aboutsummaryrefslogtreecommitdiffstats
path: root/apex
Commit message (Collapse)AuthorAgeFilesLines
...
* APEX respects relative_install_pathJiyong Park2019-02-052-1/+35
| | | | | | | | | | | | relative_install_path for cc_library is respected by APEX. relative_install_path for cc_binary is not yet respected because doing it will break the path to the dynamic linker in the runtime APEX. That change should be done along with changes in init, bionic, etc. Bug: 123721777 Test: m (apex_test.go amended) Change-Id: I855f8eda0d4255d563861ac96d0d3e2c669e9a2a
* Remove empty DepsMutator methodsColin Cross2019-02-011-3/+1
| | | | | | | | Add an empty DepsMutator to ModuleBase so it doesn't have to be implemented on every module that doesn't need it. Test: all soong tests Change-Id: I545a832a0dbf27386d3080377a75ea482cd9ce59
* Merge changes from topic "libc-bionic"Treehugger Robot2019-01-312-43/+162
|\ | | | | | | | | | | * changes: Give a knob to have apex ignore system-lib special cases Add limited target-specific configuration to apex.
| * Give a knob to have apex ignore system-lib special casesAlex Light2019-01-311-15/+22
| | | | | | | | | | | | | | | | | | | | | | | | apex will normally place libc and some other system libraries into a separate directory. This is to ensure that early startup works correctly. Some apex targets want to have these libraries at the normal places however. Test: ./art/tools/build_linux_bionic.sh com.android.runtime.host Bug: 123591866 Bug: 120266448 Change-Id: Ib5a67a43fe3eea6188b4df9215e743f1634045f3
| * Add limited target-specific configuration to apex.Alex Light2019-01-312-28/+140
| | | | | | | | | | | | | | | | | | | | | | Some apex targets need to be able to change their contents based on if they are host or target or what libc they are using. This adds support for doing this using the standard 'target: {...}' idiom. Test: m com.android.runtime.host Test: ./art/tools/build_linux_bionic.sh com.android.runtime.host Bug: 123591866 Change-Id: If73bee650cdeb277c0e603763aa0b0108656bfdd
* | Expand Jiyong's apex OWNERshipDan Willemsen2019-01-311-0/+1
|/ | | | | | There's more to apex than just apex.go Change-Id: I6603db10c43148c4f17fb9d3b762400472b32526
* Reland "Symbols for libs in APEXes are available"Jiyong Park2019-01-301-53/+88
| | | | | | | | | | This reverts commit eaebd76656c41b43c3b4590c4cf03700df4a3ccd. Bug: 120846816 Test: build/soong/build_test.bash -dist -products mainline_system_arm64 Test: lunch aosp_cf_x86_pasan-userdebug; m && SANITIZE_TARGET=address m Change-Id: I0d2f3eba33c2d1d034d13839c1bd23970adb9f85
* Add support for symlink_preferred_arch in apexAlex Light2019-01-292-18/+67
| | | | | | | | | | | | | | | | | | | Some modules rely on symlink_preferred_arch to have expected files present. This change makes apexs include these symlinks. Test: m com.android.runtime.debug pushd $(mktemp -d) mkdir mnt unzip $OUT/apex/system/com.android.runtime.debug.apex sudo mount -o loop,ro apex_payload.img mnt Ensure that mnt/bin/dalvikvm and mnt/bin/dex2oatd both exist and are symlinks to mnt/bin/dalvikvm64 and mnt/bin/dex2oatd32 respectively. Bug: 119942078 Bug: 122373634 Bug: 123079311 Change-Id: I47868fbedc5bdd3141a836c488f79e91e0a6ddfe
* Merge "Create sanitizer variants of APEX only when SANITIZE_TARGET is set"Treehugger Robot2019-01-291-3/+11
|\
| * Create sanitizer variants of APEX only when SANITIZE_TARGET is setJiyong Park2019-01-291-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a problem that APEX is unconditionally mutated for all sanitizer types. This can make an APEX to include sanitized version of a lib even when SANITIZE_TARGET is not set. It can happen when lib X is directly depended on by an APEX (e.g. via native_shared_libs) and X has a sanitized variant due to the dependency from another library Y which is force sanitized (via 'sanitize' property). In that case, regardless of lib Y is in the APEX or not, the APEX chooses the sanitized variant of lib X since the dependency from APEX to the lib is created with AddFarVariationDependency. Fixing this problem by mutating the APEX for a sanitizer type only when the device is requested to be sanitized. Bug: 122717287 Test: add libnetd_client to com.android.runtime APEX. Inspect build.ninja to verify that libnetd_client.so in the runtime APEX is not a sanitized one. Change-Id: I918bc8407137d74c5456142b3a29de13df68c0b3
* | stubs lib can export headers libJiyong Park2019-01-291-0/+50
| | | | | | | | | | | | | | | | | | Add a dependency from a stubs lib to headers libs so that the headers can be re-exported. Bug: 122717287 Test: m; a test added to apex_test.go Change-Id: I8d48c072815c6b02d343ef09cb44dfc6d1af8e64
* | Add __ANDROID_APEX__Jiyong Park2019-01-281-10/+55
|/ | | | | | | | | | | | | | | A module can be built multiple times when it is referenced from one or more APEXes. Sometimes, it is required for the module to behave differently depending on the context; e.g., do A when built form APEX M, do B when built for APEX N, and do C when built for platform. The idea is to have a macro __ANDROID_APEX__ which is set to the name of the apex that the module is built for. It is undefined when the module is built for platform. Bug: 122714993 Test: m (apex_test amended) Change-Id: I11a89c6a0e799f4810194de7ef9ee472a71ca498
* Only copy native binaries on native-bridge configsAlex Light2019-01-241-0/+5
| | | | | | | | | | | | | | If native-bridge/ndk translation is supported for a config the build system will know about 2 copies of binaries, one for each ABI. We only want to actually install the 'Native' (non-translated) ABI into the apex in these situations. Test: lunch aosp_cf_x86_phone-userdebug m showcommands com.android.runtime.debug examine the command output to make sure only a single copy of dex2oat is being installed. Change-Id: I9480e52855fd9f5564a579099309fb38f1c50367
* Disable all-assigned check in hiddenapi on master-artDavid Brazdil2019-01-231-1/+1
| | | | | | | | | | | | Master-art configurations do not have frameworks/base and therefore do not have hidden API flags. Pass --no-force-assign-all to `hiddenapi` when frameworks/base does not exist to disable the corresponding assertion. This enables us to enforce the assertion on non-master-art builds and also get rid of logspam about missing flags on ART buildbots. Test: art/tools/buildbot-build.sh on master-art Bug: 123143676 Change-Id: I074d9554fb11dab3eef904016375730520107ec2
* Fix: APEX gets .jar.jar suffix when TARGET_FLATTEN_APEX is trueJiyong Park2019-01-201-1/+5
| | | | | | | | | | | | soong_java_prebuilt.mk sets LOCAL_MODULE_SUFFIX := .jar. Therefore, we need to remove .jar suffix from LOCAL_MODULE_STEM, otherwise, we will have .jar.jar suffix. Bug: 123092860 Test: TARGET_FLATTEN_APEX=true apex.test Check /system/apex/apex.test/javalib/core-oj.jar is there. Change-Id: Ie19b20523753ec32ab16266f63d26c4df685cc34
* Enable arch variant properties in prebuilt_etc.Jaewoong Jung2019-01-171-4/+5
| | | | | | Bug: 122332178 Test: Soong unit tests + TreeHugger. Change-Id: Ia8fab0add09478599398e8cbb703debc39f658f6
* APEXes can be sanitizedJiyong Park2019-01-131-0/+8
| | | | | | | | | | | | | | | | | | | This change first introduces the interface "Sanitizeable" that module types other than cc.Module can use to be handled by the sanitizer mutator. APEX module, by implementing the interface, gets sanitizer variants. In doing so, sanitizer.go is refactored so that modules have explicit dependencies to the runtime sanitizer libraries. This allows the runtime library to be packaged into the APEX when required. This also completes the dependency graph; updating the prebuilt sanitizer runtime will trigger rebuilding of modules using the runtime. Bug: 120894259 Bug: 121038155 Test: SANITIZE_TARGET=hwaddress m apex.test Test: TARGET_FLATTEN_APEX=true SANITIZE_TARGET=address m Change-Id: Ia91576ff48cda3c996350308b75bf83fcf7c23d7
* Revert "Symbols for libs in APEXes are available"Michael Butler2019-01-111-52/+39
| | | | | | | | | | This reverts commit 769e50b3c9c8f7a3105cd0b06d155884f091cc5e. Reason for revert: Likely causing build failure on aosp_x86_64-eng in aosp_master: "build/make/core/base_rules.mk:271: error: art/build/apex: MODULE.TARGET.SHARED_LIBRARIES.com.android.runtime.host.libart-compiler already defined by art/build/apex." Change-Id: I83b7caa04b2648e4e4914aae2fa5878516634eed
* Symbols for libs in APEXes are availableJiyong Park2019-01-111-39/+52
| | | | | | | | | | | | | | | | | | | The unstripped file for libraries in APEXes are available via out/target/product/<device>/symbols/apex/<apex_name>/path_to_lib. This change make the symbol files available by installing the individual files in APEXes to the directory where the APEXes will be mounted at (i.e. runtime directory which is /apex/<apex_name>). Note that the files are not actually packaged to a filesystem image; they are installed just to create the symbol files under the out directory where developers can use them for debugging. Bug: 120846816 Test: m com.android.runtime.debug There are unstripped files under out/target/product/walleye/symbols/apex/com.android.runtime.debug Change-Id: Ib182e2bf8787b7669ccba13814491db35370f468
* APEXes can be signed with devkeysJiyong Park2019-01-113-14/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When PRODUCT_DEFAULT_DEV_CERTIFICATE is set to /vendor/foo/devkeys/test, then the public/private key pairs for an apex_key is searched at /vendor/foo/devkeys directory. To be specific, /system/timezone/Android.bp: apex_key { name: "timezone.key", public_key: "com.android.tzdata.avbpubkey", private_key: "com.android.tzdata.pem", } When PRODUCT_DEFAULT_DEV_CERTIFICATE isn't set, the keys are searched at /system/timezone, which is the path where Android.bp is located. With PRODUCT_DEFAULT_DEV_CERTIFICATE set to /vendor/foo/devkeys/test, the keys are searched at /vendor/foo/devkeys. Bug: 121224311 Test: m (apex_test updated) Test: m with crosshatch (PRODUCT_DEFAULT_DEV_CERTIFICATE is set to /vendor/google/...) Test: m with cheets (PRODUCT_DEFAULT_DEV_CERTIFICATE is set, but there is no apex key there. The product is with TARGET_FLATTEN_APEX := true) Change-Id: I213bbb96c433d851f9cc982871459fd7fb4fe47d
* apex manifest is always installed as apex_manifest.jsonJiyong Park2019-01-111-1/+9
| | | | | | | | | | | This change fixes a bug that when built with TARGET_FLATTEN_APEX=true, apex manifests are installed without being renamed to apex_manifest.json. Test: TARGET_FLATTEN_APEX=true Test: /system/apex/*/apex_mnifest.json exist Test: device boots to the UI Change-Id: Ib8baeb475babbf4faf6cc073e266bb3038ac1b2d
* Rename non-stubs variant of a lib if it is included in APEXJiyong Park2019-01-102-3/+29
| | | | | | | | | | | | | | | | | | | | | | | | If a lib is directly included in an APEX (via native_shared_libs property) and the lib has stubs (via stubs.versions property), then the ordinary non-stubs variant of the library is renamed to <libname>.bootstrap in the makefile. At the same time, the stubs variant of the lib becomes visible and it's name is <libname>. This ensures that modules in Android.mk build against the stubs variant thus preventing them from using private APIs in the lib. The non-stubs variant, however, is used if the module explicitly has set the new 'bootstrap' property to true. This is useful for building some early binaries (such as init and vold) which need to run before APEXes are activated. Since they can't use the bionic libs from the runtime APEX, they should use the bionic libs left in the system partition which is called the boostrap bionic. Bug: 120266448 Test: m Test: m with https://android-review.googlesource.com/c/platform/bionic/+/849044 Change-Id: I882b8aeb5b29460f07b4424e4f8eb844d6c9a9b0
* Add PRODUCT_MANIFEST_PACKAGE_NAME_OVERRIDESJiyong Park2019-01-091-0/+5
| | | | | | | | | | | | | | | | | | | | | It is a list of <module_name>:<manifest_name> pairs. When the module name of an APK or an APEX matches with <module_name>, then its app manifest name is overridden to <manifest_name>. <module_name> and <manifest_name> can be patterns as in com.android.%:com.mycompany.android.%.release Note that, in case of APEXes, the manifest name refers to the name of the zip container. The apex manifest name (which is specified in apex_manifest.json) is not overridden. Test: m with PRODUCT_MANIFEST_PACKAGE_NAME_OVERRIDES for 1) an APK in Android.mk 2) an APK in ANdroid.bp 3) an APEX and check that manifest names are modified as specified Change-Id: Ie58882d90884695e893944c43d9c8803b283e93d
* Executables in APEXes have root:shellJiyong Park2019-01-091-1/+1
| | | | | | | | | | | | | Executables under /system/bin are configured as (uid:gid)=(root:shell) by fs_config.cpp. Therefore, an executable that is moved/copied from /system/bin to an APEX should be configured as such. Test: adb shell ls -al /system/bin/linker /apex/com.android.runtime/bin/linker shows -rwxr-xr-x 1 root shell 1133528 1970-01-01 09:00 /apex/com.android.runtime/bin/linker -rwxr-xr-x 1 root shell 1133528 1970-01-01 09:00 /system/bin/linker Change-Id: Ibb698aab237362fed312da2af809cceead8a1092
* Don't use vendor variant when BOARD_VNDK_VERSION is not setJiyong Park2019-01-051-10/+11
| | | | | | | Vendor variants are not available when BOARD_VNDK_VERSION is not set. Test: m for aosp_marlin Change-Id: I5d89a401f5cf98db3f0a9aa553f00b2d6ee9ed1e
* Do not add _platform suffix to non-apex variationLogan Chien2019-01-041-1/+5
| | | | | | | | | | | | | | | | This commit renames `_platform` suffix to `` (empty string) so that non-apex variations are not renamed to `_core_shared_platform` or `_vendor_shared_platform`. This commit makes sure that `_core_shared` and `_vendor_shared` is always under `$OUT_DIR/soong` regardless the usages from apex modules. Furthermore, this avoids the confusing stale lsdump files (e.g. both `_core_shared` and `_core_shared_platform exist) while creating reference ABI dumps for VNDK ABI checks. Bug: 121986692 Test: lunch aosp_arm64-userdebug; make # no more _platform variants. Change-Id: Ic02a60ac45f982580349661c22331d114617fd92
* Fix: stubs lib is installed in APEXJiyong Park2019-01-041-1/+1
| | | | | | | | | | | | | | | This CL fixes the problem that when a lib is defined with stubs, the stubs variantof the lib is installed to the APEX. This was happening because the non-stubs variant is the last variant of the 'version' variants and addFarVariationDependencies selects the first variant when the 'version' variant isn't specified. Fixing the problem by making the non-stubs variant (whose name is "") the first variant. Test: m (apex_test) Change-Id: I1505fd2f29a0d70c916bad51000aa06f2b80b137
* Bundle public keys with APEXJiyong Park2019-01-041-5/+20
| | | | | | | | | | | | | When an apex key is marked as 'installable: false' and the build is debuggable, the pubic key file for the apex key is bundled with the APEX that is signed with the key. This eliminates the need to install the public keys for the testing-purpose APEX in the system partition. Bug: 122047804 Test: m Change-Id: Ifa5914891463dbf4c21484ea440836521b2f90b1
* Add installable property to apex_keyJiyong Park2019-01-041-1/+11
| | | | | | | | | | | | | Setting the property to false prevents the key from being installed. Useful for testing keys. Bug: 122042717 Test: add 'installable: false' to the apex_key 'com.android.apex.test_package.key'. mma under /system/apex/apexd/apexd_testdata. The key is not found under out/target/product/..../system/etc/security/apex Change-Id: Ibf70e4e8ea5e73432d06b1c4050df531eaafc85e
* Set stem for uninstalled apex modulesColin Cross2019-01-021-2/+2
| | | | | | | | | | | | | | Apex modules with installable: false are not installed, so the dist rule copies from LOCAL_BUILT_MODULE instead of LOCAL_INSTALLED_MODULE. If LOCAL_BUILT_MODULE_STEM is unset, LOCAL_BUILT_MODULE will have the module name as the stem, resulting in an incorrect file copied to the dist directory. Set LOCAL_MODULE_STEM instead of LOCAL_INSTALLED_MODULE_STEM, which also covers LOCAL_BUILT_MODUL_STEM. Fixes: 122277867 Test: tapas test1_com.android.tzdata && m dist Change-Id: I0af0c5adcac478a1ce68c4625203fd9bd56bf94d
* Fix: static dependency across an APEX is lostJiyong Park2018-12-211-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | This change fixes following problem: 1) a native lib having stubs is defined. 2) the lib is included in an APEX. 3) a static binary is linking the lib from outside of the APEX. 4) then, the dependency from the binary to the lib is vanishing. This is happening because cc.depsToPaths() mistakely does not distinguish static lib deps from shared lib deps. For shared lib deps, it creates two dependencies (one for stubs variant and the other for non-stubs variant) and choose the stubs variant when the lib and the current module is not in the same APEX (i.e. dependency to the non-stubs variant is discarded). However, since we don't have stubs variant for static library, it ends up having no dependency to the library if the link is static. Fixing the issue by skipping the variant selection routine when the link is static. Test: m (apex_test added) Test: build with https://android-review.googlesource.com/c/platform/bionic/+/849044 Change-Id: I21102a31cc5c0b105da2affdd035bd5cc571a6ab
* Add use_vendor to APEX moduleJiyong Park2018-12-202-40/+142
| | | | | | | | | use_vendor, when set to true, brings vendor variant of the native libraries and binaries to the APEX. Bug: 115707625 Test: m (apex_test updated) Change-Id: Ib4e996f8652f4ce4645a9c22f6914e2ab35edda6
* Fix a nill pointer dereference when TARGET_FLATTEN_APEXJiyong Park2018-12-201-1/+5
| | | | | | | | | | When TARGET_FLATTEN_APEX is set to true, there is no single output file for an APEX that other modules can reference via ":module" syntax. Return nothing in that case. Bug: 121221006 Test: TARGET_FLATTEN_APEX=true m Change-Id: I556b55073720b16fd30fd133af58aac229e958c0
* Fix: Flattend APEX is breaking buildJiyong Park2018-12-191-6/+10
| | | | | | | | | | | | | | When TARGET_FLATTEN_APEX=true, individual files in an APEX are exported to make. However, because they lack LOCAL_SOONG_CLASSES_JAR, soong_java_prebuilt.mk get confused and the build breaks. Fixing the bug by correctly emitting LOCAL_SOONG_CLASSES_JAR and LOCAL_SOONG_HEADER_JAR. Test: TARGET_FLATTEN_APEX=true m out/target/common/obj/JAVA_LIBRARIES/com.android.conscrypt.conscrypt_intermediates/classes.jar Change-Id: I65ce86ec825f978a43715146bbd5c1d5af513de0
* Merge changes Idb2b552b,I190bca35Treehugger Robot2018-12-191-0/+3
|\ | | | | | | | | | | * changes: When a stub is built for APEX, it is generated with --apex APEX-specific symbols can be tagged as # apex
| * When a stub is built for APEX, it is generated with --apexJiyong Park2018-12-161-0/+3
| | | | | | | | | | | | | | | | | | | | | | Now, symbols that are only to be visible to across APEXes can be tagged as # vndk. Then when generating the stubs library, the tagged symbol is included. The symbol is NOT included in other cases; build NDK stubs, etc. Bug: 120638081 Test: m (apex_test updated.) Change-Id: Idb2b552badddfc26af113cc8d4b984788f478813
* | Merge "Add installable property to apex module type"Treehugger Robot2018-12-151-9/+22
|\ \ | |/ |/|
| * Add installable property to apex module typeJiyong Park2018-12-151-9/+22
| | | | | | | | | | | | | | | | | | | | | | When set to false, the apex is built but not installed. Useful for not polluting the system image with test APEXes when doing mma. Bug: 120960303 Test: add 'installable: false' to apex.test under system/apex/tests/Android.bp m; check that out/..../system/apex/apex.test.apex does not exist. Change-Id: I383d5cdcc8aec705b6a5778dbd07233471d289d0
* | Remove -include <file> when compiling stubs.Jiyong Park2018-12-151-0/+5
|/ | | | | | | | | | | | Otherwise, the force included headers might cause conflicting types error with the symbols in the generated stubs source code. e.g. double acos(double); // in header void acos() {} // in the generated source code Bug: 120266448 Test: m (apex_test also updated, and passing) Change-Id: I717df990959d1b24ec515f0f52a4e28b94e92f32
* Don't create unnecessary APEX variationsJiyong Park2018-12-132-19/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change fixes a problem that APEX variations are created for the modules that actually shouldn't built for any APEX. For example, consider this case. apex { name: "myapex", native_shared_libs: ["mylib"],} cc_library { name: "mylib", shared_libs: ["libfoo#10"],} cc_library { name: "libfoo", shared_libs: ["libbar"], stubs: { versions: ["10"], }, } cc_library { name: "libbar", ...} Before this change, both the stubs and non-stubs variations of libfoo were mutated with apexMuator, which is incorrect for the non-stubs varia; there is no dependency chain from the apex "myapex" to the non-stubs variation, but to the stubs variation due to the #10 syntax. This was happening becauses we used the name of the module to determine whether it should be built for APEX or not. Both stubs and non-stubs variations have the same module name "libfoo". Fixing this issue by recording the list of APEX variations required directly on the module. So, the stubs variation of libfoo has myapex in its apex variations list, but the non-stubs variation doesn't, and thus apexMutator does not pick up the non-stubs variation. Test: m (apex_test updated and passing) Test: cherry-pick ag/5747464 and m Change-Id: I31e618626809a828a55fff513ef5f81f79637afa
* Output of an apex module type can be included in testsJiyong Park2018-12-121-0/+4
| | | | | | | | | | | | By implementing SourceFileProducer interface, output of an apex module can be included in tests (via ':modulename' syntax in 'data' property) Bug: 120055902 Test: replace apexd_testdata/* with :apex.test in system/apex/apexd/Android.bp. m apex_file_test. out/host/linux-x86/nativetest/apex_file_test/ has apex.test.apex in it. Change-Id: I8b721a68e0edc65a3e674febeed485e06b96bc24
* Fix: build error when a lib with stubs is included in an APEXJiyong Park2018-12-102-2/+11
| | | | | | | | | | | | | | | | | | | apex { name: "foo", native_shared_libs: ["mylib"] } cc_library { name: "mylib", shared_libs: ["other_lib"], stubs: { versions: ["1"]}, } This is causing build error due to missing variant for other_lib. This is happening because the stubs variant of mylib is added to apex foo instead of the non-stubs variant. Because stubs variant does not have any further dependencies, other_lib is not included to the APEX and is not built for it. Fixing this issue by specifying the version variant when adding a lib to the dependency of an APEX, so that non-stub variant of the lib is depended on. Test: m (apex_test updated) Change-Id: I972b6dcbce11942f83a76212715ba915534ec3df
* Fix: a module with sub_dir can't be placed in APEXJiyong Park2018-12-072-2/+40
| | | | | | | | | | | | | | | | | | This change fixes the bug that when a module is defined with sub_dir, then build breaks when the module is included in an APEX. This was happening because, for example when we have a prebuilt_etc module having sub_dir set to "foo/bar", then only etc/foo/bar is added to the canned_fs_config file and other intermediate directories (etc, etc/foo) are not added. e2fsdroid however expects that every directories to be listed. Fixing the problem by adding parent directories when adding a directory to canned_fs_config. Bug: 120600179 Test: m (a new test case added to apex_test) Change-Id: If712ff65761a7e1e3216371bb2eb7acf9cb5dc9e
* Make apex.ApexBundleFactory publicAlex Light2018-12-062-3/+3
| | | | | | | | | Art needs to be able to create an ApexBundle with a LoadHook to support art testing using the HOST_PREFER_32_BIT=true hack. Bug: 120617876 Test: HOST_PREFER_32_BIT=true m nothing Change-Id: Ia11e61a92094dfbc013c6c53a6edff33371ed8e1
* Add zip-apexAlex Light2018-12-042-101/+290
| | | | | | | | | | | | | | | | | | | | | | This adds support for an apex-like file where the payload is a zip file instead of a FS image. This makes it easier to examine and use without root. These can also be built for the host. This can be controlled using the 'type' modifier in the apex build rule. 'type' may be "image" to build an apex file called {name}.apex with an FS image payload, "zip" to build an apex with called {name}.zipapex with a zip-file payload or "both" to build both. By default we will use "image". This also adds support for setting apex rules to "host_supported: true". Test: cd art/build/apex; mma; examine the com.android.runtime.host.zipapex artifact. Test: go test android/soong/apex -v Bug: 120436895 Change-Id: I534d330672211ac5ccc3bd5a0c89b9fc507bf51e
* Stubs variant is used when building for APEXJiyong Park2018-12-042-14/+377
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a native module is built for an APEX and is depending on a native library having stubs (i.e. stubs.versions property is set), the stubs variant is used unless the dependent lib is directly included in the same APEX with the depending module. Example: apex { name: "myapex", native_shared_libs: ["libX", "libY"], } cc_library { name: "libX", shared_libs: ["libY", "libZ"], } cc_library { name: "libY", stubs: { versions: ["1", "2"], }, } cc_library { name: "libZ", stubs: { versions: ["1", "2"], }, } In this case, libX is linking to the impl variant of libY (that provides private APIs) while libY is linking to the version 2 stubs of libZ. This is because libY is directly included in the same apex via native_shared_libs property, but libZ isn't. Bug: 112672359 Test: apex_test added Change-Id: If9871b70dc74a06bd828dd4cd1aeebd2e68b837c
* Revert "Add resources.pb to the apex bundle"Shahar Amitai2018-11-271-2/+1
| | | | | | | | | | | | | | | | | | | | This reverts commit 1ed0fc532da81008143f1b7ae8f80d6e3eba10c4. Reason for revert: resources.pb not needed, version code is taken from AndroidManifest.xml Bug: 117295826 Test: tapas com.android.runtime.debug; m dist $ unzip -l com.android.runtime.debug-base.zip Archive: out/dist/com.android.runtime.debug-base.zip Length Date Time Name --------- ---------- ----- ---- 29618176 1980-01-01 09:00 apex/armeabi-v7a.img 52 1980-01-01 09:00 root/apex_manifest.json 464 1980-01-01 09:00 manifest/AndroidManifest.xml --------- ------- 29618692 3 files Change-Id: I677b9e70726087aa3ecc2949648976a0dfcd57dd
* Rename manifest and image files.Dario Freni2018-11-241-8/+8
| | | | | | | | | manifest.json -> apex_manifest.json image.img -> apex_payload.img Bug: 119672727 Test: m, installed on device, boots. Change-Id: Id79c6a1ac8f5d306f534477d94b76f8ed0e7d7a7
* Add resources.pb to the apex bundleJiyong Park2018-11-231-1/+5
| | | | | | | | | | | | | | | | | | | The file was missing. Bug: 117295826 Test: tapas com.android.runtime.debug; m dist $ unzip -l com.android.runtime.debug-base.zip Archive: com.android.runtime.debug-base.zip Length Date Time Name --------- ---------- ----- ---- 29614080 1980-01-01 09:00 apex/armeabi-v7a.img 52 1980-01-01 09:00 root/manifest.json 379 1980-01-01 09:00 manifest/AndroidManifest.xml 59 1980-01-01 09:00 resources.pb --------- ------- 29614570 4 files Change-Id: I916ad5ba479c952a106b055c0e71e7e6556b6101
* Align entries in APEX at 4K boundaryJiyong Park2018-11-221-0/+1
| | | | | | | | | | Use -a option of signapk to specify the alignment to 4K. The default is 4. Test: m apex.test; zipalign -c -v 4096 $(OUT)/system/apex/apex.test.apex shows ok Change-Id: I7b1a3d442b69b89838cf09451939cd23d5646bde