Commit Graph

43915 Commits

Author SHA1 Message Date
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
Anton Hansson
27527452fd Revert "Enforce specifying sdk/private for apps."
This reverts commit 49b67af95e.

Reason for revert: Missing a bunch of fixes from master.

Test: make
Bug: 73535841
Exempt-From-Owner-Approval: fixes the build
Change-Id: Ide0998bad5876aa409d1bb0f8331e6b097c3c8a2
Merged-In: Id3fbb502d26d91b64480fec74e241ba77fa0faff
(cherry picked from commit 455f2c0223)
2018-03-08 22:05:45 +00: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
20253d12dc Merge "Add minimal-runtime support for integer overflows." am: b5399007ca
am: bd3c11fd02

Change-Id: I8667c07fd8b594f4af572a97fa89552a8977c58c
2018-03-08 20:44:55 +00:00
Ivan Lozano
bd3c11fd02 Merge "Add minimal-runtime support for integer overflows."
am: b5399007ca

Change-Id: I6963ed5b9dc08a9419af4b202e79ddc30ffd3804
2018-03-08 20:39:43 +00:00
Ivan Lozano
b5399007ca Merge "Add minimal-runtime support for integer overflows." 2018-03-08 20:12:10 +00:00
Mathieu Chartier
6ce6c21e49 Merge "Revert "For user and userdebug generate error if DEXPREOPT is not enabled"" into pi-dev
am: a7d5df28cb

Change-Id: If7302d51f2b13fb0e2c0f84b7ff04cdc4b24c0f8
2018-03-08 19:18:06 +00:00
Mathieu Chartier
a7d5df28cb Merge "Revert "For user and userdebug generate error if DEXPREOPT is not enabled"" into pi-dev 2018-03-08 18:55:20 +00:00
Tao Bao
53ca37525a Merge "releasetools: Fix the broken validate_target_files.py." into pi-dev
am: 4b71ac8c93

Change-Id: I317d078f8aeab8c783dc389173c9b43aeba1c00c
2018-03-08 18:51:36 +00:00
TreeHugger Robot
4b71ac8c93 Merge "releasetools: Fix the broken validate_target_files.py." into pi-dev 2018-03-08 18:38:01 +00:00
Mathieu Chartier
0ecba4b139 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

Change-Id: I8f1390eacf685e1b7144b712fe5afb8da384ceb0
2018-03-08 18:25:28 +00:00
Anton Hansson
0be39e3a6b Revert "Enforce specifying sdk/private for apps."
am: 455f2c0223  -s ours

Change-Id: Ib70e7bb5477a778eb15a922d20703a878bbf7c56
2018-03-08 17:29:41 +00:00
Anton Hansson
455f2c0223 Revert "Enforce specifying sdk/private for apps."
This reverts commit 49b67af95e.

Reason for revert: Missing a bunch of fixes from master.

Test: make
Bug: 73535841
Exempt-From-Owner-Approval: fixes the build
Change-Id: Ide0998bad5876aa409d1bb0f8331e6b097c3c8a2
Merged-In: Id3fbb502d26d91b64480fec74e241ba77fa0faff
2018-03-08 16:41:05 +00:00
Tao Bao
f6f13acf73 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
(cherry picked from commit c63626b4a3)
2018-03-08 08:10:28 -08:00
Baligh Uddin
8c7a2bb360 Merge "releasetools: Fix the broken validate_target_files.py." am: 1617db36af
am: 946752cb24

Change-Id: Id1f96e9c03a2154f707598ab0e9d13df1fe77136
2018-03-08 16:07:48 +00:00
Baligh Uddin
946752cb24 Merge "releasetools: Fix the broken validate_target_files.py."
am: 1617db36af

Change-Id: I814e200ce3f30378fbf023321adf6b6ab5106edf
2018-03-08 16:01:38 +00:00
Baligh Uddin
1617db36af Merge "releasetools: Fix the broken validate_target_files.py." 2018-03-08 15:50:15 +00:00
Anton Hansson
8ece80aeb3 Enforce specifying sdk/private for apps.
am: 49b67af95e

Change-Id: I0ee4ac79d751cba874e5f5810991d8f59645d441
2018-03-08 15:37:26 +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
Anton Hansson
49b67af95e Enforce specifying sdk/private for apps.
All apps in master comply with this now, but new offenders
are being added daily. This will ensure compliance going
forward.

Test: vendor/google/build/build_test.bash --dist
Bug: 73535841

Exempt-From-Owner-Approval: reviewed in master/aosp, but this blocks aosp
Change-Id: Id3fbb502d26d91b64480fec74e241ba77fa0faff
Merged-In: Id3fbb502d26d91b64480fec74e241ba77fa0faff
2018-03-08 13:09:06 +00:00
Martijn Coenen
08f10d0529 Products launching with API 28 need 64-bit binder interface.
This time around we're really deprecating the 32-bit
binder interface (v7), even for 32-bit devices.

