Josh Gao | 594f70f | 2019-08-15 14:05:12 -0700 | [diff] [blame] | 1 | # Copyright (C) 2019 The Android Open Source Project |
| 2 | # |
| 3 | # Bionic loader config file for the adbd APEX. |
| 4 | |
| 5 | dir.adbd = /apex/com.android.adbd/bin/ |
| 6 | |
| 7 | [adbd] |
Josh Gao | 7f72945 | 2020-01-16 12:40:43 -0800 | [diff] [blame] | 8 | additional.namespaces = apex,platform,art |
Josh Gao | 594f70f | 2019-08-15 14:05:12 -0700 | [diff] [blame] | 9 | |
| 10 | namespace.default.isolated = true |
Jiyong Park | 016059d | 2020-01-07 19:50:45 +0900 | [diff] [blame] | 11 | namespace.default.permitted.paths = /system/${LIB} |
| 12 | namespace.default.asan.permitted.paths = /system/${LIB} |
Josh Gao | 7f72945 | 2020-01-16 12:40:43 -0800 | [diff] [blame] | 13 | namespace.default.links = apex,art,platform |
| 14 | namespace.default.link.apex.shared_libs = libcrypto.so |
Josh Gao | 594f70f | 2019-08-15 14:05:12 -0700 | [diff] [blame] | 15 | namespace.default.link.art.shared_libs = libadbconnection_server.so |
Josh Gao | 7f72945 | 2020-01-16 12:40:43 -0800 | [diff] [blame] | 16 | |
| 17 | # libcrypto.so in the APEX might be a symlink to /system, for APEXes bundled with the system image. |
| 18 | # The dynamic linker works off of realpath, so we need to permit loading libcrypto.so from /system. |
| 19 | namespace.default.link.platform.shared_libs = libc.so:libdl.so:libm.so:libclang_rt.hwasan-aarch64-android.so:liblog.so:libadbd_auth.so:libcrypto.so |
| 20 | |
| 21 | namespace.apex.isolated = true |
| 22 | namespace.apex.search.paths = /apex/com.android.adbd/${LIB} |
| 23 | namespace.apex.asan.search.paths = /apex/com.android.adbd/${LIB} |
| 24 | namespace.apex.links = platform |
| 25 | namespace.apex.link.platform.allow_all_shared_libs = true |
Josh Gao | 594f70f | 2019-08-15 14:05:12 -0700 | [diff] [blame] | 26 | |
| 27 | ############################################################################### |
| 28 | # "art" APEX namespace: used for libadbdconnection_server |
| 29 | ############################################################################### |
| 30 | namespace.art.isolated = true |
| 31 | namespace.art.search.paths = /apex/com.android.art/${LIB} |
| 32 | namespace.art.asan.search.paths = /apex/com.android.art/${LIB} |
| 33 | namespace.art.links = platform |
| 34 | namespace.art.link.platform.allow_all_shared_libs = true |
| 35 | |
| 36 | ############################################################################### |
| 37 | # "platform" namespace: used for NDK libraries, and libadbd_auth |
| 38 | ############################################################################### |
| 39 | namespace.platform.isolated = true |
| 40 | namespace.platform.search.paths = /system/${LIB} |
| 41 | namespace.platform.asan.search.paths = /data/asan/system/${LIB} |
| 42 | |
| 43 | # /system/lib/libc.so, etc are symlinks to |
| 44 | # /apex/com.android.runtime/lib/bionic/libc.so, etc. Add the path to the |
| 45 | # permitted paths because linker uses realpath(3) to check the accessibility |
| 46 | # of the lib. We could add this to search.paths instead but that makes the |
| 47 | # resolution of bionic libs be dependent on the order of /system/lib and |
| 48 | # /apex/.../lib/bionic in search.paths. If the latter is after the former, |
| 49 | # then the latter is never tried because libc.so is always found in |
| 50 | # /system/lib but fails to pass the accessibility test because of its realpath. |
| 51 | # It's better to not depend on the ordering if possible. |
| 52 | namespace.platform.permitted.paths = /apex/com.android.runtime/${LIB}/bionic |
| 53 | namespace.platform.asan.permitted.paths = /apex/com.android.runtime/${LIB}/bionic |