Commit Graph

5020 Commits

Author SHA1 Message Date
William Roberts af51373e7d fs_config: drop fs_config_files/dirs PRODUCT_PACKAGES requirement am: 7fe8b6d817 am: ee9af6edfb am: 0101f107c1
am: 718be50fc5

Change-Id: Ia5b7259ad39b5c68ceece65d2f8aa439b37e3957
2016-12-10 00:46:23 +00:00
William Roberts 5577be3f61 fs_config: introduce group generator am: 1c4721c3c5 am: 3315954861 am: 6b50e15947
am: 93bf4c147b

Change-Id: I0f89abce25e07b38d368ad3c1684ff6a86ee6669
2016-12-10 00:46:10 +00:00
William Roberts f376729542 fs_config: introduce passwd generator am: 316f9462af am: 62d75469b1 am: 13be8e4305
am: 55e33be098

Change-Id: I47becfb9904fbc22c6b926bf2dd7271c87204f4d
2016-12-10 00:45:54 +00:00
William Roberts ad90c9ba94 fs_config: generate friendly in AID class am: 8f42ce71ac am: 092fa031cd am: aa200330c5
am: 66589ea73b

Change-Id: I7834237dd926e4fbd3e862000de159511fea43ea
2016-12-10 00:45:46 +00:00
William Roberts 469519b656 fs_config: limit characters for AID_<name> sections am: 5f059a7691 am: 7fcf246c3b am: 10db3e3cb9
am: dc4190d78e

Change-Id: Id2d84fad6e70be0e4e97c433a2f42ee597316005
2016-12-10 00:45:38 +00:00
William Roberts 4069fbbec8 fs_config: generate oem AID header file am: cfc51f5347 am: 9652abfeb4 am: 64ab591155
am: dca25c1733

Change-Id: I5f9db1c1023b168554e40fb0b863f027945b0f60
2016-12-10 00:45:31 +00:00
William Roberts 1e02a6ec60 fs_config: android_id header generator am: d7104bca65 am: 04fdcc9edf am: 343bee6044
am: 3c0ea33152

Change-Id: I1abe84234579e95edf380750da221fd88da2892f
2016-12-10 00:45:24 +00:00
William Roberts 25bacda5da fs_config: support parsing android_filesystem_config.h am: 64edf5bb97 am: ca3dbe4ab8 am: 5302f1815c
am: d1eeee812a

Change-Id: I4d3c17fc2d09bd1d2ad5f39c56617e94fe024197
2016-12-10 00:45:18 +00:00
William Roberts 3210677b40 fs_config: modularize fs_config_generator am: 11c29283ec am: ce24636551 am: 6ebc4026a7
am: 9102172f30

Change-Id: I06f6deaa8349c2a288bb9224cabdffaffa89c14f
2016-12-10 00:45:10 +00:00
William Roberts bd19c0cd23 fs_config: add unit tests
am: 92ec0ab5e8

Change-Id: I7afc692257d31a09cd1bdcab2ed6d8835e56fa51
2016-12-10 00:21:34 +00:00
William Roberts ee9af6edfb fs_config: drop fs_config_files/dirs PRODUCT_PACKAGES requirement
am: 7fe8b6d817

Change-Id: Ie209bc0f1696ffdc5f167d229fc9f5378f8feb24
2016-12-10 00:21:28 +00:00
William Roberts 3315954861 fs_config: introduce group generator
am: 1c4721c3c5

Change-Id: I2eccb5f0d39a3740f540b683fb332df405728c4f
2016-12-10 00:21:17 +00:00
William Roberts 62d75469b1 fs_config: introduce passwd generator
am: 316f9462af

Change-Id: I9c4c7b5fb1c384b97bf2be09a1d4d683c56c662d
2016-12-10 00:21:07 +00:00
William Roberts 092fa031cd fs_config: generate friendly in AID class
am: 8f42ce71ac

Change-Id: I958aa6152a2b42bb7a82fe1e909fc911a08b2f36
2016-12-10 00:21:02 +00:00
William Roberts 7fcf246c3b fs_config: limit characters for AID_<name> sections
am: 5f059a7691

Change-Id: Ie5be98d61bc5920dbe2055f0432b94a3b1c07110
2016-12-10 00:20:57 +00:00
William Roberts 9652abfeb4 fs_config: generate oem AID header file
am: cfc51f5347

Change-Id: I540683cf1b648ec7445ab204c2bf9ccaf396943e
2016-12-10 00:20:51 +00:00
William Roberts 04fdcc9edf fs_config: android_id header generator
am: d7104bca65

Change-Id: I96a721690d4e145aa859c5c23e3e892e9ce983c9
2016-12-10 00:20:46 +00:00
William Roberts ca3dbe4ab8 fs_config: support parsing android_filesystem_config.h
am: 64edf5bb97

Change-Id: I95702e7e4ccefc9cb5c71710a8e8f2d5b3fbff80
2016-12-10 00:20:41 +00:00
William Roberts ce24636551 fs_config: modularize fs_config_generator
am: 11c29283ec

Change-Id: I3383ea79aded814c16d53bc18b36c27810f26163
2016-12-10 00:20:35 +00:00
Elliott Hughes 1b2de51881 Merge changes from topic 'fsconfig-2'
* changes:
  fs_config: add unit tests
  fs_config: drop fs_config_files/dirs PRODUCT_PACKAGES requirement
  fs_config: add group to build
  fs_config: introduce group generator
  fs_config: add passwd to build
  fs_config: introduce passwd generator
  fs_config: generate friendly in AID class
  fs_config: limit characters for AID_<name> sections
  fs_config: generate oem AID header file
  fs_config: android_id header generator
  fs_config: support parsing android_filesystem_config.h
  fs_config: modularize fs_config_generator
2016-12-10 00:13:05 +00:00
Patrick Tjin a1900841bb build_image: add support for specifying number of inodes
Add support for specifying number of inodes when creating
system, vendor, oem partitions.  These are all read-only
and have no use for extra inodes.  Removing extra inodes
saves a lot of space.

Bug: 32246383
Change-Id: I13f1d4614b64a4abc752c42a1c65d3d151481c21
(cherry picked from commit b59eca3586)
2016-12-06 21:07:23 -08:00
Adrien Schildknecht 0ef3d323d5 Manually merge commit 'c13da91' into stage-aosp-master am: ada51f3b8f am: 13f3b5337a
am: f147e615ca

Change-Id: I8ef3e288ab4247d13fc655dc91f028e5ed5dadae
2016-12-03 04:19:54 +00:00
The Android Automerger ada51f3b8f Manually merge commit 'c13da91' into stage-aosp-master
* commit 'c13da91':
  Add support for creating ext4 images with mke2fs

BUG:33304034
2016-12-03 04:02:09 +00:00
Treehugger Robot c13da91023 Merge "Add support for creating ext4 images with mke2fs" 2016-12-02 22:48:23 +00:00
Tao Bao 3014c885b2 Build recovery-two-step.img for two-step OTAs. am: 47ec5ab561
am: eb9de30596

Change-Id: Idd4b559d9d5f16b6e401ec6177036be1be9cb0d6
2016-12-02 16:53:04 +00:00
Tao Bao eb9de30596 Build recovery-two-step.img for two-step OTAs.
am: 47ec5ab561

Change-Id: I5288993e010fca9abab66a6aece45a48d1844d43
2016-12-02 16:46:33 +00:00
Tao Bao 44150fa69d Merge "Build recovery-two-step.img for two-step OTAs." am: 06e14e438f am: d07f9995b8 am: c180a06b20
am: 8d290959b5

Change-Id: Ic8bd67da5d018130a730037cdf5f97175d60a7f1
2016-12-02 15:41:02 +00:00
Tao Bao d07f9995b8 Merge "Build recovery-two-step.img for two-step OTAs."
am: 06e14e438f

Change-Id: I9c5d6e5f71da88bc0f662373335b024a55ca193e
2016-12-02 15:19:00 +00:00
Tao Bao 47ec5ab561 Build recovery-two-step.img for two-step OTAs.
In two-step OTAs, we write recovery image to /boot as the first step so
that we can reboot from there and install a new recovery image to
/recovery. However, bootloader will show "Your device is corrupt"
message when booting /boot with the recovery image. Because the recovery
image encodes the path of "/recovery" as part of the signature metadata,
which fails the verified boot.

This CL generates a special "recovery-two-step.img" in addition to the
regular recovery.img. This image encodes "/boot" when being signed,
which will be flashed to /boot at stage 1/3 in a two-step OTA.

Here are the desired changes:

- 'IMAGES/recovery-two-step.img' exists in target_files.zip for non-A/B
targets (e.g. bullhead). The image should not exist for targets that
don't have a recovery partition (e.g. A/B devices like sailfish).

- <device>-img.zip should not contain 'recovery-two-step.img'.

- Nothing should change when building non-two-step OTAs. For two-step
OTAs, 'recovery-two-step.img' should be included in the OTA package;
'updater-script' should flash this image to /boot at stage 1/3.

- When building a two-step OTA with an input TF.zip that doesn't have
  IMAGES/recovery-two-step.img, it should use the existing
  IMAGES/recovery.img instead.

Bug: 32986477
Test: Tested the steps above on bullhead and sailfish.
Change-Id: I34e6c599bcf2011d4cd5c926999418b3975d6d0f
(cherry picked from commit d42e97ebb4)
2016-12-01 17:55:44 -08:00
Tao Bao d42e97ebb4 Build recovery-two-step.img for two-step OTAs.
In two-step OTAs, we write recovery image to /boot as the first step so
that we can reboot from there and install a new recovery image to
/recovery. However, bootloader will show "Your device is corrupt"
message when booting /boot with the recovery image. Because the recovery
image encodes the path of "/recovery" as part of the signature metadata,
which fails the verified boot.

This CL generates a special "recovery-two-step.img" in addition to the
regular recovery.img. This image encodes "/boot" when being signed,
which will be flashed to /boot at stage 1/3 in a two-step OTA.

Here are the desired changes:

- 'IMAGES/recovery-two-step.img' exists in target_files.zip for non-A/B
targets (e.g. bullhead). The image should not exist for targets that
don't have a recovery partition (e.g. A/B devices like sailfish).

- <device>-img.zip should not contain 'recovery-two-step.img'.

- Nothing should change when building non-two-step OTAs. For two-step
OTAs, 'recovery-two-step.img' should be included in the OTA package;
'updater-script' should flash this image to /boot at stage 1/3.

- When building a two-step OTA with an input TF.zip that doesn't have
  IMAGES/recovery-two-step.img, it should use the existing
  IMAGES/recovery.img instead.

Bug: 32986477
Test: Tested the steps above on bullhead and sailfish.
Change-Id: I34e6c599bcf2011d4cd5c926999418b3975d6d0f
2016-12-01 17:47:59 -08:00
Tao Bao aeb0ee4d6d Merge "releasetools: Remove dead parameter in GetBootableImage()." am: 8df4fea85f am: 2e3f1c5258 am: dfff1ac065
am: 59da2ee4aa

Change-Id: I9f150af5698c6dcab7d7f059f009f0fca15455c0
2016-12-01 17:25:39 +00:00
Tao Bao 2e3f1c5258 Merge "releasetools: Remove dead parameter in GetBootableImage()."
am: 8df4fea85f

Change-Id: I192af3927849d0d8f995f0002b8b8f2e191b794f
2016-12-01 17:09:07 +00:00
Tao Bao 2a4336bc04 releasetools: Remove dead parameter in GetBootableImage().
The 'system_img_path' parameter was introduced in commit
d995f4b04d, but became obsolete since
commit 2ce63edab7.

Test: m dist
Change-Id: Iffd496d929db5cc3dfc955a48bfc1b1317bd012f
2016-12-01 00:08:27 -08:00
William Roberts 92ec0ab5e8 fs_config: add unit tests
Add some initial unit tests.

The unit tests themselves are inlined into the tool and
can be executed by running the "test" commandlet.

Example:
$ python -m unittest test_fs_config_generator.Tests
.............
----------------------------------------------------------------------
Ran 13 tests in 0.004s

OK

Test: run the test commandlet and observe for failures.

Change-Id: I1bada385fa841fd50fa958997d440f1198e15198
Signed-off-by: William Roberts <william.c.roberts@intel.com>
2016-11-29 22:05:39 -08:00
William Roberts 7fe8b6d817 fs_config: drop fs_config_files/dirs PRODUCT_PACKAGES requirement
When configuring fs_config_files or fs_config_dirs for file_system
capabilities, drop the requirement that OEMs must add the target
to PRODUCT_PACKAGES. This limits the configuration requirement
to only needing to set the new and preferred TARGET_FS_CONFIG_GEN
or the older TARGET_ANDROID_FILESYSTEM_CONFIG_H method.

Test: That only setting TARGET_FS_CONFIG_GEN results in passwd and
group in the build image.
Change-Id: I818854fa1b3e94edaff59a32bd7cf23cf9b504aa
Signed-off-by: William Roberts <william.c.roberts@intel.com>
2016-11-29 16:21:17 -08:00
William Roberts 1c4721c3c5 fs_config: introduce group generator
Introduce a generator that outputs group files per man(5) group.

Succinctly, the output is a colon delimited string containing the following
fields:
  * group name
  * encrypted password (optional)
  * gid (int)
  * userlist (str,...)

Multiple colon delimited lines may exist, but will not be separated
across lines.

Sample generator output:
foo::2900:
foo_bar::2901:
custom_oem1::2902:

Test: That make group produces the group file.
Change-Id: Idd3fe925a09a227c6e894e1b5d2b3873b01531c6
Signed-off-by: William Roberts <william.c.roberts@intel.com>
2016-11-29 16:21:17 -08:00
William Roberts 316f9462af fs_config: introduce passwd generator
Introduce a generator that outputs passwd files per man(5) passwd.

Succinctly, the output is a colon delimited string containing the following
fields:

  * login name
  * encrypted password (optional)
  * uid (int)
  * gid (int)
  * User name or comment field
  * home directory
  * interpreter (optional)

Multiple colon delimited lines may exist, but will not be separated
across lines.

When run, produces:

foo::2900:2900::/:/system/bin/sh
foo_bar::2901:2901::/:/system/bin/sh
custom_oem1::2902:2902::/:/system/bin/sh

Note that this generator allows for 0 or more config.fs files. This allows for:
  * Unconditional inclusion of /system/etc/passwd in the generated image
  * A blank passwd file if no config.fs files are specified.

This ensures that when OEMs add config.fs files, there is no additional steps
for proper functionality (simpler for OEMs).

The one draw back is the additional inode consumption on system for a possible
blank file.

Test: That it produces a valid passwd file.
Change-Id: I19691c8260f02147ed861f8a319aeab3f5b1738e
Signed-off-by: William Roberts <william.c.roberts@intel.com>
2016-11-29 16:21:17 -08:00
William Roberts 8f42ce71ac fs_config: generate friendly in AID class
Generate the friendly name in one location. This prepares
the tool for generatting passwd and group files.

Also support mapping friendly names to identifiers.

