Some devices require VNDK using core library list, but this is dependent
to system image rather than VNDK version. This change removes VNDK using
core variant library list file from VNDK APEX, and also remove VNDK
version from its filename.
Bug: 142599349
Test: m -j passed && aosp_cf_x86_go_phone booted
Change-Id: Ibc53b8dfc9d38e14bbaa878154034d25a6d34089
java_import doesn't support dex jar which is necessary to be packaged in
an APEX. Supporting this would require non-trivial work. By the way
java_import is not used and there is a workaround.(defining java_library
and static-linking with it)
We drop the support for `java_import` in APEX.
Bug: 139175488
Test: m (soong tests amended)
Change-Id: I924386571079090c701276d87f665ce7fbb6f074
When a java_sdk_library module is added, both impl jar and permission
xml files are packaged together.
For example, when a java_sdk_library "foo" is listed, following two
entries will be in an APEX package.
/javalibs/foo.jar
/etc/permissions/foo.xml
Bug: 145474221
Test: m com.android.cronet
deapexer list com.android.cronet.apex
Change-Id: If5883c02255e9309f20810b1532d3fbe73bf4e95
Effectively adds the cc_defaults module type to the set that are
registered for tests that rely on cc default deps so needed to remove
a few references of that.
Test: m checkbuild
Bug: 146540677
Change-Id: I9df3d33a0cf3f6b22d270efed8366d0183eccaec
This fixes an issue that arises when deduping cc build component
registration code.
The sanitize_runtime_deps and sanitize_runtime post deps mutators were
not previously added when running cc tests. That meant the tests were
not actually testing the same behavior as at runtime.
Adding the mutators breaks the TestFuzzTarget test as the mutator adds
libclang_rt.ubsan_standalone-aarch64-android as a dependency of libc++
and the former is not available.
This fixes the test by adding the missing dependency as a cc prebuilt
shared library.
Test: m checkbuild
Bug: 146540677
Change-Id: Ie13c7e6fcefef7d9cb1cc5364be3dc563ce40de5
The cc.GatherRequiredDepsForTest() method returns some default module
definitions that are required when using cc module types like
cc_library. Previously, the registration of the module types and
mutators needed to process those default definitions was duplicated
in the test config initialization.
This change removes that duplicated code and replaces it with calls
to cc.RegisterRequiredBuildComponentsForTest(ctx) which registers all
the required build components.
Test: m checkbuild
Bug: 146540677
Change-Id: I80b6913c5691ff164ce9d308b9e1da24940f2d42
The registration of module types and singletons is duplicated between
init() functions that register them for use in the build runtime and
test context creation code that registers them for testing.
This is a proof of concept for a mechanism that will allow the code
to be shared. It defines a RegistrationContext interface that is
implemented by both the TestContext and the new initRegistrationContext
type. An instance of the the latter is available through the
InitRegistrationContext variable.
The intent is that the registration of the module types and singleton
types will be extracted from the init() function into a separate
function that takes a RegistrationContext parameter. That method is
called from init() passing in the InitRegistrationContext and from a
test passing in the TestContext. Something like this:
func init() {
RegisterBuildComponents(android.InitRegistrationContext)
}
func RegisterBuildComponents(ctx android.RegistrationContext) {
ctx.RegisterModuleType(....)
....
}
A test would do something like this:
ctx := android.NewTestContext()
RegisterBuildComponents(ctx)
Test: m nothing
Change-Id: I97173cabb6d6cf7ce98fdb5f73418438b1997b35
The filesystem object was available through ModuleContext.Fs(), but
gives too much access to the filesystem without enforicing correct
dependencies. In order to support sandboxing the soong_build
process move the filesystem into the Config. The next change will
make it private.
Bug: 146437378
Test: all Soong tests
Change-Id: I5d3ae9108f120fd335b21efd612aefa078378813
Run the imageMutator between osMutator and archMutator so that
different arch variants can be set for the different partitions.
Bug: 142286466
Test: m checkbuild
Change-Id: I65d05714b75aa462bf9816da60fdc2deda4de593
Merged-In: I65d05714b75aa462bf9816da60fdc2deda4de593
(cherry picked from commit 9c8f687584)
The rules for apex certificate:
1. <unspecified>: use <default app cerficicate>
2. name: use <default app cerficiate dir>/<name>(.x509.pem|.pk8)
3. :module: use specified by <module>
Certificates can be overridden by PRODUCT_CERTIFICATE_OVERRIDES.
Currently, 1) and 2) aren't overridden by PRODUCT_CERTIFICATE_OVERRIDES,
which should be.
Bug: n/a
Test: m (apex_test.go amended)
Change-Id: Icbdf4979613ef10127ecc02f3debd6a798460532
In case that an apex module depends on a module with stubs directly
*and* indirectly, the build system should follow the deps graph further.
Note that WalkDeps() visits deps in DFS and it won't visit again visited
modules.
Bug: n/a
Test: m (apex_test.go amended)
Change-Id: I1a6f135dbda6d1eb641575a3fbbc9bbee0622076
Use the empty string for the core image variant so that modules
added to imageMutator do not change their build directory.
Bug: 142286466
Test: m checkbuild
Change-Id: Ida4534d9a4d6176236aaa480fed359ce27acfaa1
Merged-In: Ida4534d9a4d6176236aaa480fed359ce27acfaa1
(cherry picked from commit 72d685ee7f45e5393be44ae4159edf083ac918de)
APEXes with "legacy_android10_support" will have apex_manifest.json for
compatibility as well as apex_manifest.pb.
Bug: 143951586
Test: m (soong tests)
Change-Id: I019252aee5a9423f4b180ba1026e6e99c9961437
AndroidMkEntries now returns multiple AndroidMkEntires so that a module
can emit multiple Make modules if needed.
Bug: 128708192
Test: m
Change-Id: I56b6f76d22943b80329951c5acb80a1b932441ad
Move the ImageMutator to be registered just after the archMutator
in preparation for moving it between osMutator and archMutator.
Requries updating variants in a few tests that now run the
ImageMutator.
Bug: 142286466
Test: no change to build.ninja
Test: all soong tests
Change-Id: Ia9d2a7bc0e225bedec3c9a83ea04f471a931bf47
GSI targets are supposed to have both 'flattened' and 'unflattened'
APEXes. By adding 'flattened' APEX as REQUIRED moduled for 'unflattened'
APEX, both will be installed togetther.
This is done by a new variable PRODUCT_INSTALL_EXTRA_FLATTENED_APEXES,
which is set only for GSI targets.
Bug: 137802149
Test: lunch aosp_arm64-userdebug && m
resulting apex images under /system/apex
and flattened apexes under /system/system_ext/apex
Change-Id: I336e2674e427b358542e0045b2a49dfa3d84095b
This change fixes the problem that when an apex module is overridden by
another override_apex, the <apex_name>-file_contexts are duplicated when
creating the system-level file-contexts.
Fixing this by not emitting the file_context info for the overridden
apex.
In doing so, OverridableModule interface was extended to have
GetOverriddenBy() method which can be used to test whether a module is
an overridden one or not.
Bug: 144338929
Test: m (apex_test amended)
Test: add "override_apex {name:"com.googlge.android.tzdata",
Change-Id: I5e9401c32899bb9987c90cba4185f571dc1a87f0
base:"com.android.tzdata"}" and the build is successful
This change is to make it easier to add new fields to the struct.
transitiveDep field is added to distinguish apexFiles coming from
transitive dependencies of the APEX. We will later use the info to
reduce the size of bundled APEXes by replacing the transitive deps with
symlinks to the corresponding files in the system partition outside of
the APEX.
Bug: 144533348
Test: m
Change-Id: I283859f2f2f1b5cfb3025569f168ba8569b22bb9
This build rule is specific to platform APEXes.
For non-platform APEXes, MakeAsSystemExt() is not applied.
This fixes the cases of "soc_specific: true" apexes which fails to
build.
Bug: 139053989
Test: m nothing (soong tests)
Change-Id: I98d0257499647ab41cdaa62a3671d89addbdf833
Exempt-From-Owner-Approval: got +1 before rebasing
Avoid having to pass ModuleFactoryAdaptor to every call to
RegisterModuleType in a test by wrapping RegisterModuleType.
Test: all soong tests
Change-Id: If8847d16487de0479cc3020b728256922b3cadba
When an override_apex named Foo overrides an apex module named Bar, the
Make modules from Foo have Foo as their suffix. Previously the suffix
was Bar for both of the overriding and the overridden APEXes, causing
name conflicts in the Make side.
Bug: 144338929
Test: apex_test.go
Change-Id: I1396910ab294ba5f5e0585af6d37f1eab9460250
For platform APEXes, file_contexts should point a file under
/system/sepolicy.
Bug: 144732805
Test: m
Change-Id: Ib2d5db715bbebc80a6178d1c42e387b268cc4a0d
Prepare for making the image mutator available to all modules and
moving it between the os and arch mutators by moving it into the
android package and using an interface implemented by the module
types to control it.
Bug: 142286466
Test: No unexpected changes to out/soong/build.ninja
Change-Id: I0dcc9c7b5ec80edffade340c367f6ae4da34151b
override_apex module type is used to override existing apex module with
certain properties overridden. Currently, only the 'apps' property is
overridable.
Bug: 144338929
Test: m
Change-Id: Ic050b062093cda29ce78126cc92dd6097647f7db
APEXes are ETC type, which should be overridden via
LOCAL_OVERRIDES_MODULES. This change fixes a bug that
LOCAL_OVERRIDES_PACKAGES was used for APEXes.
Bug: 140792287
Test: m
Test: add com.google.android.tzdata to PRODUCT_PACKAGES and build.
/system/apex/com.google.android.tzdata.apex exists, but
/system/apex/com.android.tzdata.apex doesn't.
Change-Id: Id65743b36e0b706d6ffd8cae0597cc0a42a83fb7
If a JNI lib is depended on by an APK that is included in an APEX, the
lib is embedded inside the APK.
This change also fixes a bug that APKs are not mutated for APEXes.
Bug: 144135069
Test: m (apex_test.go amended)
Change-Id: I21ac24412b30c05afc03385655c6b196130dffe3
ApexPropreties are added in InitApexModule() and they are supposed to be
defaultable. To be defaultable, InitApexModule() should be called before
InitDefaultableModule().
Bug: 144332048
Test: m (soong test added)
Change-Id: I6c90ed3b66a086292a4c0ecb37c61f83769e62bd
If a JNI lib is depended on by an APK that is included in an APEX, the
lib is embedded inside the APK.
This change also fixes a bug that APKs are not mutated for APEXes.
Bug: 144135069
Test: m (apex_test.go amended)
Change-Id: Icf490d2701a7ede8bcad7e671fc72be9c8d7c01e