Commit Graph

41443 Commits

Author SHA1 Message Date
Tao Bao e128734fa0 Merge "releasetools: Add AbOtaPropertyFiles." 2018-03-16 04:47:46 +00:00
Colin Cross 1f4f67201d Merge "Update turbine command line flags" 2018-03-15 22:39:28 +00:00
Tao Bao febe7b0736 Merge "releasetools: Create PropertyFiles class." 2018-03-15 22:36:35 +00:00
Treehugger Robot f2a8007912 Merge "Allow compiles with only srcjars" 2018-03-15 22:31:37 +00:00
Tao Bao b63046750c releasetools: Add AbOtaPropertyFiles.
AbOtaPropertyFiles writes 'ota-property-files' into package metadata.
Comparing to StreamingPropertyFiles, AbOtaPropertyFiles additionally
writes a token of 'payload-metadata.bin' for a virtual entry that's head
of the 'payload.bin'. This entry can be used by the system updater to
verify if a payload is applicable to the underlying device.

AbOtaPropertyFiles intends to replace StreamingPropertyFiles, as it
covers all the info of the latter. We keep them both in P, and will
remove the latter in later release.

Bug: 74210298
Test: python -m unittest test_ota_from_target_files
Test: Generate full and incremental A/B OTAs. Check the property-files
      in the METADATA entry.
Change-Id: If5872c8ee0a97a8a95b07d4c69b463aa3fe1b9b9
2018-03-15 14:58:31 -07:00
Tao Bao 69203525e4 releasetools: Create PropertyFiles class.
And move StreamingPropertyFiles as its subclass. We will need similar
PropertyFiles instance for non-A/B OTA as well (to expose the
offset/size for the METADATA entry).

Bug: 74210298
Test: python -m unittest test_ota_from_target_files
Test: Generate an A/B OTA. Check the generated property-files string.
Test: pylint --rcfile=pylintrc \
          ota_from_target_files.py \
          test_ota_from_target_files.py
Change-Id: If90d97f0b330749fd8a6cde2ed9d0d6cd6ea60a8
2018-03-15 14:50:55 -07:00
Colin Cross 0c0adb993c Allow compiles with only srcjars
Some javac and turbine compiles have no source files but sources
from srcjars.  Continue with compilation if the java source list
is empty but the srcjar source list is not.

Bug: 73885582
Test: m checkbuild
Change-Id: Ica412de2dd1b1bfc12c01c3eafca884220d42771
2018-03-15 13:07:33 -07:00
Colin Cross 6b27285619 Update turbine command line flags
The latest version of turbine requires a -- after the javac
options, and uses multiple --bootclasspath arguments instead
of a javac-style colon separated list.

Test: m javac-check
Bug: 74339924
Change-Id: I3f694ac375eab61954d4fe63c1166a18314bf75f
2018-03-15 06:04:53 +00:00
Colin Cross 34af6a41ff Merge changes I97ea3ff3,Ib4351a5b,I74b61809,If2653f84,I2932f9e9, ...
* changes:
  Allow aapt2 rules to take zipped resource files
  Add LOCAL_SRCJARS support
  Remove unused .fs file suppport
  Remove unused file lists
  Remove sharding support from make
  Move aapt flags from java_common.mk to aapt_flags.mk
2018-03-14 23:29:49 +00:00
Colin Cross bc0c494d3a Allow aapt2 rules to take zipped resource files
Allow aapt2 rules to take zipped resource files similar to the
way the javac rules take srcjars.  For now, unzip the files using
extract_srcjars.sh, and then use aapt2 compile --dir.  Eventually
it could be done with aapt2 compile --zip.

Bug: 73885582
Bug: 74574557
Test: m checkbuild
Change-Id: I97ea3ff305e7a9ef2a908b4cf0bca903af62c6b1
2018-03-14 14:13:18 -07:00
Treehugger Robot d3547d9d5b Merge "Enable apps to build with resource namespaces" 2018-03-14 21:05:55 +00:00
Colin Cross 017a894c6e Merge "Allow locally disabling R8" 2018-03-14 19:07:58 +00:00
Colin Cross 11e2d55c0f Add LOCAL_SRCJARS support
Allow java modules to take jars containing .java files as an input.
For turbine, pass them directly to turbine.  For javac, extract them
to a directory and pass a list of the files to javac.