Test: That output files stay the same as before.
Change-Id: I12198611126613eae81ca61614ed269c2439b72b
Signed-off-by: William Roberts <william.c.roberts@intel.com>
2016-11-29 16:21:17 -08:00
William Roberts 5f059a7691 fs_config: limit characters for AID_<name> sections
When generating files restrict the characters allowed in
AID_<name> to upercase, numbers, and underscores.

This detects errors ahead of time for generated C files as
well as handles seperation characters for passwd/group files.

This also lends itself to automatic detection of collisions
on friendly names, since freindly names are the lowercase
version of <name>.

Test: That invalid aid values result in a build failure.
Test: That the output files are consistent with ones before
this change (hash and diff checks)
Change-Id: Ie8ec44c1157ba9c22100e9169d9187f615e71280
Signed-off-by: William Roberts <william.c.roberts@intel.com>
2016-11-29 16:21:17 -08:00
William Roberts cfc51f5347 fs_config: generate oem AID header file
Generate an OEM AID_<name> header file seperate from fs_config
header file and provide details on how to export this interface
into native code.

Test: That ls, ps, chown and services function for built in
services as before.
Change-Id: Ie8ce6585e0721b52633ee50d62dcfe796e178f65
Signed-off-by: William Roberts <william.c.roberts@intel.com>
2016-11-29 16:21:17 -08:00
William Roberts d7104bca65 fs_config: android_id header generator
Implement an android_id generator that takes the data
acquired from parsing private/android_filesystem_config.h
and generates the android_id friendly name to uid mapping
for consumption in Bionic.

Test: That ls, ps, mkdir, chown, chgrp and services for built
in names work.
Change-Id: I1e55a401be0fca0ad162f8dc1e072e6afde7b927
Signed-off-by: William Roberts <william.c.roberts@intel.com>
2016-11-29 16:21:17 -08:00
William Roberts 64edf5bb97 fs_config: support parsing android_filesystem_config.h
Rather than hardcode the OEM ranges, parse and extract
AID values from android_filesystem_config.h.

An AID is defined to the tool as:
  * #define AID_<name>

An OEM Range is defined to the the tool as:
  * AID_OEM_RESERVED_START
  * AID_OEM_RESERVED_END
  or
  * AID_OEM_RESERVED_N_START
  * AID_OEM_RESERVED_N_END

Where N is a number.

While parsing, perform sanity checks such as:
1. AIDs defined in the header cannot be within OEM range
2. OEM Ranges must be valid:
   * Cannot overlap one another.
   * Range START must be less than range END
3. Like the C preproccessor, multiple matching AID_<name> throws
   en error.

The parser introduced here, prepares the tool to output android_ids
consumable for bionic.

Note that some AID_* friendly names were not consistent, thus a small
fixup map had to be placed inside the tool.

Test: tested parsing and dumping the data from android_filesystem_config.h
file.
Change-Id: Ifa4d1c9565d061b60542296fe33c8eba31649e62
Signed-off-by: William Roberts <william.c.roberts@intel.com>
2016-11-29 16:21:17 -08:00
William Roberts 11c29283ec fs_config: modularize fs_config_generator
This internally structures fs_config_generator.py to be able
to plug in generators to produce different outputs. This
prepares this tool for group and pwd file outputs.

Test: Checked diff and hash of before and after files.
Change-Id: Ie558518ac227dd946d70ab48027698b72a9bc94a
Signed-off-by: William Roberts <william.c.roberts@intel.com>
2016-11-29 16:21:17 -08:00
Ian Rogers 05a8a492d8 Merge "Update warn.py for new Error Prone diagnostics" am: 7ed3af23a8 am: 1eef968704 am: 0be9b84218
am: 7efc8c7b35

Change-Id: Idb3b3ff93c330dd1aa704a49a126dc5badd35ec9
2016-11-22 18:58:52 +00:00
Ian Rogers 1eef968704 Merge "Update warn.py for new Error Prone diagnostics"
am: 7ed3af23a8

Change-Id: Iae1dec6c0b48be23d874c01b9d87627bbf0c0caf
2016-11-22 18:50:21 +00:00
Nick Glorioso 8a7b25c736 Update warn.py for new Error Prone diagnostics
Test: Local build, tee'd to file, ran warn.py and checked output HTML
Change-Id: Iee3386e88c73e4b8e0a1fcc60105ee5fb86e3cb0
2016-11-22 10:35:07 -08:00
Sami Tolvanen 628e032773 DO NOT MERGE: build_image: add padding to match partition size
am: 9a675c94d3

Change-Id: I6cc9b531eb3494146355c7cc50e7e4cb0bf4a6b4
2016-11-20 06:26:56 +00:00
Zheng Zhang 28b96d1470 Merge "DO NOT MERGE: build_image: add padding to match partition size" into cw-f-dev 2016-11-20 06:22:17 +00:00
Adrien Schildknecht 9a072cc0b0 Add support for creating ext4 images with mke2fs
We are investigating replacing make_ext4fs with the upstream tool mke2fs.
To mitigate the trouble that may arise if the new tool behave differently
compared to the old one, there will be a transition period.

Devices that want to use the new way of creating ext4 images can set the
variable "TARGET_USES_MKE2FS" to true in their BoardConfig.mk
By default, the build system will choose the old tool 'make_ext4fs'.

Test: m otapackage with TARGET_USES_MKE2FS={,false,true}
Change-Id: I282bcb9efe335a86c53986283090ca947d65c7f8
2016-11-18 17:06:29 -08:00
William Roberts cb4d9940dd Merge "fs_config: move sort to be consistent with other sort" am: 052a01958c am: c06559eb7b am: 15e654392a
am: 084d5b9678

Change-Id: Icbcb7ad0e36d45cedd90630367f987fce5a39a42
2016-11-18 01:22:51 +00:00
William Roberts c06559eb7b Merge "fs_config: move sort to be consistent with other sort"
am: 052a01958c

Change-Id: If18ab459d74e20f96db56d80ecdbf94580583463
2016-11-18 00:57:15 +00:00
Treehugger Robot 052a01958c Merge "fs_config: move sort to be consistent with other sort" 2016-11-18 00:29:53 +00:00
William Roberts 94bcccf4d0 Merge "fs_config: correct README" am: 4baaf905ee am: 2088e57ed8 am: 8dfc55363e
am: 5ba5f1f8c6

Change-Id: I77370837e71da7730c1bb9448f157f445ec87de2
2016-11-18 00:28:32 +00:00
William Roberts 2088e57ed8 Merge "fs_config: correct README"
am: 4baaf905ee

Change-Id: I1a3fa8a296608205a29efb94c32fbfd14d4844f2
2016-11-17 23:42:52 +00:00
William Roberts 8cb6a1893e fs_config: move sort to be consistent with other sort
Test: Checked diff and hash of before and after output files, same.
Test: Tested build for basic boot and functionality.
Change-Id: If7806427e3a2a9ddb7a2c9aa14e1e4f9bf696acf
Signed-off-by: William Roberts <william.c.roberts@intel.com>
2016-11-17 14:18:38 -08:00
William Roberts db616f0091 fs_config: correct README
Testing on earlier versions of Python indicated an error in the
README. Python's ConfigParser prior to version 3.2 allows for
sections within the same file to override later sections.
Correct the README.

Test: Checked diff and hash of output file from before and after.
Change-Id: Ifd3f78414b4803e4b74decb1fdf6816d4902c4a2
Signed-off-by: William Roberts <william.c.roberts@intel.com>
2016-11-17 13:10:55 -08:00
Tao Bao 02dd0ab453 releasetools: Use java_path in sign_target_files_apks.py. am: cd4f7c96c0 am: 6414a94c50 am: 4722fc1734
am: e6a27e7e69

Change-Id: I3695dab4d258a3a97163248021f5e65caa0b5527
2016-11-16 20:21:51 +00:00
Tao Bao e6a27e7e69 releasetools: Use java_path in sign_target_files_apks.py. am: cd4f7c96c0 am: 6414a94c50
am: 4722fc1734

Change-Id: Ia393a720694b21eb9ebcda0361630605e792470f
2016-11-16 20:14:20 +00:00
Tao Bao 4722fc1734 releasetools: Use java_path in sign_target_files_apks.py. am: cd4f7c96c0
am: 6414a94c50

Change-Id: I6cf1cd53ca96b30df9a2621c12cbcbe05f99297c
2016-11-16 20:07:20 +00:00
Tao Bao 6414a94c50 releasetools: Use java_path in sign_target_files_apks.py.
am: cd4f7c96c0

Change-Id: I21cf5519a51e9a9ebb86c98ef9a50e2d7e86b9e5
2016-11-16 19:59:19 +00:00
Chih-hung Hsieh d0f47c11e7 Merge "Separate parallel_classify_warnings out of parse_input_file." am: e4fb495b09 am: 70bbbdfdb1 am: dec1367ad3
am: a1a48bcfc2

Change-Id: Id9521f775af537d4ae02479b77d4248017c74314
2016-11-15 22:57:04 +00:00
Chih-hung Hsieh 70bbbdfdb1 Merge "Separate parallel_classify_warnings out of parse_input_file."
am: e4fb495b09

Change-Id: I5353f10ea0d78d8d9cd4539e4095b9c0ff010520
2016-11-15 22:34:03 +00:00
Pat Tjin 9cd8b12f7c Merge "build_image: add support for specifying number of inodes" 2016-11-14 16:42:52 +00:00
Sami Tolvanen 9a675c94d3 DO NOT MERGE: build_image: add padding to match partition size
For some partition sizes, we currently build an image that's 1-2
blocks smaller than the actual partition, which causes fs_mgr to
not find metadata. This change adds padding to FEC metadata that
correctly positions the metadata header at the end.

Bug: 28865197
Bug: 32789520
Change-Id: Ie0e044715a9c5ae8ba395e7d2ff9fbd7cffc0b4c
(cherrypicked from commit 433905f50e)
2016-11-10 18:18:09 +00:00
Chih-Hung Hsieh 76d0065ef8 Separate parallel_classify_warnings out of parse_input_file.
* Allow other callers of this module to:
  * pass any input stream to parse_input_file,
  * pass any warning_lines to parallel_classify_warnings,
  * call dump_csv or dump_html to get output.
* No output change.
* Capture and ignore signal.SIGTERM at the end,
  to avoid bad warning/error messages from the exit clean-up process.

Test: run warn.py build.log.
Change-Id: I1414797a536c0ee622e2a34c226578621be1ddab
2016-11-09 18:19:05 -08:00
Tao Bao cd4f7c96c0 releasetools: Use java_path in sign_target_files_apks.py.
Prior to this CL, it was calling the hard-coded "java" although it was
accepting a "--java_path" option.

Also switch OPTIONS.java_args from string to list. Otherwise it won't
work when providing multiple args.

Bug: 32737832
Test: Specify "--java_path=" and "--java_args" when invoking
      sign_target_files_apks.py with "-v". Check the commands being
      called.
Change-Id: Id7ef98e778646d532027434de7fba9b7a104dbd0

(cherry picked from commit e95540e060)
2016-11-09 17:05:28 -08:00
Clay Murphy 4ca20fc658 Merge "Creates a css nowrap class for non-breaking elements in source.android.com Test: build2stage 36" am: 98f15a70e9 am: 731df4f4f3 am: 74ea495250
am: ae9ee888d6

Change-Id: I488e1b12a0538922b597b9e082e76922d20f3cce
2016-11-09 21:48:00 +00:00
Clay Murphy 731df4f4f3 Merge "Creates a css nowrap class for non-breaking elements in source.android.com Test: build2stage 36"
am: 98f15a70e9

Change-Id: I19f35481e688b205790e4f2d817932422b72b93f
2016-11-09 21:29:57 +00:00
Billy Lamberta 4d41e26a54 Creates a css nowrap class for non-breaking elements
in source.android.com
Test: build2stage 36

Change-Id: I467cc66d5e205b00ed188180140b1ae972e2ebad
2016-11-09 21:17:41 +00:00
Tao Bao 4f9bef7af5 Merge "releasetools: Use java_path in sign_target_files_apks.py." am: 4a71d500c1 am: dc04f93e39 am: 36f0b8daeb
am: 14b69f4ff5

Change-Id: I59ba285fef79bf6562b020a46f10710c9870a52a
2016-11-08 23:58:58 +00:00
Tao Bao dc04f93e39 Merge "releasetools: Use java_path in sign_target_files_apks.py."
am: 4a71d500c1

Change-Id: I61400574ac3f7d29906ca571f497554631ecd72d
2016-11-08 23:42:26 +00:00
Tao Bao e95540e060 releasetools: Use java_path in sign_target_files_apks.py.
Prior to this CL, it was calling the hard-coded "java" although it was
accepting a "--java_path" option.

Also switch OPTIONS.java_args from string to list. Otherwise it won't
work when providing multiple args.

Bug: 32737832
Test: Specify "--java_path=" and "--java_args" when invoking
      sign_target_files_apks.py with "-v". Check the commands being
      called.
Change-Id: Id7ef98e778646d532027434de7fba9b7a104dbd0
2016-11-08 12:48:43 -08:00
Tao Bao b4cd33fac9 releasetools: Make BBOTA incremental generation repeatable.
set() doesn't keep elements according to the order of insertion. So
Transfers managed with set() in intermediate steps may not appear in the
same order across runs. This leads to slightly different output packages
when generating the same incremental OTA.

This CL fixes the issue by replacing set() with OrderedDict() in
blockimgdiff.GenerateDigraph() and blockimgdiff.FindVertexSequence().

It also adds a testcase that ensures blockimgdiff.GenerateDigraph()
preserves the insertion order for Transfer.goes_after set.

Bug: 32220816
Test: ota_from_target_files.py gives identical package when running
multiple times.

Change-Id: I56d551e5ca926993ab46896e33c80e0ce42e506a
(cherry picked from commit 3348228423)
2016-11-06 00:37:29 -07:00
Tao Bao f7b7e69d92 Merge "releasetools: compare size between compressed and patch while build otapackage" am: 49758959f2 am: 9242e1f750 am: aa4d046bb5
am: c9b8d96c5a

Change-Id: I0a143e1a7dabc732e9e18d2a7af9eb864eb7fc79
2016-11-05 00:24:27 +00:00
Tao Bao 9242e1f750 Merge "releasetools: compare size between compressed and patch while build otapackage"
am: 49758959f2

Change-Id: I17b988878cc7ffdfbe490f404c9cd5ab996a8c5f
2016-11-05 00:13:55 +00:00
Tao Bao 49758959f2 Merge "releasetools: compare size between compressed and patch while build otapackage" 2016-11-05 00:09:35 +00:00
Tao Bao a45d083b14 Merge "releasetools: Make BBOTA incremental generation repeatable." am: b9bd78d110 am: e3554167e2 am: 91445e5886
am: cdb29d139c

Change-Id: I37160c1a061004aefa6ed3c887ab80c63fb11cad
2016-11-04 21:40:15 +00:00
Tao Bao e3554167e2 Merge "releasetools: Make BBOTA incremental generation repeatable."
am: b9bd78d110

Change-Id: I6402481bf300b52d36df1570cceeae6ec3ff4f8f
2016-11-04 21:29:15 +00:00
Tao Bao b9bd78d110 Merge "releasetools: Make BBOTA incremental generation repeatable." 2016-11-04 21:26:13 +00:00
Colin Cross 9fade2fa53 findleaves.py: prevent recursion into symlink loops am: 7829ebfebd am: 7227637308 am: 7cb42e1340
am: 25dabdeb81

