We actually want some targets (in particular, the MediaProvider apk)
to link against framework-mediaprovider.
The gist of what the neverallow rule achieves (disallow general use)
is achieved equally well with visibility rules, which
framework-mediaprovider already has.
Bug: 152891096
Test: m nothing
Change-Id: Ic4b0a571985b9ad1dfdd56d45035f224a622700e
Use droidstubs for public and system stubs to provide a list of @removed APIs. As these APIs are not present in the stubs, they are not whitelisted / greylised automatically. Keep them on greylist manually.
Bug: 143864733
Test: diff out/soong/hiddenapi/hiddenapi-flags.csv
Change-Id: I4c8e6899fadfdfd1da82f6f453cc92e71aa9b78c
Merged-In: I4c8e6899fadfdfd1da82f6f453cc92e71aa9b78c
Exempt-From-Owner-Approval: clean cherry-pick
(cherry picked from commit c7fb5c9964)
Reuse the generic Dist support instead of writing
custom mk rules for it. Use the new Tag support to
grab the classes.jar instead of the dexed jar.
Bug: 152618077
Test: m sdk dist
Change-Id: Id893d52cc24b66e6bd900b5062a59f3820000bcd
Make java_library support this mode of output, to allow
callers to dist the classes.jar file rather than the dexed
jar file.
Bug: 152618077
Test: followup CL
Change-Id: I5ba6949833a0fbb95376142aec5096ff5f084c00
We have known problems (docker; distros w/o user namespaces) which mean
that we won't be turning this into a fatal error anytime soon. Also
remove the bug report link, it's not useful to continue getting the same
reports.
Bug: 123210688
Test: treehugger
Change-Id: I271871d68150417ac938f074d3730cad4518e327
Merged-In: I271871d68150417ac938f074d3730cad4518e327
(cherry picked from commit 1871d88e4f)
For VNDK-Lite devices, which doesn't define BOARD_VNDK_VERSION, VNDK
APEX is built with only VNDK-Sp libraries with core variants.
Bug: 141908078
Bug: 152353068
Bug: 151635128
Test: TH
Change-Id: I0d08d32473368fd158818d4c2c72fc4cfad68ce6
This is a cherry-pick change.
Test: Built mainline module coverage data
Bug: 152117890
Change-Id: I47bf3e5d6e78c4518729bdb52616e248156d3cec
Merged-In: I47bf3e5d6e78c4518729bdb52616e248156d3cec
It's painful to debug without these.
Bug: 151160048
Test: do a build; find out -name '*.rsp'
Change-Id: I6fc25095442178c0bcbc1dea444ba51e9259c600
Merged-In: I6fc25095442178c0bcbc1dea444ba51e9259c600
A library may have both VNDK variant and stubs. getRefAbiDumpFile should
differentiate its vendor and core variants.
Bug: 152277104
Test: Add dumps to platform/ and vndk/ ; make libselinux.vendor libselinux
Change-Id: Iad038cf4cd3eccc3dfbef13fab67da044498ce77
Merged-In: Iad038cf4cd3eccc3dfbef13fab67da044498ce77
(cherry picked from commit 27d235f918)
Previously, when Q-targeting apexes are bundled-built, they are built
against the latest stubs.
It was because unwinder is linked dynamically in R and APIs are provided
by libc while Q apexes should run on Q where libc doesn't provide those
APIs. To make Q apexes run on Q device, libc++ should be linked with
static unwinder. But, because libc++ with static unwinder may cause problem
on HWASAN build, Q apexes were built against the latest stubs for bundled
build.
However, Q apexes should be built against Q stubs.
Now, only for HWASAN builds, Q apexes are built against the latest stubs
(and native modules are not linked with static unwinder).
Bug: 151912436
Test: TARGET_SANITIZE=hwaddress m
=> Q apexes(media, resolv, ..) are linked with the latest stubs
m
=> Q apexes are linked with Q stubs,
and Q apexes' libc++ is linked with static unwinder
Change-Id: If32f1b547e6d93e3955c7521eec8aef5851f908c
If "v4_signature: true" is set, the v4 signature file,
named [outputApkFile].idsig
will be generated along side the outputApkFile.
Test: m nothing
Test: atest PackageManagerShellCommandIncrementalTest
BUG: 149354175
Change-Id: Ie84725a15406f96f65042ea9909460e4eb34d57f
The macro is required only for apex variants regardless of useVndk.
Before the enforcement of LLNDK sdk version, the macro was not passed to
vendor variants.
Bug: 151689896
Test: TARGET_BUILD_APPS=com.android.media.swcodec m
libbase in swcodec apex is linked with liblog#29
(compiled with __ANDROID_SDK_VERSIO__=29)
Merged-In: I57fa4afe027eb39b98bd94d534be9ebe11713f19
Change-Id: I57fa4afe027eb39b98bd94d534be9ebe11713f19
(cherry picked from commit 24282778ee)
Exempt-From-Owner-Approval: cp from aosp
Even though use_vendor:true is prohibited, there is media.swcodec apex
which is still use_vendor: true and also needs to support Android10.
(min_sdk_version: 29)
Because LLNDK stubs were provided only for the current VNDK version,
media.swcodec couldn't be built against min_sdk_version: 29.
This change introduces additional versions for LLNDK stubs which are
enforced when an apex with use_vendor: true sets min_sdk_version.
To make things easier, the versions of LLNDK stubs are borrowed from its
implementation libraries.
Bug: 147450930
Bug: 149591522
Test: TARGET_BUILD_APPS=com.android.media.swcodec m
(with min_sdk_version: 29 set)
check if liblog/libc/libm/libdl stubs are 29
check if 29 stubs don't have new symbols.
Merged-In: I79946cbb4da6617138a96d2b254349d3a298e77b
Change-Id: I79946cbb4da6617138a96d2b254349d3a298e77b
(cherry picked from commit 380fc3615c)
Use the result of regex.ReplaceAllString()
Bug: 149591522 (not directly related to this)
Test: m (with new unit test)
Merged-In: Ifce07547ccc067f1ee5bd8467c2fb7d7f8387b8e
Change-Id: Ifce07547ccc067f1ee5bd8467c2fb7d7f8387b8e
(cherry picked from commit b04a4997b8)
Soong already uses build directory as a part of the generated output
path. Besides, trying to append it second time breaks if the build
directory is an absolute path.
Test: frameworks/rs/build_rs.py (uses absolute build directory path)
Test: walleye-userdebug boots
Bug: 152235239
Change-Id: Ie03c9e688013b9a3e6bc859c936d89c538ded76a
The null pointer dereference was caused by trying to get device name
from a config passed to dexpreopt. For Make modules, the config is a
stub that doesn't have a device name. The fix is to use build directory
instead of device name (it is provided both by the full config passed
to Soong modules and by the stub config passed to Make modules).
Test: walleye-userdebug boots.
Test: aosp_bertha_arm-userdebug builds and generates arc-services.odex.
Bug: 152193534
Change-Id: I7adc173646cae6eaee188c6672629a5a942aea06
Flow:
1. Annotation processor generates a CSV file per class as a CLASS_OUTPUT resource.
2. hiddenapi.go extracts individual .csv files and merges them into an index.csv file per module.
3. hiddenapi_singleton.go merges individual index.csv files into a combined .csv file.
In a follow up hiddenapi-index.csv would replace unsupportedappusage_index.csv
Bug: 145132366
Change-Id: I87d92f9c8d4b1cc1df526fc576ee3c2101116b58
Merged-In: I87d92f9c8d4b1cc1df526fc576ee3c2101116b58
Test: diff unsupportedappusage_index.csv hiddenapi-index.csv
Exempt-From-Owner-Approval: cp from r.android.com/1239709
This reworks CL https://r.android.com/1180134 as follows:
1) Do not reorder the list of system server jars passed from Make to
Soong via the product variable PRODUCT_SYSTEM_SERVER_JARS. This means
that for some products the order of jars on the system server
classpath may be non-optimal: a jar X that depends on Y may be
dexpreopted before Y, so that all references to the classes and
methods from Y wil be unresolved.
Unfortunately for such products, fixing the order is not a simple
matter of rearranging their PRODUCT_SYSTEM_SERVER_JARS, because the
conflicts may arise when the product-specific variable gets merged
with the common variable.
2) As a consequence of 1), do not add artificial dependencies between
system server jars: this is now impossible, as it would create
circular dependencies for those products that have non-optimal order
of jars.
3) Copy dex files for system server jars to a predefined build location.
This is necessary because at the time when Soong generates class
loader context for k-th jar, it needs to know the paths to jars 1 ..
(k-1), and it might have not processed those jars yet (so Soong can't
query the paths from the modules).
This approach is similar to the way Soong handles bootclasspath jars.
4) Do not exclude from dexpreopting system server jars that are not
Soong modules (those that are Make modules). The previous CL excluded
them because Make modules do not have ModuleContext. But it turns out
that ModuleContext is not necessary, as all the information is passed
via the dexpreopt config.
Test: aosp_walleye-userdebug boots and there are no messages in the
logcat regarding class loader context mismatch:
$ adb logcat | grep 'mismatch'
# empty
Test: Class loader contexts in the oat files for system server jars
match expectations:
$ oatdump --oat-file=out/target/product/walleye/system/framework/oat/arm64/com.android.location.provider.odex 2>/dev/null | grep '^classpath'
classpath = PCL[]
$ oatdump --oat-file=out/target/product/walleye/system/framework/oat/arm64/services.odex 2>/dev/null | grep '^classpath'
classpath = PCL[/system/framework/com.android.location.provider.jar*1989208671]
$ oatdump --oat-file=out/target/product/walleye/system/framework/oat/arm64/ethernet-service.odex 2>/dev/null | grep '^classpath'
classpath = PCL[/system/framework/com.android.location.provider.jar*1989208671:/system/framework/services.jar*4040443083:/system/framework/services.jar!classes2.dex*2210087472]
Test: The phone boots and logcat has no scary messages related to
class loader contexts:
$ lunch aosp_walleye-userdebug && m
$ adb reboot bootloader && fastboot flashall -w && adb wait-for-device
$ adb root
$ adb shell stop
$ adb logcat -c
$ adb shell setprop dalvik.vm.extra-opts -verbose:oat
$ adb shell start
$ adb logcat | egrep -io 'system_server: .*load.*/system/framework.*'
system_server: Loading /system/framework/oat/arm64/com.android.location.provider.odex with executable: 0
system_server: Successfully loaded /system/framework/oat/arm64/com.android.location.provider.odex with executable: 0
system_server: Loading /system/framework/oat/arm64/services.odex with executable: 0
system_server: Successfully loaded /system/framework/oat/arm64/services.odex with executable: 0
system_server: Loading /system/framework/oat/arm64/ethernet-service.odex with executable: 0
system_server: Successfully loaded /system/framework/oat/arm64/ethernet-service.odex with executable: 0
system_server: Loading /system/framework/oat/arm64/wifi-service.odex with executable: 0
system_server: Successfully loaded /system/framework/oat/arm64/wifi-service.odex with executable: 0
system_server: Loading /system/framework/oat/arm64/com.android.location.provider.odex with executable: 1
system_server: Successfully loaded /system/framework/oat/arm64/com.android.location.provider.odex with executable: 1
system_server: Loading /system/framework/oat/arm64/services.odex with executable: 1
system_server: Successfully loaded /system/framework/oat/arm64/services.odex with executable: 1
system_server: Loading /system/framework/oat/arm64/ethernet-service.odex with executable: 1
system_server: Successfully loaded /system/framework/oat/arm64/ethernet-service.odex with executable: 1
system_server: Loading /system/framework/oat/arm64/wifi-service.odex with executable: 1
system_server: Successfully loaded /system/framework/oat/arm64/wifi-service.odex with executable: 1
system_server: Loading /system/framework/oat/arm64/com.android.location.provider.odex with executable: 1
system_server: Successfully loaded /system/framework/oat/arm64/com.android.location.provider.odex with executable: 1
Bug: 141785760
Bug: 140451054
Bug: 148944771
Bug: 147017252
Change-Id: I33c4087f8bfacd0ecb89877aa150b75360d06710
We only need documentation (javadocs) when building docs stubs,
for regular stubs, we can drop printing out all the docs.
Tested with:
touch frameworks/base/core/java/android/view/View.java && time make -j framework
Before (with just r.android.com/1254909)
Run #1 2m4.779s
Run #2 2m6.672s
Run #3 2m4.179s
Average: 125.2 seconds
After (with this patch and r.android.com/1254909)
Run #1 1m58.682s
Run #2 1m58.820s
Run #3 1m57.724s
Average: 118.4 seconds
Speedup ~6.8 seconds (5.4%)
Bug: 151160048
Test: make checkapi
Change-Id: I27eafb5a61bb9d26a74ca25f84c9daca17a8394f
Merged-in: I27eafb5a61bb9d26a74ca25f84c9daca17a8394f
vararg parameter is passed without unpacking, which prints
not-so-useful value.
Bug: 151963308
Test: m
Merged-In: I03f011557d10c6e2bc06813491cd8df2cce7c6ea
Change-Id: I03f011557d10c6e2bc06813491cd8df2cce7c6ea
(cherry picked from commit cd87c69de4)
This makes sure that we don't keep old vendor_boot artifacts around
after a clean.
Signed-off-by: Will McVicker <willmcvicker@google.com>
Fixes: 151957122
Bug: 151949371
Test: touch $OUT/vendor-ramdisk/test-file && make installclean
Change-Id: I357929583f234212a998dceaa31506fce42e0255
Include the module_api stubs in system_server one instead of
putting both of these jars on the classpath. Also rename it
to be in line with the other stubs.
Bug: 149293194
Test: m
Change-Id: Iead5af4152a49cd59a4fd7afc0312c2f0c872c1e
This change fixes a bug that license info for statically linked
libraries are absent in the merged notice for APEX. The problem was that
we were iterating over the apexFiles list that represents actual files
(not Soong modules) that are included in the APEX. The problem is now
fixed by iterarting the all the modules that directly or indirectly
contribute to the APEX using walkPayloadDeps() function.
Bug: 149455933
Test: m
Merged-In: I38655da62b590b669ab4649815b61a5a8e314154
(cherry picked from commit 9918e1afd7)
Change-Id: I38655da62b590b669ab4649815b61a5a8e314154
libselinux no longer is included in any APEX. Only the platform variant
of it (/system/lib/libselinux.so) exists and APEXes link to it.
Removing the lib name from the whitelist to make it clear that the
library is not available to any APEX.
Bug: 151053366
Bug: 150999716
Test: m
Exempt-From-Owner-Approval: cherry-pick from aosp
Merged-In: Id4fb933141ad32ff5217a58f1c7d689cc657e9ea
(cherry picked from commit 1731f6ae3f)
Change-Id: Id4fb933141ad32ff5217a58f1c7d689cc657e9ea
sdk_version is passed for relevant variants.
If not specified or "current",
it maps to "10000" for platform variants, and
"min_sdk_version" of the apex for apex variants.
Bug: 150860940
Test: m (soong test)
manually check build.ninja
Merged-In: I5102ab0c5086b5ad29d16ac45af55d32062167b4
Change-Id: I5102ab0c5086b5ad29d16ac45af55d32062167b4
(cherry picked from commit ccce2f2c23)
Exempt-From-Owner-Approval: cp from aosp
This is rarely used feature but cost alot for the local build and build
inra.
Bug: 150506627
Test: m
Merged-In: Iec3ada4a97c7b228f2818563fa0e81b407f2715a
Change-Id: Iec3ada4a97c7b228f2818563fa0e81b407f2715a
(cherry picked from commit c87a059c88)
Exempt-From-Owner-Approval: cp from aosp
min_sdk_version = 29 implies that the module should support Android10.
Bug: 150431944
Test: m
Merged-In: Iad90a239898f59456900ae7816b90379b1b43406
Change-Id: Iad90a239898f59456900ae7816b90379b1b43406
(cherry picked from commit 5417f775e5)
Exempt-From-Owner-Approval: cp from aosp