Automatic RROs don't make sense for tests, the tests can't rely on
overlays being installed on product or vendor. Creating the RROs
causes a race during builds that build both droid and device-tests
goals, as the RROs may be installed to the vendor directory as a
dependency of the device-tests goal before or after the vendor image
is packaged as a dependency of the droid goal. If the RROs are
installed first and the vendor image is low on space it may result
in an out-of-space error.
Bug: 282885159
Test: Rule to build $OUT/vendor/overlay/SystemUITests__*__auto_generated_rro_vendor.apk no longer exists
Change-Id: I760355ffb1818e91c02a98473312f9f21c149361
Merged-In: I760355ffb1818e91c02a98473312f9f21c149361
* move package-res.apk related files to "common" intermediate dir as
aapt2.srcjar does because it is an app which is supposed to be arch
neutral
* add device name in auto-gen RRO to avoid conflicits
Bug: 279358050
Bug: 279360102
Test: m
Change-Id: Ibcc5e5546bd43767ab0d4807933eeb57d58f99d6
Test: m signapk
Test: make GoogleRestorePrebuilt apksigner
Test: Add LOCAL_ROTATION_MIN_SDK_VERSION := 33 to vendor/unbundled_google/packages/GoogleRestorePrebuilt/Android.mk and run both commands above again -- no phony target warnings
Bug: 197787352
Change-Id: If106113b6557ad1ecf24e2778bd38e7cb30e39ca
Previously a manifest file would be generated for static_java_library.mk
and package_internal.mk. For pacakge_internal.mk, this would cause
cryptic errors like b/188612215#2
With this CL, a manifest file would only be generated for java_library
with need_compile_res == true. The advantages are
1. No redundant generation for java_library with need_compile_res == false
(i.e. modules that do not require aapt2)
2. Force devs to provide manifest for android_app, and not silently
generating one for them
Bug: 188652897
Test: TH
Test: m nothing in tv-dev, car-dev
Change-Id: I69a23e373f1b4ac1569ae5b1d36067bfc0dadc05
LOCAL_MODULE_STEM is not used in the packaging code,
except when setting PACKAGES.$(LOCAL_MODULE).STEM.
Having this disconnect between PACKAGES.$(LOCAL_MODULE).STEM
and the actual name of the apk causes an apk signing
step to fail.
Other module types like BUILD_HEADER_LIBRARY explicetly
disallow setting LOCAL_MODULE_STEM, so we can also just
do that for packages.
Fixes: 204027319
Test: Presubmits
Change-Id: Ib3da9a8dd6792a6c9d725cb24b835b32dbb13c40
Move manifest_check (a.k.a. verify_uses_libraries check) from makefiles
for specific module types to common makefile dex_preopt_odex_install.mk,
which is included by all Java modules that may require dexpreopt. If a
modules locally disables dexpreopt, it still goes through manifest_check
(unless dexpreopt is globally disabled or the module has no Java code).
This CL allows to have manifest_check and dexpreopt in the same makefile
(which is needed for a follow-up CL that will reuse dexpreopt variables
for manifest_check).
Bug: 132357300
Test: lunch cf_x86_64_phone-userdebug && m
Change-Id: Ia217cfc247ae43d8fc716bfc1fe9dcce1d00aa7f
When an APK is packaged without any classes.dex files the resources
are packaged directly, and so the packaging rule must depend on the
resources.
Fixes: 177295654
Test: prebuilts/build-tools/linux-x86/bin/ninja -f out/combined-aosp_cf_x86_64_phone.ninja -t query out/target/product/vsoc_x86_64/obj/APPS/CtsSplitApp_x86_64_intermediates/package.apk
Change-Id: I786e71439f11e7bd5e20e010b66fbf529eb57a5a
This hasn't worked for a couple years, and continues to bitrot. Just
remove it.
Test: treehugger
Change-Id: Iea6caf3c08252a560155e095135c5ddaad712991
Merged-In: Iea6caf3c08252a560155e095135c5ddaad712991
- TARGET_BUILD_UNBUNDLED_IMAGE is similar to TARGET_BUILD_APPS, but
its targets are the unbundled partitions instead of apps.
- Rename TARGET_BUILD_APPS_USE_PREBUILT_SDK to TARGET_BUILD_USE_PREBUILT_SDKS
because it is used even without TARGET_BUILD_APPS.
-Instead of TARGET_BUILD_APPS, use TARGET_BUILD_USE_PREBUILT_SDKS
to build java modules with prebuilt sdks, and propagate to Soong.
Bug: 160390776
Test: TARGET_BUILD_UNBUNDLED_IMAGE=true m vendorimage
Change-Id: Ie096212ccbcca0018baae55e106af693b002c9e5
This change fixes a regression that was caused by I56bc55e2231eb946617a9d6f97d55c9b61f3bff7
that file names for Make modules are ".apk" in apkcerts.txt.
This was because PACKAGES.$(LOCAL_MODULE).STEM was only set for the
modules from Soong. It is now set for Make modules too.
Bug: 155440232
Test: OVERRIDE_TARGET_FLATTEN_APEX=true m apkcerts-list
and check the generated apkcerts txt file to see that it doesn't have an
entry where file name is ".apk"
Exempt-From-Owner-Approval: cherry-pick from internal
Merged-In: I6f14bbb5678255bef2c1f2397f59ede6c2b5df18
(cherry picked from commit db64e3d528)
Change-Id: I6f14bbb5678255bef2c1f2397f59ede6c2b5df18
Also add multi-cert support to prebuilt apps so that they can benefit
from the new lineage feature.
(This is a cherry-pick change.)
Test: m GoogleServicesFramework w/ modified build rules
Test: m PrebuiltGmsCore w/ modified build rules
Test: apksigner lineage -v --print-certs -in <built_module_path>
Fixes: 152897457
Change-Id: If7d5d4bd308629c8340231520214c76c8a568a65
Merged-In: If7d5d4bd308629c8340231520214c76c8a568a65
Propagate partition tag data to apexkeys.txt and
apkcerts.txt so that merge_target_files.py can build
merged versions of these files by filtering the
framework files for framework partitions and filtering
the vendor files for vendor partitions.
Bug: 138942268
Change-Id: Ic3226728e97dae84d38ec230ccc86d1b124bea94
Until now, packages from system_ext don't create RRO packages, instead
it uses static overlay, but to make system_ext common, it should use
RRO.
Bug: 150820813
Test: m && check if there are RRO packages that use from system_ext apps
Change-Id: Id0ddb66adca07a6bb4dda66fbee49fd476ac5342
Stripping is incompatible with ART module updatability.
Bug: 65154345
Bug: 138851227
Test: build and observe no change in output (stripping is not used by
default).
Change-Id: Ic2d9738ef393814c3af3cad116071f7b5938aa84
Change RRO logic from
"Enforce RRO for all modules when PRODUCT_ENFORCE_RRO_TARGETS is '*'"
to
"Enforce RRO for all modules when PRODUCT_ENFORCE_RRO_TARGETS includes '*'"
Bug: b/137727426
Test: test build on local machine
Change-Id: I10b215c28919988ec58deb1fe3d5498ad4e73eb4
Do this by introducing a new LOCAL_PROGUARD_FLAGS_DEPS variable that we
can modify anytime we add a file reference to LOCAL_PROGUARD_FLAGS.
An alternative would have been to switch to LOCAL_PROGUARD_FLAG_FILES,
but that would have been much harder to ensure the same command line
ordering.
Bug: 130111713
Test: treehugger
Change-Id: If367197b30d563e0796f0cafa00be1f275f2c406
--legacy will soon no longer be passed by default to all aapt2
compiles. Allow it to be specified in LOCAL_AAPT_FLAGS by passing
it to aapt2 compile when it is present and filtering it out from
the flags passed to aapt2 link.
Bug: 135597368
Test: m java
Change-Id: I92792cf6a0d4c6ecf5e0971523bd0ab76c81345f
dexpreopt usually gets a dex jar instead of the final APK, which
means targetSdkVersion can't be parsed out of it. Move the
shared library verification to a tool that operates on the final
AndroidManifest.xml instead. verify_uses_libraries.sh is still
used to verify prebuilts where we don't have an AndroidManifest.xml
and must parse it out of the APK.
Test: m Gallery2
Bug: 132357300
Change-Id: I6ade74b6144c73aee094f5d5ff343067ca0a0e5a
AAPT2 is used everywhere now, remove support for AAPT1. Also
removes dpi_specific_apk.mk, it was never updated to use AAPT2
and has been generating bad APKs (resource ID mismatch between
the dex files and the resources) since AAPT2 was made the default
in May 2018 (I9b67fd2a9b3234798b2aac879b5242c2097b3863).
Bug: 80450981
Test: m checkbuild
Change-Id: I2ff768897360ff866dbae5562455bab22be270f7
Merged-In: I2ff768897360ff866dbae5562455bab22be270f7
This change changes auto-generated RROs from DEVICE_PACKAGE_OVERLAYS
to be generated in the vendor partition, as opposed to /product where
they were generated in the past.
Note that PRODUCT_PACKAGE_OVERLAYS continue generating RRO packages
to /product, which means that a single app can be overlayed from
different partitions. These RROs have been given module and package
names based on their location.
Bug: 127758779
Test: verify noop on presubmit targets
Change-Id: I5cee70e28e3969e67b2d83eaf25d9c6e3a11102d
Make the runtime vs static resource overlays a little clearer.
This will help adding more logic around determining if an RRO
needs to be generated in /vendor, /product or both.
Bug: 127758779
Test: verify noop on presubmit targets
Change-Id: I43111a1d9bb3405c559faaef56a75a5ad7672ba0
Make it a bit clearer what this code is intended to do.
Bug: 127758779
Test: verify noop on presubmit targets
Change-Id: Ic405fc5d4601b9f0a91b4d24caa06f279267c51a
This reverts commit 224e103308.
Reason for revert: Build Breakage in git_pi-dev-plus-aosp/docs @5366136
make -j110 docs showcommands dist DIST_DIR=/buildbot/dist_dirs/git_pi-dev-plus-aosp-linux-docs/5366136 checkbuild
FAILED:
Dependencies in out found with no rule to create them:
out/target/product/generic/data/app/CtsVerifierTester/CtsVerifierTester.apk
out/target/product/generic/data/app/TradeFedTestApp/TradeFedTestApp.apk
out/target/product/generic/data/app/TradeFedUiTestApp/TradeFedUiTestApp.apk
15:53:46 stopping
and
make -j50 showcommands dist TARGET_PRODUCT=cf_x86_phone DIST_DIR=/buildbot/dist_dirs/git_master-linux-ndk_translation_all/5366149 ndk_translation_all
FAILED: ninja: 'out/target/product/vsoc_x86/data/nativetest/arm/arm_insn_tests_arm_static/arm_insn_tests_arm_static', needed by 'out/target/product/vsoc_x86/obj/PACKAGING/ndk_translation_tests_intermediates/arm_insn_tests_arm_static_result.xml', missing and no known rule to make it
15:55:38 ninja failed with: exit status 1
make: *** [run_soong_ui] Error 1
Return Code: 2
Change-Id: Idf95ef2e06526a0a31690420c923207db627605f
1. A test can add a runtime dependent test module by just setting
LOCAL_REQUIRED_MODULES or LOCAL_TARGET_REQUIRED_MODULES. Then the dependent test
module will be copied to testcase folder.
2. Do not install to $(TARGET_OUT_DATA) for testcase
BUG: 117224272
Test: 1. (a) vi cts/tests/tests/text/Android.mk
(b) add LOCAL_REQUIRED_MODULES := CtsPrintTestCases
(c) m -j CtsTextTestCases
(d) Then, CtsPrintTestCases should also be built to testcase folder like below.
./target/product/generic_arm64/testcases/CtsPrintTestCases
Change-Id: I24ea3783486c54a05cfa9d3d0375b977afc230f8
Only put uncompressed native libs in an APK if the min_sdk_version
supports it (>= 23, Marshmallow), and set
android:extractNativeLibs="false" in the AndroidManifest.xml so
that the platform won't extract them anyways.
Bug: 117618214
Test: m checkbuild
Change-Id: Iae26e4676c29c68fa3f76187512c82786bfa0522
Define non_system_module in base_rules.mk when the module is product, vendor,
product_services or proprietary module.
Bug: 74699609
Test: m -j
Change-Id: Iebdd3ec8c643be3d9877b7a96cbdd83465fa3878