Bug: 73885582
Test: m checkbuild
Change-Id: Ib4351a5b4b165a55e5fb02ee2680466db368983a
2018-03-14 12:05:04 -07:00
Colin Cross 93d6550c53 Remove unused .fs file suppport
.fs files are obsolete.

Bug: 73885582
Test: m checkbuild
Change-Id: I74b618099333fe565c7b235994be64e6466d2da6
2018-03-14 12:05:01 -07:00
Colin Cross c3e7074df1 Remove unused file lists
RS_FILES and AIDL_FILES were used for cleaning up the intermediate
src dir, but are no longer used after
If7529979de6fa62a651933a3a974f47b033851d6 and
I01feff7cc399ac5b88b83333a1ac86928d0a81e6.

Bug: 73885582
Test: m checkbuild
Change-Id: If2653f846b568fd2587c8e055ef820e17760f133
2018-03-14 12:04:58 -07:00
Colin Cross 5ef6e79c21 Remove sharding support from make
Sharding is not used in make any more, the large java modules
(libcore and framework) have moved to Soong.  Keeping sharding
support complicates java compiling, so remove it.

Bug: 73885582
Test: m checkbuild
Change-Id: I2932f9e96bfc8f2ebf82095b16d6c0b3c51613f0
2018-03-14 12:04:55 -07:00
Colin Cross b6013af085 Move aapt flags from java_common.mk to aapt_flags.mk
The aapt flags were being set in java_common.mk, which is used by
various entry points.  host_dalvik_java_library.mk and
host_java_library.mk, and java_library.mk don't support aapt, only
package_internal.mk and static_java_library.mk do.  Move the aapt
flags into aapt_flags.mk, and include it from package_internal.mk
and static_java_library.mk.

Bug: 73885582
Test: no change to build-${TARGET_PRODUCT}.ninja
Change-Id: I124393846d37b9bbc941272cce4274121ac235ef
2018-03-14 12:04:35 -07:00
Adam Lesinski 960de8efcd Enable apps to build with resource namespaces
Setting LOCAL_AAPT_NAMESPACES := true enables
namespaces for an app and requires any library resources
to be fully qualified by their package.

Test: manual
Bug: 73885582
Change-Id: Ia6bfc82ee8b8d6335f8e7c2abe94ce36467a012d
Merged-In: Ia6bfc82ee8b8d6335f8e7c2abe94ce36467a012d
2018-03-14 12:04:01 -07:00
Colin Cross 5c66c2864a Allow locally disabling R8
Bug: 74746744
Test: m checkbuild
Change-Id: I5741f15821cf8de5df494ed8ad31d32a44657514
2018-03-14 17:00:23 +00:00
Julien Desprez edf8fc4e51 Merge "Update the base autogenerated config template for instru" 2018-03-14 14:03:42 +00:00
jdesprez b8f85204a6 Update the base autogenerated config template for instru
For APCT auto-generated configuration, the template will
include the test-suite-tag that will allow it to be
picked up automatically.

Test: none
Bug: 74440293
Change-Id: Ia82e8287f212f4daec97523394517bfbbe7a86d3
2018-03-13 13:43:42 -07:00
Treehugger Robot 1988d976ec Merge "Use default libnfc-nci.conf if not found in vendor/etc" 2018-03-13 00:51:04 +00:00
Mathieu Chartier c18ae710ae Merge changes I01d32749,If3540c3a
* changes:
  Revert "Revert "For user and userdebug generate error if DEXPREOPT is not enabled""
  Revert "For user and userdebug generate error if DEXPREOPT is not enabled"
2018-03-12 23:42:53 +00:00
Justin Yun 746684376a Use default libnfc-nci.conf if not found in vendor/etc
If libnfc-nci.conf is not installed in vendor/etc, use default
configuration file in system/etc on GSI.

Bug: 72080121
Test: Install GSI and remove vendor/etc/libnfc-nci.conf.
      Check if nfc is available in settings menu.

Change-Id: Icc6e0b1d2b29adacf085cfa68566b064e736d3fa
2018-03-12 23:24:31 +00:00
Dan Willemsen a0c1cc97bd Merge "Remove obsolete BRILLO variable" 2018-03-12 21:26:03 +00:00
Mathieu Chartier e430236eba Revert "Revert "For user and userdebug generate error if DEXPREOPT is not enabled""
Fixed the failing targets.

