diff options
| author | 2021-11-30 10:45:09 +0000 | |
|---|---|---|
| committer | 2021-12-08 09:47:38 +0000 | |
| commit | 405fb6dee98204af0c6f82ecc888bdeb10b4fd46 (patch) | |
| tree | a56add73d4cdd27a8ec4df50462eeb3d087646f8 /api/api.go | |
| parent | c532fc2bdeb5ffe2bf397816ec5cd15aa26258bc (diff) | |
Prefetch standalone system server jars before switching domain.
In b/203198541, we start to compile standalone system server jars, but
the SELinux policy doesn't allow system_server to load the compiled code
at runtime. As a solution, this change creates class loaders for
standalone system server jars and caches them before switching to the
"system_server" SELinux domain, which essentially loads the jars and
compiled code into the memory.
Bug: 203198541
Test: manual -
1. Patch aosp/1874113, aosp/1876173, aosp/1906158 (in order to have
odrefresh compile a standalone system server jar).
2. Build a system image and flash it to a device.
3. Run "adb shell cat /proc/`adb shell pidof system_server`/maps" and
see "apex@com.android.wifi@javalib@service-wifi.jar@classes.odex"
being mmap'ed.
4. Run "adb logcat | grep avc" and see no denial.
5. atest odsign_e2e_tests
Change-Id: I27fbdaadae2b6f50989b4c534f7fbc80044a6685
Merged-In: I365be766cfb77c6e240d5871f1b3d8ed7abae6f5
(cherry picked from commit 281a2dfaa15fb3439b5ca92995958a8882197f3b)
Diffstat (limited to 'api/api.go')
0 files changed, 0 insertions, 0 deletions