Upgrading devices can keep using it.

Bug: 69775513
Test: manual makefile prodding
Change-Id: I3850418ca267e72593f5f12b940e5382b29b024a
2018-03-08 10:57:15 +00:00
Nicolas Geoffray
d64980f0ce Merge "Revert "Remove art targets from PARSE_TIME_MAKE_GOALS"" am: 2bff9a7c79
am: 9bb6b435fa

Change-Id: Ib3ebb994faaa2e857cab5d0589d91aedb9c8bc6b
2018-03-08 09:10:56 +00:00
Nicolas Geoffray
9bb6b435fa Merge "Revert "Remove art targets from PARSE_TIME_MAKE_GOALS""
am: 2bff9a7c79

Change-Id: Ib0ff912ce3bfa34cf29f2b3c219de6e228b6dc96
2018-03-08 09:05:19 +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
Justin Yun
ebc012de62 Add ld.config.txt for wearables
am: c29ba5a800  -s ours

Change-Id: I4ae39a8ba84865b6a92415c59779bc5fa05a08b5
2018-03-08 02:05:01 +00:00
Simran Basi
d8ef044fee Merge "build/make: Add default suite for all native tests/benchmarks" am: f74c027301
am: 4fbe95bef0

Change-Id: I44cdbee1b197401fa127f940754cc38f3705059e
2018-03-08 01:58:37 +00:00
Simran Basi
4fbe95bef0 Merge "build/make: Add default suite for all native tests/benchmarks"
am: f74c027301

Change-Id: I07e53997867a684d0f1b8c8934ddd2076722e8db
2018-03-08 01:53:58 +00:00
Jiyong Park
f023aedec7 Merge "Don't allow linking to a java module with broader API surface" into pi-dev
am: 355d9b8bab

Change-Id: Id029a26942b7e1d96ad3222c3ebc0010742d24a8
2018-03-08 01:48:55 +00:00
Treehugger Robot
f74c027301 Merge "build/make: Add default suite for all native tests/benchmarks" 2018-03-08 01:38:04 +00:00
Justin Yun
c29ba5a800 Add ld.config.txt for wearables
When BOARD_VNDK_VERSION is set, the required VNDK libs for vendor
modules are installed in vndk directory.
The default namespace configuration cannot reach those directories
and fails to link the required libs.
By installing ld.config.txt, the namespace configurations for each
build target will be selected automatically. This does not affect
the devices that requires default namespace configurations.

Bug: 74242105
Test: lunch sdk_gwear_x86-userdebug; make -j; emulator
Change-Id: Ib1097846fcd9c123184b13b6fbcfcb9a72ca3d97
Merged-In: Ib1097846fcd9c123184b13b6fbcfcb9a72ca3d97
(cherry picked from commit 61c412ed05)
2018-03-08 01:06:01 +00:00
TreeHugger Robot
355d9b8bab Merge "Don't allow linking to a java module with broader API surface" into pi-dev 2018-03-08 00:58:59 +00:00
Mathieu Chartier
bcef1e4a99 Merge "For user and userdebug generate error if DEXPREOPT is not enabled" am: afc270b066
am: 6a3744ba11  -s ours

Change-Id: I7fe4749e2af8f63eeff4fb9aac779210816fbd1e
2018-03-07 22:52:05 +00:00
Colin Cross
73a365f983 Merge changes I31ea4954,Ia02f8160,I5cfea62e,If484e9eb am: 78d5ea8e9b
am: 10b24dba79

Change-Id: I331a9835e5ed731f0424e4624a15635f2c367c7c
2018-03-07 22:45:34 +00:00
Mathieu Chartier
6a3744ba11 Merge "For user and userdebug generate error if DEXPREOPT is not enabled"
am: afc270b066

Change-Id: I0f1913673dc9732325b86ea0796295bc5967e1a1
2018-03-07 22:44:58 +00:00
Colin Cross
10b24dba79 Merge changes I31ea4954,Ia02f8160,I5cfea62e,If484e9eb
am: 78d5ea8e9b

Change-Id: Id0ba6f9c089d1c59d119ec39e1fae1e0b70ac03b
2018-03-07 22:38:05 +00:00
Mathieu Chartier
afc270b066 Merge "For user and userdebug generate error if DEXPREOPT is not enabled" 2018-03-07 22:34:14 +00:00
Colin Cross
78d5ea8e9b Merge changes I31ea4954,Ia02f8160,I5cfea62e,If484e9eb
* changes:
  Remove missed PRODUCT_AAPT_FLAGS
  Allow soong java libraries to include exported resources and proguard flags
  Silence more duplicate path warnings
  Remove framework_res_package_export_deps