Bug: 74209329
Test: make

This reverts commit 0ecba4b139.

(cherry picked from commit 1f1335ceeb)

Merged-In: I4f346b8107ffaf6afbd551d91574ed040372635e
Change-Id: I01d32749ad2cad09479e3864729ecd8ef2c63b5d
2018-03-12 11:58:40 -07:00
Mathieu Chartier d4ef79d7df Revert "For user and userdebug generate error if DEXPREOPT is not enabled"
This reverts commit f26b8e4249.

Reason for revert: Too many broken targets
Bug: 74209329
Test: m

(cherry picked from commit 0ecba4b139)

Merged-In: I8f1390eacf685e1b7144b712fe5afb8da384ceb0
Change-Id: If3540c3a4bfd2fa829e3c948c699a5fd62994998
2018-03-12 11:58:31 -07:00
Treehugger Robot 1a6220f598 Merge "releasetools: Support validating Verified Boot images." 2018-03-12 17:29:49 +00:00
Tao Bao ba557707d8 releasetools: Support validating Verified Boot images.
For a given (signed) target-files.zip, this CLs allows verifying the
Verified Boot related images. It works with both of VB 1.0 and VB 2.0
images.

As part of the CL, it also moves validate_target_files.py to argparse,
which is more flexible than the traditional getopt module.

Also add unittests for the VB 1.0 path. VB 2.0 tests will be added in
follow-up CL.

Example usage:

- Run the script on aosp_bullhead target-files.zip.

$ ./build/make/tools/releasetools/validate_target_files.py \
    --verity_key build/target/product/security/verity.x509.pem \
    --verity_key_mincrypt build/target/product/security/verity_key \
    aosp_bullhead-target_files-4522605.zip

- Run the script on aosp_walleye target-files.zip.

$ ./build/make/tools/releasetools/validate_target_files.py \
    --verity_key external/avb/test/data/testkey_rsa4096.pem \
    aosp_walleye-target_files-4627254.zip

Bug: 63706333
Bug: 65486807
Test: Run validate_target_files.py on target_files.zip files.
Test: PYTHONPATH=build/make/tools/releasetools python -m unittest \
          test_validate_target_files
Change-Id: I170f14d5828d15f3687d8af0a89a816968069057
2018-03-12 00:17:09 -07:00
Dan Willemsen 19bd9b99ce Remove obsolete BRILLO variable
Test: none
Change-Id: Ia4474927709ccfa1ff76f5dda1d8aa13ef9d1004
2018-03-10 15:23:12 -08:00
Treehugger Robot b16a5b8d17 Merge "Fix xz with SANITIZE_HOST" 2018-03-10 09:03:39 +00:00
Dan Willemsen 6b3a8380cc Fix xz with SANITIZE_HOST
There isn't an Address Sanitizer prebuilt of xz, so always use the same
xz prebuilt.

Bug: 36130900
Test: SANITIZE_HOST=address m nothing; check ninja file
Test: m libc
Change-Id: Iba3599d4289ad5afb573dbec5ac8fc463668b1c6
2018-03-09 22:38:37 -08:00
Treehugger Robot 8e287901c3 Merge "Use xz prebuilt" 2018-03-10 03:00:29 +00:00
Treehugger Robot 6991c1a35d Merge "Fix droiddoc variable name in clear_vars.mk" 2018-03-09 22:33:50 +00:00
Dan Willemsen 893859573d Use xz prebuilt
Instead of whichever xz happens to be on the PATH.

