blob: ca297fe01ed01ff2044cc7293f674931422f2f2f [file] [log] [blame]
Josh Gao594f70f2019-08-15 14:05:12 -07001# Copyright (C) 2019 The Android Open Source Project
2#
3# Bionic loader config file for the adbd APEX.
4
5dir.adbd = /apex/com.android.adbd/bin/
6
7[adbd]
Josh Gao7f729452020-01-16 12:40:43 -08008additional.namespaces = apex,platform,art
Josh Gao594f70f2019-08-15 14:05:12 -07009
10namespace.default.isolated = true
Jiyong Park016059d2020-01-07 19:50:45 +090011namespace.default.permitted.paths = /system/${LIB}
12namespace.default.asan.permitted.paths = /system/${LIB}
Josh Gao7f729452020-01-16 12:40:43 -080013namespace.default.links = apex,art,platform
14namespace.default.link.apex.shared_libs = libcrypto.so
Josh Gao594f70f2019-08-15 14:05:12 -070015namespace.default.link.art.shared_libs = libadbconnection_server.so
Josh Gao7f729452020-01-16 12:40:43 -080016
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.
19namespace.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
21namespace.apex.isolated = true
22namespace.apex.search.paths = /apex/com.android.adbd/${LIB}
23namespace.apex.asan.search.paths = /apex/com.android.adbd/${LIB}
24namespace.apex.links = platform
25namespace.apex.link.platform.allow_all_shared_libs = true
Josh Gao594f70f2019-08-15 14:05:12 -070026
27###############################################################################
28# "art" APEX namespace: used for libadbdconnection_server
29###############################################################################
30namespace.art.isolated = true
31namespace.art.search.paths = /apex/com.android.art/${LIB}
32namespace.art.asan.search.paths = /apex/com.android.art/${LIB}
33namespace.art.links = platform
34namespace.art.link.platform.allow_all_shared_libs = true
35
36###############################################################################
37# "platform" namespace: used for NDK libraries, and libadbd_auth
38###############################################################################
39namespace.platform.isolated = true
40namespace.platform.search.paths = /system/${LIB}
41namespace.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.
52namespace.platform.permitted.paths = /apex/com.android.runtime/${LIB}/bionic
53namespace.platform.asan.permitted.paths = /apex/com.android.runtime/${LIB}/bionic