Change-Id: Ie5b7e506c74ae984b5e3751498bdda8b68c3e3a2
2016-11-04 18:28:35 +00:00
Colin Cross 7227637308 findleaves.py: prevent recursion into symlink loops
am: 7829ebfebd

Change-Id: Ib0ff185e2798ca57c6c28157a1182e7b4d1ed820
2016-11-04 18:17:35 +00:00
Colin Cross 7829ebfebd findleaves.py: prevent recursion into symlink loops
Keep a set of all visited inodes, and prevent recursing into a symlink
to an already visited inode.

Test: m -j
Test: compare `build/tools/findleaves.py --prune=.repo --prune=.git --mindepth=2 --dir=. Android.mk` before and after
Change-Id: Ied14c40d3066ef9f8e8a2b1535f56f7bbbbd0ab6
2016-11-03 14:29:40 -07:00
Chih-hung Hsieh 43a8298b72 Merge "Do not use multiprocessing.Pool when --processes=1." am: 948ebf5510 am: 85465a39fb am: d3242b7ae6
am: 142d6903c5

Change-Id: I53999109049990af8a954b5d043761ee50c0244d
2016-10-28 20:59:07 +00:00
Chih-hung Hsieh 85465a39fb Merge "Do not use multiprocessing.Pool when --processes=1."
am: 948ebf5510

Change-Id: Ia305f1c26706069d8e048340eac9037782f895b7
2016-10-28 20:44:35 +00:00
Chih-Hung Hsieh 63de300094 Do not use multiprocessing.Pool when --processes=1.
Purpose of this change is not to save some execution time,
but to avoid forking another process. In other applications
that use a wrapper to call this python script, it is difficult
to get overwritten file I/O functions work in a subprocess.
So the wrapper will call warn.py with --processes=1.

Test: run "warn.py --processes=1 build.log"
Change-Id: I5998d5c70d81a456c86eb4002f444a4a60135477
2016-10-28 10:53:34 -07:00
Sasha Levitskiy c63565970c build: tools: Add json collection of installed files with hashes.
am: 3c97fa78cd

Change-Id: I5eb12808bbb82a4b9aeaa76b32d971ee4d2643ba
2016-10-27 20:56:44 +00:00
Alexander Levitskiy 343d72fac8 Merge "build: tools: Add json collection of installed files with hashes." into cw-f-dev 2016-10-27 20:51:15 +00:00
Tao Bao 53a1acf53b releasetools: Support verity signer args. am: c7814837a0 am: 8a6d94c9aa
am: b31f486d75

Change-Id: I871181398a41da89f1851a0b9a5599de23f6100e
2016-10-26 22:22:58 +00:00
Tao Bao b31f486d75 releasetools: Support verity signer args. am: c7814837a0
am: 8a6d94c9aa

Change-Id: I3383bfa1920dad8976963813dd73435f19cb6593
2016-10-26 22:18:28 +00:00
Tao Bao 8a6d94c9aa releasetools: Support verity signer args.
am: c7814837a0

Change-Id: Ie5ba1d9b706eacae6d6d2f52624526521301c724
2016-10-26 22:13:27 +00:00
Tao Bao 3348228423 releasetools: Make BBOTA incremental generation repeatable.
set() doesn't keep elements according to the order of insertion. So
Transfers managed with set() in intermediate steps may not appear in the
same order across runs. This leads to slightly different output packages
when generating the same incremental OTA.

This CL fixes the issue by replacing set() with OrderedDict() in
blockimgdiff.GenerateDigraph() and blockimgdiff.FindVertexSequence().

It also adds a testcase that ensures blockimgdiff.GenerateDigraph()
preserves the insertion order for Transfer.goes_after set.

Bug: 32220816
Test: ota_from_target_files.py gives identical package when running
multiple times.

Change-Id: I56d551e5ca926993ab46896e33c80e0ce42e506a
2016-10-26 09:40:50 -07:00
Tao Bao c7814837a0 releasetools: Support verity signer args.
system/extras/verity/build_verity_metadata.py now accepts
"--signer_args" to specify verity signer args.

Also remove the duplicate "--verity_signer_args" in
add_img_to_target_files.py, as we already have that in common.py.

Bug: 31500665
Test: Building and signing work w/ and w/o --signer_args.

Change-Id: I02f59c50a1ebf15c5505e9fffd5b9bbbbaa785be
(cherry picked from commit 458104266f)
2016-10-25 21:17:02 -07:00
Patrick Tjin b59eca3586 build_image: add support for specifying number of inodes
Add support for specifying number of inodes when creating
system, vendor, oem partitions.  These are all read-only
and have no use for extra inodes.  Removing extra inodes
saves a lot of space.

Bug: 32246383
Change-Id: I13f1d4614b64a4abc752c42a1c65d3d151481c21
2016-10-24 14:03:25 -07:00
Tao Bao df13110881 Merge "releasetools: Support verity signer args." am: 02d2d68aec am: f4a88279ed am: c1e60bb08b
am: 2d0666a95e

Change-Id: I23762dbcd3325570dac02976d1226b131afa3680
2016-10-24 19:03:52 +00:00
Tao Bao f4a88279ed Merge "releasetools: Support verity signer args."
am: 02d2d68aec

Change-Id: Ib1aed8ff11eeef2fd64a6520e92cfb30678dadc7
2016-10-24 18:53:33 +00:00
Tao Bao 02d2d68aec Merge "releasetools: Support verity signer args." 2016-10-24 18:50:14 +00:00
Sasha Levitskiy 3c97fa78cd build: tools: Add json collection of installed files with hashes.
Adds installed-files.json in addition to installed-files.txt
Further sorts the file list to be ordered within the same size bucket.

Test: manual, cross-checked checksums with sha256sum utility
      checked build outputs.

Bug: 19988819
Merged-in: Ifb632eb4df65ec48645c8f93e36bae44ccc52ba8
Change-Id: Ifb632eb4df65ec48645c8f93e36bae44ccc52ba8
Signed-off-by: Sasha Levitskiy <sanek@google.com>
2016-10-20 10:07:13 -07:00
bowgotsai 63f5839071 Move AVB related properties from 'system_other' to 'system'
The original CL in AOSP is for 'system' partition.
Howerver, after automerger merges the CL from aosp to goog gerrit, it
patches part of the properties to 'system_other' partition. Correct this by
moving the system_avb* properties to 'system'.

Bug: 31264226
Test: build aosp_angler-userdebug successfully
Change-Id: I1a7128d29c1152315e9b50cfe5bbe13b47b131a7
2016-10-20 12:14:18 +08:00
YOUNG HO CHA ccc5c40523 releasetools: compare size between compressed and patch while build otapackage
Currently, whether contains patch or verbatim, compute with file size
and patch size.
But ota file must be compressed with zip, so it should be better with
compressed size than uncompressed.

Test: aosp_shamu-user build without proprietary blobs between MOB30P and NRD90S
$ du -k ota_shamu_old.zip ota_shamu_new.zip
217252	ota_shamu_old.zip
216520	ota_shamu_new.zip

Change-Id: If68cb1fbe2f7815067451915a0dcfe93ea5ba8d6
Signed-off-by: YOUNG HO CHA <ganadist@gmail.com>
2016-10-18 17:27:09 +09:00
Chih-Hung Hsieh 6b7752ec7e Merge "Use parallel subprocesses to classify warnings." am: 92396e1747 am: e3345c438b
am: 8391419e80

Change-Id: Ie5585ba71560e1c3dd7b2fdc25b3de1188c6a8af
2016-10-18 04:14:46 +00:00
Chih-Hung Hsieh e3345c438b Merge "Use parallel subprocesses to classify warnings."
am: 92396e1747

Change-Id: I6e92d8d5a6ee4ca8e9fa626064f5d5752197d739
2016-10-18 04:01:15 +00:00
Treehugger Robot 92396e1747 Merge "Use parallel subprocesses to classify warnings." 2016-10-18 03:49:49 +00:00
Stephen Hines 0cc3ced3c7 Split apart frameworks/compile into sub-projects. am: d0aec89d43 am: 2f64eb88e5
am: c8a25eb6e4

Change-Id: I3d992fd11a869c1a999e942ee671e860e8eb04fd
2016-10-18 01:22:05 +00:00
Stephen Hines 2f64eb88e5 Split apart frameworks/compile into sub-projects.
am: d0aec89d43

Change-Id: I52500c1d216dfc26628835c87fb81d1bf5393c62
2016-10-18 01:08:34 +00:00
Chih-Hung Hsieh a6bd044ac1 Use parallel subprocesses to classify warnings.
* Add a --processes flag to specify number of parallel processes,
  with default multiprocessing.cpu_count().
* Wrap long line to suppress pylint warning.

Test: run warn.py with a large build.log file.
Change-Id: I9a93a9324bc531c1bce741367013051ce40a67fa
2016-10-17 17:47:20 -07:00
Jerry Zhang 8cc653ba56 Merge "Revert "Remove automatic adding of adb into default.prop"" 2016-10-18 00:15:43 +00:00
Jerry Zhang 1695653bb2 Revert "Remove automatic adding of adb into default.prop"
This reverts commit 3c51c2bc48.

Bug: 32223614
Change-Id: I1addc93b175e9442d9fc2f5e7a557fe818201a27
2016-10-18 00:01:27 +00:00
Tao Bao 458104266f releasetools: Support verity signer args.
system/extras/verity/build_verity_metadata.py now accepts
"--signer_args" to specify verity signer args.

Also remove the duplicate "--verity_signer_args" in
add_img_to_target_files.py, as we already have that in common.py.

Bug: 31500665
Test: Building and signing work w/ and w/o --signer_args.

Change-Id: I02f59c50a1ebf15c5505e9fffd5b9bbbbaa785be
2016-10-17 16:25:22 -07:00
Stephen Hines d0aec89d43 Split apart frameworks/compile into sub-projects.
These projects are all used by RenderScript, but it would be good to
differentiate warnings for each.

Change-Id: I983279d590630175a36075b01e8eec9100c07d26
Test: Ran warn.py
2016-10-17 15:40:38 -07:00
Mark Salyzyn b628c93f50 Merge "zipalign missing header" am: 94180579f7 am: 2421b1c099
am: 390b7a953e

Change-Id: If5da2d15b5dfb07cd44469d1a1c2e226a26dfb0d
2016-10-17 22:10:22 +00:00
Mark Salyzyn 2421b1c099 Merge "zipalign missing header"
am: 94180579f7

Change-Id: I4643aebbb73a5d9103de48147d5a4a25c2db6ca4
2016-10-17 21:56:52 +00:00
Mark Salyzyn 404fd5bc4a zipalign missing header
Remove assumptions about header side effects

Test: compile
Bug: 30465923
Change-Id: I117567b0f99814b9d9a955b39c56f43f7972cf62
2016-10-17 12:22:44 -07:00
Chih-hung Hsieh 2cb1d6b70b Merge "Add more patterns for a finer project warning list." am: 8ef4397c22 am: fd9558d09a
am: 9a6331701d

Change-Id: I8ee4c7af7970d8fab7e443ea13ae40aff58f0cb3
2016-10-15 01:52:35 +00:00
Chih-hung Hsieh fd9558d09a Merge "Add more patterns for a finer project warning list."
am: 8ef4397c22

Change-Id: I5e377a80abc1953455b9b8a1840f579b7f133475
2016-10-15 01:44:04 +00:00
Chih-hung Hsieh 8ef4397c22 Merge "Add more patterns for a finer project warning list." 2016-10-15 01:36:59 +00:00
Sasha Levitskiy 1ea9eacdae Merge "build: tools: Add json collection of installed files with hashes."
am: fe77369b50

Change-Id: Ib3e9c8dead0a6fdbb0f93690da66e2a8e1ea0f39
2016-10-15 01:13:22 +00:00
TreeHugger Robot 6a3d196fbc Merge "build: tools: Add json collection of installed files with hashes." 2016-10-14 23:43:26 +00:00
Sasha Levitskiy 4a34533e11 build: tools: Add json collection of installed files with hashes.
Adds installed-files.json in addition to installed-files.txt
Further sorts the file list to be ordered within the same size bucket.

Test: manual, cross-checked checksums with sha256sum utility
      checked build outputs.

Bug: 19988819
Merged-in: Ifb632eb4df65ec48645c8f93e36bae44ccc52ba8
Change-Id: Ifb632eb4df65ec48645c8f93e36bae44ccc52ba8
Signed-off-by: Sasha Levitskiy <sanek@google.com>
2016-10-14 16:29:16 -07:00
Sasha Levitskiy 83561d1f98 build: tools: Add json collection of installed files with hashes.
Adds installed-files.json in addition to installed-files.txt
Further sorts the file list to be ordered within the same size bucket.

Test: manual, cross-checked checksums with sha256sum utility
      checked build outputs.

Bug: 19988819
Change-Id: Ifb632eb4df65ec48645c8f93e36bae44ccc52ba8
Signed-off-by: Sasha Levitskiy <sanek@google.com>
2016-10-14 15:01:39 -07:00
Chih-Hung Hsieh 144864eed0 Add more patterns for a finer project warning list.
Bug: 31377083
Test: run warn.py --byproject build.log
Change-Id: I3cad8e24bc97a84f067a162ff728e30fde3c7197
2016-10-14 12:27:17 -07:00
Jerry Zhang d33366feb4 Merge "Remove automatic adding of adb into default.prop" 2016-10-14 18:24:33 +00:00
Alex Deymo 36276c2cb7 fat16copy: Fix allocation logic when extending directories. am: a1c977735b am: a507800e5f am: 0931a41ea5
am: ad5b6d2acb

Change-Id: I62fd89701fa88da9db66ff747251580258adb72c
2016-10-14 03:35:48 +00:00
Alex Deymo 330b3469b3 fat16copy: Sort new directory entries. am: 567c5d0f95 am: cf24e4b85f am: 3c6bf619ac
am: 556d863425

Change-Id: I5101f84476ee2cf20229aee4be716d7c0c0584f9
2016-10-14 03:35:42 +00:00
Casey Dahlin 42f61d75c8 Make fat16copy.py add . and .. entries to directories am: df71efe378 am: 8cf11d1423 am: 70e24e55b3
am: 2ca8667d9e

Change-Id: Id352e3f771be8b21f2c55efbc07dcd2bee28a984
2016-10-14 03:35:36 +00:00
Alex Deymo ad5b6d2acb fat16copy: Fix allocation logic when extending directories. am: a1c977735b am: a507800e5f
am: 0931a41ea5

Change-Id: Iaad5cd91d5f09da7996c791ed55515c3d633c9ae
2016-10-14 03:32:45 +00:00
Alex Deymo 556d863425 fat16copy: Sort new directory entries. am: 567c5d0f95 am: cf24e4b85f
am: 3c6bf619ac

Change-Id: I689251be77849cb3ae1cdfa595d4ff3111f59ab5
2016-10-14 03:32:40 +00:00
Casey Dahlin 2ca8667d9e Make fat16copy.py add . and .. entries to directories am: df71efe378 am: 8cf11d1423
am: 70e24e55b3