Bug: 36130900
Test: m
Change-Id: Ib37d8db4e935ef8f69f3d43b5065c22d34028cf3
2018-03-09 12:56:01 -08:00
Nan Zhang ccdecc7e02 Fix droiddoc variable name in clear_vars.mk
Test: m -j
Bug: b/70351683
Change-Id: I8cb4429a7e6bebde541a09f0328dddb937c0aced
2018-03-09 12:39:34 -08:00
Treehugger Robot 32dfa4914d Merge "releasetools: Create StreamingPropertyFiles class." 2018-03-09 19:56:18 +00:00
Treehugger Robot d29f3e7026 Merge "Rename stubsjar to stubsSrcjar for droiddoc" 2018-03-09 09:42:29 +00:00
Anton Hansson 5a49a36a55 Merge "Enforce specifying sdk/private for apps. DO NOT MERGE" 2018-03-09 09:18:06 +00:00
Treehugger Robot 1cfafdd9fc Merge "Support a pre-extracted PDK zip" 2018-03-09 04:26:48 +00:00
Nan Zhang 89f12b00f0 Rename stubsjar to stubsSrcjar for droiddoc
Test: m -j core-docs
Bug: b/70351683
Change-Id: I90e4df3ba002c7488f3a80066bf3723b6f299b04
2018-03-08 17:29:16 -08:00
Treehugger Robot 0b4b321565 Merge "Remove unnecessary link-type check" 2018-03-09 00:21:21 +00:00
Tao Bao ae5e4c30fe releasetools: Create StreamingPropertyFiles class.
This CL breaks down ComputeStreamingMetadata() into mutiple member
functions of StreamingPropertyFiles class, which correspond to the
two-pass logic when generating streaming property files (aka streaming
metadata).

StreamingPropertyFiles.Compute() does the work for the first pass, by
putting placeholders before doing initial signing. Finalize()
corresponds to the second pass, where the placeholders get replaced with
actual data. Verify() can be optionally called to assert the correctness
of the work.

The separation between Compute() and Finalize() is to allow having
multiple StreamingPropertyFiles instances (in coming up CLs). This way
we can call Compute() multiple times for each instance, followed by only
one call to SignOutput(). And similarly for Finalize().

Bug: 74210298
Test: Generate an A/B OTA package. Check the METADATA entry.
Test: python -m unittest test_ota_from_target_files
Change-Id: I45be0372a4863c4405e6d8e20bcb9ccdc29e7e11
2018-03-08 14:59:42 -08:00
Dan Willemsen 0663f685c2 Support a pre-extracted PDK zip
Pre-extracting the zip files are more sustainable for git, so that
objects can be shared if unchanged, rather than the 900MB zip file
changing on every build.

This also has the advantage that we could put an Android.bp file inside
the PDK, and Soong would just pick it up.

Bug: 68767391
Test: Build mini_arm64 PDK with platform.zip
Test: Build mini_arm64 PDK with extracted zip file
Change-Id: I16db030a731aea55b69c1d6e2260dbd70b167544
2018-03-08 13:50:21 -08:00
Ivan Lozano b5399007ca Merge "Add minimal-runtime support for integer overflows." 2018-03-08 20:12:10 +00:00
Baligh Uddin 1617db36af Merge "releasetools: Fix the broken validate_target_files.py." 2018-03-08 15:50:15 +00:00
Anton Hansson 62c7de3792 Enforce specifying sdk/private for apps. DO NOT MERGE
All apps in master comply with this now, but new offenders
are being added daily. This will ensure compliance going
forward.

Test: build/soong/build_test.bash
Bug: 73535841

Change-Id: If28049750a9787bf455f72402e624dbddf842253
2018-03-08 13:19:36 +00:00
Nicolas Geoffray 2bff9a7c79 Merge "Revert "Remove art targets from PARSE_TIME_MAKE_GOALS"" 2018-03-08 08:57:44 +00:00
Jiyong Park 98a4f52c28 Remove unnecessary link-type check
Modules from Soong do not have dependency specified (via
LOCAL_JAVA_LIBRARIES). So, link-type check 'from' them doesn't make
sense. Resetting my_warn_types and my_allowed_types

Bug: 69899800
Test: m -j checkbuild on aosp_walleye, aosp_sailfish
Test: build/soong/build_test.bash --dist
Change-Id: I2a409e64f388bd8cb9336be589bf6af33e48a6f4
2018-03-08 15:23:08 +09:00
Tao Bao c63626b4a3 releasetools: Fix the broken validate_target_files.py.
The file was broken due to earlier touches:
 - Missing 'import zipfile';
 - Mismatching arguments when calling GetSparseImage().

Bug: 73996151
Test: Run validate_target_files.py with a walleye-target_files.zip.
Test: pylint --rcfile=pylintrc validate_target_files.py
Change-Id: I3692bd51fb27a3da698e06b75155e84502549f66
2018-03-07 21:45:40 -08:00