blob: 56066bcf2dfcf0d572919f43821db6bd93e2bf8c [file] [log] [blame]
Dimitry Ivanovee34aec2017-02-15 14:11:18 -08001# Copyright (C) 2017 The Android Open Source Project
2#
3# Bionic loader config file.
4#
5
Jiyong Park450cff42017-04-05 14:24:14 +09006# Don't change the order here.
7dir.system = /system/bin/
8dir.system = /system/xbin/
9dir.vendor = /vendor/bin/
Jiyong Parkc034a432017-07-20 15:17:35 +090010dir.test = /data/nativetest/
11dir.test = /data/nativetest64/
12dir.test = /data/benchmarktest/
13dir.test = /data/benchmarktest64/
Dimitry Ivanovee34aec2017-02-15 14:11:18 -080014
15[system]
Jiyong Park450cff42017-04-05 14:24:14 +090016additional.namespaces = sphal,vndk,rs
Dimitry Ivanovee34aec2017-02-15 14:11:18 -080017
Jiyong Park450cff42017-04-05 14:24:14 +090018###############################################################################
19# "default" namespace
20#
21# Framework-side code runs in this namespace. Anything from /vendor partition
22# can't be loaded in this namespace.
23###############################################################################
24namespace.default.isolated = false
25namespace.default.search.paths = /system/${LIB}:/vendor/${LIB}
26namespace.default.permitted.paths = /system/${LIB}:/vendor/${LIB}
Dimitry Ivanovee34aec2017-02-15 14:11:18 -080027
Andreas Gampec7c2d7b2017-04-21 17:18:45 -070028namespace.default.asan.search.paths = /data/asan/system/${LIB}:/system/${LIB}:/data/asan/vendor/${LIB}:/vendor/${LIB}
29namespace.default.asan.permitted.paths = /data/asan/system/${LIB}:/system/${LIB}:/data/asan/vendor/${LIB}:/vendor/${LIB}
30
Jiyong Park450cff42017-04-05 14:24:14 +090031# TODO(b/37013858): remove all dependencies to /vendor/lib from system processes
32# When this is done, comment out following three lines and remove the three
33# lines above
34#namespace.default.isolated = true
35#namespace.default.search.paths = /system/${LIB}
36#namespace.default.permitted.paths = /system/${LIB}
Andreas Gampec7c2d7b2017-04-21 17:18:45 -070037#
38#namespace.default.asan.search.paths = /data/asan/system/${LIB}:/system/${LIB}
39#namespace.default.asan.permitted.paths = /data/asan/system/${LIB}:/system/${LIB}
Jiyong Park450cff42017-04-05 14:24:14 +090040
41###############################################################################
42# "sphal" namespace
43#
44# SP-HAL(Sameprocess-HAL)s are the only vendor libraries that are allowed to be
45# loaded inside system processes. libEGL_<chipset>.so, libGLESv2_<chipset>.so,
46# android.hardware.graphics.mapper@2.0-impl.so, etc are SP-HALs.
47#
48# This namespace is exclusivly for SP-HALs. When the framework tries to dynami-
49# cally load SP-HALs, android_dlopen_ext() is used to explicitly specifying
50# that they should be searched and loaded from this namespace.
51#
52# Note that there is no link from the default namespace to this namespace.
53###############################################################################
54namespace.sphal.isolated = true
55namespace.sphal.visible = true
56namespace.sphal.search.paths = /vendor/${LIB}/egl:/vendor/${LIB}/hw:/vendor/${LIB}
57namespace.sphal.permitted.paths = /vendor/${LIB}
58
Andreas Gampec7c2d7b2017-04-21 17:18:45 -070059namespace.sphal.asan.search.paths = /data/asan/vendor/${LIB}/egl:/vendor/${LIB}/egl:/data/asan/vendor/${LIB}/hw:/vendor/${LIB}/hw:/data/asan/vendor/${LIB}:/vendor/${LIB}
60namespace.sphal.asan.permitted.paths = /data/asan/vendor/${LIB}:/vendor/${LIB}
61
Jiyong Park450cff42017-04-05 14:24:14 +090062# Once in this namespace, access to libraries in /system/lib is restricted. Only
63# libs listed here can be used.
Jiyong Parkbfa03ee2017-04-21 15:16:12 +090064namespace.sphal.links = default,vndk,rs
Jiyong Park450cff42017-04-05 14:24:14 +090065
66# WARNING: only NDK libs can be listed here.
Logan Chienf499bcd2017-06-29 22:02:53 +080067namespace.sphal.link.default.shared_libs = libc.so:libz.so:libm.so:libdl.so:libstdc++.so:liblog.so:libnativewindow.so:libEGL.so:libsync.so:libGLESv1_CM.so:libGLESv2.so:libvndksupport.so
Jiyong Park450cff42017-04-05 14:24:14 +090068
69# WARNING: only VNDK-SP libs can be listed here. DO NOT EDIT this line.
Logan Chienf499bcd2017-06-29 22:02:53 +080070namespace.sphal.link.vndk.shared_libs = android.hardware.renderscript@1.0.so:android.hardware.graphics.allocator@2.0.so:android.hardware.graphics.mapper@2.0.so:android.hardware.graphics.common@1.0.so:android.hidl.memory@1.0.so:libhwbinder.so:libbase.so:libcutils.so:libhardware.so:libhidlbase.so:libhidlmemory.so:libhidltransport.so:libion.so:libutils.so:libc++.so
Jiyong Parkbfa03ee2017-04-21 15:16:12 +090071
72# Renderscript gets separate namespace
73namespace.sphal.link.rs.shared_libs = libRS_internal.so
74
75###############################################################################
76# "rs" namespace
77#
78# This namespace is exclusively for Renderscript internal libraries.
79# This namespace has slightly looser restriction than the vndk namespace because
80# of the genuine characteristics of Renderscript; /data is in the permitted path
81# to load the compiled *.so file and libmediandk.so can be used here.
82###############################################################################
83namespace.rs.isolated = true
Jiyong Parkeb9694a2017-05-09 15:07:43 +090084namespace.rs.search.paths = /vendor/${LIB}/vndk-sp:/system/${LIB}/vndk-sp:/vendor/${LIB}
Jiyong Parkbfa03ee2017-04-21 15:16:12 +090085namespace.rs.permitted.paths = /vendor/${LIB}:/data
86
Jiyong Parkeb9694a2017-05-09 15:07:43 +090087namespace.rs.asan.search.paths = /data/asan/vendor/${LIB}/vndk-sp:/vendor/${LIB}/vndk-sp:/data/asan/system/${LIB}/vndk-sp:/system/${LIB}/vndk-sp:/data/asan/vendor/${LIB}:/vendor/${LIB}
88namespace.rs.asan.permitted.paths = /data/asan/vendor/${LIB}:/vendor/${LIB}:/data
89
Jiyong Parkbfa03ee2017-04-21 15:16:12 +090090namespace.rs.links = default,vndk
Logan Chienf499bcd2017-06-29 22:02:53 +080091namespace.rs.link.default.shared_libs = libc.so:libz.so:libm.so:libdl.so:libstdc++.so:liblog.so:libnativewindow.so:libEGL.so:libsync.so:libGLESv1_CM.so:libGLESv2.so:libmediandk.so:libvndksupport.so
92namespace.rs.link.vndk.shared_libs = android.hardware.renderscript@1.0.so:android.hardware.graphics.allocator@2.0.so:android.hardware.graphics.mapper@2.0.so:android.hardware.graphics.common@1.0.so:android.hidl.memory@1.0.so:libhwbinder.so:libbase.so:libcutils.so:libhardware.so:libhidlbase.so:libhidlmemory.so:libhidltransport.so:libion.so:libutils.so:libc++.so
Jiyong Park450cff42017-04-05 14:24:14 +090093
94###############################################################################
95# "vndk" namespace
96#
97# This namespace is exclusively for vndk-sp libs.
98###############################################################################
99namespace.vndk.isolated = true
Jiyong Parkeb9694a2017-05-09 15:07:43 +0900100namespace.vndk.search.paths = /vendor/${LIB}/vndk-sp:/system/${LIB}/vndk-sp:/vendor/${LIB}
Jiyong Park450cff42017-04-05 14:24:14 +0900101namespace.vndk.permitted.paths = /vendor/${LIB}/hw:/vendor/${LIB}/egl
102
Jiyong Parkeb9694a2017-05-09 15:07:43 +0900103namespace.vndk.asan.search.paths = /data/asan/vendor/${LIB}/vndk-sp:/vendor/${LIB}/vndk-sp:/data/asan/system/${LIB}/vndk-sp:/system/${LIB}/vndk-sp:/data/asan/vendor/${LIB}:/vendor/${LIB}
Andreas Gampec7c2d7b2017-04-21 17:18:45 -0700104namespace.vndk.asan.permitted.paths = /data/asan/vendor/${LIB}/hw:/vendor/${LIB}/hw:/data/asan/vendor/${LIB}/egl:/vendor/${LIB}/egl
105
Jiyong Park450cff42017-04-05 14:24:14 +0900106# When these NDK libs are required inside this namespace, then it is redirected
107# to the default namespace. This is possible since their ABI is stable across
108# Android releases.
109namespace.vndk.links = default
Logan Chienf499bcd2017-06-29 22:02:53 +0800110namespace.vndk.link.default.shared_libs = android.hidl.memory@1.0-impl.so:libc.so:libz.so:libm.so:libdl.so:libstdc++.so:liblog.so:libnativewindow.so:libEGL.so:libsync.so:libvndksupport.so
Jiyong Park450cff42017-04-05 14:24:14 +0900111
Jiyong Parkc034a432017-07-20 15:17:35 +0900112###############################################################################
113# Namespace config for vendor processes. In O, no restriction is enforced for
114# them. However, in O-MR1, access to /system/${LIB} will not be allowed to
115# the default namespace. 'system' namespace will be added to give limited
116# (LL-NDK only) access.
117###############################################################################
Jiyong Park450cff42017-04-05 14:24:14 +0900118[vendor]
119namespace.default.isolated = false
Jiyong Parkeb9694a2017-05-09 15:07:43 +0900120namespace.default.search.paths = /vendor/${LIB}:/vendor/${LIB}/vndk-sp:/system/${LIB}/vndk-sp:/system/${LIB}
Andreas Gampec7c2d7b2017-04-21 17:18:45 -0700121
Jiyong Parkeb9694a2017-05-09 15:07:43 +0900122namespace.default.asan.search.paths = /data/asan/vendor/${LIB}:/vendor/${LIB}:/data/asan/vendor/${LIB}/vndk-sp:/vendor/${LIB}/vndk-sp:/data/asan/system/${LIB}/vndk-sp:/system/${LIB}/vndk-sp:/data/asan/system/${LIB}:/system/${LIB}
Jiyong Parkc034a432017-07-20 15:17:35 +0900123
124###############################################################################
125# Namespace config for tests. No VNDK restriction is enforced for these tests.
126###############################################################################
127[test]
128namespace.default.isolated = false
129namespace.default.search.paths = /vendor/${LIB}:/vendor/${LIB}/vndk-sp:/system/${LIB}/vndk-sp:/system/${LIB}
130
131namespace.default.asan.search.paths = /data/asan/vendor/${LIB}:/vendor/${LIB}:/data/asan/vendor/${LIB}/vndk-sp:/vendor/${LIB}/vndk-sp:/data/asan/system/${LIB}/vndk-sp:/system/${LIB}/vndk-sp:/data/asan/system/${LIB}:/system/${LIB}