This change contains a prototype implementation for multitree. Several
interfaces and modules are added.
1. Imported/Exported
Modules implementing Exportable interface can export artifacts to other
components. "imported_filegroup" modules can import generated artifacts from other exported modules.
2. Multitree metadata
It contains information about imported/exported modules in each
component, and can be generated via "m update-meta".
3. cc library stub
It's based on prototype stub libraries. It uses imported/exported
mechanism to expose a C API, with a map.txt file and header files.
Bug: 230448564
Test: m
Change-Id: Id7ff7618e2c630c5617a564d8b23b60a1cc9c8e8
This CL removes the build_id.mk suffix and replaces it with a hardcoded
placeholder string that will be replaced with the actual version in
apex_manifest.json by apexer at apex construction time.
This means that as long as the apex version is incremented, the
APK-in-APEX will be installed to a new directory path from the package
manager's perspective.
Fixes: 229574810
Bug: 229625490
Bug: 226559955
Bug: 224589412
Bug: 227417611
Bug: 228157333
Bug: 228803590
Bug: 229136249
Test: atest StrictJavaPackagesTest
Test: soong tests
Test: deapexer list out/dist/com.google.android.permission.apex
Ignore-AOSP-First: this is an cherrypick
Change-Id: I9cef1418c3fc7e0970d96995b8398f5e82f479e0
Merged-In: I9cef1418c3fc7e0970d96995b8398f5e82f479e0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2067907
Change-Id: Ib5c681d03dc12c5f4839b810b79ef4800235ea30
Ignore-AOSP-First: this is an automerge
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This CL removes the build_id.mk suffix and replaces it with a hardcoded
placeholder string that will be replaced with the actual version in
apex_manifest.json by apexer at apex construction time.
This means that as long as the apex version is incremented, the
APK-in-APEX will be installed to a new directory path from the package
manager's perspective.
Fixes: 229574810
Bug: 229625490
Bug: 226559955
Bug: 224589412
Bug: 227417611
Bug: 228157333
Bug: 228803590
Bug: 229136249
Test: atest StrictJavaPackagesTest
Test: soong tests
Test: deapexer list out/dist/com.google.android.permission.apex
Change-Id: I9cef1418c3fc7e0970d96995b8398f5e82f479e0
This fixes an issue with package manager's cache invalidation.
Test: CI
Bug: 226559955
Bug: 224589412
Change-Id: I8af49d51ff99cf8184d0e4d1136fff1cdb29c23e
Merged-In: I8af49d51ff99cf8184d0e4d1136fff1cdb29c23e
When coverage is enabled there are two variants of the apex, one
installable and one not installable. Don't try to install files
files to $OUT/apex for the non-installable variant.
Bug: 217453046
Test: m NATIVE_COVERAGE_PATHS="*" NATIVE_COVERAGE_EXCLUDE_PATHS="art bionic/libc device" CLANG_COVERAGE=true USE_HOST_MUSL=true com.android.runtime
Change-Id: I23e58c811ff943b9d5dec025fa619c8db835b29c
When a library is included in two APEXes whose platform_apis settings
are different, two apex variants of the library is created: apex1000 and
apex1000_private.
This change was introduced with ag/15061306, especially by the commit
[1].
However, that part should be reverted because it actually creates
unnecessary variants. It's unnecessary because the two variants of the
library are compiled (excluding the linking) exactly the same. If a
private symbol of its dependency was actually used when compiling the
apex1000_private variant, then the other apex1000 variant wouldn't have
been built because that private symbol must have caused a linkage error.
[1] https://googleplex-android-review.git.corp.google.com/c/platform/build/soong/+/15061306/2..4/android/apex.go#b527).
Bug: 228785792
Test: m
Change-Id: Id58d3e98a51de5e628ca72ef86e9cd11b0ee8971
The proguard test files are duplicated in apex and sysprop and will
be needed by app tests, move them to the java package.
Test: run all soong tests
Change-Id: Ie13817dcda8d98801d16a97ffceef1100c7d5380
Override all mainline updateable apexes' min_sdk_version
to same version to get single shared native libs on DCLA.
Test: Run "vendor/google/build/go/mainline_go_modules_arm.sh" and inspect built apexes
Bug: 212609891
Change-Id: Ide7d3f2bc772ac6240f1c917b87285d051d6f605
Merged-In: Ide7d3f2bc772ac6240f1c917b87285d051d6f605
Override all mainline updateable apexes' min_sdk_version
to same version to get single shared native libs on DCLA.
Test: Run "vendor/google/build/go/mainline_go_modules_arm.sh" and inspect built apexes
Bug: 212609891
Change-Id: Ide7d3f2bc772ac6240f1c917b87285d051d6f605
Previously we were only generating used-by API-coverage for APEX modules.
This change adds support for APK-only modules such as NetworkStack and DocumentsUI.
Bug: b/216313756
Forrest Run: https://android-build.googleplex.com/builds/abtd/run/L10800000953846781
Test: TARGET_BUILD_VARIANT=userdebug PRODUCT=mainline_modules_x86 ./vendor/google/build/build_unbundled_coverage_mainline_module.sh -j16
Change-Id: Id17e4a55c2a52e9903632a654e778f8d54982dfc
Merged-In: Id17e4a55c2a52e9903632a654e778f8d54982dfc
(cherry picked from commit 56d75785bd)
(cherry-pick of ag/17524387 into aosp)
Summary:
- updates the Q and R maps, the new keys are the bcp jars and not the
apexes. neverallow build rules ensure that these bcp jars have a
restricted set of permitted_packages
- remove BootclasspathJar from the neverallow rule. This is no longer
necessary since the keys in the maps are the bootjars themselves, and
not apexes
Bug: 205289292
Test: In build/soong, go test ./apex
Change-Id: Icb91de934181a8b6f085e03a0ce8c5e08504ff94
Merged-In: Icb91de934181a8b6f085e03a0ce8c5e08504ff94
(cherry picked from commit 440ff96728)
This reverts commit 1fdd6ca88a.
Reason for revert: b/205289292 tracks the real fix for this
Test: presubmit
Change-Id: I5a2edaf4f930dafa26659f85d9425e9041c72275
Merged-In: I5a2edaf4f930dafa26659f85d9425e9041c72275
* changes:
Remove android.safetycenter from framework-permission bcp permitted_packges
Change permitted_packages check to be per-jar rather than per-apex
Revert "Relax apex package restriction for T+ jars"
Switch from generate-notice-files.py and mergenotice.py to htmlnotice.
Bug: 151177513
Bug: 213388645
Bug: 210912771
Test: m droid dist reportmissinglicenses
Change-Id: I6cac049d24f35ec358c6f341a04f4ba6161703bf
This fixes an issue with package manager's cache invalidation.
Test: CI
Bug: 226559955
Bug: 224589412
Change-Id: I8af49d51ff99cf8184d0e4d1136fff1cdb29c23e
Merged-In: I8af49d51ff99cf8184d0e4d1136fff1cdb29c23e
The permitted_packages check is now per jar and not per apex. Remove
safetycenter from the map since this package prefix cannot be in
framework-permission
Bug: 205719989
Bug: 205289292
Test: TH
Change-Id: I473731a697fb09319037536dead97f5abf4bd6ea
(This CL has been implemented in master to prevent a merge conflict with
ag/16222633. It will be cherry-picked to AOSP)
Summary:
- updates the Q and R maps, the new keys are the bcp jars and not the
apexes. neverallow build rules ensure that these bcp jars have a
restricted set of permitted_packages
- remove BootclasspathJar from the neverallow rule. This is no longer
necessary since the keys in the maps are the bootjars themselves, and
not apexes
Bug: 205289292
Test: In build/soong, go test ./apex
Change-Id: Icb91de934181a8b6f085e03a0ce8c5e08504ff94
This reverts commit 1fdd6ca88a.
Reason for revert: b/205289292 tracks the real fix for this
Test: presubmit
Change-Id: I5a2edaf4f930dafa26659f85d9425e9041c72275
(cherry picked from commit 1d016c50d0ee18ebc81ce7966e616b9936befd5a)
* changes:
Do not propagate strict updatability linting to libcore/
Create allowlist to skip strict updatability lint check
Propagate strict_updatability_linting to transitive deps of updatable apexes
Export LintDepSetsIntf from java package
When an apex sets installable: false call SkipInstall to prevent
creating the install rules, and don't report the install rules
to Make.
Fixes: 221261079
Test: m checkbuild
Change-Id: If94759b16f79ee10ddcf8ee89603ca9e822b74f5
The clang prebuilts now provide a single module with per-architecture
variants instead of a module per architecture.
Bug: 220019988
Test: m checkbuild
Change-Id: I39e2cf8ae14edf8510276dab38011afaef85822c
Merged-In: I39e2cf8ae14edf8510276dab38011afaef85822c
In addition to the current "apps", support overriding
bootclasspath_fragments, systemserverclasspath_fragments, and java_libs.
This is useful to build APEXes with slightly different contents, for
example where the base APEX could contain libraries that only use stable
APIs, but the overriding APEX could contain a variant that also uses
non-finalized APIs.
Bug: 222247869
Test: m (runs apex tests)
Change-Id: I14da6f835c58b44be31e517598695ec8ff830648
The clang prebuilts now provide a single module with per-architecture
variants instead of a module per architecture.
Bug: 220019988
Test: m checkbuild
Change-Id: I39e2cf8ae14edf8510276dab38011afaef85822c
(cherry picked from commit 386ee59a23)
Merged-In:I39e2cf8ae14edf8510276dab38011afaef85822c
The primary boot image is a required dep of the ART APEX. It needs to be
installed no matter the APEX is flattened or not.
Bug: 220991677
Test: 1. m OVERRIDE_TARGET_FLATTEN_APEX=true com.android.art
2. See boot.art in /system/framework/<isa>
Change-Id: I1a69ae1b86df97fc44ea6c75c8bb9ec960c8d249
dependencies of rust library registered as jni_lib are correctly
tracked.
Bug: 220397949
Test: m nothing
Change-Id: I43016a77656d04f59f798b02d541c6a19288ec9c
propogation of this flag is determined by the location of the Android.bp
where a library is defined.
libcore/ libraries that are transtive deps of updatable apexes will
- inherit strict_updatability_linting:true if defined in libcore root
- not inherit strict_updatability_linting:true if defined in libcore
subdir
Note that the module can explicitly list `lint:{strict_updatability_linting: true}'
in their Android.bp file, in which case they will not be allowed to
baseline NewApi errors
Test: m lint-check
Test: TH
Bug: 208656169
Bug: 182349282
Change-Id: I4c373b2960a7af16301d7f06aab448f39b937ea9
Cleans out the remaining modules that build system
auto-allowed for the media mainline modules com.android.media
and com.android.media.swcodec. With this change, both lists
are empty and all needed modules are documented with explicit
apex_available clauses.
Bug: 215589022
Bug: 147364041
Test: build
Change-Id: I7d809ae72ad21f6b2ed8b05613c44019a974f6fd
This CL refactors the code related to ManifestFixer parameters.
The required parameters android.ModuleContext, manifest android.Path are
passed separately as the parameters and the optional parameters are
kept as part of the ManifestFixerParams struct.
By default, the member variable of struct have the zero (nil, false,
empty string) values. Hence, it is only required to pass the
parameters of interest at the time of function call to
ManifestFixer.
Manual testing done to check the working of the code.
Test: m nothing && m test_com.android.sdkext
Test: manually tested the generation of AndroidManifest in the out
directory with the testOnly attribute
Test: atest manifest_fixer_test --host
To test the existing unittests are not breaking.
Change-Id: I20cb6c06c57f8fe7811050288bcb03945dc0425b
As of Jan 2022, some updatable mainline modules have (transitive) deps with
NewApi in their respective lint-baseline.xml. Create an allowlist to
relax this check temporarily for those mainline modules.
Test: m lint-check
Test: TH
Bug: 182349282
Change-Id: I9ccda6fccb973e9100e31b7e559f5642289ac717
If the build file contains the apex_test module, but the apex_test
module does not contain the AndroindManifest file, then create the
AndroidManifest file.
In such case, the apexer tool is already generating an AndroidManifest
file. In order to handle the testOnly attribute for apex_test modules, a
--test_only flag is appended to the opt flags.
The apexer tool reads the opt flags and if the --test_only flag is
present then it generate the AndroidManifest file with testOnly
attribute.
Bug: 213310150
Test: m nothing && m test_com.android.sdkext
Test: manually checked the generation of AndroidManifest file in the
unsigned zip file mentioned in the description.
This command allows to read the attribute of the binary xml file -
aapt2 dump xmltree test_com.android.sdkext.apex.unsigned --file
AndroidManifest.xml
Verified the presence of testOnly flag in the output.
Change-Id: Ic47378428b2dba51d73e75d912546c2374f68d57
Create a topdown mutator to walk the deps of updatable apexes. If a dep
is lintable, set its strictUpdatabilityLinting to true
Creating a new mutator after apexInfoMutator makes it easy to maintain
an allowlist (e.g. override_apex does not require an entry in the
allowlist, its canonical name can be retrieved using ApexVariationName())
Test: In build/soong/, go test ./apex
Test: TH
Bug: 182349282
Change-Id: I1b390b0e3a8fb20754ce50c6b253d68d2b3f263b
Clean out list of modules automatically allowed to be used in the media
mainline modules, now that those modules have explicit apex_available
clauses in their Android.bp files.
Bug: 215589022
Bug: 147364041
Test: build
Change-Id: I2d3f57621796c99a119acc98e1ead358aebedc5d
In case there are two vendor apexes(one with "use_vndk_as_stable:true",
and the other with "use_vndk_as_stable:false") a VNDK lib used by both
will have "APEX" variant and the former APEX will use "apex" variation.
For example,
apex1(use_vndk_as_stable) -> foo -> libvndk
apex2 -> bar -> libvndk
Since foo, bar and libvndk are mutated into two APEX variations("",
"apex10000"), foo will use the apex variation of libvndk.
To fix this, VNDK libs can use "unique" APEX variations. Then, in the
above example, foo will have "myapex1" variation and libvndk will have
two APEX variations("" and "apex2"). So foo will link to ""(non-APEX)
variation as fallback.
Bug: 216847402
Test: m nothing (soong tests)
Change-Id: I116932860ef79e22dc338a58b251e3ca693ab4f3
Even though a vendor APEX sets use_vndk_as_stable:true it was possible
to include a VNDK lib by directly depending on it with
native_shared_libs.
But it's contradictory to have a VNDK lib while declaring not to include
VNDK libs. It was missing since pruning dependencies on VNDK libs was
done only for transitive deps.
Added a check to reject this.
Bug: 216847402
Test: m nothing(running soong tests)
Change-Id: I8d79a434b1bfe8e563cf8968fa76830b0e582f66
If the build file contains the apex_test module, add the
testOnly attribute to the application element of the
corresponding AndroidManifest file and set its value to true.
If the testOnly attribute is already present and has value
false, then do nothing.
Tests added in manifest_fixer_test.py to check if the updated
AndroidManifest file has the testOnly attribute set to true or not.
Bug: 213310150
Test: atest --host manifest_fixer_test
Test: m nothing
Test: manually checked the AndroidManifest file generated
Change-Id: I36247dbe0261c342d451a4422c314fd8fe0c2369
This change is similar to aosp/1947127, but for prebuilts.
After this change, if `bootImageConfig.installDirOnDevice` is set to a
path outside of the APEX, the build system will build a boot image from
the dex files and the profile extracted from the prebuilt APEX.
Otherwise, it keeps the current behavior: extracting the boot image from
the prebuilt APEX.
This is a no-op change. Current behavior is not affected.
Bug: 211973309
Test: m nothing
Test: -
On internal master:
1. Patch aosp/1947128.
2. Patch ag/16743847 and ag/16746804.
3. m SOONG_CONFIG_art_module_source_build=false com.google.android.art
4. See the boot image being installed in `/system/framework/<arch>`.
Change-Id: I24ca525309fecaf3ab7a67960fbf118cd00ecd1d
Bug: 214466457
Bug: 207551677
Test: b build //build/bazel/examples/apex/minimal:build.bazel.examples.apex.minimal
Test: b test //build/bazel/tests/apex:build.bazel.examples.apex.minimal_apex
Test: b test //build/bazel/tests/apex:build.bazel.examples.apex.minimal_capex
Change-Id: I6bf12c1b0c52d4486968bb430a67a3c3110766db
This is needed to allow the Android Go versions of modules
(com.google.android.go.*) to select a different compression toggle than
their non-Go (com.google.android.*) conterparts. go/go-updatability
Bug: 203024418
Test: Preloaded go variants on wembley, booted Android.
Change-Id: Ic96aff5fafb65fbd08e8a69d47c994532e27819e
Merged-In: Ic96aff5fafb65fbd08e8a69d47c994532e27819e
(cherry picked from commit 2c4a96375a)
As requested by reminv@, their team wants the source code in
sc-mainline-prod to be strictly the same as the code in AOSP. Therefore,
we need to ignore `standalone_contents` in the
`systemserverclasspath_fragment` module and
`systemserverclasspath_fragments` in the `sdk` module in order to merge
aosp/1925682 into sc-mainline-prod.
- `standalone_contents` in the `systemserverclasspath_fragment` module
does nothing but adds its contents as dependencies of the APEX.
- `systemserverclasspath_fragments` in the `sdk` module does nothing.
Bug: 203198541
Test: TARGET_BUILD_APPS=com.android.tethering vendor/google/build/mainline_modules_bundles.sh
Change-Id: I56ca22aa91a807cd113dfda2fabaeb49ecabe289
Merged-In: I09a6fd1d3db85c194330da9b751702a9bf069e26
Discourage jarjaring code where there are alternatives with
better system health implications.
Test: m
Bug: 215233995
Change-Id: I1b076d00e1ad6aa32b41da6bda1033978b5e829d
Currently, the bpf module netd.o (source system/netd/bpf_progs/netd.c)
will be built to /system/etc/bpf/netd.o. In Android T, it will be moved
to mainline module com.android.tethering.
The expected behavior is:
- In T device, it uses the netd.o in mainline module.
- In pre-T devices, it uses the original netd, built from platform.
However, netd.o will be double loaded if the tethering module is
installed in Pre-T devices. Because:
1. bpf in apex is packed into /apex/MAINLINE_MODULE/etc/bpf/
2. bpf in platform is packed into /system/etc/bpf/
3. bpfloader in pre-T loads ANY bpf modules under
/apex/com.android.tethering/etc/bpf/ and /system/etc/bpf/.
We can't change the behavior of bpfloader in pre-T devices. We can't
delete the /system/etc/bpf/netd.o from pre-T devices. Both of them are
not mainline modules. So the mainlined netd.o needs to be packed into a
folder other than /apex/com.android.tethering/etc/bpf/ or
/system/etc/bpf/.
This commit adds a tag 'sub_dir' for bpf module. The installation path
of bpf modules will be:
- /system/etc/bpf/SUB_DIR/ (for platform code)
- /apex/MAINLINE_MODULE/etc/bpf/SUB_DIR/ (for mainline module)
Bug: 202086915
Test: add test in apex_test.go and build
Merged-In: Icc6619768ab006de9f86620a7df1bb2853eaba13
Change-Id: Icc6619768ab006de9f86620a7df1bb2853eaba13
Currently, the bpf module netd.o (source system/netd/bpf_progs/netd.c)
will be built to /system/etc/bpf/netd.o. In Android T, it will be moved
to mainline module com.android.tethering.
The expected behavior is:
- In T device, it uses the netd.o in mainline module.
- In pre-T devices, it uses the original netd, built from platform.
However, netd.o will be double loaded if the tethering module is
installed in Pre-T devices. Because:
1. bpf in apex is packed into /apex/MAINLINE_MODULE/etc/bpf/
2. bpf in platform is packed into /system/etc/bpf/
3. bpfloader in pre-T loads ANY bpf modules under
/apex/com.android.tethering/etc/bpf/ and /system/etc/bpf/.
We can't change the behavior of bpfloader in pre-T devices. We can't
delete the /system/etc/bpf/netd.o from pre-T devices. Both of them are
not mainline modules. So the mainlined netd.o needs to be packed into a
folder other than /apex/com.android.tethering/etc/bpf/ or
/system/etc/bpf/.
This commit adds a tag 'sub_dir' for bpf module. The installation path
of bpf modules will be:
- /system/etc/bpf/SUB_DIR/ (for platform code)
- /apex/MAINLINE_MODULE/etc/bpf/SUB_DIR/ (for mainline module)
Bug: 202086915
Test: add test in apex_test.go and build
Change-Id: Icc6619768ab006de9f86620a7df1bb2853eaba13
After this change, `bootImageConfig.installDirOnDevice` can be set to a
path outside of the APEX, in which case, the boot image will not be
installed in the APEX. Instead, it will be installed to the given path
by Make.
This is a no-op change. Current behavior is not affected.
Bug: 211973309
Test: m nothing
Test: -
1. m com.android.art
2. See the boot image still being installed in the ART APEX.
Test: -
1. Change `installDirOnDevice` of the ART boot image config to
`system/framework`.
2. See the boot image being installed in `/system/framework/<arch>`.
Change-Id: Ib13b17cc9e94dc5754c9b51b04df3307323b8783
This change adds support for dexpreopting standalone system server
jars from prebuilts.
Bug: 203198541
Test: -
1. Add a standalone system server jar (e.g., by patching
aosp/1906158)
2. Build and drop a module SDK and an APEX.
3. Build a system image from prebuilts.
4. See the odex and vdex files generated in
$ANDROID_PRODUCT_OUT/system/framework/oat/
Change-Id: I8f4eaed10a1053cd560b8583efa12dc495f58db1
The property is used to customize uid/gid/mode/capabilities of files in
an APEX.
Bug: 209971551
Test: m
Change-Id: I484e46ff819a5266c1e8046dae337e18ef3fefea
... in preparation for adding the support for custom canned fs config
Bug: 209971551
Test: m nothing
Change-Id: I7f2576ff99c65bdb6c9ce4ace61bc783eea2f0d4
App compact impact is hard to judge (see http://b/124106384#comment9
ff), so this tries it early in the dessert cycle.
This is also a workaround for b/209867137 where the symlink install
rules interact badly with the artifact_path_requirements.mk check.
Test: m installclean && m droid
verify that $(PRODUCT_DIR)/system/bin doesn't have dalvikvm and
dex2oat symlinks
Bug: 124106384
Bug: 209867137
Change-Id: I044fb40f656beeb7c6e61f1d418fa13f56714a70
Each conversion required defining a separate mutator, which will each
operate on _all_ modules and requires each to repeat checks whether the
mutator should operator. Instead, we introduce a single mutator and
modules can define a ConvertWithBp2build to implement bp2build
conversion for that module.
Test: bp2build.sh
Bug: 183079158
Change-Id: I99d4b51f441c2903879092c5b56313d606d4338d
The ART AOT exemption only applies to Q/R/S, so module jars that have
min_sdk T+ do not need to follow the module package restriction, even if
they are part of a Q/R/S module (but not loaded on Q/R/S).
Relax the restriction to only apply to jars that have min_sdk before T.
(clean cherry-pick)
Bug: 208773835
Change-Id: Ib41ab443e36a694e3fac5f2ab0acabb3009f40a9
Test: m (runs apex tests)
Merged-In: I2c3ad8984ca05ad763bf6162bd478f93ab4ee650
* changes:
Allow java_sdk_library in an APEX to have higher min_sdk_version.
Perform CheckMinSdkVersion for java_sdk_library.
Add MinSdkVersion(ctx) method to ModuleWithMinSdkVersionCheck interface.
Add ModuleWithMinSdkVersionCheck type.
Use textproto format for classpaths.proto generation.
Propagate min and max sdk versions to classpaths.proto configs.
Introduce max_sdk_version device property.
Test SdkSpecForm.
Inidividual boot or system server jars may have higher min_sdk_version
than the contianing apex, since the runtime respects the values of
min/max_sdk_version; e.g. runtime would not load a boot jar with
higher min_sdk_version. This allows shipping new boot jars via apexes
that target older platforms.
Bug: 190818041
Test: presubmit
Change-Id: I08ec0b4463a17bc8265b948fe09da55eb4e52ac3
Merged-In: I08ec0b4463a17bc8265b948fe09da55eb4e52ac3
(cherry picked from commit 758968a700)
This is to help following refactor for individual modules to have their
own version of checking where needed.
For example, apk in apex may want to enforce it's own version of
CheckMinSdkVersion.
Bug: 205923322
Test: presubmit
Change-Id: Ia2fad6c52af39e21f65385bcb283f1e3adab5548
Merged-In: Ia2fad6c52af39e21f65385bcb283f1e3adab5548
(cherry picked from commit b3fd411465)
The ART AOT exemption only applies to Q/R/S, so module jars that have
min_sdk T+ do not need to follow the module package restriction, even if
they are part of a Q/R/S module (but not loaded on Q/R/S).
Relax the restriction to only apply to jars that have min_sdk before T.
Bug: 208773835
Test: m (runs apex tests)
Change-Id: I2c3ad8984ca05ad763bf6162bd478f93ab4ee650
apex_set modules failed to set prebuiltCommon.installedFile, which
caused LOCAL_SOONG_INSTALLED_MODULE to be empty and base_rules.mk
to create a duplicate install rule. Set it to the path to the
apex file installed by Soong.
Bug: 204136549
Bug: 209867137
Test: m SOONG_CONFIG_art_module_source_build=false
Change-Id: Ia7fec09598823343242ebd44f1732e6bba21d027
Soong has enough information to build the license metadata files
without resorting to the fixups required in Make.
Bug: 207445310
Test: m checkbuild
Change-Id: I8e74108376162b8fdb87ba098ebe94350aa1f7c4
Inidividual boot or system server jars may have higher min_sdk_version
than the contianing apex, since the runtime respects the values of
min/max_sdk_version; e.g. runtime would not load a boot jar with
higher min_sdk_version. This allows shipping new boot jars via apexes
that target older platforms.
Bug: 190818041
Test: presubmit
Change-Id: I08ec0b4463a17bc8265b948fe09da55eb4e52ac3
apex.binaries accepts a list of module names, which should be resolved to
their fully qualified labels. Bazel treats string_list and label_list
attributes differently, most notably with the latter adding dependency edges.
Test: apex_conversion_test.go
Bug: 209743852
Change-Id: Iafdc5c728e8658cce0e99d42f32e7bb6fe2f3168
Add scripts to generate java APIs used by Mainline modules. This is
aosp/1879177 with fixed build error that caused by dexdeps analyzing
resource only APKs which doesn't contains any .dex files. Now skip the
error generates in that case in gen_java_usedby_apex.sh
Test: TARGET_BUILD_APPS=com.android.adbd m dist apps_only
Change-Id: Id539cbe1b7306ace69c047f95ffc02265a467511
Merged-In: Id539cbe1b7306ace69c047f95ffc02265a467511
This is configured from Make by setting up Darwin+Arm64 as a HOST_CROSS
target (which is largely true, as binaries can't be executed on X86_64
machines). On the Soong side, it's a bit blurier, as we don't current
have any other users that are the same OS but not natively executable
(Linux/musl is executable, Windows/x86 is a different OS).
Instead of requiring cc_binary/etc to become multi-architecture-aware
and using something like common_first/MultiTarget, this defaults all
non-multi-architecture-aware modules to be built with both
architectures. It then adds a dependency with the
DarwinUniversalVariantTag so that supporting modules can get the outputs
of the other variant.
Cc uses that dependency tag to run lipo on shared libraries and binaries
so that the output of the x86_64 variant is actually a fat binary
including both architectures.
Bug: 203607969
Test: build sdk-repo targets on a Mac
Change-Id: Icbddb0a177c0ba19d3e0d11f8cf568e0d1ea3245
Without these errors, the last encountered deapexer would silently be
used. However with PRODUCT_INSTALL_APEXES there will only be deapexer
for installable APEXes, and we can assume only a single installable
APEX exists for each APEX variant, so make it an error if it isn't the
case.
Corresponding to http://ag/15156931.
Test: m nothing SOONG_CONFIG_art_module_source_build=true
Test: m nothing SOONG_CONFIG_art_module_source_build=false
Test: m nothing SOONG_CONFIG_art_module_source_build=false
with installable:true for the com.android.art.debug prebuilt APEX -
check that it fails with an "ambiguous duplicate deapexer" error
Bug: 192006406
Bug: 192542393
Change-Id: I44566fd26b12f82a8a67fe4a69e56303460756d0
This is to help following refactor for individual modules to have their
own version of checking where needed.
For example, apk in apex may want to enforce it's own version of
CheckMinSdkVersion.
Bug: 205923322
Test: presubmit
Change-Id: Ia2fad6c52af39e21f65385bcb283f1e3adab5548
The new property is used to mimic some of the build behaviors that
currently are applied only when an APEX is `updatable: true`. This
property is helpful to minimize the sudden impact (e.g. change in size)
when an APEX becomes updatable.
Currently, the behavior that this property mimics is the disabling of
the size optimization.
Bug: 207336449
Test: m
Change-Id: I500306afa1221625fda3e89a8d12d5d341791a1f
We will need the profile when we generate the primary boot image on
device.
Bug: 203492478
Test: Run `banchan com.android.art x86_64 && m` and see
`$ANDROID_PRODUCT_OUT/apex/com.android.art/etc/boot-image.prof`.
Test: Run `lunch aosp_cf_x86_64_phone-userdebug && m` and see both
`$ANDROID_PRODUCT_OUT/apex/com.android.art/etc/boot-image.prof` and
`$ANDROID_PRODUCT_OUT/system/etc/boot-image.prof`, in different
sizes.
Test: Start Cuttlefish with the built image and see both
`/apex/com.android.art/etc/boot-image.prof` and
`/system/etc/boot-image.prof` on device.
Change-Id: Id879dc49b234133dfbb9563814328661a1f4a6c0
Vendor APEXes do not formally support updates outside of the main OTA
process. We should clarify this at build time.
Test: set vendor apex to updatable, observe failure
Test: apex_test.go
Change-Id: Ife8d242a42415ebf00d7dced72c07cda1fde1839
Previously, could not set an empty string as a value of an attribute;
however, this is necessary in some cases. To not unnecessarily create an
empty string, use string pointers for attributes rather than strings.
Test: go test bp2build tests
Change-Id: I03b3a3567452d455246d22d81f86c317d06b7c39
This CL updates platform_systemserverclasspath,
systemserverclasspath_fragment, and
prebuilt_systemserverclasspath_fragment to write entries for
STANDALONE_SYSTEMSERVER_JARS to systemserverclasspath.pb. A new property
`standalone_contents` is aded to `systemserverclasspath_fragment` and
`prebuilt_systemserverclasspath_fragment` to list the standalone system
server jars in the APEX, and entries will be written to
systemserverclasspath.pb accordingly at build time.
To add more context, these entries will be consumed by derive_classpath
in order to generate an environment variable
PRODUCT_STANDALONE_SYSTEM_SERVER_JARS. The environment variable will
then be comsumed by odrefresh to determine what jars to preopt on early
boot.
Note that the variable should not end with "CLASSPATH" because the list
is not used by runtime as a classpath. It is just a colon-separated list
of jars. System server loads the jars separately with paths hardcoded in
the code.
Bug: 203198541
Test: manual -
1. Add some jars to PRODUCT_STANDALONE_SYSTEM_SERVER_JARS
2. Add some other jars to PRODUCT_APEX_STANDALONE_SYSTEM_SERVER_JARS
and standalone_contents.
3. Build an image.
4. Flash the image to a device.
5. adb shell echo \$STANDALONE_SYSTEMSERVER_JARS
6. See the correct list of jars.
Change-Id: I09a6fd1d3db85c194330da9b751702a9bf069e26
The sh_binary module is not supported the vendor variant. So, even if
there is "vendor: true" in sh_binary module, the image variant is
"image:" instead of "image:vendor.Tiramisu".
But the vendor APEX has vendor variant, so vendor APEX module and
sh_binary module have different variants and the sh_binary cannot be
added to vendor apex.
So the Sh_binaries property is added, and the image variant is removed
at DepsMutator.
Bug: 205065320
Test: make -j40 && sh_binary is added to vendor APEX && install check
Change-Id: I30e2d96a73b45e7b06eff24550542cb010008c41
Perform consistency checks as per http://go/updatable-shared-libraries
These include:
* no attribute can specified can be less than T
* max-device-sdk can't be less than min-device-sdk
* min and max-device-sdk need to be at least the module's
min_sdk_version
* using on-bootclasspath-before implies that the module's
min_sdk_version is at least T or the library has min-device-sdk of at
least T
Test: m nothing
Bug: 191978330
Change-Id: Iaca5cf23fb0bc7e65effb3529c8e829560894c2e
Merged-In: Iaca5cf23fb0bc7e65effb3529c8e829560894c2e
(cherry picked from commit f9e584dd20)
We are expanding PackageManager's supported attributes and this change
enables the developer to define them in the .bp file.
Test: m nothing
Bug: 191978330
Change-Id: I01d579190fb585662086a7fc456f3b33cb89fb57
Merged-In: I01d579190fb585662086a7fc456f3b33cb89fb57
(cherry picked from commit 826863c8e0)
As libsync is NDK/LLNDK, it doesn't need to be aded to allowlist as
apex_available.
Bug: n/a
Test: m
Change-Id: I16cfb258a24bde4def428f1e6277f5d3c95c228c
Move apex module installation rules into Soong by overriding
InstallBypassMake.
Soong installs don't support post install commands, so move the
symlinks into separate rules and add dependencies on them.
This relands If65d283abc86f18ad266da0bf16fe95971a0bf9c with fixes
to install files into $OUT/apex and I606286e971b55d9d1fc4dcd0fbd476962de5fa79
with a fix for reversed logic.
Bug: 204136549
Test: m checkbuild
Change-Id: Ie65c53ebc7911efacdb8e11ba49059448f03c658