Commit graph

3350 commits

Author SHA1 Message Date
Shinichiro Hamaji
d17c3a57f6 Merge "Revert "Build ijar for apps build"" 2015-11-27 03:59:18 +00:00
Shinichiro Hamaji
ea2da50e17 Revert "Build ijar for apps build"
This reverts commit 9084705744.

Change-Id: I8a9958788c51dcec5028ef396cb67abd541ce31f
2015-11-27 03:57:17 +00:00
Colin Cross
39cca23d41 Revert "Use libstdc++ for ijar"
This reverts commit 718bab6aec.

Change-Id: I9aa222fc2936d7d89ae0700eeef505c6b317d777
2015-11-26 22:20:22 +00:00
Colin Cross
718bab6aec Use libstdc++ for ijar
For some reason ijar won't build against libc++ for TARGET_BUILD_APPS
builds, but does build with libstdc++.

Change-Id: I8e900b0f764f0bb8f827705cb9173f07e4f33862
2015-11-26 14:09:50 -08:00
Colin Cross
ec4db56e58 Merge "Build ijar for apps build" 2015-11-26 17:34:50 +00:00
Shinichiro Hamaji
9084705744 Build ijar for apps build
This fixes git_master-linux-apps build.

Change-Id: I1a77b2495d98d89f570cb165d7f25f617c9af9aa
2015-11-26 17:24:40 +09:00
Shinichiro Hamaji
c9a1b27845 Merge "Use .KATI_RESTAT to reduce unnecessary rebuilds of .jar files" 2015-11-26 05:25:58 +00:00
Tao Bao
5dd9a2ce11 target_files_diff: Allow writing outputs to file.
Also clean up some pylint warnings.

Bug: 25372309
Change-Id: I226bfd72cb1310ba77352f8d367803e815e1cfa3
2015-11-24 15:23:20 -08:00
Alex Klyubin
0aaf7aa53c Merge "Clean up compiler warnings in signapk." 2015-11-24 17:30:42 +00:00
Alex Klyubin
c218d3eca3 Clean up compiler warnings in signapk.
Bug: 25794543
Change-Id: Ia7da4fbaed77af4020e5aa0b14fe5e1bd8521edb
2015-11-24 09:27:55 -08:00
Tao Bao
48550cceb0 releasetools: Fix the bug with TARGET_NO_RECOVERY.
The packaging script is broken when we set TARGET_NO_RECOVERY and
SYSTEM_ROOT_IMAGE both. With TARGET_NO_RECOVERY set, we don't have
RECOVERY/RAMDISK/etc/recovery.fstab. It thus fails the assertion in
common.LoadRecoveryFSTab() that "/" must exist in fstab when enabling
SYSTEM_ROOT_IMAGE.

Change-Id: Id509d724f18be7cf7389dd786924ead894ac0cc1
2015-11-19 17:14:21 -08:00
Shinichiro Hamaji
c1f5d9c203 Use .KATI_RESTAT to reduce unnecessary rebuilds of .jar files
The same optimization was done for binaries in

https://android-review.googlesource.com/#/c/175250/

To create a TOC file from .jar files, this change introduces
ijar, which is designed for this purpose. Only #include lines
were modified from the original version.

https://github.com/bazelbuild/bazel/tree/master/third_party/ijar

Performance:

$ m && touch
frameworks/base/core/java/com/google/android/util/Procedure.java && time
m
Before: 4m30s (1580 targets)
After: 3m57s (772 targets)

Unfortunately, the improvement is small yet, but local
experiments showed we can cut ~2 more minutes if the similar
optimization is done for .dex files.

Bug: 24597504
Change-Id: Id54953aea25e497c8ebbe783b03f13b488577c6a
2015-11-19 17:10:35 +09:00
Tao Bao
128466cea5 Merge "releasetools: Pack updatable images into IMAGES/ for A/B update." 2015-11-17 05:32:56 +00:00
Tao Bao
a0421cd1bd releasetools: Pack updatable images into IMAGES/ for A/B update.
Vendor-specific images (radio, bootloader and etc) used to stay in
RADIO/ in target_files zip. A/B updater expects them to be available
under IMAGES/. Make a copy for such images when calling
add_img_to_target_files.py.

