Library order is important because it is used to construct class loader
context, which is then written into OAT/ODEX files and chacked against
class loader context constructed by PackageManager on the device. If the
orders are different, dexpreopted code is rejected.
This CL fixes a few problems that caused reordering:
- 'filter' function arguments are swapped so that patterns list comes
first, and the library list second
- JSON representation of class loader context is changed to avoid
unmarshaling it to Go maps, which may reorder keys
- library list is no longer sorted (it's unclear why it was sorted)
Bug: 132357300
Test: lunch cf_x86_64_phone-userdebug && m && launch_cvd \
adb wait-for-device && adb root && adb logcat \
| grep -E 'ClassLoaderContext [a-z ]+ mismatch'
# empty grep output, no errors
Change-Id: Ie76996d497e60da0948f1879d6db589ff3e968a2
This adds the configuration necessary to allow the cts_root
test suite to be built.
Bug: 162933947
Test: m cts_root
Merged-In: I4732bf82d3cedc77e30d7fa5eff285d382992853
Change-Id: I4732bf82d3cedc77e30d7fa5eff285d382992853
This is needed due to output artifacts in the zip that confuse globbing,
such as [.
(Also changes this call to RunAndCheckOutput, which prints the stderror
by default instead of RunAndWait which does not. Removes RunAndWait
which is now unused)
Bug: 179799226
Test: Run merge_target_files to merge two partial builds
Change-Id: Ibf8a5b0c013c9cd8b1e61195d97583f247d97c6f
For the first-boot (happening after upgrades) use verify as quicken is deprecated.
For the usual boot operations use extract instead of the verify. Under normal behaviour all apps should already be optimized (either with the first-boot option, a/b option or in bg-dexopt). This will speed up the boot process in corner cases and reduce resource contention that could make the device janky in at boot time.
Bug: 172114559
Change-Id: I33f204911bdc825bf6731feb5cea7c260382798b
Test: m
Jarjar doesn't exit with a nonzero return code when there is a syntax
error in a rules file and doesn't write the output file. Without a
nonzero return code ninja prints a warning but continues, which leads
to stale results on incremental builds where the output file already
exists, or delayed errors on clean builds whre the output file didn't
exist.
Delete the output file before running jarjar, and then check if it
exists after running jarjar.
Fixes: 119516143
Test: m out/target/common/obj/JAVA_LIBRARIES/noto-emoji-compat-java_intermediates/classes-jarjar.jar
Change-Id: Ib99167403948ee11f039dd4d2d7e63052bb92136
Use_lmkd_stats_log used to control LMKD_LOG_STATS when compiling lmkd.
However, for newer Android releases, we mandate that lmkd informs statsd of process kills (change id I8cb123b9488fbc6e88863c2f0e75f1422bcd282e)
After aosp/1555318 we compile lmkd with statsd by default, so this setting is a noop.
Change-Id: I91bd08198fe2275fb8aca77ae5ea637df360d416
Test: build
Bug: 177985094
use py3 for AOSP build, while the script itself can be
executed under py2/py3 environment directly.
TEST: extract info from Pixel 4 kernel
Change-Id: I00db6dabb1ff93f0758017a666c476816caefae7
to facilitate mixing GSI onto Cuttlefish
Bug: 178677060
Bug: 179455901
Test: build gsi_x86_64 and aosp_arm64 and check the existence of
'dynamic_partition_list' in misc_info.txt
Change-Id: I0fd9e9645d4882e2cd7d3508a44fbcad5dce81bc
repack_bootimg is useful to add files into a ramdisk, then repack
a boot.img. Note that mkbootimg, unpack_bootimg, lz4, minigzip, etc.,
that repack_bootimg depends are already in otatools.zip.
Bug: 174443192
Test: `m otatools-package`, unzip $OUT/otatools.zip, export $PATH
with ./otatools/bin and checks unpack_bootimg can run
Change-Id: Id4fbf2076b50522b95ab46dfeb1e2b7115d6606d
target_files.zip passes a list of files to soong_zip in a file list
file, which soong_zip interprets as a glob. Adding a file called "["
causes soong_zip to error with "syntax error in pattern". Use an RSP
file instead, which after I1de7829c668538204fc4a2ac793a4f88dbc886c9
does not interpret entries as globs.
Bug: 179297188
Test: m target-files-package
soong_zip: don't glob RSP file entries
File arguments are considered globs, but RSP file entries should be
considered filenames without globbing. Escape RSP file entries so
they don't get treated as globs later.
Bug: 179297188
Test: zip_test.go
Change-Id: I0736f2d1802114217cba03ee32b67479c9d98da8
builds.
This CL is a nop since the default is still true, but it gives us a way
to toggle it without affecting coverage builds.
Test: env NATIVE_COVERAGE=true build/soong/soong_ui.bash \
--dumpvar-mode SOONG_CONFIG_art_module_source_build
env CLANG_COVERAGE=true build/soong/soong_ui.bash \
--dumpvar-mode SOONG_CONFIG_art_module_source_build
env NATIVE_COVERAGE=true CLANG_COVERAGE=true \
build/soong/soong_ui.bash \
--dumpvar-mode SOONG_CONFIG_art_module_source_build
check that all these print "true" when the default in the "else"
clause is "false".
Bug: 172480615
Change-Id: I648ed911773c59a5b2a117dbf3ddcb2ef338830d
Filter LOCAL_OPTIONAL_USES_LIBRARIES by PRODUCT_PACKAGES. This has the
drawback that some present libraries may be filtered out as well, as the
full list of product packages is unknown until all Android.mk files have
been read.
This CL unblocks <uses-library> fixes for individual apps, which will be
necessary to dexpreopt them in the nearest future when the &-classpath
hack is removed in ART. Apps that are not fixed by then will loose
dexpreopt completely. This fix, although not perfect, lowers the risk of
loosing dexpreopt for many apps. In the future it may be replaced with a
better solution.
Bug: 132357300
Test: lunch aosp_cf_x86_64_phone-userdebug && m && launch_cvd \
adb wait-for-device && adb root && adb logcat \
| grep -E 'ClassLoaderContext [a-z ]+ mismatch'
# empty grep output, no errors
Change-Id: I188cf240259f7a448623450e6a949e0784a21f87
If a module is installed to TARGET_RECOVERY_ROOT_OUT,
then its init rc file (declared in LOCAL_INIT_RC) is installed
to $OUT/recovery/root/system/etc/init instead of
$TARGET(partition)_OUT_ETC/init.
Fixes: 178859897
Test: m snapuserd.recovery
Change-Id: I82d0f40d6d7047e271612204391c5a027f84f52f