blob: 94465f4a1da666ef86dd2d98bbd2c92e75b7970c [file] [log] [blame]
Justin Yun24c29f12017-06-16 18:11:35 +09001# Copyright (C) 2017 The Android Open Source Project
2#
3# Bionic loader config file.
4#
5
6# Don't change the order here. The first pattern that matches with the
Steven Morelandab338c12017-11-28 12:41:56 -08007# absolute path of an executable is selected.
Justin Yun24c29f12017-06-16 18:11:35 +09008dir.system = /system/bin/
9dir.system = /system/xbin/
Jiyong Park2498e1b2017-12-12 22:11:47 +090010
11dir.vendor = /odm/bin/
Justin Yun24c29f12017-06-16 18:11:35 +090012dir.vendor = /vendor/bin/
Jiyong Park2498e1b2017-12-12 22:11:47 +090013dir.vendor = /data/nativetest/odm
14dir.vendor = /data/nativetest64/odm
15dir.vendor = /data/benchmarktest/odm
16dir.vendor = /data/benchmarktest64/odm
Justin Yun24c29f12017-06-16 18:11:35 +090017dir.vendor = /data/nativetest/vendor
18dir.vendor = /data/nativetest64/vendor
19dir.vendor = /data/benchmarktest/vendor
20dir.vendor = /data/benchmarktest64/vendor
Jiyong Park2498e1b2017-12-12 22:11:47 +090021
Justin Yun24c29f12017-06-16 18:11:35 +090022dir.system = /data/nativetest
23dir.system = /data/nativetest64
24dir.system = /data/benchmarktest
25dir.system = /data/benchmarktest64
26
Jiyong Parkd7e6cb22018-03-20 01:12:31 +090027dir.postinstall = /postinstall
28
Justin Yun24c29f12017-06-16 18:11:35 +090029[system]
30additional.namespaces = sphal,vndk,rs
31
32###############################################################################
33# "default" namespace
34#
Jiyong Park55f05d72017-08-28 14:42:49 +090035# Framework-side code runs in this namespace. Libs from /vendor partition
Justin Yun24c29f12017-06-16 18:11:35 +090036# can't be loaded in this namespace.
37###############################################################################
Jiyong Park55f05d72017-08-28 14:42:49 +090038namespace.default.isolated = true
Justin Yun24c29f12017-06-16 18:11:35 +090039
Jiyong Park2498e1b2017-12-12 22:11:47 +090040namespace.default.search.paths = /system/${LIB}
41
42# We can't have entire /system/${LIB} as permitted paths because doing so
43# makes it possible to load libs in /system/${LIB}/vndk* directories by
44# their absolute paths (e.g. dlopen("/system/lib/vndk/libbase.so");).
45# VNDK libs are built with previous versions of Android and thus must not be
46# loaded into this namespace where libs built with the current version of
47# Android are loaded. Mixing the two types of libs in the same namespace can
48# cause unexpected problem.
49namespace.default.permitted.paths = /system/${LIB}/drm
50namespace.default.permitted.paths += /system/${LIB}/extractors
51namespace.default.permitted.paths += /system/${LIB}/hw
52# These are where odex files are located. libart has to be able to dlopen the files
53namespace.default.permitted.paths += /system/framework
54namespace.default.permitted.paths += /system/app
55namespace.default.permitted.paths += /system/priv-app
56namespace.default.permitted.paths += /vendor/framework
57namespace.default.permitted.paths += /vendor/app
58namespace.default.permitted.paths += /vendor/priv-app
Bowgo Tsai39476ff2018-03-14 16:19:03 +080059namespace.default.permitted.paths += /odm/framework
60namespace.default.permitted.paths += /odm/app
61namespace.default.permitted.paths += /odm/priv-app
Jiyong Park2498e1b2017-12-12 22:11:47 +090062namespace.default.permitted.paths += /oem/app
Jaekyun Seokdff165d2017-11-28 12:10:10 +090063namespace.default.permitted.paths += /product/framework
64namespace.default.permitted.paths += /product/app
65namespace.default.permitted.paths += /product/priv-app
Jiyong Park2498e1b2017-12-12 22:11:47 +090066namespace.default.permitted.paths += /data
67namespace.default.permitted.paths += /mnt/expand
68
69namespace.default.asan.search.paths = /data/asan/system/${LIB}
70namespace.default.asan.search.paths += /system/${LIB}
71
72namespace.default.asan.permitted.paths = /data
73namespace.default.asan.permitted.paths += /system/${LIB}/drm
74namespace.default.asan.permitted.paths += /system/${LIB}/extractors
75namespace.default.asan.permitted.paths += /system/${LIB}/hw
76namespace.default.asan.permitted.paths += /system/framework
77namespace.default.asan.permitted.paths += /system/app
78namespace.default.asan.permitted.paths += /system/priv-app
79namespace.default.asan.permitted.paths += /vendor/framework
80namespace.default.asan.permitted.paths += /vendor/app
81namespace.default.asan.permitted.paths += /vendor/priv-app
Bowgo Tsai39476ff2018-03-14 16:19:03 +080082namespace.default.asan.permitted.paths += /odm/framework
83namespace.default.asan.permitted.paths += /odm/app
84namespace.default.asan.permitted.paths += /odm/priv-app
Jiyong Park2498e1b2017-12-12 22:11:47 +090085namespace.default.asan.permitted.paths += /oem/app
Jaekyun Seokdff165d2017-11-28 12:10:10 +090086namespace.default.asan.permitted.paths += /product/framework
87namespace.default.asan.permitted.paths += /product/app
88namespace.default.asan.permitted.paths += /product/priv-app
Jiyong Park2498e1b2017-12-12 22:11:47 +090089namespace.default.asan.permitted.paths += /mnt/expand
Justin Yun24c29f12017-06-16 18:11:35 +090090
91###############################################################################
92# "sphal" namespace
93#
94# SP-HAL(Sameprocess-HAL)s are the only vendor libraries that are allowed to be
95# loaded inside system processes. libEGL_<chipset>.so, libGLESv2_<chipset>.so,
96# android.hardware.graphics.mapper@2.0-impl.so, etc are SP-HALs.
97#
98# This namespace is exclusivly for SP-HALs. When the framework tries to dynami-
99# cally load SP-HALs, android_dlopen_ext() is used to explicitly specifying
100# that they should be searched and loaded from this namespace.
101#
102# Note that there is no link from the default namespace to this namespace.
103###############################################################################
104namespace.sphal.isolated = true
105namespace.sphal.visible = true
Justin Yun24c29f12017-06-16 18:11:35 +0900106
Jiyong Park2498e1b2017-12-12 22:11:47 +0900107namespace.sphal.search.paths = /odm/${LIB}
108namespace.sphal.search.paths += /vendor/${LIB}
109
110namespace.sphal.permitted.paths = /odm/${LIB}
111namespace.sphal.permitted.paths += /vendor/${LIB}
112
113namespace.sphal.asan.search.paths = /data/asan/odm/${LIB}
114namespace.sphal.asan.search.paths += /odm/${LIB}
115namespace.sphal.asan.search.paths += /data/asan/vendor/${LIB}
116namespace.sphal.asan.search.paths += /vendor/${LIB}
117
118namespace.sphal.asan.permitted.paths = /data/asan/odm/${LIB}
119namespace.sphal.asan.permitted.paths += /odm/${LIB}
120namespace.sphal.asan.permitted.paths += /data/asan/vendor/${LIB}
121namespace.sphal.asan.permitted.paths += /vendor/${LIB}
Justin Yun24c29f12017-06-16 18:11:35 +0900122
123# Once in this namespace, access to libraries in /system/lib is restricted. Only
124# libs listed here can be used.
125namespace.sphal.links = default,vndk,rs
126
Jiyong Park2498e1b2017-12-12 22:11:47 +0900127namespace.sphal.link.default.shared_libs = %LLNDK_LIBRARIES%
128namespace.sphal.link.default.shared_libs += %SANITIZER_RUNTIME_LIBRARIES%
Justin Yun24c29f12017-06-16 18:11:35 +0900129
Jiyong Park36798462017-08-04 19:08:06 +0900130namespace.sphal.link.vndk.shared_libs = %VNDK_SAMEPROCESS_LIBRARIES%
Justin Yun24c29f12017-06-16 18:11:35 +0900131
132# Renderscript gets separate namespace
133namespace.sphal.link.rs.shared_libs = libRS_internal.so
134
135###############################################################################
136# "rs" namespace
137#
138# This namespace is exclusively for Renderscript internal libraries.
139# This namespace has slightly looser restriction than the vndk namespace because
140# of the genuine characteristics of Renderscript; /data is in the permitted path
141# to load the compiled *.so file and libmediandk.so can be used here.
142###############################################################################
143namespace.rs.isolated = true
144namespace.rs.visible = true
Justin Yun24c29f12017-06-16 18:11:35 +0900145
Jiyong Park60a29662017-12-13 16:59:21 +0900146namespace.rs.search.paths = /odm/${LIB}/vndk-sp
147namespace.rs.search.paths += /vendor/${LIB}/vndk-sp
Justin Yuncbbf1952018-01-16 11:46:21 +0900148namespace.rs.search.paths += /system/${LIB}/vndk-sp%VNDK_VER%
Jiyong Park2498e1b2017-12-12 22:11:47 +0900149namespace.rs.search.paths += /odm/${LIB}
150namespace.rs.search.paths += /vendor/${LIB}
151
152namespace.rs.permitted.paths = /odm/${LIB}
153namespace.rs.permitted.paths += /vendor/${LIB}
154namespace.rs.permitted.paths += /data
155
Jiyong Park60a29662017-12-13 16:59:21 +0900156namespace.rs.asan.search.paths = /data/asan/odm/${LIB}/vndk-sp
157namespace.rs.asan.search.paths += /odm/${LIB}/vndk-sp
158namespace.rs.asan.search.paths += /data/asan/vendor/${LIB}/vndk-sp
159namespace.rs.asan.search.paths += /vendor/${LIB}/vndk-sp
Justin Yuncbbf1952018-01-16 11:46:21 +0900160namespace.rs.asan.search.paths += /data/asan/system/${LIB}/vndk-sp%VNDK_VER%
161namespace.rs.asan.search.paths += /system/${LIB}/vndk-sp%VNDK_VER%
Jiyong Park2498e1b2017-12-12 22:11:47 +0900162namespace.rs.asan.search.paths += /data/asan/odm/${LIB}
163namespace.rs.asan.search.paths += /odm/${LIB}
164namespace.rs.asan.search.paths += /data/asan/vendor/${LIB}
165namespace.rs.asan.search.paths += /vendor/${LIB}
166
167namespace.rs.asan.permitted.paths = /data/asan/odm/${LIB}
168namespace.rs.asan.permitted.paths += /odm/${LIB}
169namespace.rs.asan.permitted.paths += /data/asan/vendor/${LIB}
170namespace.rs.asan.permitted.paths += /vendor/${LIB}
171namespace.rs.asan.permitted.paths += /data
Justin Yun24c29f12017-06-16 18:11:35 +0900172
173namespace.rs.links = default,vndk
Jiyong Park2498e1b2017-12-12 22:11:47 +0900174
175namespace.rs.link.default.shared_libs = %LLNDK_LIBRARIES%
176namespace.rs.link.default.shared_libs += %SANITIZER_RUNTIME_LIBRARIES%
Jiyong Parkad7ddd52017-12-07 09:59:48 +0900177# Private LLNDK libs (e.g. libft2.so) are exceptionally allowed to this
178# namespace because RS framework libs are using them.
179namespace.rs.link.default.shared_libs += %PRIVATE_LLNDK_LIBRARIES%
Jiyong Park2498e1b2017-12-12 22:11:47 +0900180
Jiyong Park36798462017-08-04 19:08:06 +0900181namespace.rs.link.vndk.shared_libs = %VNDK_SAMEPROCESS_LIBRARIES%
Justin Yun24c29f12017-06-16 18:11:35 +0900182
183###############################################################################
184# "vndk" namespace
185#
186# This namespace is exclusively for vndk-sp libs.
187###############################################################################
188namespace.vndk.isolated = true
Jiyong Parka07f3052017-08-22 10:26:10 +0900189namespace.vndk.visible = true
Justin Yun24c29f12017-06-16 18:11:35 +0900190
Jiyong Park60a29662017-12-13 16:59:21 +0900191namespace.vndk.search.paths = /odm/${LIB}/vndk-sp
192namespace.vndk.search.paths += /vendor/${LIB}/vndk-sp
Justin Yuncbbf1952018-01-16 11:46:21 +0900193namespace.vndk.search.paths += /system/${LIB}/vndk-sp%VNDK_VER%
Jiyong Park2498e1b2017-12-12 22:11:47 +0900194
195namespace.vndk.permitted.paths = /odm/${LIB}/hw
196namespace.vndk.permitted.paths += /odm/${LIB}/egl
197namespace.vndk.permitted.paths += /vendor/${LIB}/hw
198namespace.vndk.permitted.paths += /vendor/${LIB}/egl
199# This is exceptionally required since android.hidl.memory@1.0-impl.so is here
Justin Yuncbbf1952018-01-16 11:46:21 +0900200namespace.vndk.permitted.paths += /system/${LIB}/vndk-sp%VNDK_VER%/hw
Jiyong Park2498e1b2017-12-12 22:11:47 +0900201
Jiyong Park60a29662017-12-13 16:59:21 +0900202namespace.vndk.asan.search.paths = /data/asan/odm/${LIB}/vndk-sp
203namespace.vndk.asan.search.paths += /odm/${LIB}/vndk-sp
204namespace.vndk.asan.search.paths += /data/asan/vendor/${LIB}/vndk-sp
205namespace.vndk.asan.search.paths += /vendor/${LIB}/vndk-sp
Justin Yuncbbf1952018-01-16 11:46:21 +0900206namespace.vndk.asan.search.paths += /data/asan/system/${LIB}/vndk-sp%VNDK_VER%
207namespace.vndk.asan.search.paths += /system/${LIB}/vndk-sp%VNDK_VER%
Jiyong Park2498e1b2017-12-12 22:11:47 +0900208
209namespace.vndk.asan.permitted.paths = /data/asan/odm/${LIB}/hw
210namespace.vndk.asan.permitted.paths += /odm/${LIB}/hw
211namespace.vndk.asan.permitted.paths += /data/asan/odm/${LIB}/egl
212namespace.vndk.asan.permitted.paths += /odm/${LIB}/egl
213namespace.vndk.asan.permitted.paths += /data/asan/vendor/${LIB}/hw
214namespace.vndk.asan.permitted.paths += /vendor/${LIB}/hw
215namespace.vndk.asan.permitted.paths += /data/asan/vendor/${LIB}/egl
216namespace.vndk.asan.permitted.paths += /vendor/${LIB}/egl
217
Justin Yuncbbf1952018-01-16 11:46:21 +0900218namespace.vndk.asan.permitted.paths += /data/asan/system/${LIB}/vndk-sp%VNDK_VER%/hw
219namespace.vndk.asan.permitted.paths += /system/${LIB}/vndk-sp%VNDK_VER%/hw
Justin Yun24c29f12017-06-16 18:11:35 +0900220
221# When these NDK libs are required inside this namespace, then it is redirected
222# to the default namespace. This is possible since their ABI is stable across
223# Android releases.
224namespace.vndk.links = default
Jiyong Park2498e1b2017-12-12 22:11:47 +0900225namespace.vndk.link.default.shared_libs = %LLNDK_LIBRARIES%
226namespace.vndk.link.default.shared_libs += %SANITIZER_RUNTIME_LIBRARIES%
Justin Yun24c29f12017-06-16 18:11:35 +0900227
228###############################################################################
229# Namespace config for vendor processes. In O, no restriction is enforced for
230# them. However, in O-MR1, access to /system/${LIB} will not be allowed to
231# the default namespace. 'system' namespace will be added to give limited
232# (LL-NDK only) access.
233###############################################################################
234[vendor]
Logan Chien225b71d2017-12-15 22:19:57 +0800235additional.namespaces = system,vndk
Justin Yun24c29f12017-06-16 18:11:35 +0900236
237###############################################################################
238# "default" namespace
239#
Jiyong Parkad7ddd52017-12-07 09:59:48 +0900240# This is the default linker namespace for a vendor process (a process started
241# from /vendor/bin/*). The main executable and the libs under /vendor/lib[64]
242# are loaded directly into this namespace. However, other libs under the system
243# partition (VNDK and LLNDK libraries) are not loaded here but from the
244# separate namespace 'system'. The delegation to the system namespace is done
245# via the 'namespace.default.link.system.shared_libs' property below.
Justin Yun24c29f12017-06-16 18:11:35 +0900246###############################################################################
247namespace.default.isolated = true
248namespace.default.visible = true
249
Jiyong Park2498e1b2017-12-12 22:11:47 +0900250namespace.default.search.paths = /odm/${LIB}
Jiyong Park2498e1b2017-12-12 22:11:47 +0900251namespace.default.search.paths += /vendor/${LIB}
Justin Yun24c29f12017-06-16 18:11:35 +0900252
Jiyong Park2498e1b2017-12-12 22:11:47 +0900253namespace.default.permitted.paths = /odm
254namespace.default.permitted.paths += /vendor
255
256namespace.default.asan.search.paths = /data/asan/odm/${LIB}
257namespace.default.asan.search.paths += /odm/${LIB}
Jiyong Park2498e1b2017-12-12 22:11:47 +0900258namespace.default.asan.search.paths += /data/asan/vendor/${LIB}
259namespace.default.asan.search.paths += /vendor/${LIB}
Jiyong Park2498e1b2017-12-12 22:11:47 +0900260
Jiyong Park2498e1b2017-12-12 22:11:47 +0900261namespace.default.asan.permitted.paths = /data/asan/odm
262namespace.default.asan.permitted.paths += /odm
263namespace.default.asan.permitted.paths += /data/asan/vendor
264namespace.default.asan.permitted.paths += /vendor
Justin Yun24c29f12017-06-16 18:11:35 +0900265
Logan Chien225b71d2017-12-15 22:19:57 +0800266namespace.default.links = system,vndk
267namespace.default.link.system.shared_libs = %LLNDK_LIBRARIES%
268namespace.default.link.vndk.shared_libs = %VNDK_SAMEPROCESS_LIBRARIES%
269namespace.default.link.vndk.shared_libs += %VNDK_CORE_LIBRARIES%
270
271###############################################################################
272# "vndk" namespace
273#
274# This namespace is where VNDK and VNDK-SP libraries are loaded for
275# a vendor process.
276###############################################################################
277namespace.vndk.isolated = false
278
Logan Chien91b3fb42018-01-11 20:00:37 +0800279namespace.vndk.search.paths = /odm/${LIB}/vndk
280namespace.vndk.search.paths += /odm/${LIB}/vndk-sp
281namespace.vndk.search.paths += /vendor/${LIB}/vndk
282namespace.vndk.search.paths += /vendor/${LIB}/vndk-sp
283namespace.vndk.search.paths += /system/${LIB}/vndk-sp%VNDK_VER%
Justin Yuncbbf1952018-01-16 11:46:21 +0900284namespace.vndk.search.paths += /system/${LIB}/vndk%VNDK_VER%
Logan Chien225b71d2017-12-15 22:19:57 +0800285
Logan Chien91b3fb42018-01-11 20:00:37 +0800286namespace.vndk.asan.search.paths = /data/asan/odm/${LIB}/vndk
287namespace.vndk.asan.search.paths += /odm/${LIB}/vndk
288namespace.vndk.asan.search.paths += /data/asan/odm/${LIB}/vndk-sp
289namespace.vndk.asan.search.paths += /odm/${LIB}/vndk-sp
290namespace.vndk.asan.search.paths += /data/asan/vendor/${LIB}/vndk
291namespace.vndk.asan.search.paths += /vendor/${LIB}/vndk
292namespace.vndk.asan.search.paths += /data/asan/vendor/${LIB}/vndk-sp
293namespace.vndk.asan.search.paths += /vendor/${LIB}/vndk-sp
294namespace.vndk.asan.search.paths += /data/asan/system/${LIB}/vndk-sp%VNDK_VER%
Justin Yuncbbf1952018-01-16 11:46:21 +0900295namespace.vndk.asan.search.paths += /system/${LIB}/vndk-sp%VNDK_VER%
296namespace.vndk.asan.search.paths += /data/asan/system/${LIB}/vndk%VNDK_VER%
297namespace.vndk.asan.search.paths += /system/${LIB}/vndk%VNDK_VER%
Logan Chien225b71d2017-12-15 22:19:57 +0800298
299# When these NDK libs are required inside this namespace, then it is redirected
300# to the system namespace. This is possible since their ABI is stable across
301# Android releases.
Logan Chienea4a2bd2018-01-18 12:06:14 +0800302namespace.vndk.links = system,default
Logan Chien225b71d2017-12-15 22:19:57 +0800303namespace.vndk.link.system.shared_libs = %LLNDK_LIBRARIES%
304namespace.vndk.link.system.shared_libs += %SANITIZER_RUNTIME_LIBRARIES%
Justin Yun24c29f12017-06-16 18:11:35 +0900305
Logan Chienea4a2bd2018-01-18 12:06:14 +0800306namespace.vndk.link.default.allow_all_shared_libs = true
307
Justin Yun24c29f12017-06-16 18:11:35 +0900308###############################################################################
309# "system" namespace
310#
Jiyong Parkad7ddd52017-12-07 09:59:48 +0900311# This namespace is where system libs (VNDK and LLNDK libs) are loaded for
312# a vendor process.
Justin Yun24c29f12017-06-16 18:11:35 +0900313###############################################################################
314namespace.system.isolated = false
Justin Yun24c29f12017-06-16 18:11:35 +0900315
Logan Chien225b71d2017-12-15 22:19:57 +0800316namespace.system.search.paths = /system/${LIB}
Jiyong Park2498e1b2017-12-12 22:11:47 +0900317
Logan Chien225b71d2017-12-15 22:19:57 +0800318namespace.system.asan.search.paths = /data/asan/system/${LIB}
Jiyong Park2498e1b2017-12-12 22:11:47 +0900319namespace.system.asan.search.paths += /system/${LIB}
Jiyong Parkd7e6cb22018-03-20 01:12:31 +0900320
321###############################################################################
322# Namespace config for binaries under /postinstall.
323# Only one default namespace is defined and it has no directories other than
324# /system/lib in the search paths. This is because linker calls realpath on the
325# search paths and this causes selinux denial if the paths (/vendor, /odm) are
326# not allowed to the poinstall binaries. There is no reason to allow the
327# binaries to access the paths.
328###############################################################################
329[postinstall]
330namespace.default.isolated = false
331namespace.default.search.paths = /system/${LIB}