2018-03-07 22:25:30 +00:00
Mathieu Chartier
3bd047aef9 Merge "For user and userdebug generate error if DEXPREOPT is not enabled" into pi-dev
am: 1fb39aa1e4

Change-Id: Iff14045a3eb137d4296b0a9a61eab47f7204e20b
2018-03-07 22:24:30 +00:00
Mathieu Chartier
2594230d83 For user and userdebug generate error if DEXPREOPT is not enabled
This prevents cases where system_server is running in interpreter
only mode.

Removed unused flag in product.mk

(cherry-picked from commit 27f4287406)

Bug: 74209329
Test: WITH_DEXPREOPT=false make
Merged-In: I4ab3afed95a5baf77d0cd089dafaa18bcc1913e5
Change-Id: I4ab3afed95a5baf77d0cd089dafaa18bcc1913e5
2018-03-07 22:21:43 +00:00
Mathieu Chartier
1fb39aa1e4 Merge "For user and userdebug generate error if DEXPREOPT is not enabled" into pi-dev 2018-03-07 22:14:51 +00:00
Simran Basi
d63a8153da build/make: Add default suite for all native tests/benchmarks
Not all native tests have the "tests" tag so adjust the logic to be:
NATIVE_TESTS||NATIVE_BENCHMARKS||(APPS&&tags==tests)

Bug: 74339384
Test: Rebuilt module-info.json, verified native tests now have
      their suite set to null-suite and have auto_test_config=True
      Double checked a frameworks App unittest as well.

Change-Id: Idea00adcebfc1a78b0c6d8ade40feddb1e90ed83
2018-03-07 12:36:55 -08:00
Mathieu Chartier
f26b8e4249 For user and userdebug generate error if DEXPREOPT is not enabled
This prevents cases where system_server is running in interpreter
only mode.

Removed unused flag in product.mk

Bug: 74209329
Test: WITH_DEXPREOPT=false make
Change-Id: I4ab3afed95a5baf77d0cd089dafaa18bcc1913e5
2018-03-07 10:51:52 -08:00
Jiyong Park
3d71a082ed Don't allow linking to a java module with broader API surface
It has been allowed that a java module built with Android SDK or System
SDK to link against other java module built with broader API surface.
For example, an app that is building with SDK (LOCAL_SDK_VERSION :=
current or <number>) can link libs like telephony-common or bouncycastle
which are built without SDK but in fact exposing private APIs.

From now on, this is no longer allowed because it prevents the app from
being unbundled. In general, a Java module A cannot be linked to Java
module B if B is built with broader API surface than A.

Bug: 69899800
Test: m -j checkbuild on walleye, sailfish, and crosshatch
Test: m -j ANDROID_BUILDSPEC=vendor/google/build/app_build_spec.mk
Test: ./vendor/google/build/build_test.bash --dist
Change-Id: Ibfdb1a6777f4e0606927d834d56f808639eb91f0
2018-03-07 18:36:20 +00:00
Tao Bao
51fd9428a1 releasetools: Separate streaming metadata computation into functions.
am: fe5b69a4ae

Change-Id: I78b0a4d44c8fca3a60541ec15ac02c746803c2c9
2018-03-07 18:19:06 +00:00
Colin Cross
8dad6c62d4 Remove missed PRODUCT_AAPT_FLAGS
PRODUCT_AAPT_FLAGS was removed by Iacc914114616b5bd19d9a1011802f4f9bca9bc19,
remove one more that it missed.

Test: m checkbuild
Change-Id: I31ea4954f5af5af37f13210925ed5d622625d71b
2018-03-07 09:48:33 -08:00
Colin Cross
7874138a8a Allow soong java libraries to include exported resources and proguard flags
Test: m checkbuild
Change-Id: Ia02f816084d0eb1c0e0f20e1ecd57aaf3778874c
2018-03-07 09:48:33 -08:00
Colin Cross
f6799e859a Silence more duplicate path warnings
Silence warnings when merging header jars that were missed by
Ifb67dbf7734b5f53941d110f578c4fe642e36005.

Bug: 69316739
Test: m checkbuild
Change-Id: I5cfea62e46d99f9b315a589d8915bf62307220aa
2018-03-07 09:47:41 -08:00
Colin Cross
6e136922f3 Remove framework_res_package_export_deps
framework_res_package_export is now always either the prebuilt
android.jar from an SDK or a package-export.apk generated by
Soong, so the dependency on R.stamp is never useful.  Remove
all assignments to framework_res_package_export_deps, and replace
usages with frameworks_res_package_export.

Test: m checkbuild
Change-Id: If484e9eb08061cb0ed0697755f13db71d741aaab
2018-03-07 09:47:41 -08:00