diff options
author | 2024-08-16 17:13:50 +0100 | |
---|---|---|
committer | 2024-08-23 21:35:51 +0000 | |
commit | 8cebfd7298f1a913b8b6f4db57af626e9d3caa73 (patch) | |
tree | 16e603cf7cc99d170b9b986607b2bf9d78a54ea1 /compiler/optimizing/code_generator.h | |
parent | e68e2282df72bcb495aa8b03793253cc0ab6a983 (diff) |
Add a fallback to bind-mount external libs elsewhere during Pre-reboot.
On Android V release (AP3A), we cannot bind-mount
/system{,_ext}/lib{,64} due to lack of an SELinux permission. As a
workaround, we bind-mount external libs at
/mnt/compat_env/system{,_ext}/lib{,64}, and patch the linker config to
make artd and art_exec link against external libs from there.
This change bumps the Pre-reboot version to 3, as the incompatibility
issue in Pre-reboot Dexopt is fully fixed after this change.
Note:
1. Only artd and art_exec needs to link against old external libs so
far. artd depends on libbinder_ndk.so, and art_exec depends on
libcgrouprc.so, where incompatibilities with the platform can occur.
Forrunately, both of them have the "search" permission on
/mnt/compat_env, where the bind-mounted old libs locate at.
2. When this fallback is used, other binaries such as dex2oat still
link against new external libs because they don't have the "search"
permission on /mnt/compat_env. Forrunately, they don't have to link
against old libs.
Bug: 356858364
Test: atest art_standalone_dexopt_chroot_setup_tests
Test: -
1. Flash AP3A.241005.002.
2. Build an ART apex with this CL and install it.
3. adb shell setprop ro.ota.allow_downgrade true
4. OTA to AP4A.240729.001 (the bad OTA package that has
https://r.android.com/3194614, which introduced an
incompatibility with AP3A build, but does not have
https://r.android.com/3196705, which disabled Pre-reboot Dexopt).
Change-Id: I9505b60d4cc47965bb08f06ed23c6c0b47906700
Diffstat (limited to 'compiler/optimizing/code_generator.h')
0 files changed, 0 insertions, 0 deletions