We cannot move them directly from RADIO/ to IMAGES/, because we will
delete everything under IMAGES/ when signing for release.

Bug: 25674625
Change-Id: I977c879d0ff7e45c83b3f5c63844a5b135caa383
2015-11-16 16:42:43 -08:00
Tao Bao
79dd4b2983 Merge "build: Remove check_prereq." 2015-11-12 16:41:45 +00:00
Tao Bao
cb4abef523 build: Remove check_prereq.
check_prereq is a tool for recovery API v2, which has been obselete
since we moved to v3 in [1].

[1] commit e08991e02a7d678f2574e85289a34b2a9a537c82

Bug: 24621915
Change-Id: Ie96348fb56c5a3e029cac2417b59d8eb62dc085b
2015-11-11 21:26:29 -08:00
Dan Willemsen
5685af316e Merge "Add tool to diff two target files packages" 2015-11-12 05:16:29 +00:00
Tao Bao
6af8ef528b Merge "releasetools: Support generating verify packages." 2015-11-11 21:53:11 +00:00
Tao Bao
c1c01c6504 Merge "releasetools: Refactor ota_from_target_files.py." 2015-11-11 19:38:44 +00:00
Tao Bao
9bc6bb23b5 releasetools: Support generating verify packages.
We can generate a special OTA package that verifies all the partitions
(boot, recovery, system, vendor and etc) on a device. It also calls
device-specific script to verify bootloader and radio images. This
ensures a flashed device contains all the desired images faithfully.

Usage:
ota_from_target_files.py --gen_verify target_files.zip output.zip

Bug: 24679956
Change-Id: Ib3091d98c4b17a6fad305b3edf16d09efbda5c38
2015-11-10 12:49:33 -08:00
Dan Willemsen
8ae4984c2c Create reproducible NOTICE collections
Sort the lists of notice files instead of relying on the filesystem
ordering returned by os.walk

Bug: 23972440
Change-Id: Id32be9ce8e540244ad9d67b6fc7883fc2963fe5c
2015-11-10 12:37:23 -08:00
Tao Bao
767e3ac246 releasetools: Refactor ota_from_target_files.py.
Factor out some common lines between generating incremental and full
OTAs. Remove the outer while loop for cleaner logic.

Change-Id: I0a4d44a4a59b488748222c2031bd63f67d45e0b5
2015-11-10 12:23:10 -08:00
Dan Willemsen
9956862b4b Add tool to diff two target files packages
This tool will help identify unexpected differences between two target
files packages. Expected changes (build number / date) are hidden, along
with known bugs.