Change-Id: Ib3b8a5e1145451ea52158a1ca23a62902f2794d4
2016-10-14 03:32:34 +00:00
Alex Deymo 0931a41ea5 fat16copy: Fix allocation logic when extending directories. am: a1c977735b
am: a507800e5f

Change-Id: Ida8f372a1656ff0b4059c8b2d5629ea1b479c9fc
2016-10-14 03:27:14 +00:00
Alex Deymo 3c6bf619ac fat16copy: Sort new directory entries. am: 567c5d0f95
am: cf24e4b85f

Change-Id: I109b9e0d9f9e3bf6851b575a3b9576282b851c0a
2016-10-14 03:27:09 +00:00
Casey Dahlin 70e24e55b3 Make fat16copy.py add . and .. entries to directories am: df71efe378
am: 8cf11d1423

Change-Id: I6f2dd99f66ffafffca7161cc578cc08f7c798078
2016-10-14 03:27:04 +00:00
Alex Deymo a507800e5f fat16copy: Fix allocation logic when extending directories.
am: a1c977735b

Change-Id: I5bc6da73f2c5f9dfb9b9e9cf34b77481d45ab911
2016-10-14 03:24:14 +00:00
Alex Deymo cf24e4b85f fat16copy: Sort new directory entries.
am: 567c5d0f95

Change-Id: I2d7bc7b3e7ed5e0ddf940d490de439ff591c9817
2016-10-14 03:24:09 +00:00
Casey Dahlin 8cf11d1423 Make fat16copy.py add . and .. entries to directories
am: df71efe378

Change-Id: Idc2516c8a29d62589f355e8bdbbaade170a5cdb5
2016-10-14 03:24:04 +00:00
Alex Deymo 3b54b69205 Merge changes Ie3d82cfa,I2f808896,I587f400d
* changes:
  fat16copy: Fix allocation logic when extending directories.
  fat16copy: Sort new directory entries.
  Make fat16copy.py add . and .. entries to directories
2016-10-14 03:19:55 +00:00
Jerry Zhang 3c51c2bc48 Remove automatic adding of adb into default.prop
Default.prop can interfere with UsbDeviceManager's management of usb state.
Adb is now enabled for userdebug and eng builds directly from UsbDeviceManager.

Bug: 31814300
Test: Manually verified that logcat is not kicked
Change-Id: I69c998c0dd184f9440cc236d82cc2f25f36e8734
2016-10-13 17:18:03 -07:00
Dan Willemsen d95f90b7fa Update droiddoc templates for build/make move am: 0f40bafa96
am: a62ff78df4

Change-Id: Ide8cff8175defb1df783ae0f2b8091eceb9b195e
2016-10-12 19:28:24 +00:00
Dan Willemsen a62ff78df4 Update droiddoc templates for build/make move
am: 0f40bafa96

Change-Id: I74f5c5bb84c5a748ea38e6c8015dce8ecc269aaa
2016-10-12 19:21:52 +00:00
Clay Murphy f8d8458edd Merge "Update droiddoc templates for build/make move" 2016-10-12 18:34:23 +00:00
Dan Willemsen 0f40bafa96 Update droiddoc templates for build/make move
Since build/ was moved to build/make/, the droiddoc templates now need
another ../ to reach the android root.

Test: m online-sac-docs
Change-Id: I2393f6c791df9b67ccafb4eb047fd8ccc52481cb
2016-10-12 10:35:53 -07:00
Chih-Hung Hsieh 541c280f64 Merge "Better pattern matching and dump of warning messages." am: 6949e7ecba am: 1a876e215b am: fbb1b890fa
am: 71155edd09

Change-Id: I9a7deffadcd83a042ef1c634450d5dcd8c3ce08d
2016-10-12 17:05:59 +00:00
Chih-Hung Hsieh f97b719032 Merge "Normalize warning source file path to relative path." am: eb2f711528 am: d4b0a20c01 am: b4a26ee48f
am: ae1a5c973b

Change-Id: Ie54d9f1599df0929316e45ec01aec835754a951d
2016-10-12 17:05:46 +00:00
Chih-Hung Hsieh 71155edd09 Merge "Better pattern matching and dump of warning messages." am: 6949e7ecba am: 1a876e215b
am: fbb1b890fa

Change-Id: Icaff358e282166c635c3ac2edd3297547c32cf6d
2016-10-12 16:59:33 +00:00
Chih-Hung Hsieh ae1a5c973b Merge "Normalize warning source file path to relative path." am: eb2f711528 am: d4b0a20c01
am: b4a26ee48f

Change-Id: I9fa7bdf12f86f65259409a1dc0735ab455ea6320
2016-10-12 16:59:19 +00:00
Chih-Hung Hsieh fbb1b890fa Merge "Better pattern matching and dump of warning messages." am: 6949e7ecba
am: 1a876e215b

Change-Id: Ieeb9fe468a12aeb532f35ede9879f3968441709d
2016-10-12 16:52:01 +00:00
Chih-Hung Hsieh b4a26ee48f Merge "Normalize warning source file path to relative path." am: eb2f711528
am: d4b0a20c01

Change-Id: I16d7425b3a933596c06ee7acdf396b0b2b37a483
2016-10-12 16:51:46 +00:00
Treehugger Robot 6949e7ecba Merge "Better pattern matching and dump of warning messages." 2016-10-12 16:35:34 +00:00
Dan Willemsen 82be5468c3 Update droiddoc templates for build/make move
Since build/ was moved to build/make/, the droiddoc templates now need
another ../ to reach the android root.

Test: m online-sac-docs
Change-Id: I2393f6c791df9b67ccafb4eb047fd8ccc52481cb
2016-10-12 00:10:33 -07:00
Chih-Hung Hsieh 5722f9247b Better pattern matching and dump of warning messages.
* Warning messages must start with source file path.
  This will reject lines containing only 'warning:'
  but not a source file path prefix.
* Escape both backslash and quotation marks in the
  dump of strings to JavaScript string literals.

Bug: 32060052
Test: run through build.log files
Change-Id: Ib064768b1ba2954f974604ea054f7a6d2ad15ae7
2016-10-11 15:33:19 -07:00
Chih-Hung Hsieh a45c5c1cf9 Normalize warning source file path to relative path.
Remove Android root directory path from long
absolute source file path.

Test: run warn.py with build.log
Bug: 32059187
Change-Id: Ib630cebd8c56a9fef443139ca502d97e59c7b42e
2016-10-11 15:30:26 -07:00
Yunlian Jiang 3b83ef934e Merge "Fix a nullness warning." am: b37e81d3cd am: 10b5a9d3f6 am: ea4f981031
am: b087e00ba0

Change-Id: I767582963592c8790aeda4e9b0cab5e06ba944ae
2016-10-11 19:54:32 +00:00
Yunlian Jiang b087e00ba0 Merge "Fix a nullness warning." am: b37e81d3cd am: 10b5a9d3f6
am: ea4f981031

Change-Id: Ie1fd127b89e6bc37514b05051708e69f37ae95f9
2016-10-11 19:48:01 +00:00
Yunlian Jiang ea4f981031 Merge "Fix a nullness warning." am: b37e81d3cd
am: 10b5a9d3f6

Change-Id: I07c3a7c4f8b08b3b9c0a90a6b72cae70efcf9f4e
2016-10-11 19:42:01 +00:00
Treehugger Robot b37e81d3cd Merge "Fix a nullness warning." 2016-10-11 19:29:37 +00:00
Yunlian Jiang be6124e7ce Merge "Fix an uninitialized value warning." am: f943e138d7 am: d7a0b25d66 am: 570063f82d
am: 4fdd8f156d

Change-Id: I042c6951378b125336eb0899d4e73dc11c75d5a4
2016-10-11 03:10:59 +00:00
Yunlian Jiang 4fdd8f156d Merge "Fix an uninitialized value warning." am: f943e138d7 am: d7a0b25d66
am: 570063f82d

Change-Id: Iefbe15d4bb48b9e92df1a2223cccec0a32000452
2016-10-11 03:05:28 +00:00
Yunlian Jiang 570063f82d Merge "Fix an uninitialized value warning." am: f943e138d7
am: d7a0b25d66

Change-Id: I0f19e57829765e7d070cad4370d808a3a23d46ad
2016-10-11 02:59:59 +00:00
Treehugger Robot f943e138d7 Merge "Fix an uninitialized value warning." 2016-10-11 02:43:47 +00:00
Yunlian Jiang 221c1c027a Fix an uninitialized value warning.
Warning from the static analyzer:

