odrefresh: regenerate artifacts after ART APEX update
Replaces compile_bcp.sh to check and compile boot class path
extensions and system server jars.
Enable ART to load those artifacts when present in the ART APEX data
directory.
Bug: 160683548
Test: art_libartbase_tests
Test: adb root && adb odrefresh {--force-check,--force-compile}
Test: adb install com.android.art && adb reboot && adb root && \
adb shell odrefresh {--check,--compile} && adb reboot && \
adb shell cat /proc/<zygote>/maps | grep apexdata
Change-Id: I81bf520d38f9dc0109c91f192bc6e728099049fd
diff --git a/build/apex/Android.bp b/build/apex/Android.bp
index 4c8502b..eaf0b5a 100644
--- a/build/apex/Android.bp
+++ b/build/apex/Android.bp
@@ -24,6 +24,7 @@
// only the "first" (likely 64-bit) version is required on host).
art_runtime_base_binaries_prefer32_on_device_first_on_host = [
"dexoptanalyzer",
+ "odrefresh",
"profman",
]
@@ -131,7 +132,6 @@
// Tools exclusively for the device APEX derived from art-tools in art/Android.mk.
art_tools_device_only_binaries = [
- "compile_bcp.sh",
// oatdump cannot link with host linux_bionic due to not using clang lld;
// TODO: Make it work with clang lld.
"oatdump",
@@ -333,6 +333,7 @@
"art_libdexfile_support_tests",
"art_libprofile_tests",
"art_oatdump_tests",
+ "art_odrefresh_tests",
"art_profman_tests",
"art_runtime_compiler_tests",
"art_runtime_tests",
diff --git a/build/apex/art_apex_test.py b/build/apex/art_apex_test.py
index 95e193d..91af3db 100755
--- a/build/apex/art_apex_test.py
+++ b/build/apex/art_apex_test.py
@@ -619,9 +619,9 @@
# removed in Android R.
# Check binaries for ART.
- self._checker.check_executable("compile_bcp.sh")
- self._checker.check_executable('oatdump')
self._checker.check_multilib_executable('dex2oat')
+ self._checker.check_executable('oatdump')
+ self._checker.check_executable("odrefresh")
# Check internal libraries for ART.
self._checker.check_native_library('libperfetto_hprof')
@@ -646,6 +646,7 @@
self._checker.check_executable('hprof-conv')
self._checker.check_symlinked_first_executable('dex2oatd')
self._checker.check_symlinked_first_executable('dex2oat')
+ self._checker.check_executable("odrefresh")
# Check exported native libraries for Managed Core Library.
self._checker.check_native_library('libicu')
@@ -753,6 +754,7 @@
self._checker.check_art_test_executable('art_libdexfile_tests')
self._checker.check_art_test_executable('art_libprofile_tests')
self._checker.check_art_test_executable('art_oatdump_tests')
+ self._checker.check_art_test_executable('art_odrefresh_tests')
self._checker.check_art_test_executable('art_profman_tests')
self._checker.check_art_test_executable('art_runtime_compiler_tests')
self._checker.check_art_test_executable('art_runtime_tests')