aboutsummaryrefslogtreecommitdiffstats
path: root/apex
Commit message (Collapse)AuthorAgeFilesLines
* AndroidMkEntries minor refactoring.Jaewoong Jung2019-09-271-5/+7
| | | | | | | | | This includes a few changes that make AndroidMkEntries more resemble AndroidMkData, especially in terms of how extra entries are added. Most importantly it can now have multiple custom functions. Test: Soong tests Change-Id: Ibf9102624d16d0c1c9894a2794fc7c797bb34c9a
* Add overrides property to prebuilt_apexJaewoong Jung2019-09-272-29/+35
| | | | | | Bug: 137218697 Test: apex_test.go Change-Id: I55a42e1e4af60d6d7185515a380c786312b8b29b
* Improve android_app_import.dpi_variants handling.Jaewoong Jung2019-09-271-1/+1
| | | | | | | | | | | | | Instead of circumventing the limitation of Prebuilt implementation by picking a source path itself, it now uses the same mechanism as archMutator and replaces the source path in advance so that Prebuilt always sees the corrent source path. Because this requires the Apk field to be a string pointer, the single source prebuilt implementation is being updated to be reflection-based. Test: Soong unit tests, m soong_docs, TreeHugger Change-Id: I2304f15e32d632f74f95f0d9e9bf1f75ff3e2225
* Stop using build/target -> build/make/target symlinkDan Willemsen2019-09-251-1/+1
| | | | | | | Instead, fully specify build/make/target/... everywhere Test: treehugger Change-Id: I07ba0e9b0604919a271afd5133070616e1f404fc
* fix: APEX prebuilts are disabled in platform buildJiyong Park2019-07-171-1/+1
| | | | | | | | | | | | This change fixes a bug that APEX prebuilts are auto-disabled in platform builds (i.e. non-unbundled builds). Bug: 137282010 Test: m com.android.conscrypt check that the apex is from prebuilt directory Change-Id: I935ef3896e80864bdcc1ca5f6fc12b63c9588c0d (cherry picked from commit 895e224d8fad6877918ef05545d7423a30d72c2b)
* Fix the unbundled mainline module buildJiyong Park2019-07-171-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | This change fixes two problems: 1) the prebuilt apexes are force disabled for the unbundled builds because we need to build the modules from the source then 2) the dependencies from an sdk_library module to *.stubs.{public|system|tests} are not added for the unbundled build because the stubs modules are disabled. Bug: 137282010 Test: unbundled mainline builds are successful Test: build com.android.media and inspect the jar file to see if hiddenapi flags are there $ cd out/dist/mainline_modules_arm $ unzip com.android.media.apex apex_payload.img $ mkdir -p mnt $ sudo mount -o ro,loop apex_payload.img mnt $ dexdump2 mnt/javalib/updatable-media.jar | grep hiddenapi shows results Merged-In: I2c00af07aac4a15770d3acab011a36e2e4803bfc Change-Id: I2c00af07aac4a15770d3acab011a36e2e4803bfc (cherry picked from commit 53554e25593d6498a229d1dc89208aade4137008)
* Don't use APEX prebuilts when asan is onJiyong Park2019-07-121-4/+10
| | | | | | | | | | Some prebuilt APEXes are enabled with scudo, which causes crash on devices with asan. Bug: 137216042 Test: build walleye_hwasan and check if apexes are not from prebuilts Change-Id: Ic436ad06e724af952d99fb8e66358a595450eb84 (cherry picked from commit 3b98a509f19cb25e9734bb62ba0b592663ed8e4e)
* Don't use prebuilt_apex when TARGET_FLATTEN_APEX is set to trueJiyong Park2019-07-071-1/+14
| | | | | | | | | | | When the device does not support non-flattened APEX (i.e. TARGET_FLATTEN_APEX is set to true), then ignore the prebuilt_apex modules even when `prefer: true`. Bug: 136251130 Bug: 136662772 Test: build marlin, and check if /system/apex has flattened APEXes Change-Id: I9f3dfefc3bd357d6750fbb1e418937d095720b04
* Embed NOTICE output as an APEX asset.Jaewoong Jung2019-06-252-14/+21
| | | | | | | | | | | | | Instead of outputting an aggregated NOTICE file as an intermediate build resource to allow Make to include it in the final system-wide NOTICE, process and embed it as an asset in the final APEX. This allows us to update the NOTICE contents automatically when an APEX is updated. Fixes: 135218846 Test: Built mainline modules, apex_test.go Change-Id: Ic851b330fe93be1f602907d44ecc7886c3b0171b Merged-In: Ic851b330fe93be1f602907d44ecc7886c3b0171b (cherry picked from commit 14f5ff62c952350a9e2b07d9d07429b9535655de)
* Optionally embed NOTICE files in apks.Jaewoong Jung2019-06-252-23/+5
| | | | | | | | | | | | | If embed_notices or ALWAYS_EMBED_NOTICES is set, collect NOTICE files from all dependencies of the android_app, merge them with the app's own one (if exists), transform it to HTML, gzip it, and put it as an asset in the final APK output. Bug: 135460391 Test: app_test.go + Built Mainline modules Change-Id: I52d92e2fd19b3f5f396100424665c5cc344190d8 Merged-In: I52d92e2fd19b3f5f396100424665c5cc344190d8 (cherry picked from commit 5b425e2e20c55216c1ed13fcf047b0df33886736)
* Revert "Revert "Strip libgcc to only keep fallback symbols""Yi Kong2019-05-071-0/+7
| | | | | | | | | | This reverts commit 619cd098b6008d81876f310e2d83ebf141c4061e. Test: manual testing Bug: 130267141 Change-Id: Ie156d4a3255be0ad082cda35c22bac4359852f22 Merged-In: I5b349fa6138e51663bf3b67109b880b4356da8e8 Exempt-From-Owner-Approval: Cherry pick
* Revert "Strip libgcc to only keep fallback symbols"Colin Cross2019-05-061-7/+0
| | | | | | | | | | This reverts commit bd475367c3dcb4478a70409c99b959ebdb117be3. Reason for revert: b/130267141 Bug: 29275768 Bug: 130267141 Merged-In: I5b349fa6138e51663bf3b67109b880b4356da8e8 Change-Id: Ieab56390b27240ef7f2f52a48a673809da7bcf8e
* Strip libgcc to only keep fallback symbolsYi Kong2019-05-031-0/+7
| | | | | | | | | | | | | | We use libgcc as fallback for symbols not present in libclang_rt builtins, however we didn't know what exact symbols were being used, some may not be intended to fallback. Create libgcc_stripped, which only contains unwind symbols from libgcc. Bug: 29275768 Test: bionic-unit-tests Change-Id: I98df02ead7f6cca4e76ec92d4f880de4e03f5b5c Merged-In: I5b349fa6138e51663bf3b67109b880b4356da8e8 (cherry picked from commit acee27cd7236554d0112001c96b9b5790c1c7097)
* Merge "Prebuilt APEXes are recoreded in apexkeys.txt" into qt-devTreeHugger Robot2019-04-242-5/+35
|\
| * Prebuilt APEXes are recoreded in apexkeys.txtJiyong Park2019-04-232-5/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | apexkeys.txt now correctly lists prebuilt APEXes with keys specified as PRESIGNED. This change also fixes a bug that non-installable APEXes are listed in the file. Bug: 131130235 Test: m out/soong/apexkeys.txt and check that com.android.apex.cts.shim.apex is listed there with PRESIGNED keys. Change-Id: Ib6d391a82864714743a1cc59cd655bea917b5073
* | Set default target SDK version for APEXJiyong Park2019-04-232-0/+14
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Target SDK version is used for targeting an APEX to a specific set of platform builds. Usually, the targeting is unrestricted (in case the APEX can run on all platforms), or based on platform SDK version (e.g. 28 for P). However, when the platform is under development and SDK is not finalized, the targeting should be much more fine-grained; the APEX should be targeted to a very specific build that supports the same set of APIs that the APEX was built against. To support that, target sdk version is automatically set by the build system. When the platform is released or SDK is finalized, the target sdk version set to the SDK version number. If not, it is set to <version_code>.<fingerprint> (e.g., Q.123456). Note that the target sdk version set by the build system is used only when the target sdk version is not explicitly set in AndroidManifest.xml. Bug: 130541924 Test: UNBUNDLED_BUILD_SDKS_FROM_SOURCE=true \ UNBUNDLED_BUILD_TARGET_SDK_WITH_API_FINGERPRINT=true \ TARGET_BUILD_APPS=com.android.tzdata m build.ninja has --target_sdk_version Q.$$(cat out/soong/api_fingerprint.txt) Test: aapt dump badging out/dist/com.android.tzdata.apex | grep \ targetSdkVersion shows: targetSdkVersion:'Q.6ee443d9ad5f0cca7a43cfa97b7fc62a' Merged-In: I086230d787f01075c28fc3f0163550300fa00212 Change-Id: I086230d787f01075c28fc3f0163550300fa00212 (cherry picked from commit 71b519d6ce98fc0313019d84777bfc04f3799efc)
* Fix package path of android/soong/android pctxColin Cross2019-04-101-1/+1
| | | | | | | | | | | | android/soong/common was renamed to android/soong/android long ago, but the pctx package path was still "android/soong/common". This required all users of rules defined in android/soong/android to import "android/soong/android" and then pctx.Import("android/soong/common"). Bug: 130298888 Test: m checkbuild Change-Id: I20d096522760538f7cfc2bec3d4bfeba99b275d4
* Make prebuilt_apex be usable via :modulename syntaxNikita Ioffe2019-04-081-0/+11
| | | | | | | | | Test: m Bug: 127789981 Bug: 128677967 Change-Id: Ie1a1147c1d5570cd7eda48e274faabf95566d53f Merged-In: Ie1a1147c1d5570cd7eda48e274faabf95566d53f (cherry picked from commit 89ecd590ea9cb1424964f98f88a76830b6953a6a)
* Add filename property to prebuilt_apexNikita Ioffe2019-04-082-4/+29
| | | | | | | | | | | | | | * Makes it more inline with prebuilt_etc; * For shim apexes, prebuilt_apex modules have pattern of com.android.apex.cts.shim.v1_prebuilt, but I would prefer pre-installed shim to be: /system/apex/com.android.apex.cts.shim.apex Bug: 128677967 Bug: 127789981 Test: m Change-Id: I34e3e078733420b5cf777fd6e3ce4d8c5796b19b Merged-In: I34e3e078733420b5cf777fd6e3ce4d8c5796b19b (cherry picked from commit 7a41ebdf5fafcd2ca101ddd56e560c3f59660778)
* Add installable property for prebuilt_apexNikita Ioffe2019-04-061-1/+10
| | | | | | | | | | | In case of shim apexes, we prebuilt all of them, but only need to install v1 to a system partition. Bug: 128677967 Test: manually checked that non-installable prebuilts don't end in /system Change-Id: I112432abfd8f03cc7d7379ea3cab3f5491ace49c Merged-In: I112432abfd8f03cc7d7379ea3cab3f5491ace49c (cherry picked from commit dd53e8be1891aa3db182bba24c32d48580d666d4)
* Key property is removed from prebuilt_apexJiyong Park2019-04-012-40/+0
| | | | | | | | The property is not needed as key is embedded in the apex. Bug: 128344735 Test: m Change-Id: Iae671994fc271593dd9319f6262279736ea34ad1
* Always bundle the public key for APEXJiyong Park2019-04-013-45/+19
| | | | | | | | | | | The public key associated with an APEX is always included in the APEX. Obviously, the public keys are no longer installed to /system/etc/security/apex Bug: 128344735 Test: m Change-Id: I1e1aef1d32597a447b57d49ab80bbfb921fa8178
* Arch-specific source for prebuilt_apexJiyong Park2019-03-302-6/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Arch-specific source can be specified for prebuilt_apex as follows. arch: { arm64: { src: "myapex-arm64.apex", }, }, A note on the implementation. The Src property was not tagged as `android:"arch_variant"` as usual. Instead, multiple Src properties are explicitly declared like struct Arch { struct Arm { struct Src *string } ... } Corresponding Src property is manually selected according to the MultiTargets()[0]. This is because prebuilt_apex is mutated only for android_common, in order to have the same arch variant with the apex module type. Therefore, we can't rely on the arch_variant tag. Bug: 127789981 Test: m (apex_test amended) Change-Id: I77dbe626171d8975f549bdb4af3c487232cf05f7
* Add prebuilt_apex.Jaewoong Jung2019-03-283-1/+118
| | | | | | Bug: 127789981 Test: apex_test.go + com.android.tzdata.apex Change-Id: I09bb0a4b2acf310c55c789569da3c9d755638232
* :module syntax support properties in apex_keyJiyong Park2019-03-222-10/+56
| | | | | | | | | | | public_key and private_key properties support :module syntax so that the key pairs can be dynamically created during the build, which is useful for one-time keys. Bug: 128960614 Test: m (apex_test amended) Change-Id: I249b1d29f247784193b0d733a7b6a20274ece105
* Notice support for APEXJiyong Park2019-03-212-0/+61
| | | | | | | | | | | | | | | | Notice file for an APEX is created by merging notice files for the modules included in it (plus the notice file for the APEX itself if specified). Notice files having the same content are not duplicated; it is emitted only once. Bug: 128701495 Test: m (apex_test is amended) Test: m and inspect $(PRODUCT_OUT)/obj/NOTICE.txt to check there are license entries for /system/apex/*.apex files Change-Id: I169d91038291a6c71615de97cf5b03174afab5d4
* Replace ctx.ExpandSources with android.PathsForModuleSrcColin Cross2019-03-201-3/+3
| | | | | | | | | | | Move the logic from ctx.ExpandSources into android.PathsForModuleSrc and ctx.ExpandSource into android.PathForModuleSrc, and deprecate them. When combined with the pathDepsMutator this will let all properties that take source paths also take filegroups or genrule outputs, as long as they are tagged with `android:"path"`. Test: All soong tests Change-Id: I01625e76b5da19240e9649bf26a014eeeafcab8f
* Fix the symbol file paths for files in APEXesJiyong Park2019-03-201-3/+9
| | | | | | | | | | | | | | | | | | This change fixes the problem that symbol files for APEXes are installed to incorrect path when TARGET_FLATTEN_APEX is set to true or the canonical name of an APEX is different fro the module name of the APEX. For the case when TARGET_FLATTEN_APEX is true, LOCAL_SOONG_SYMBOL_PATH is set to point to the runtime path of a file (e.g. /apex/<name>/*). For the case of the different canonical and module names, apex_name property is added to explicitly specify the canonical name Bug: 120846816 Test: m and inspect that symbol files exist under $(PRODUCT_OUT)/symbols/apex/com.android.runtime/ Change-Id: Idfec88d6a30a18c225b0d87b868b9f1e0a617e38
* respect relative_install_path for binaries in APEXesJiyong Park2019-03-182-7/+4
| | | | | | Bug: 123721777 Test: m (apex_test.go has the test) Change-Id: I89bc83d4bc6fe8dc374cf36e06e795c75b290844
* product_specific support for apex_keyJiyong Park2019-03-152-4/+48
| | | | | | | | | apex_key, when with product_specific: true, is installed to /product/etc/security/apex. Bug: 128519063 Test: m (apex_test.go amended) Change-Id: I39e8ac1c486c734dfe0555cd1874468d75e71f34
* Annotate paths and deprecate ExtractSource(s)DepsColin Cross2019-03-071-10/+2
| | | | | | | | | Add `android:"path"` to all properties that take paths to source files, and remove the calls to ExtractSource(s)Deps, the pathsDepsMutator will add the necessary SourceDepTag dependency. Test: All soong tests Change-Id: I488ba1a5d680aaa50b04fc38acf693e23c6d4d6d
* Add support for including py_binary and *_go_binary in apexsAlex Light2019-03-011-3/+32
| | | | | | | | | | | | These additional binary types are useful for some apexs. Add the ability to include them. Due to the nature of the resulting artifacts only py binaries with embedded launchers and host go binaries are supported. Test: m com.android.support.apexer Bug: 119332365 Bug: 119332362 Change-Id: I27c253d3647cf7bbe15896610d7a74a5f93e8bec
* Revert "Add override_module."Jaewoong Jung2019-02-281-1/+1
| | | | | | | | This reverts commit aa65e17016152d0d73cd10ab3987bc3bd5c2ef91. Reason for revert: Not compatible with PRODUCT_PACKAGES, and so has very limited use. Change-Id: Ib141d3984a6f12bb50989e66037494c466b066f1
* Add override_module.Jaewoong Jung2019-02-271-1/+1
| | | | | | | | | | | This new module type replaces the inherit-package function in make by allowing developers to override the name, the certificate, and the manifest package name of an android_app module. Bug: 122957760 Fixes: 123640028 Test: app_test.go + BrowserGoogle Change-Id: Iefe447e7078b25039233221361ef95c83a29973a
* Include symlinks in flattened apexsAlex Light2019-02-251-1/+7
| | | | | | | | | | | | Flattened apexs were not including symlinks. This could cause expected files not to be present. Test: lunch aosp_marlin-userdebug m droid stat $OUT/system/apex/com.android.runtime.debug/bin/dalvikvm Bug: 124924906 Change-Id: I04e696602b776b383bf7198eb19220353df74192
* Don't use stubs for host apexsAlex Light2019-02-211-1/+4
| | | | | | | | | Host apexs don't have a system-image associated with them so we need to include all libraries, including those with stubs. Test: ./art/test/testrunner/run_build_test_target.py -j50 art-linux-bionic-x64-zipapex Bug: 125417922 Change-Id: Ie76e6a34e8be1057b29e2e005597c3e4b5fb1f9c
* Merge "Install external deps of an APEX"Treehugger Robot2019-02-211-0/+14
|\
| * Install external deps of an APEXJiyong Park2019-02-201-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By default, if a lib is included in an APEX, all its direct and indirect dependencies are also included in the same APEX. However, when one of the dependencies have stable API (i.e. has stubs: {...}) then the lib having stable API and its dependencies are not included in the APEX. However, the problem here is that the lib having stable API might not be installed on the system, thus causing error at runtime. This can happen if there is no other module in the platform that depends on the lib. This change fixes the problem by adding such libraries as external dependencies so that they are also installed on the device along with the APEXes using them. Bug: 124831003 Test: m installclean; m com.android.resolv libbinder_ndk, libvndksupport are found under system/lib Change-Id: I457e03ff3fce37e0890c64d911e6e0ea6d0c6dd6
* | Export make vars using MakeVars methodJiyong Park2019-02-201-17/+8
|/ | | | | | | | | | | ed023eca73ff120de15cbd9f0ebfb9c9af5cdcd6 introduced a new (better) way of exporting make vars from singletone. apex_keys_text singletone is switched to the new method. Test: inspect out/soong/make_vars-<target>.mk Check SOONG_SOONG_APEX_KEYS_FILE is set Change-Id: Ia218852ba9ae40070cb6c99340d97e0c77d19841
* build apexkeys.txtJiyong Park2019-02-192-29/+83
| | | | | | | | | | | | | | | | | | | | | apexkeys.txt is a text file having APEX-to-keys mappings. The file is included in the target-files package where it is used when re-sign the APEXes with release keys. Each line of the file consists of 5 fields: 1) name: file name of the APEX 2) public_key: the public key for the apex_payload.img of the APEX 3) private_key: the private key used to sign the apex_payload.img 4) container_certificate: the certificate used to sign the APEX zip container 5) container_private_key: the private key used to sign the APEX zip container Bug: 124406181 Test: m out/soong/apexkeys.txt and inspect the content Test: TARGET_BUILD_APPS=com.android.tzdata m dist and make sure out/dist/apexkeys.txt exists Change-Id: I1daa13ec50956323b97e15e8df7f1fbe5ea21d63
* Add ":name" support for manifest and androidManifest properties in apexJiyong Park2019-02-142-3/+25
| | | | | | | | | The manifest and androidManifest properties in the apex module type now supports ":name" syntax. Bug: 123857186 Test: m (apex_test amended) Change-Id: Ic4e5a73cf73260d156ec61d07932ad07b2561413
* Remove prefer_sanitize.* propertiesJiyong Park2019-02-141-34/+10
| | | | | | | | | | | | | | The properties are no longer required as an APEX module is mutated with required sanitizers which are gathered by scanning the sanitizers that are enabled for its direct dependencies. Bug: 124128094 Test: m on marlin The extractor libs are found under /system/apex/com.android.media Merged-In: I55961d400dcbac067a5c0dcecb90e399d4991a70 Change-Id: I55961d400dcbac067a5c0dcecb90e399d4991a70 (cherry picked from commit abda0eb76b8aa9aac3220e4f60391210fbcb5b53)
* Ensure that make doesn't flatten zipapex files.Alex Light2019-02-131-3/+3
| | | | | | | | | | | | Zip apex files are not really installed so should not ever be flattened. Unfortunately we didn't send this information to make which would still unzip everything. Test: ALLOW_MISSING_DEPENDENCIES=true ./art/tools/build_linux_bionic_tests.sh com.android.runtime.host Bug: 124333446 Change-Id: I3eda579f8c40f768f1ef2be867967f436396cd4c
* APEX certificates can be overriden by PRODUCT_CERTIFICATE_OVERRIDESJiyong Park2019-02-132-18/+45
| | | | | Test: m (apex_test amended) Change-Id: I9b66a250c9ca20ad754e12455de2b444cf19b1fa
* Allow each APEX to provide its own AndroidManifestJiyong Park2019-02-131-0/+10
| | | | | | | | | | | | | | AndroidManifest.xml file can be specified via the 'androidManifest' property in the apex module type. It can be used to have a custom AndroidManifest.xml that have additional tags (such as <uses-sdk> or <uses-feature>) for precise targeting. The property is optional; if unspecified, then one is auto-generated as before. Bug: 123857186 Test: m apex_test_build_features Change-Id: Id7ee0471661887cfa11124cbaa3beea8cffcdda4
* Always build zipapex's unflattened.Alex Light2019-02-121-1/+1
| | | | | | | | | | | | Zipapex's cannot be flattened so do not prevent them from being built even if TARGET_FLATTEN_APEX is set. Test: lunch aosp_arm-eng; ALLOW_MISSING_DEPENDENCIES=true \ ./art/tools/build_linux_bionic.sh com.android.runtime.host Bug: 124333446 Change-Id: I4bef65cce100136a8f7852692e841b62ed9e399f
* Add prefer_sanitize.* properties to apexJiyong Park2019-02-091-0/+38
| | | | | | | | | | | | | It is used to configure an apex to prefere specific sanitizer variants if available. For example, if a lib is with sanitize: {cfi: true} then an APEX with prefer_sanitize: {cfi: true} will use the sanitized variant of the lib. Bug: 124128094 Test: m on marlin extractor libraries are found under /system/apex/com.android.media Change-Id: I858778eef78c5791cdeb497c7c11688cb128b5fe
* Add support for test_apexAlex Light2019-02-072-4/+116
| | | | | | | | | | | | | | | | | | Some test and other miscallaneous use-cases need apexs that are installable but will not affect the installation of other artifacts onto the device. For this purpose we added a test_apex type. These test_apex targets create apex files and have all the normal attributes but are not considered the source of any of their contents for the device by the rest of the build-system. Test: build and boot Test: ALLOW_MISSING_DEPENDENCIES=true \ DIST_DIR=$ANDROID_BUILD_TOP/out/dist \ ./art/tools/dist_linux_bionic.sh -j72 showcommands com.android.runtime.host Bug: 123591866 Bug: 123892969 Change-Id: I7f50be0ac0425cd87868145e18bcee6962d472ef
* add apex_defaultsJiyong Park2019-02-082-2/+38
| | | | | | | | apex_defaults is the default module for apex. Bug: 124026431 Test: m (apex_test updated) Change-Id: I09f63046e909e8eeb52ecec6bb07eb51e5490561
* Don't remove non-installable apex deps from the system installAlex Light2019-02-071-2/+7
| | | | | | | | | | | We were marking any libraries included in any apex (including non-installable apex's like com.android.runtime.host) as uninstallable. This could cause phones to become unbootable if these apex's are modified. Bug: 123892969 Test: m droid && boot device. Change-Id: Ief9004bbe7b106ee8f52715ce5bd7bb5accec290