build/tools/zipalign/ZipFile.cpp:503:5: warning: Function call argument
is an uninitialized value
pEntry->setDataInfo(uncompressedLen, endPosn - startPosn, crc,

Specifically, it's referencing `crc`, which would be uninitialized if we
hit either of these two error cases, since we'd return `NO_ERROR`.

Note that the warning is still there, but that's only because the static
analyzer can't see the asserts. If we #undef NDEBUG in the file, then
the warning disappears.

Bug: none
Test: With NDEBUG undefined, the warning is gone.
Change-Id: Iaed66127746c38add2c842ab027f2e1982d0e2fd
2016-10-10 17:31:06 -07:00
Dirk Dougherty 09f49d4d57 Fix samples metadata concat. am: 8d565ed204 am: 22fe7409a4
am: 7f56225968

Change-Id: I39ad662b38562d65aa58ab733c6a6f20b2921e80
2016-10-08 02:40:34 +00:00
Dirk Dougherty 3dc35a0148 Fix samples metadata concat. am: 8d565ed204 am: bafc0b1baf
am: 20e91f4e7a

Change-Id: I7e77f030b6dc45da3b22459bbd5871ff42285ba8
2016-10-08 02:35:33 +00:00
Dirk Dougherty 20e91f4e7a Fix samples metadata concat. am: 8d565ed204
am: bafc0b1baf

Change-Id: I21dadb32eeb771aae9c188372d0da1cf4ea16126
2016-10-08 02:31:32 +00:00
Dirk Dougherty 7f56225968 Fix samples metadata concat. am: 8d565ed204
am: 22fe7409a4

Change-Id: I08418dfb23d225fa73ed21cb0704b69c2c8d0028
2016-10-08 02:31:32 +00:00
Dirk Dougherty 22fe7409a4 Fix samples metadata concat.
am: 8d565ed204

Change-Id: Ic1a7d62fb278022518154f9c8fe3394df620670c
2016-10-08 02:27:02 +00:00
Dirk Dougherty bafc0b1baf Fix samples metadata concat.
am: 8d565ed204

Change-Id: I02cf4c7c04ac691b71ef48a6e584c8f2b224a6ff
2016-10-08 02:27:01 +00:00
Dirk Dougherty 8d565ed204 Fix samples metadata concat.
Change-Id: Ie9b616818995b3066d0e65ea1aa30077ed9d82ce
2016-10-07 12:12:50 -07:00
Scott Main a6da9e565c template updates to support constraint layout reference
Change-Id: I83394c0c09c2c6fe83238cd072375cdd122f6cac
2016-10-07 18:13:57 +00:00
Amanda Kassay 17a86b9058 Adding excludeFromSuggestions, wear preview project path, and android wear/tv/auto/versions projectsw to template am: b5c04107af am: 95bf07b069
am: 284c15d7c2

Change-Id: Ie89c35e925139560f2718e5be4abc664de2b39b7
2016-10-06 17:00:03 +00:00
Amanda Kassay 9d22bd1c63 Adding excludeFromSuggestions, wear preview project path, and android wear/tv/auto/versions projectsw to template am: b5c04107af am: 858aa63148
am: cb5021e842

Change-Id: I899a771e0743eb6ce0eb027e4511343cf83d6624
2016-10-06 17:00:02 +00:00
Amanda Kassay cb5021e842 Adding excludeFromSuggestions, wear preview project path, and android wear/tv/auto/versions projectsw to template am: b5c04107af
am: 858aa63148

Change-Id: I6f7afd6d2c9a8b5deea04948468ddf1ccf8a6db2
2016-10-06 16:55:32 +00:00
Amanda Kassay 284c15d7c2 Adding excludeFromSuggestions, wear preview project path, and android wear/tv/auto/versions projectsw to template am: b5c04107af
am: 95bf07b069

Change-Id: I58488322e94b7e1ece1f77fdc600bc1fac6442b0
2016-10-06 16:55:32 +00:00
Amanda Kassay 858aa63148 Adding excludeFromSuggestions, wear preview project path, and android wear/tv/auto/versions projectsw to template
am: b5c04107af

Change-Id: I11d773f8ca2ca9b4b20a659432d39f8c4adbef2d
2016-10-06 16:52:32 +00:00
Amanda Kassay 95bf07b069 Adding excludeFromSuggestions, wear preview project path, and android wear/tv/auto/versions projectsw to template
am: b5c04107af

Change-Id: I0dbabb4c9dfa21971d6c46f3eb68aedec377968b
2016-10-06 16:52:32 +00:00
Chih-hung Hsieh db4fa8d19d Merge "Add a new ANALYZER severity group." am: 89244619ad am: 8a2f279b37 am: 9a838ef507
am: 9031974b1f

Change-Id: I1c00581b44617f0b2b67caa68a1c52f0616b22f4
2016-10-06 00:07:27 +00:00
Chih-hung Hsieh 9031974b1f Merge "Add a new ANALYZER severity group." am: 89244619ad am: 8a2f279b37
am: 9a838ef507

Change-Id: I44d24577700403f26544a443fc47f1453daa1010
2016-10-05 23:43:52 +00:00
Chih-hung Hsieh 9a838ef507 Merge "Add a new ANALYZER severity group." am: 89244619ad
am: 8a2f279b37

Change-Id: If326565dda294235df273211ba2fb21ef4c292c9
2016-10-05 23:41:21 +00:00
Chih-hung Hsieh 89244619ad Merge "Add a new ANALYZER severity group." 2016-10-05 23:31:43 +00:00
Dan Willemsen e3dc3bfc0d Merge "Add tool to run kati for all products" am: 480678e220 am: 652c4b4001 am: 8c0a4f49a2
am: c9c6284660

Change-Id: I0b221dedce563a7ad24260af88e3bdffb64cbef0
2016-10-05 23:07:47 +00:00
Dan Willemsen c9c6284660 Merge "Add tool to run kati for all products" am: 480678e220 am: 652c4b4001
am: 8c0a4f49a2

Change-Id: I086f181ffcd8291fa950c084f0471686d845eaf7
2016-10-05 23:04:28 +00:00
Dan Willemsen 8c0a4f49a2 Merge "Add tool to run kati for all products" am: 480678e220
am: 652c4b4001

Change-Id: I70645fc341fa1df26635d60731c8877421f73ead
2016-10-05 23:01:28 +00:00
Amanda Kassay b5c04107af Adding excludeFromSuggestions, wear preview project path, and android wear/tv/auto/versions projectsw to template
b/31771704 b/31903798 b/31773716

Staged:
https://android-dot-devsite.googleplex.com/about/versions/nougat/index.html
https://android-dot-devsite.googleplex.com/index.html
https://android-dot-devsite.googleplex.com/wear/preview/index.html

Change-Id: Idf9893f9d108c26038ead06c84de771e21b89f37
2016-10-05 22:31:22 +00:00
Dan Willemsen 4c364620ac Add tool to run kati for all products
Test: get_build_var all_named_products
Test: build/tools/kati_all_products.sh
Change-Id: I3496cb4c59a1edb11c9149b95ecabd3a828b8972
2016-10-05 14:04:21 -07:00
Chih-Hung Hsieh 1eabb0ecb2 Add a new ANALYZER severity group.
* Separate clang-tidy's clang-analyzer-* warnings from
  other clang-tidy warnings.

Bug: 31559947
Test: build with WITH_TIDY=1 and DEFAULT_GLOBAL_TIDY_CHECKS=*,-readability-*,-google-readability-*
Change-Id: If03c421c9319741ef6588bc0d803b6da0cc4433a
2016-10-05 11:53:20 -07:00
Yunlian Jiang 4f1a91cbac Fix a nullness warning.
This silences a warning null pointer passed as an argument to a
'nonnull' parameter

BUG=None
Test: The warning is gone.

Change-Id: I10a17d4674bfb373d7fe8666863abd5f10a4d11f
2016-10-05 10:52:35 -07:00
David Zeuthen 4e9c89ab87 resolve merge conflicts of 86180eb to nyc-mr1-dev-plus-aosp
Change-Id: Ia4bfb2571bac509cebe22f70ff43e6696f832423
2016-10-04 18:53:34 -04:00
David Zeuthen 86180ebab9 Merge "Make room for AVB hashtree and metadata." am: 70209ad9f0
am: b5b638f7fa

Change-Id: I2bdfd752ff2082b241ad5fbf88e89644d9cd2f3f
2016-10-04 22:39:21 +00:00
David Zeuthen 70209ad9f0 Merge "Make room for AVB hashtree and metadata." 2016-10-04 22:32:27 +00:00
David Zeuthen 4014a9daa7 Make room for AVB hashtree and metadata.
While the system.img images currently built with AVB support verify
correctly, mounting the filesystem content fails. This is because
'avbtool add_hashtree_footer' used to claim some of the unused /
DONT_CARE space for stashing the verity tables and this resulting in the
mapped device ending up being smaller causing the mount failure.

Fix this by leaving enough room for AVB hashtree and metadata before
building the image. This is achieved by moving the AVB hashtree support
into build_image.py and using a just added '--calc_max_image_size'
option to 'avbtool add_hashtree_footer' to figure out how much space to
leave out.

This depends on https://android-review.googlesource.com/#/c/281821/

Bug: 31264226
Test: Mounting dm-verity set up from system.img now works.

Merged-In: I4c5de1004c1059f8c582e76b3b8517d427aa1a87

Change-Id: I945a5f1f6782791736cd319f216cfa6b448fb04d
2016-10-04 17:32:16 -04:00
David Zeuthen f892ac33ec Merge "Make room for AVB hashtree and metadata." 2016-10-04 21:30:18 +00:00
Przemyslaw Szczepaniak a8c8dadd09 Merge "Fix for non-empty a[name] tags in openJdk based javadocs." 2016-10-04 11:35:58 +00:00
Przemyslaw Szczepaniak 4bce2866fb Fix for non-empty a[name] tags in openJdk based javadocs.
openJdk based android javadoc contains <a name=... tags
that are non-empty. Currently they are being hidden,
causing badly formatted pages for some java.* classes
(missing text and random whitespace blocks).

This change makes the existing a[name] hiding rule
apply only to empty tags.

Test: make docs
Bug: 31700998
Change-Id: Ifa75bbabe308d7aed0cce6165c1113e5a382a121
(cherry picked from commit a7edd92c45)
2016-10-04 10:31:54 +00:00
Colin Cross 2b95c56226 Merge "Propagate signals through makeparallel" am: e0f42b41f6 am: 6f4807da4b am: fd00ed23a9
am: c66ad83f43

Change-Id: I24c78ce29f32dc10574b55003b5be031bcb950ed
2016-10-04 00:36:49 +00:00
Colin Cross c66ad83f43 Merge "Propagate signals through makeparallel" am: e0f42b41f6 am: 6f4807da4b
am: fd00ed23a9

Change-Id: I322f8cecc72e64a6c318e04950c0d200c7f9ef6b
2016-10-04 00:34:44 +00:00
Colin Cross fd00ed23a9 Merge "Propagate signals through makeparallel" am: e0f42b41f6
am: 6f4807da4b

Change-Id: Ia2a896df2782603b68c4dd5d348bcc7f5d661933
2016-10-04 00:30:39 +00:00
Colin Cross 49c45aecc4 Propagate signals through makeparallel
Set up a signal handler in makeparallel that will forward SIGHUP,
SIGINT, SIGQUIT, and SIGTERM to the child process.

Bug: 31907490
Test: m -j & killall make; pgrep -a ninja
Test: make makeparallel_test
Change-Id: I306e5335ed1b2c7056804d5da377a2f283877f30
2016-10-03 15:33:11 -07:00
David Zeuthen 52872baa78 Make room for AVB hashtree and metadata.
While the system.img images currently built with AVB support verify
correctly, mounting the filesystem content fails. This is because
'avbtool add_hashtree_footer' used to claim some of the unused /
DONT_CARE space for stashing the verity tables and this resulting in the
mapped device ending up being smaller causing the mount failure.

Fix this by leaving enough room for AVB hashtree and metadata before
building the image. This is achieved by moving the AVB hashtree support
into build_image.py and using a just added '--calc_max_image_size'
option to 'avbtool add_hashtree_footer' to figure out how much space to
leave out.

This depends on https://android-review.googlesource.com/#/c/281821/

Bug: 31264226
Test: aosp_x86_64-eng 'm' and 'm dist' successful.
Change-Id: I4c5de1004c1059f8c582e76b3b8517d427aa1a87
2016-10-03 14:07:41 -04:00
Dirk Dougherty 77475e522f For ds builds only, emit a separate metadata file for samples only. am: a9fcf48078 am: fd40bbc586
am: 3d58e7f387

Change-Id: Iec35ec96194a76c67dec543cf28184f0d0c2e549
2016-10-01 01:19:00 +00:00
Dirk Dougherty 6a147ff80c For ds builds only, emit a separate metadata file for samples only. am: a9fcf48078 am: 913e1dfcd7
am: 7e9cccdfba

Change-Id: I9cbe82cf2c86bef7aa433f8256f4f3ee378fd6bd
2016-10-01 01:14:46 +00:00
Dirk Dougherty 7e9cccdfba For ds builds only, emit a separate metadata file for samples only. am: a9fcf48078
am: 913e1dfcd7

Change-Id: I7c6164efec249e50abdc4b032e8f9a47f0ae17eb
2016-10-01 01:11:15 +00:00
Dirk Dougherty 3d58e7f387 For ds builds only, emit a separate metadata file for samples only. am: a9fcf48078
am: fd40bbc586

Change-Id: I97c8ecb583d951752218b94dcc88c3f81cf548cd
2016-10-01 01:11:12 +00:00
Dirk Dougherty 913e1dfcd7 For ds builds only, emit a separate metadata file for samples only.
am: a9fcf48078

Change-Id: Ic2b786401a3431896e6441c8c2c61545a6aaea1b
2016-10-01 01:07:42 +00:00
Dirk Dougherty fd40bbc586 For ds builds only, emit a separate metadata file for samples only.
am: a9fcf48078

Change-Id: I1795160d80b1038ffe30758ce6fc4cd48d3bda2a
2016-10-01 01:07:41 +00:00
Tao Bao 059da93a48 Merge "releasetools: Clean up sign_target_files_apks.py." am: ad49deb5e6 am: 4299e48f0c am: dfc210c9a4
am: 658af49662

Change-Id: Ib55aa302ec810271de54e6ffc7372f420820d02a
2016-10-01 00:36:20 +00:00
Dirk Dougherty a9fcf48078 For ds builds only, emit a separate metadata file for samples only.
Change-Id: I95c03a10cca586c6675f98664479ba8bf2e43576
2016-09-30 17:33:50 -07:00
Tao Bao 658af49662 Merge "releasetools: Clean up sign_target_files_apks.py." am: ad49deb5e6 am: 4299e48f0c
am: dfc210c9a4

Change-Id: Iee5cda2c10bc9c474140bf1f303261d8cf31d7b8
2016-10-01 00:24:10 +00:00
Tao Bao dfc210c9a4 Merge "releasetools: Clean up sign_target_files_apks.py." am: ad49deb5e6
am: 4299e48f0c

Change-Id: Ic59f6a2839502c4007f2e5dc51ac4a8eb2477b2d
2016-10-01 00:20:39 +00:00
Tao Bao 9aa4b9b1b6 releasetools: Clean up sign_target_files_apks.py.
Remove the obsolete workaround for API 24. Also make it pylint clean.

Test: 1. Sign a target_files.zip and get identical results.
      2. `pylint --rcfile=pylintrc sign_target_files_apks.py` gives 10.00/10.

Change-Id: I21736f959c5182486fd8ccebea9bbc594edef9fb
2016-09-30 15:29:09 -07:00
Tao Bao 45f71d7fdd Merge "releasetools: Fix the reference to OPTIONS.info_dict." am: 0a5b59e78b am: 8b6d59e110 am: b00dbd1b11
am: 8145c70f2b

Change-Id: Ie529cf04f955cfb1302e98116a068ea6f1be11e1
2016-09-30 18:10:51 +00:00
Tao Bao 8145c70f2b Merge "releasetools: Fix the reference to OPTIONS.info_dict." am: 0a5b59e78b am: 8b6d59e110
am: b00dbd1b11

Change-Id: Ib31adf3e30f4b9077e14c577ffdc5791e89b746b
2016-09-30 17:59:31 +00:00
Tao Bao b00dbd1b11 Merge "releasetools: Fix the reference to OPTIONS.info_dict." am: 0a5b59e78b
am: 8b6d59e110

Change-Id: If2385afbd245654f27a96f02414856a7ce546a00
2016-09-30 17:48:38 +00:00
Tao Bao b31b94e159 releasetools: Fix the reference to OPTIONS.info_dict.
sign_target_files_apks.py calls common.GetBootableImage() but without
calling 'OPTIONS = common.OPTIONS' first. In common.GetBootableImage(),
we should use the local info_dict parameter instead of OPTIONS.info_dict.

Test: sign_target_files_apks.py generates signed-TF.zip successfully.

Change-Id: Ia3d32b88691c26e5fb98feea709e3e3c3eb70fdb
2016-09-29 22:04:50 -07:00
David Zeuthen 27ac0e34fe resolve merge conflicts of c36ab42 to nyc-mr1-dev-plus-aosp
Change-Id: Iaf78fb6c723955fd92cc64194cb32bba73a9dafb
2016-09-29 14:25:03 -04:00
David Zeuthen c36ab42dcc Merge "Update for new Android Verified Boot (AVB)." am: 8ee6d119d1
am: 621a3dbf7a

Change-Id: I1e7101853ba81ba21f68b9a72993dc731653692a
2016-09-29 18:04:21 +00:00
David Zeuthen 8ee6d119d1 Merge "Update for new Android Verified Boot (AVB)." 2016-09-29 17:48:40 +00:00
David Zeuthen 2ce63edab7 Update for new Android Verified Boot (AVB).
This updates the build system for the new Android Verified Boot
codebase. As this is based on Brillo Verified Boot, this change replaces
the existing BVB support.

Android Verified Boot is enabled by the BOARD_AVB_ENABLE variable

 BOARD_AVB_ENABLE := true

This will make the build system create vbmeta.img which will contain a
hash descriptor for boot.img, a hashtree descriptor for system.img, a
kernel-cmdline descriptor for setting up dm-verity for system.img and
append a hash-tree to system.img.

Additionally, the descriptors are left in boot.img and system.img so a
third party can create their own vbmeta.img file linking - using the
option --chain_partition - to these images. If this is not needed
footers can be erased using the 'avbtool erase_footer' command. It's
also harmless to just leave them in the images.

By default, the algorithm SHA256_RSA4096 is used with a test key from
the AVB source directory. This can be overriden by the
BOARD_AVB_ALGORITHM and BOARD_AVB_KEY_PATH variables to use e.g. a
4096-bit RSA key and SHA-512:

 BOARD_AVB_ALGORITHM := SHA512_RSA4096
 BOARD_AVB_KEY_PATH := /path/to/rsa_key_4096bits.pem

To prevent rollback attacks, the rollback index should be increased on a
regular basis. The rollback index can be set with the
BOARD_AVB_ROLLBACK_INDEX variable:

 BOARD_AVB_ROLLBACK_INDEX := 5

If this is not set, the rollback index defaults to 0.

The variable BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS can be used to specify
additional options passed to 'avbtool make_vbmeta_image'. Typical
options to be used here include '--prop', '--prop_from_file', and
'--chain_partition'.

The variable BOARD_AVBTOOL_BOOT_ADD_HASH_FOOTER_ARGS can be used to
specify additional options passed to 'avbtool add_hash_footer' for
boot.img. Typical options to be used here include '--hash_algorithm' and
'--salt'.

The variable BOARD_AVBTOOL_SYSTEM_ADD_HASHTREE_FOOTER_ARGS can be used
to specify additional options passed to 'avbtool add_hashtree_footer'
for systems.img. Typical options to be used here include
'--hash_algorithm', '--salt', and '--block_size'.

BUG=31264226
TEST=Manually tested on edison-eng by inspecting {boot, system,
  vbmeta}.img in out/ directory as well as their counterparts in
  the IMAGES/ directory of edision-target_files-eng.zeuthen.zip

Merged-In: Ic9a61cfc65c148b12996e57f04da5432eef6b982

Change-Id: I97042655bca15e7eac899f12c5bada2f6184d307
2016-09-29 11:19:36 -04:00
David Zeuthen 01f808de49 Merge "Update for new Android Verified Boot (AVB)." 2016-09-29 15:18:56 +00:00
Meike Baumgärtner 835fa711f3 Merge "Only run warn.py's main function if it is the main program." am: 312c310f7c am: ce4e16d835 am: 8a37ee0c63
am: dc7706a8ad

Change-Id: Ie921e1559ce5b43dff4ac164a5fe58ba68d6288e
2016-09-29 04:25:19 +00:00
Meike Baumgärtner dc7706a8ad Merge "Only run warn.py's main function if it is the main program." am: 312c310f7c am: ce4e16d835
am: 8a37ee0c63

Change-Id: I48db2a1358ab5236706217a2c9a14de856854037
2016-09-29 04:19:33 +00:00
Meike Baumgärtner 8a37ee0c63 Merge "Only run warn.py's main function if it is the main program." am: 312c310f7c
am: ce4e16d835

Change-Id: I44973ef0f9ff3f8e1bc641db592b1ac3c96d051a
2016-09-29 04:11:30 +00:00
Treehugger Robot 312c310f7c Merge "Only run warn.py's main function if it is the main program." 2016-09-29 03:58:07 +00:00
Meike Baumgärtner ac9d5df349 Only run warn.py's main function if it is the main program.
Test: run warn.py --byproject build.log
Change-Id: I155cce8c952d6d8a02c8e1809bf61a46c847c26e
2016-09-28 17:59:08 -07:00
David Zeuthen 0eb1097dd3 Update for new Android Verified Boot (AVB).
This updates the build system for the new Android Verified Boot
codebase. As this is based on Brillo Verified Boot, this change replaces
the existing BVB support.

Android Verified Boot is enabled by the BOARD_AVB_ENABLE variable

 BOARD_AVB_ENABLE := true

This will make the build system create vbmeta.img which will contain a
hash descriptor for boot.img, a hashtree descriptor for system.img, a
kernel-cmdline descriptor for setting up dm-verity for system.img and
append a hash-tree to system.img.

Additionally, the descriptors are left in boot.img and system.img so a
third party can create their own vbmeta.img file linking - using the
option --chain_partition - to these images. If this is not needed
footers can be erased using the 'avbtool erase_footer' command. It's
also harmless to just leave them in the images.

By default, the algorithm SHA256_RSA4096 is used with a test key from
the AVB source directory. This can be overriden by the
BOARD_AVB_ALGORITHM and BOARD_AVB_KEY_PATH variables to use e.g. a
4096-bit RSA key and SHA-512:

 BOARD_AVB_ALGORITHM := SHA512_RSA4096
 BOARD_AVB_KEY_PATH := /path/to/rsa_key_4096bits.pem

To prevent rollback attacks, the rollback index should be increased on a
regular basis. The rollback index can be set with the
BOARD_AVB_ROLLBACK_INDEX variable:

 BOARD_AVB_ROLLBACK_INDEX := 5

If this is not set, the rollback index defaults to 0.

The variable BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS can be used to specify
additional options passed to 'avbtool make_vbmeta_image'. Typical
options to be used here include '--prop', '--prop_from_file', and
'--chain_partition'.

The variable BOARD_AVBTOOL_BOOT_ADD_HASH_FOOTER_ARGS can be used to
specify additional options passed to 'avbtool add_hash_footer' for
boot.img. Typical options to be used here include '--hash_algorithm' and
'--salt'.

The variable BOARD_AVBTOOL_SYSTEM_ADD_HASHTREE_FOOTER_ARGS can be used
to specify additional options passed to 'avbtool add_hashtree_footer'
for systems.img. Typical options to be used here include
'--hash_algorithm', '--salt', and '--block_size'.

Bug: 31264226
Test: aosp_x86_64-eng 'm' and 'm dist' successful.

Change-Id: Ic9a61cfc65c148b12996e57f04da5432eef6b982
2016-09-28 18:55:41 -04:00
Tao Bao 199c0b3948 Analyze unchanged blocks in odex files.
am: d0814585b8

Change-Id: Ie4d6415d4d3ebc1e28a299bd3bb0150262a07535
2016-09-28 19:37:54 +00:00
Chih-Hung Hsieh 2008a5350d Merge "Fix pylint warning and refactor project_list." am: 6784a3fcdd am: ac2df1c205 am: 62c9956819
am: 882737b7cb

Change-Id: I461a7e92241789453b0aeb9cfb667f4bed2b9440
2016-09-28 18:02:58 +00:00
Chih-Hung Hsieh 882737b7cb Merge "Fix pylint warning and refactor project_list." am: 6784a3fcdd am: ac2df1c205
am: 62c9956819

Change-Id: I9171de8c9062b93de102ae782345d93da6892598
2016-09-28 18:00:50 +00:00
Chih-Hung Hsieh 62c9956819 Merge "Fix pylint warning and refactor project_list." am: 6784a3fcdd
am: ac2df1c205

Change-Id: I7f2017a50ab5b5aee425e86211e0746538e94e90
2016-09-28 17:57:47 +00:00
Treehugger Robot 6784a3fcdd Merge "Fix pylint warning and refactor project_list." 2016-09-28 17:47:41 +00:00
Tao Bao d744df6f60 Merge "Analyze unchanged blocks in odex files." am: 6e12b72966 am: 0493339a1f am: 4fbdde5150
am: 7f5f23160d

Change-Id: I3d67e6d64c2449509b300721e5a37355d6b536eb
2016-09-28 17:21:25 +00:00
Tao Bao 7f5f23160d Merge "Analyze unchanged blocks in odex files." am: 6e12b72966 am: 0493339a1f
am: 4fbdde5150

Change-Id: Ibbd1b92b81249b7f11de1ba166ff04ee7ba73b88
2016-09-28 17:18:15 +00:00
Tao Bao 4fbdde5150 Merge "Analyze unchanged blocks in odex files." am: 6e12b72966
am: 0493339a1f

Change-Id: Icfdd5a0f02f43fdca2adf6468b106fcd403614bc
2016-09-28 17:15:45 +00:00
Tao Bao d0814585b8 Analyze unchanged blocks in odex files.
In BBOTA, we generate patches based on _all_ the blocks of a pair of
input files (src and tgt). For security incremental OTAs, one common
pattern is that only a few blocks are changed in odex files (e.g.
headers). We don't really need to stash/patch the unchanged blocks.

This CL analyzes the unchanged blocks in odex files and computes the
diff for the changed blocks only. It reduces the OTA install time by
about 25% to 40% in our experiments, by paying an increase of 5% to 30%
OTA generation time cost.

Bug: 31570716
Test: Generate an incremental and apply on device.

Change-Id: If842c1afeff6894a3d27eb60b7e8f65a179b7977
(cherry picked from commit 08c8583aea)
2016-09-28 10:13:33 -07:00
Tao Bao 6e12b72966 Merge "Analyze unchanged blocks in odex files." 2016-09-28 17:08:10 +00:00
Chih-hung Hsieh 7314c7012a Merge "Fix Google pylint warnings." am: aa5f2ccde2 am: 2d06a27ae6 am: 9e0609ee36
am: c67151bdf2

Change-Id: I03675e3531cafe5f22ac283658ebb98c667dbe9d
2016-09-28 04:26:07 +00:00
Chih-hung Hsieh c67151bdf2 Merge "Fix Google pylint warnings." am: aa5f2ccde2 am: 2d06a27ae6
am: 9e0609ee36

Change-Id: Id5152ca1676935175d7a5c911b128d7e4b312aae
2016-09-28 04:22:56 +00:00
Chih-hung Hsieh 9e0609ee36 Merge "Fix Google pylint warnings." am: aa5f2ccde2
am: 2d06a27ae6

Change-Id: Id90eacb4b5316ac1cecd4c8578127fbf6a1c5102
2016-09-28 04:19:56 +00:00
Chih-Hung Hsieh 9f766239f0 Fix pylint warning and refactor project_list.
Bug: 31377083
Test: run warn.py --byproject build.log
Change-Id: Id442cf6608bf5c14784063c05f5ff0b731f17486
2016-09-27 21:13:52 -07:00
Chih-Hung Hsieh b426c54e8a Fix Google pylint warnings.
* Rename 'severity' to 'Severity'.
* Fix bad line indentations and space.

Test: run warn.py --byproject build.log
Change-Id: I33d701cca408b5ca4715be8d44c890942b7d132a
2016-09-27 18:15:40 -07:00
Chih-Hung Hsieh fa8cd6b1a6 Merge "Add buttons to group warning by project or severity." am: 9796175d0f am: 9dee2ac43c am: 3791e7b242
am: 0c86a5b490

Change-Id: I1224fbb38e7d237fe4ad22b4760084d64b4b5ac0
2016-09-27 21:28:11 +00:00
Chih-Hung Hsieh 0c86a5b490 Merge "Add buttons to group warning by project or severity." am: 9796175d0f am: 9dee2ac43c
am: 3791e7b242

Change-Id: Ia47f5be94cfc37d2bb934eef97a3b9f860a0d139
2016-09-27 21:25:39 +00:00
Chih-Hung Hsieh 3791e7b242 Merge "Add buttons to group warning by project or severity." am: 9796175d0f
am: 9dee2ac43c

Change-Id: I10ff9eb5c01a9d594ccc3332b5a8daaf673705c8
2016-09-27 21:22:40 +00:00
Przemyslaw Szczepaniak 420ba30adb Fix for non-empty a[name] tags in openJdk based javadocs. am: a7edd92c45 am: ea14cfba0f
am: 6169f2b065

Change-Id: I328b66a8a08126baeaa38a66d888dcf0521c6976
2016-09-27 09:16:41 +00:00
Przemyslaw Szczepaniak 108cb427bf Fix for non-empty a[name] tags in openJdk based javadocs. am: a7edd92c45 am: 8bcdd9a36c
am: 06dcac3666

Change-Id: Ia992d83eb4663ec442ddc0ac73ec6e166fb6bfe9
2016-09-27 09:13:40 +00:00
Przemyslaw Szczepaniak ea14cfba0f Fix for non-empty a[name] tags in openJdk based javadocs.
am: a7edd92c45

Change-Id: I5759d442e038f31105c249250ce3474564d7954c
2016-09-27 09:11:55 +00:00
Przemyslaw Szczepaniak 06dcac3666 Fix for non-empty a[name] tags in openJdk based javadocs. am: a7edd92c45
am: 8bcdd9a36c

Change-Id: Idf0ddf51b41549c55336a2c583d0f6199165284c
2016-09-27 09:11:55 +00:00
Przemyslaw Szczepaniak 8bcdd9a36c Fix for non-empty a[name] tags in openJdk based javadocs.
am: a7edd92c45

Change-Id: Iaef35c55e7af6f27a12944491026ee45b5ef8312
2016-09-27 09:08:40 +00:00
Chih-Hung Hsieh 2a38c37d57 Add buttons to group warning by project or severity.
* Add more project patterns.
* Add more top level comments for global variables and functions.
* Resequence severity numbers to match the dump order.
* Emit warning messages and tables to static HTML JavaScript arrays.
* Replace old static HTML table dumper functions with
  new dynamic HTML JavaScript to generate sections of warnings.
* Warning messages are grouped into sections by severity or projects.
* Better descriptions for SKIP warning patterns.
* Replace output function with print.

Bug: 31377083
Test: run warn.py --byproject build.log
Change-Id: I7b44ef6223d5b2f1aa31655a5a47d854f9a1dedc
2016-09-26 16:02:12 -07:00
Chih-Hung Hsieh cf502f9b60 Merge "Fix Google pylint warnings." am: bcd229277a am: 64af14a4d2 am: 14a22e9222
am: 2616d8adfe

Change-Id: I96493a062565aac92bc0cff758c96fcfe92b1541
2016-09-26 21:32:26 +00:00
Chih-Hung Hsieh 2616d8adfe Merge "Fix Google pylint warnings." am: bcd229277a am: 64af14a4d2
am: 14a22e9222

Change-Id: I6ef533be4ce3c798a4ff4c7d7364b3b3f5b81e49
2016-09-26 21:27:55 +00:00
Chih-Hung Hsieh 14a22e9222 Merge "Fix Google pylint warnings." am: bcd229277a
am: 64af14a4d2

Change-Id: I332da66829738d6793ca1795103f903271f235c6
2016-09-26 21:25:25 +00:00
Treehugger Robot bcd229277a Merge "Fix Google pylint warnings." 2016-09-26 21:18:08 +00:00
Chih-Hung Hsieh 6c0fdbb84d Fix Google pylint warnings.
* Rename variables and functions to follow Google coding style.
* Fix line indentations to follow Google coding style.
* Add module and function docstrings.
* Change shebang line to avoid pylint warning.
* Suppress some pylint warnings to avoid too many changes at once.
* Fix typos.

Test: run warn.py --byproject build.log
Change-Id: I569961981b562e35cb5609a96cd5ebb40a80829c
2016-09-26 12:24:54 -07:00
Przemyslaw Szczepaniak a7edd92c45 Fix for non-empty a[name] tags in openJdk based javadocs.
openJdk based android javadoc contains <a name=... tags
that are non-empty. Currently they are being hidden,
causing badly formatted pages for some java.* classes
(missing text and random whitespace blocks).

This change makes the existing a[name] hiding rule
apply only to empty tags.

Test: make docs
Bug: 31700998
Change-Id: Ifa75bbabe308d7aed0cce6165c1113e5a382a121
2016-09-26 16:36:03 +00:00
Alex Deymo a1c977735b fat16copy: Fix allocation logic when extending directories.
When extending a directory, empty directory entries were left behind
signaling the end of a directory.

Bug: 31570546
Test: make dist; mdir shows all the files.

(cherry picked from commit d4516300b010c8155861e310dac871e8c10d3382)

Change-Id: Ie3d82cfaad51be73911293a54d18746e8adf62a2
2016-09-23 14:21:43 -07:00
Alex Deymo 567c5d0f95 fat16copy: Sort new directory entries.
Sort the entries returned by os.listdir to give a consistent ordering
across build.

Bug: None
Test: `make dist`

(cherry picked from commit ef34e5dca216e61fd81020e818f247f6ce47d26e)

Change-Id: I2f80889684f108208f07e13d725acaa7bc0ab099
2016-09-23 14:21:38 -07:00
Casey Dahlin df71efe378 Make fat16copy.py add . and .. entries to directories
Test: fsck no longer complains
Bug: None

(cherry picked from commit 7d38ec37432c307d729b9a8fdb78dbf820427538)

Change-Id: I587f400df2f57b987df8b92d551c99f2f42a9af6
2016-09-23 14:21:31 -07:00
Tao Bao 08c8583aea Analyze unchanged blocks in odex files.
In BBOTA, we generate patches based on _all_ the blocks of a pair of
input files (src and tgt). For security incremental OTAs, one common
pattern is that only a few blocks are changed in odex files (e.g.
headers). We don't really need to stash/patch the unchanged blocks.

This CL analyzes the unchanged blocks in odex files and computes the
diff for the changed blocks only. It reduces the OTA install time by
about 25% to 40% in our experiments, by paying an increase of 5% to 30%
OTA generation time cost.

Bug: 31570716
Test: Generate an incremental and apply on device.

Change-Id: If842c1afeff6894a3d27eb60b7e8f65a179b7977
2016-09-23 12:15:23 -07:00
Chih-Hung Hsieh 9f69625a12 Merge "Recognize new warning messages." am: b0553ca65b am: d95f164112 am: b6e37662ba
am: 6b4ce491f2

Change-Id: I11efbfa60fa741938b0abc6f3a6945f4ce98e39e
2016-09-23 04:44:07 +00:00
Chih-Hung Hsieh 6b4ce491f2 Merge "Recognize new warning messages." am: b0553ca65b am: d95f164112
am: b6e37662ba

Change-Id: Iaa46479649224d5b8e05d69d9af57aedd3d396c7
2016-09-23 04:40:43 +00:00
Chih-Hung Hsieh b6e37662ba Merge "Recognize new warning messages." am: b0553ca65b
am: d95f164112

Change-Id: I063024bfa1bf1ad1ef516905ec04a0902cc840c1
2016-09-23 04:38:41 +00:00
Chih-Hung Hsieh acdc956ada Merge "Simplify warn.py and output of warning count table and tablerow." am: eac773047f am: d7f5496a7c am: 693c1baa15
am: 213815c966

Change-Id: I7da8e3d746822a87324db0158ec4a57350d70c42
2016-09-23 01:23:55 +00:00
Chih-Hung Hsieh 0a19207f7b Recognize new warning messages.
* -Wunnamed-type-template-args and -W#pragma-messages

Test: run warn.py with build.log.
Change-Id: I36277e001081604f92a4d9c92f9a0b5d3f0ee5e5
2016-09-22 17:44:38 -07:00
Chih-Hung Hsieh 213815c966 Merge "Simplify warn.py and output of warning count table and tablerow." am: eac773047f am: d7f5496a7c
am: 693c1baa15

Change-Id: I5830b4e416df88c5988bf2564c5d7461fd68626f
2016-09-23 00:15:11 +00:00
Chih-Hung Hsieh 693c1baa15 Merge "Simplify warn.py and output of warning count table and tablerow." am: eac773047f
am: d7f5496a7c

Change-Id: Ia434a91fd21427107170931bc7a6dd26199754f1
2016-09-23 00:13:41 +00:00
Dirk Dougherty ddbe6ff5c5 Support "ID" lang code in place of "IN". am: fc61720cd5 am: 992ceaad75
am: 197ed2bf27

Change-Id: I2798e586fdcf1a351febd738d06566d8778d9637
2016-09-23 00:12:06 +00:00
Dirk Dougherty a57fa8b2f9 Support "ID" lang code in place of "IN". am: fc61720cd5 am: 1e3157760a
am: 4f4060398b

Change-Id: Ibbf7dae4de81f65b4caa9f433be5f144d251c449
2016-09-22 22:25:38 +00:00
Dirk Dougherty 197ed2bf27 Support "ID" lang code in place of "IN". am: fc61720cd5
am: 992ceaad75

Change-Id: Ic003d4fb88047791c4b2272e03bc6c850e652962
2016-09-22 22:18:04 +00:00
Chih-Hung Hsieh 99459fc0d0 Simplify warn.py and output of warning count table and tablerow.
* Use a loop to initialize empty 'members' and 'option' of warnpatterns.
* Create severity.{color,columnheader,header} from an attributes list.
* Compute totalbyproject and totalbyseverity from a constructor.
* Skip all-zero rows and columns in the warning count table.
* Remove redundant spaces and newlines in tablerow output.

Test: run through build.log files
Change-Id: I4d3fa4ecd92e1afab91d85b7535d03f8696e83d8
2016-09-22 15:15:43 -07:00
Dirk Dougherty 1e3157760a Support "ID" lang code in place of "IN".
am: fc61720cd5

Change-Id: If9670423332a3c785cc7b7ddc5e53b524f9e4e7d
2016-09-22 21:54:37 +00:00
Dirk Dougherty 992ceaad75 Support "ID" lang code in place of "IN".
am: fc61720cd5

Change-Id: I5b83ffec940a6b0c0d613955027b7b0668cbe589
2016-09-22 20:08:54 +00:00
Dirk Dougherty fc61720cd5 Support "ID" lang code in place of "IN".
Change-Id: I56632e638fdda81e494cbb7080502b35393a291f
2016-09-21 18:29:18 -07:00
Dan Willemsen 98b277b930 Merge "Fix link_type checking" am: 665cda08f0 am: 1347d959de am: 8459bbca6f
am: 83aba3a7ab

Change-Id: I0cca5c1e262c8a8d92858ed5c927e4775c2e3a6e
2016-09-20 03:29:59 +00:00
Dan Willemsen 83aba3a7ab Merge "Fix link_type checking" am: 665cda08f0 am: 1347d959de
am: 8459bbca6f

Change-Id: I22da0f1703995c4734a72901abe2dbcee62c1406
2016-09-20 01:01:38 +00:00
Dan Willemsen 8459bbca6f Merge "Fix link_type checking" am: 665cda08f0
am: 1347d959de

Change-Id: Ia7ba9accbfa4c7de8843d5554a62524500509d5b
2016-09-19 23:21:16 +00:00
Dan Willemsen 665cda08f0 Merge "Fix link_type checking" 2016-09-19 21:54:09 +00:00
Tao Bao 4c851b1098 Change the default parameter values in common.MakeTempFile().
tempfile.TemporaryFile() complains when 'None' is passed as the
prefix/suffix. It uses prefix='tmp' and suffix='' as the default values
and we should do the same.

Test: Call check_ota_package_signature.py and ota_from_target_files.py
and they still work.

Change-Id: I7fb023a3fd0b1a57c009631d0c57a7bb8e4cb5a3
2016-09-19 13:58:49 -07:00
Tao Bao 786fb29ed1 Merge "Add a script that verifies OTA package signature." am: 3b0cb6e842 am: 3db2c7fedd am: e3ca43013f
am: f71719b635

Change-Id: I94972f2ff973b6ee1247cc88824b058eb34c82a8
2016-09-19 17:46:12 +00:00
Tao Bao f71719b635 Merge "Add a script that verifies OTA package signature." am: 3b0cb6e842 am: 3db2c7fedd
am: e3ca43013f

Change-Id: I04d5da95fe3299b2f8fb378cfa0b27e69333d1da
2016-09-19 17:42:36 +00:00
Tao Bao e3ca43013f Merge "Add a script that verifies OTA package signature." am: 3b0cb6e842
am: 3db2c7fedd

Change-Id: I017800761e4ab883af62d42075542fb250cde22c
2016-09-19 17:39:35 +00:00
Tao Bao 9c63fb59bd Add a script that verifies OTA package signature.
Currently it supports verifying packages signed with RSA algorithms
(v1-v4 as in bootable/recovery/verifier.cpp). No support for ECDSA (v5)
signed packages yet.

$ ./build/tools/releasetools/check_ota_package_signature.py \
    bootable/recovery/tests/testdata/testkey_v1.x509.pem \
    bootable/recovery/tests/testdata/otasigned_v1.zip

Package: bootable/recovery/tests/testdata/otasigned_v1.zip
Certificate: bootable/recovery/tests/testdata/testkey_v1.x509.pem
Comment length: 1738
Signed data length: 2269
Use SHA-256: False
Digest: 115e688ec3b77743070b743453e2fc6ce8754484

VERIFIED

Bug: 31523193
Test: Used the tool to verify existing packages (like above).

Change-Id: I71d3569e858c729cb64825c5c7688ededc397aa8
2016-09-16 15:08:40 -07:00
Dan Willemsen 121e284b46 Fix link_type checking
This was printing "error:", but not actually triggering an error.
Instead of trying to write a single line bash script to handle this,
move the actual check into python. This allows us to print all of the
errors for a single module before triggering the failure.

Also updates the warning format and the warn.py script to properly parse
these warning. Many of the java:sdk -> java:platform warnings are false
positives due to the lack of LOCAL_SDK_VERSION markings on prebuilts.

Individual tags can be marked as warnings now, which lets us check for
system libraries linking against vendor libraries (which won't work on
AOSP). I'm not sure this is a completely valid check, which one reason
that it's just a warning.

Test: m all_link_types (with some missing libs commented out)
Change-Id: I333e418c9a4511b7c7e826891ae481da08fbf6f9
2016-09-15 14:40:39 -07:00
Chih-hung Hsieh 1cb5dd22c4 Merge "Emit a table of warnings by project and severity." am: 029ced528b am: ecbfa77903 am: 74a9e76175
am: 205eac92ea

Change-Id: I821e6c91a9c339cfc15a370b2517806b89342a87
2016-09-14 17:21:17 +00:00
Chih-hung Hsieh 205eac92ea Merge "Emit a table of warnings by project and severity." am: 029ced528b am: ecbfa77903
am: 74a9e76175

Change-Id: I79075e55329c0c04e90de9a10d8b036c5d776f82
2016-09-14 16:57:14 +00:00
Chih-hung Hsieh 74a9e76175 Merge "Emit a table of warnings by project and severity." am: 029ced528b
am: ecbfa77903

Change-Id: Idb0cceaf1d3476e08879f1cba9986bce6ec3376b
2016-09-14 16:54:45 +00:00
Chih-hung Hsieh 029ced528b Merge "Emit a table of warnings by project and severity." 2016-09-14 16:39:27 +00:00
Dan Willemsen 4cb7686365 resolve merge conflicts of 8dadc2d to nyc-mr1-dev-plus-aosp
am: d111debc18

Change-Id: If1706cc449750030bedb56ecf1f2e60a91105ea3
2016-09-14 03:05:49 +00:00
Chih-Hung Hsieh e41c99b721 Emit a table of warnings by project and severity.
* Use 't1' CSS class for main warning tables,
  and default table style for new warning count table.
* Count total skipped warnings.
* Append count of warnings in each severity header.
* Fix some skipped warning patterns and count/dump skipped warnings.
* Add dumpskippedanchors function to fix expand_collapse
  error when --byproject flag is used and severity.SKIP
  is not emitted.
* Minor coding style changes:
  * Loop through severity.kinds.
  * Remove unused import.
  * Add spaces around assignment operators.
  * Adjust indentation.

Bug: 31377083
Test: run warn.py with build.log
Change-Id: I68949edc4601b10ea2f7ac84e48e6c3da4ab1e4f
2016-09-13 10:18:01 -07:00
Dan Willemsen d111debc18 resolve merge conflicts of 8dadc2d to nyc-mr1-dev-plus-aosp
Change-Id: I296a81c17f9311a9425619141e1b5f5f5fb4c0dc
2016-09-12 21:43:19 -07:00
Dan Willemsen 8dadc2d2e6 Merge "Remove incremental workaround for aapt overlays" am: 946e58bdff
am: cd573e3aef

Change-Id: I7f90596676af64202fe17f76beb49f0a61a0dc1b
2016-09-13 04:38:22 +00:00
Dan Willemsen 8e6e6fdba9 Remove incremental workaround for aapt overlays
This workaround to clean package intermediates is no longer necessary,
as ninja reruns commands whose command line changes.

Test: switch between product overlays that use add-resource, verify
      R.java is regenerated.
Change-Id: Icb1f76360e39882e4401180414a031956777b020
2016-09-12 20:30:12 -07:00
smain@google.com 1d36912842 add support for constraint layout's DATA list am: 7055897faa am: bca27e5836
am: 0070d17b04

Change-Id: Ic64f129d5e714f07272fca0fe1ff324da8627f5f
2016-09-10 01:50:20 +00:00
smain@google.com 0070d17b04 add support for constraint layout's DATA list am: 7055897faa
am: bca27e5836

Change-Id: I9689cfe6088637a6702d8bee52835eb7ff19a33c
2016-09-10 01:37:52 +00:00
smain@google.com 4330a151cd add support for constraint layout's DATA list am: 7055897faa am: 210083ab97
am: 6fee24869b

Change-Id: I422c3feb38337c2426eec264fca0c35a3b99d6ae
2016-09-10 01:37:51 +00:00
smain@google.com bca27e5836 add support for constraint layout's DATA list
am: 7055897faa

Change-Id: Ibce59cf7867e6a197a39873453dae8336419e233
2016-09-10 01:33:17 +00:00
smain@google.com 210083ab97 add support for constraint layout's DATA list
am: 7055897faa

Change-Id: I9781454790423d51385094aaa530d994cccb1016
2016-09-10 01:32:24 +00:00
Scott Main 64bd41ff7d Merge "add support for constraint layout's DATA list" into nyc-dev 2016-09-10 01:28:09 +00:00
smain@google.com 7055897faa add support for constraint layout's DATA list
Change-Id: Ia301ad235dcfd5a5c2bb13bfa6daa753f9206800
2016-09-09 15:47:58 -07:00
Alex Klyubin c420ee4c39 Merge ""SignApk" in Created-By header" am: 6e85eeaf53 am: 1989b26783 am: c16afc3e6e
am: d6acfd5767

Change-Id: I7d42dfe633c22006115b0d4ddac4fc9cd576bebd
2016-09-08 17:25:30 +00:00
Alex Klyubin d6acfd5767 Merge ""SignApk" in Created-By header" am: 6e85eeaf53 am: 1989b26783
am: c16afc3e6e

Change-Id: I87fae3aca5c6b6736620dadb8567512a6757c115
2016-09-08 17:23:01 +00:00
Alex Klyubin c16afc3e6e Merge ""SignApk" in Created-By header" am: 6e85eeaf53
am: 1989b26783

Change-Id: Ie6ba1f239e36ee671ae9b5973bef6f1b8f584b5a
2016-09-08 17:20:36 +00:00
Treehugger Robot 6e85eeaf53 Merge ""SignApk" in Created-By header" 2016-09-08 17:10:37 +00:00
Alex Klyubin 969e354b1f "SignApk" in Created-By header
The switch to apksig changed the Created-By header value in .SF file
from "1.0 (Android SignApk)" to "1.0 (Android apksigner)". This commit
reverts the value back to "1.0 (Android SignApk)".

Change-Id: I2fc462cade40a5b31bb6191996fd6f18fabbf08f
2016-09-07 13:21:00 -07:00
Casey Dahlin 9a9dfa49b1 Merge "Add tool to copy files in to fat16 images" am: bfea84dabc am: f061b906e4 am: 1da082d2c5
am: 2ceedbee92

Change-Id: If1a692da6119a97ceb3ca25b07c06d823ebc6c5e
2016-09-07 20:18:53 +00:00
Casey Dahlin 2ceedbee92 Merge "Add tool to copy files in to fat16 images" am: bfea84dabc am: f061b906e4
am: 1da082d2c5

Change-Id: Ia13845de77d1750c7ba54de13d06ed0eb55b8ac9
2016-09-07 20:09:10 +00:00
Casey Dahlin 1da082d2c5 Merge "Add tool to copy files in to fat16 images" am: bfea84dabc
am: f061b906e4

Change-Id: Ia3988e59b82245ffa41b92a5df057cada1ac6154
2016-09-07 20:06:41 +00:00
Treehugger Robot bfea84dabc Merge "Add tool to copy files in to fat16 images" 2016-09-07 19:51:06 +00:00
Chih-hung Hsieh 094af3c22d Merge "Recognize new clang-tidy and Java warnings." am: 0c9a2ee864 am: 7df7722f2a am: 77a81d5e96
am: db3a22cd84

Change-Id: Ifd2d6771fd21bc6848a54f66fc5ce1bf810bf1a5
2016-09-07 05:43:05 +00:00
Chih-hung Hsieh db3a22cd84 Merge "Recognize new clang-tidy and Java warnings." am: 0c9a2ee864 am: 7df7722f2a
am: 77a81d5e96

Change-Id: I9928bc1231be5df2931ec227ffdc9b2e720f34c6
2016-09-07 05:40:35 +00:00
Chih-hung Hsieh 77a81d5e96 Merge "Recognize new clang-tidy and Java warnings." am: 0c9a2ee864
am: 7df7722f2a

Change-Id: I6ee8322bea222340457ce1245844f5e2e6a426dc
2016-09-07 05:38:05 +00:00
Chih-hung Hsieh 0c9a2ee864 Merge "Recognize new clang-tidy and Java warnings." 2016-09-07 05:27:45 +00:00
Chih-Hung Hsieh 0862c48770 Recognize new clang-tidy and Java warnings.
Test: run warn.py with build.log
Change-Id: I11ff844bcfd7fb13aef8909307bc7eb1f5ee9b2a
2016-09-07 05:27:16 +00:00
smain@google.com 3b7b490ecf delete 'templates-sdk-dev', all these files were merged back into 'templates-sdk' with this CL: https://googleplex-android-review.git.corp.google.com/#/c/1394582/ and this depends on the following CL to update all the doc build targets: https://googleplex-android-review.git.corp.google.com/#/c/1406302/
am: 6c8efecbda

Change-Id: Id24a404a3944049979397d08c58ccbaeb7772e9a
2016-09-06 18:04:32 +00:00
smain@google.com 232a4de22f delete 'templates-sdk-dev', all these files were merged back into 'templates-sdk' with this CL: https://googleplex-android-review.git.corp.google.com/#/c/1394582/ and this depends on the following CL to update all the doc build targets: https://googleplex-android-review.git.corp.google.com/#/c/1406302/ am: 6c8efecbda am: 21c9005ff1 am: 22f2435e98 am: 5cdd592cf2
am: 48e332d73b

Change-Id: Ifffcabf86343374dd1ba3a722d52540eb512d529
2016-09-02 22:11:02 +00:00
smain@google.com 48e332d73b delete 'templates-sdk-dev', all these files were merged back into 'templates-sdk' with this CL: https://googleplex-android-review.git.corp.google.com/#/c/1394582/ and this depends on the following CL to update all the doc build targets: https://googleplex-android-review.git.corp.google.com/#/c/1406302/ am: 6c8efecbda am: 21c9005ff1 am: 22f2435e98
am: 5cdd592cf2

Change-Id: I76167406f900f2a70fe4592a463944829e199921
2016-09-02 22:04:10 +00:00
smain@google.com 5cdd592cf2 delete 'templates-sdk-dev', all these files were merged back into 'templates-sdk' with this CL: https://googleplex-android-review.git.corp.google.com/#/c/1394582/ and this depends on the following CL to update all the doc build targets: https://googleplex-android-review.git.corp.google.com/#/c/1406302/ am: 6c8efecbda am: 21c9005ff1
am: 22f2435e98

Change-Id: Id320eadbf32102a1be1b1ec2fa527ee3aa230cfc
2016-09-02 21:55:20 +00:00
smain@google.com 21c9005ff1 delete 'templates-sdk-dev', all these files were merged back into 'templates-sdk' with this CL: https://googleplex-android-review.git.corp.google.com/#/c/1394582/ and this depends on the following CL to update all the doc build targets: https://googleplex-android-review.git.corp.google.com/#/c/1406302/
am: 6c8efecbda

Change-Id: I4692f455ed30f7cbbb10c40b35718c8a8952b27e
2016-09-02 21:36:14 +00:00
Casey Dahlin 29e2b21c0a Add tool to copy files in to fat16 images
fat16copy.py can be used to copy files or directories in to the root of
a fat16 image.

Usage: fat16copy <image> <file> [<file> ...]

Test: Used to compose a Raspberry Pi 3 boot image
Bug: 28912590
Change-Id: I29c9eec3786e2c5cc94f9a160360bac850809a93
2016-09-02 14:13:47 -07:00
Sami Tolvanen 5d4041898e Merge "build_image: add padding to match partition size" am: ef5751c1ec am: 5875285ecf am: e261a2dc20
am: 3d207c8889

Change-Id: I467d80e7e6c68de74b23404ffa0153a54c14f9ab
2016-09-02 18:28:28 +00:00
Sami Tolvanen 3d207c8889 Merge "build_image: add padding to match partition size" am: ef5751c1ec am: 5875285ecf
am: e261a2dc20

Change-Id: Ib396abb9f6707c984b2888b8b5a265d8ebcf76be
2016-09-02 18:24:43 +00:00
Sami Tolvanen e261a2dc20 Merge "build_image: add padding to match partition size" am: ef5751c1ec
am: 5875285ecf

Change-Id: I6b5e882c7a980d43aad310ed925061da6d3a4c4a
2016-09-02 18:21:42 +00:00
smain@google.com 6c8efecbda delete 'templates-sdk-dev', all these files were merged
back into 'templates-sdk' with this CL:
https://googleplex-android-review.git.corp.google.com/#/c/1394582/
and this depends on the following CL to update all the doc build targets:
https://googleplex-android-review.git.corp.google.com/#/c/1406302/

Change-Id: Id38134e1d35c5235bb66241c50945b55ac9de1dd
2016-09-02 11:02:41 -07:00
Sami Tolvanen 433905f50e build_image: add padding to match partition size
For some partition sizes, we currently build an image that's 1-2
blocks smaller than the actual partition, which causes fs_mgr to
not find metadata. This change adds padding to FEC metadata that
correctly positions the metadata header at the end.

Bug: 28865197
Change-Id: Ie0e044715a9c5ae8ba395e7d2ff9fbd7cffc0b4c
2016-09-02 10:20:02 -07:00
smain@google.com 938e440e03 Merge all of templates-sdk-dev into templates-sdk. I actually just deleted templates-sdk/ then made a copy of templates-sdk-dev/ and then renamed it to templates-sdk/. So this is a clean copy. Once this goes through cleanly, I'll delete templates-sdk-dev/ and update all doc targets to use templates-sdk/. am: 4f3a05a2c6 am: 0e35de1436
am: 8a9d4732d2

Change-Id: Ib1c8b4cdfd7eb0ed15d26d7fe2ef50ce3b920678
2016-08-31 22:48:50 +00:00
smain@google.com 8a9d4732d2 Merge all of templates-sdk-dev into templates-sdk. I actually just deleted templates-sdk/ then made a copy of templates-sdk-dev/ and then renamed it to templates-sdk/. So this is a clean copy. Once this goes through cleanly, I'll delete templates-sdk-dev/ and update all doc targets to use templates-sdk/. am: 4f3a05a2c6
am: 0e35de1436

Change-Id: I7b0a435755ad7a18acbd83bdb30fd3e9bee4577f
2016-08-31 22:19:29 +00:00
smain@google.com 5b5e03c2e6 Merge all of templates-sdk-dev into templates-sdk. I actually just deleted templates-sdk/ then made a copy of templates-sdk-dev/ and then renamed it to templates-sdk/. So this is a clean copy. Once this goes through cleanly, I'll delete templates-sdk-dev/ and update all doc targets to use templates-sdk/. am: 4f3a05a2c6 am: 5c7588bd37
am: 26ded8766f

Change-Id: I92814d1ad60bb0417a3b4d1165dd13924b0e7ad2
2016-08-31 22:19:24 +00:00
smain@google.com 0e35de1436 Merge all of templates-sdk-dev into templates-sdk. I actually just deleted templates-sdk/ then made a copy of templates-sdk-dev/ and then renamed it to templates-sdk/. So this is a clean copy. Once this goes through cleanly, I'll delete templates-sdk-dev/ and update all doc targets to use templates-sdk/.
am: 4f3a05a2c6

Change-Id: Icd5ae3ecdeb840c347c6bedcfc802fe2e6c4a76f
2016-08-31 22:17:16 +00:00
smain@google.com 5c7588bd37 Merge all of templates-sdk-dev into templates-sdk. I actually just deleted templates-sdk/ then made a copy of templates-sdk-dev/ and then renamed it to templates-sdk/. So this is a clean copy. Once this goes through cleanly, I'll delete templates-sdk-dev/ and update all doc targets to use templates-sdk/.
am: 4f3a05a2c6

Change-Id: I11564954529ed7a1cd1098c66b052190f3d3d6f6
2016-08-31 22:13:34 +00:00
smain@google.com 4f3a05a2c6 Merge all of templates-sdk-dev into templates-sdk.
I actually just deleted templates-sdk/ then made a copy of templates-sdk-dev/
and then renamed it to templates-sdk/. So this is a clean copy.
Once this goes through cleanly, I'll delete templates-sdk-dev/ and update
all doc targets to use templates-sdk/.

Change-Id: I276695969e02fcf718370564e84b077a9d43725e
2016-08-31 11:30:02 -07:00
smain@google.com a40ab99f19 delete templates-ds (the original attempt to template docs for devsite) delete templates-sdk-refonly (the "dev branch" for the reference only flag) am: 6d00e69c3f am: 034014d684
am: 03562cb191

Change-Id: I66a2caee2c2626c9fe1561c034ce269228418dc9
2016-08-31 15:22:58 +00:00
smain@google.com 03562cb191 delete templates-ds (the original attempt to template docs for devsite) delete templates-sdk-refonly (the "dev branch" for the reference only flag) am: 6d00e69c3f
am: 034014d684

Change-Id: Ib54979e22225c271579390dc55c7c4d32a067d13
2016-08-31 15:14:54 +00:00
smain@google.com f81ba20ad8 delete templates-ds (the original attempt to template docs for devsite) delete templates-sdk-refonly (the "dev branch" for the reference only flag) am: 6d00e69c3f am: e4b21d82eb
am: f1d6b8f2a8

Change-Id: I4597218a0cba21b7a1f6ca4eaebccdc459e107b6
2016-08-31 15:11:54 +00:00
smain@google.com 034014d684 delete templates-ds (the original attempt to template docs for devsite) delete templates-sdk-refonly (the "dev branch" for the reference only flag)
am: 6d00e69c3f

Change-Id: I5489a9a32196c21f98bbd4e3e98bc484fe5710e1
2016-08-31 15:09:46 +00:00
smain@google.com e4b21d82eb delete templates-ds (the original attempt to template docs for devsite) delete templates-sdk-refonly (the "dev branch" for the reference only flag)
am: 6d00e69c3f

Change-Id: Id709e0c519d6a79e45f6865f7fac200762501091
2016-08-31 15:05:54 +00:00
smain@google.com 4bb23ab03c delete no-longer-used custom sdkpage template. depends on https://googleplex-android-review.git.corp.google.com/#/c/1389393/ am: 42859fae46 am: 5ba1d83e01
am: 57f9a69a03

Change-Id: Id7b3a67decc36361ce4a183f82b54416e6548459
2016-08-30 21:12:21 +00:00
smain@google.com b10350d956 update templates-sdk-dev to support the referenceonly build. includes an updated snapshot of the css and js files from devsite am: eeeb9b832a am: 86f20d0dd6
am: 3dbf7a81e0

Change-Id: Ic086caa422e3197f1677050ff21730661191f59b
2016-08-30 21:12:17 +00:00
smain@google.com 9dbf2bb569 delete no-longer-used custom sdkpage template. depends on https://googleplex-android-review.git.corp.google.com/#/c/1389393/ am: 42859fae46 am: 618756ab95
am: 6deecc4c35

Change-Id: Ice5d1c76feda0f189f50ecada155ae97f4fc7e8b
2016-08-30 20:55:43 +00:00
smain@google.com 405a2084e5 update templates-sdk-dev to support the referenceonly build. includes an updated snapshot of the css and js files from devsite am: eeeb9b832a am: 7501218e40
am: 9674a9975a

Change-Id: I0d3c5c49c033845f40b581c439ebbde12212e15f
2016-08-30 20:55:41 +00:00
smain@google.com 6d00e69c3f delete templates-ds (the original attempt to template docs for devsite)
delete templates-sdk-refonly (the "dev branch" for the reference only flag)

Change-Id: I73e2760fcca76b7242be9aefa92006df3a555a03
2016-08-30 13:55:16 -07:00
smain@google.com 57f9a69a03 delete no-longer-used custom sdkpage template. depends on https://googleplex-android-review.git.corp.google.com/#/c/1389393/ am: 42859fae46
am: 5ba1d83e01

Change-Id: Iea623c514250e670752fba76cce7a7ef018ebe18
2016-08-30 20:52:44 +00:00
smain@google.com 3dbf7a81e0 update templates-sdk-dev to support the referenceonly build. includes an updated snapshot of the css and js files from devsite am: eeeb9b832a
am: 86f20d0dd6

Change-Id: I6e916b21a4c28f40fd0497daa84279a472fb974e
2016-08-30 20:52:41 +00:00
smain@google.com 5ba1d83e01 delete no-longer-used custom sdkpage template. depends on https://googleplex-android-review.git.corp.google.com/#/c/1389393/
am: 42859fae46

Change-Id: I5e72be2acf921383733eeb09137be72786520325
2016-08-30 20:47:13 +00:00
smain@google.com 618756ab95 delete no-longer-used custom sdkpage template. depends on https://googleplex-android-review.git.corp.google.com/#/c/1389393/
am: 42859fae46

Change-Id: I0a5a870f5cbc5c0ba2e620a8cf2cb8b497bbec1d
2016-08-30 20:47:12 +00:00
smain@google.com 86f20d0dd6 update templates-sdk-dev to support the referenceonly build. includes an updated snapshot of the css and js files from devsite
am: eeeb9b832a

Change-Id: I69c2bd63fdf1b894707ec911a65144ec38a2f07c
2016-08-30 20:47:11 +00:00
smain@google.com 7501218e40 update templates-sdk-dev to support the referenceonly build. includes an updated snapshot of the css and js files from devsite
am: eeeb9b832a

Change-Id: Ieed1beceb693ecae6be25c878b40bd6dd697aad2
2016-08-30 20:47:10 +00:00
Scott Main 1b1c5c5ebc Merge "delete no-longer-used custom sdkpage template. depends on https://googleplex-android-review.git.corp.google.com/#/c/1389393/" into nyc-dev 2016-08-30 20:39:44 +00:00
Scott Main a7e978b6b6 Merge "update templates-sdk-dev to support the referenceonly build. includes an updated snapshot of the css and js files from devsite" into nyc-dev 2016-08-30 20:39:20 +00:00
Amanda Kassay 872f62fdf6 Remove hard coded leading slash in head_tag.cs for DevSite image_path meta tag. am: c9ef9fea7f am: 582c52df07
am: b3fcd6ff9b

Change-Id: Ifbcece8af49719c03e738ef8747ffe9a8e7661be
2016-08-30 19:06:41 +00:00
smain@google.com 42859fae46 delete no-longer-used custom sdkpage template.
depends on https://googleplex-android-review.git.corp.google.com/#/c/1389393/

Change-Id: Idd8f039294fe8c2c6dddf6d8a00a196222154d58
2016-08-30 10:52:40 -07:00
smain@google.com eeeb9b832a update templates-sdk-dev to support the referenceonly build.
includes an updated snapshot of the css and js files from devsite

Change-Id: Ib597c1dd488347795e02e1d09880559ead1d54e0
2016-08-30 10:22:51 -07:00
Amanda Kassay a7776e5bb9 Remove hard coded leading slash in head_tag.cs for DevSite image_path meta tag. am: c9ef9fea7f am: ea99b7d8bd
am: 065e5e3fac

Change-Id: I7fc8d83b96113a555c13d2b1571d24a7b13946b5
2016-08-30 16:58:25 +00:00
Amanda Kassay ea99b7d8bd Remove hard coded leading slash in head_tag.cs for DevSite image_path meta tag.
am: c9ef9fea7f

Change-Id: I9a4bde7048fc92fe694175bb349b0a82700e3da4
2016-08-30 16:52:54 +00:00
Amanda Kassay b3fcd6ff9b Remove hard coded leading slash in head_tag.cs for DevSite image_path meta tag. am: c9ef9fea7f
am: 582c52df07

Change-Id: I1b469bb8d3d86d91f17219cb971564c379642b08
2016-08-30 16:52:54 +00:00