It ignores anything that is just packaging for other files that are
already being diffed, like the recovery patching, and all of IMAGES/*

Bug 25372309

Change-Id: I4641754dd5dfbdfd3a89d8fa5262b9a9595e8e9c
2015-11-06 18:42:57 -08:00
Dan Willemsen
41bc424c32 Use explicitly sized types in zipalign/ziptime
getLongLE would return a 64-bit number with the upper 32-bits set when
decoding a 32-bit number with the top bit set. Per the zip file format,
it was only expected to return a 32-bit number. Use explicitly sized
types so that we use the proper sizes and don't do any implicit
extensions.

Change-Id: I5a4304dc99ce5f8f17284d4ca3094ae115207a1e
2015-11-04 23:52:52 +00:00
Clay Murphy
e47d8b99a2 Merge "Docs: Add Security tab to top" 2015-11-03 23:45:56 +00:00
Dan Willemsen
a0975edc16 Merge "Remove changing uids/timestamps from zip/jar files" 2015-11-03 21:38:45 +00:00
Dan Willemsen
48a621c277 Remove changing uids/timestamps from zip/jar files
Pass -X to zip so that Unix UID/GID and extra timestamps aren't
saved into the zip files.

Add a new tool, ziptime, that uses a very stripped down copy of
zipalign. It no longer depends on libandroidfw, and now rewrites the
timestamps in place instead of making a copy of the zipfile. This should
improve speed and reduce disk requirements, especially with the large
packaging zip files.

Bug: 24201956
Change-Id: I50f68669f659da1b4393e964ad40b6aafb00c1e7
2015-11-02 14:51:54 -08:00
Clay Murphy
2a0522b277 Docs: Add Security tab to top
Bug: 24908502
Change-Id: If3331bc4ba84a8694bc30cfa81d9dc080e93fa09
2015-10-29 15:19:06 -07:00
Dan Willemsen
d8d06da814 Merge "Revert "Remove changing uids/timestamps from zip/jar files""
am: 49d8c5196e

* commit '49d8c5196eb690fc987673c27cb61087c5886be4':
  Revert "Remove changing uids/timestamps from zip/jar files"
2015-10-29 21:33:39 +00:00
Dan Willemsen
b589ae4e26 Revert "Remove changing uids/timestamps from zip/jar files"
This reverts commit 3c2c064c87.

zipalign depends on libandroidfw, and some setups don't include frameworks/base.

Bug: 24201956
Change-Id: I48ee95808924f6b2221f0a49ab205c2565096b1f
2015-10-29 21:26:18 +00:00
Dan Willemsen
a51b1d532e Merge "Remove changing uids/timestamps from zip/jar files"
am: 9f25219371

* commit '9f252193714c82dbce702e8055ffaa7eec4afe66':
  Remove changing uids/timestamps from zip/jar files
2015-10-29 19:12:37 +00:00
Dan Willemsen
3c2c064c87 Remove changing uids/timestamps from zip/jar files
Pass -X to zip so that Unix UID/GID and extra timestamps aren't
saved into the zip files.

Add a new option to zipalign, -t, to replace all timestamps with static
timestamps (2008 Jan 1 00:00:00). Use this for all non-APK zip files.
APK zip timestamps are set based on the certificate date in SignApk.

Bug: 24201956
Change-Id: Ifb619fc499ba9d99fc624f2acd5f8de36d78ef8e
2015-10-29 11:57:16 -07:00
Tao Bao
e5eb4567d4 Merge "Honor TARGET_NO_RECOVERY flag."
am: c448e91c3d

* commit 'c448e91c3d3d095f8f200c9925f7db2ad525132f':
  Honor TARGET_NO_RECOVERY flag.
2015-10-29 16:45:31 +00:00
Sami Tolvanen
a25cced65f Merge "Error correction: Use block_image_recover in block OTAs"
am: fe4e86c7fd

* commit 'fe4e86c7fd1b9c8903fda194b8515451c477ced9':
  Error correction: Use block_image_recover in block OTAs
2015-10-29 16:45:14 +00:00
Tao Bao
c448e91c3d Merge "Honor TARGET_NO_RECOVERY flag." 2015-10-29 16:13:52 +00:00
Sami Tolvanen
f0a7c76b45 Error correction: Use block_image_recover in block OTAs
If block_image_verify fails, attempt to recover using FEC before giving up.

Bug: 21893453
Change-Id: Ibc1fe5d28b2a8099d2b5094277b572ec08229c3a
2015-10-29 11:39:31 +00:00
Ying Wang
3482ea54a2 Merge "Normalize the product makefile path in inherit-product."
am: aabff90bfe

* commit 'aabff90bfe2312a95d3cf57564845fef8dc469a2':
  Normalize the product makefile path in inherit-product.
2015-10-28 23:55:10 +00:00
Ying Wang
a174261042 Normalize the product makefile path in inherit-product.
Some vendor product makefiles call $(inherit-product) on the same
product makefile with different paths, by using "../" in relative paths.
However inherit-product requires unique path as ID for a product
makefile, for bookkeeping purpose.
Normalize the product makefile path in inherit-product, if the path
contains "../".

Change-Id: I1a864ce120c713d8e79ec179213b9fc9352aba53
2015-10-28 15:20:41 -07:00
Tao Bao
db45efa647 Honor TARGET_NO_RECOVERY flag.
Don't generate recovery.img when calling 'make dist' if
TARGET_NO_RECOVERY is set. The build system passes the flag to the
packaging script which then generates recovery.img conditionally.

Bug: 25329471
Change-Id: Ifbc999300d5c31e897878f81e231ae7dd2aca660
2015-10-27 20:00:10 -07:00
Ying Wang
471d347b89 Merge "Normalize java source file paths before running "sort -u"."
am: 0d4dad46f4

* commit '0d4dad46f44d6f4a498a1a8205a4b26ae2e55ac5':
  Normalize java source file paths before running "sort -u".
2015-10-23 20:24:52 +00:00
Ying Wang
4d68879ca6 Normalize java source file paths before running "sort -u".
We rely on "sort -u" to dedupe aidl/logtags generated java files added
by both from $(all_java_sources) and from "find
$(PRIVATE_SOURCE_INTERMEDIATES_DIR) -name '*.java".
But "sort -u" doesn't work if any of the aidl/logtags source file path
has "../" in it.
This change fixes this issue by normalizing the source file paths before
passing them to "sort -u".

Change-Id: I12d2c4e0397bed9f426a1ed9b13608d72d01e0df
2015-10-23 13:19:47 -07:00
Tao Bao
ada3927e53 Merge "Bump up the BBOTA version to 4."
am: ac4ec1a4ea

* commit 'ac4ec1a4ea83a150e08ccd43f30fe34de52cdebf':
  Bump up the BBOTA version to 4.
2015-10-23 18:45:35 +00:00
Tao Bao
eba409c4da Bump up the BBOTA version to 4.
To accommodate new changes (such as error correction in [1]) to BBOTA
in N release. We bump up the version to keep the OTA script backward
compatible.

Needs the matching CL in commit
1fdec8685af858c5ff4f45d2e3059186ab5ed2ab.

[1]: commit 0a7b47397db3648afe6f3aeb2abb175934c2cbca

Change-Id: Ib9158b455cd5905fe2d4742ce81feb1b7583054f
2015-10-23 10:45:36 -07:00
Tao Bao
8287572f7f Merge "Fix calculation of stashed blocks."
am: db08d835d0

* commit 'db08d835d0d071b27fc6fcf14e0cf261a5f18f68':
  Fix calculation of stashed blocks.
2015-10-22 19:11:12 +00:00
Tao Bao
db08d835d0 Merge "Fix calculation of stashed blocks." 2015-10-22 18:57:42 +00:00
Tao Bao
954024649e Merge "blockimgdiff.py: Fix the script error for BBOTA v1."
am: bcb9240a2b

* commit 'bcb9240a2b168c711e4a9543e9d34f9c58a6f0c2':
  blockimgdiff.py: Fix the script error for BBOTA v1.
2015-10-22 18:12:56 +00:00
caozhiyuan
21b37d83eb Fix calculation of stashed blocks.
Change-Id: Ic3d607cb6691fc58e189a54a7244942cf3f3c387
Signed-off-by: caozhiyuan <cao.zhiyuan@zte.com.cn>
2015-10-22 09:57:10 +08:00
Tao Bao
4fcb77e4e3 blockimgdiff.py: Fix the script error for BBOTA v1.
CL in [1] added an assertion to make sure an empty RangeSet cannot call
RangeSet.to_raw_string(). However, we may unintentionally hit that when
generating BBOTA v1 script (e.g. for "new" commands that always have
empty src_ranges).

[1] commit e8f756137c

Change-Id: I1723606967f354ace9286d2b888fdbc80ba10e39
2015-10-21 17:03:18 -07:00
Colin Cross
8b63d67e1b Merge changes I2ba90314,I5f47307d
am: fc8b331858

* commit 'fc8b331858747f8207e3861c0ada2c4fd359f648':
  makeparallel: prepend flags to ninja command line
  Put NINJA_ARGS last
2015-10-21 00:21:52 +00:00
Colin Cross
466ea35202 makeparallel: prepend flags to ninja command line
Ninja stops parsing top level options after -t is used to select a
tool.  Put any inserted command line options at the beginning of the
command.

Change-Id: I2ba903143366aaded63e21d749476248617c8962
2015-10-20 17:05:49 -07:00