blob: 51e3f9efc63027d39387bdfbe41d8ff2225174c8 [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
Inseob Kim67cb0562018-05-04 11:39:12 +090040namespace.default.search.paths = /system/${LIB}
41namespace.default.search.paths += /product/${LIB}
Jiyong Park2498e1b2017-12-12 22:11:47 +090042
43# We can't have entire /system/${LIB} as permitted paths because doing so
44# makes it possible to load libs in /system/${LIB}/vndk* directories by
45# their absolute paths (e.g. dlopen("/system/lib/vndk/libbase.so");).
46# VNDK libs are built with previous versions of Android and thus must not be
47# loaded into this namespace where libs built with the current version of
48# Android are loaded. Mixing the two types of libs in the same namespace can
49# cause unexpected problem.
50namespace.default.permitted.paths = /system/${LIB}/drm
51namespace.default.permitted.paths += /system/${LIB}/extractors
52namespace.default.permitted.paths += /system/${LIB}/hw
Inseob Kim67cb0562018-05-04 11:39:12 +090053namespace.default.permitted.paths += /product/${LIB}
Jiyong Park2498e1b2017-12-12 22:11:47 +090054# These are where odex files are located. libart has to be able to dlopen the files
55namespace.default.permitted.paths += /system/framework
56namespace.default.permitted.paths += /system/app
57namespace.default.permitted.paths += /system/priv-app
58namespace.default.permitted.paths += /vendor/framework
59namespace.default.permitted.paths += /vendor/app
60namespace.default.permitted.paths += /vendor/priv-app
Bowgo Tsai39476ff2018-03-14 16:19:03 +080061namespace.default.permitted.paths += /odm/framework
62namespace.default.permitted.paths += /odm/app
63namespace.default.permitted.paths += /odm/priv-app
Jiyong Park2498e1b2017-12-12 22:11:47 +090064namespace.default.permitted.paths += /oem/app
Jaekyun Seokdff165d2017-11-28 12:10:10 +090065namespace.default.permitted.paths += /product/framework
66namespace.default.permitted.paths += /product/app
67namespace.default.permitted.paths += /product/priv-app
Jiyong Park2498e1b2017-12-12 22:11:47 +090068namespace.default.permitted.paths += /data
69namespace.default.permitted.paths += /mnt/expand
70
71namespace.default.asan.search.paths = /data/asan/system/${LIB}
72namespace.default.asan.search.paths += /system/${LIB}
Inseob Kim67cb0562018-05-04 11:39:12 +090073namespace.default.asan.search.paths += /data/asan/product/${LIB}
74namespace.default.asan.search.paths += /product/${LIB}
Jiyong Park2498e1b2017-12-12 22:11:47 +090075
76namespace.default.asan.permitted.paths = /data
77namespace.default.asan.permitted.paths += /system/${LIB}/drm
78namespace.default.asan.permitted.paths += /system/${LIB}/extractors
79namespace.default.asan.permitted.paths += /system/${LIB}/hw
80namespace.default.asan.permitted.paths += /system/framework
81namespace.default.asan.permitted.paths += /system/app
82namespace.default.asan.permitted.paths += /system/priv-app
83namespace.default.asan.permitted.paths += /vendor/framework
84namespace.default.asan.permitted.paths += /vendor/app
85namespace.default.asan.permitted.paths += /vendor/priv-app
Bowgo Tsai39476ff2018-03-14 16:19:03 +080086namespace.default.asan.permitted.paths += /odm/framework
87namespace.default.asan.permitted.paths += /odm/app
88namespace.default.asan.permitted.paths += /odm/priv-app
Jiyong Park2498e1b2017-12-12 22:11:47 +090089namespace.default.asan.permitted.paths += /oem/app
Inseob Kim67cb0562018-05-04 11:39:12 +090090namespace.default.asan.permitted.paths += /product/${LIB}
Jaekyun Seokdff165d2017-11-28 12:10:10 +090091namespace.default.asan.permitted.paths += /product/framework
92namespace.default.asan.permitted.paths += /product/app
93namespace.default.asan.permitted.paths += /product/priv-app
Jiyong Park2498e1b2017-12-12 22:11:47 +090094namespace.default.asan.permitted.paths += /mnt/expand
Justin Yun24c29f12017-06-16 18:11:35 +090095
96###############################################################################
97# "sphal" namespace
98#
99# SP-HAL(Sameprocess-HAL)s are the only vendor libraries that are allowed to be
100# loaded inside system processes. libEGL_<chipset>.so, libGLESv2_<chipset>.so,
101# android.hardware.graphics.mapper@2.0-impl.so, etc are SP-HALs.
102#
103# This namespace is exclusivly for SP-HALs. When the framework tries to dynami-
104# cally load SP-HALs, android_dlopen_ext() is used to explicitly specifying
105# that they should be searched and loaded from this namespace.
106#
107# Note that there is no link from the default namespace to this namespace.
108###############################################################################
109namespace.sphal.isolated = true
110namespace.sphal.visible = true
Justin Yun24c29f12017-06-16 18:11:35 +0900111
Jiyong Park2498e1b2017-12-12 22:11:47 +0900112namespace.sphal.search.paths = /odm/${LIB}
113namespace.sphal.search.paths += /vendor/${LIB}
114
115namespace.sphal.permitted.paths = /odm/${LIB}
116namespace.sphal.permitted.paths += /vendor/${LIB}
117
118namespace.sphal.asan.search.paths = /data/asan/odm/${LIB}
119namespace.sphal.asan.search.paths += /odm/${LIB}
120namespace.sphal.asan.search.paths += /data/asan/vendor/${LIB}
121namespace.sphal.asan.search.paths += /vendor/${LIB}
122
123namespace.sphal.asan.permitted.paths = /data/asan/odm/${LIB}
124namespace.sphal.asan.permitted.paths += /odm/${LIB}
125namespace.sphal.asan.permitted.paths += /data/asan/vendor/${LIB}
126namespace.sphal.asan.permitted.paths += /vendor/${LIB}
Justin Yun24c29f12017-06-16 18:11:35 +0900127
128# Once in this namespace, access to libraries in /system/lib is restricted. Only
129# libs listed here can be used.
130namespace.sphal.links = default,vndk,rs
131
Jiyong Park2498e1b2017-12-12 22:11:47 +0900132namespace.sphal.link.default.shared_libs = %LLNDK_LIBRARIES%
133namespace.sphal.link.default.shared_libs += %SANITIZER_RUNTIME_LIBRARIES%
Justin Yun24c29f12017-06-16 18:11:35 +0900134
Jiyong Park36798462017-08-04 19:08:06 +0900135namespace.sphal.link.vndk.shared_libs = %VNDK_SAMEPROCESS_LIBRARIES%
Justin Yun24c29f12017-06-16 18:11:35 +0900136
137# Renderscript gets separate namespace
138namespace.sphal.link.rs.shared_libs = libRS_internal.so
139
140###############################################################################
141# "rs" namespace
142#
143# This namespace is exclusively for Renderscript internal libraries.
144# This namespace has slightly looser restriction than the vndk namespace because
145# of the genuine characteristics of Renderscript; /data is in the permitted path
146# to load the compiled *.so file and libmediandk.so can be used here.
147###############################################################################
148namespace.rs.isolated = true
149namespace.rs.visible = true
Justin Yun24c29f12017-06-16 18:11:35 +0900150
Jiyong Park60a29662017-12-13 16:59:21 +0900151namespace.rs.search.paths = /odm/${LIB}/vndk-sp
152namespace.rs.search.paths += /vendor/${LIB}/vndk-sp
Justin Yuncbbf1952018-01-16 11:46:21 +0900153namespace.rs.search.paths += /system/${LIB}/vndk-sp%VNDK_VER%
Jiyong Park2498e1b2017-12-12 22:11:47 +0900154namespace.rs.search.paths += /odm/${LIB}
155namespace.rs.search.paths += /vendor/${LIB}
156
157namespace.rs.permitted.paths = /odm/${LIB}
158namespace.rs.permitted.paths += /vendor/${LIB}
159namespace.rs.permitted.paths += /data
160
Jiyong Park60a29662017-12-13 16:59:21 +0900161namespace.rs.asan.search.paths = /data/asan/odm/${LIB}/vndk-sp
162namespace.rs.asan.search.paths += /odm/${LIB}/vndk-sp
163namespace.rs.asan.search.paths += /data/asan/vendor/${LIB}/vndk-sp
164namespace.rs.asan.search.paths += /vendor/${LIB}/vndk-sp
Justin Yuncbbf1952018-01-16 11:46:21 +0900165namespace.rs.asan.search.paths += /data/asan/system/${LIB}/vndk-sp%VNDK_VER%
166namespace.rs.asan.search.paths += /system/${LIB}/vndk-sp%VNDK_VER%
Jiyong Park2498e1b2017-12-12 22:11:47 +0900167namespace.rs.asan.search.paths += /data/asan/odm/${LIB}
168namespace.rs.asan.search.paths += /odm/${LIB}
169namespace.rs.asan.search.paths += /data/asan/vendor/${LIB}
170namespace.rs.asan.search.paths += /vendor/${LIB}
171
172namespace.rs.asan.permitted.paths = /data/asan/odm/${LIB}
173namespace.rs.asan.permitted.paths += /odm/${LIB}
174namespace.rs.asan.permitted.paths += /data/asan/vendor/${LIB}
175namespace.rs.asan.permitted.paths += /vendor/${LIB}
176namespace.rs.asan.permitted.paths += /data
Justin Yun24c29f12017-06-16 18:11:35 +0900177
178namespace.rs.links = default,vndk
Jiyong Park2498e1b2017-12-12 22:11:47 +0900179
180namespace.rs.link.default.shared_libs = %LLNDK_LIBRARIES%
181namespace.rs.link.default.shared_libs += %SANITIZER_RUNTIME_LIBRARIES%
Jiyong Parkad7ddd52017-12-07 09:59:48 +0900182# Private LLNDK libs (e.g. libft2.so) are exceptionally allowed to this
183# namespace because RS framework libs are using them.
184namespace.rs.link.default.shared_libs += %PRIVATE_LLNDK_LIBRARIES%
Jiyong Park2498e1b2017-12-12 22:11:47 +0900185
Jiyong Park36798462017-08-04 19:08:06 +0900186namespace.rs.link.vndk.shared_libs = %VNDK_SAMEPROCESS_LIBRARIES%
Justin Yun24c29f12017-06-16 18:11:35 +0900187
188###############################################################################
189# "vndk" namespace
190#
191# This namespace is exclusively for vndk-sp libs.
192###############################################################################
193namespace.vndk.isolated = true
Jiyong Parka07f3052017-08-22 10:26:10 +0900194namespace.vndk.visible = true
Justin Yun24c29f12017-06-16 18:11:35 +0900195
Jiyong Park60a29662017-12-13 16:59:21 +0900196namespace.vndk.search.paths = /odm/${LIB}/vndk-sp
197namespace.vndk.search.paths += /vendor/${LIB}/vndk-sp
Justin Yuncbbf1952018-01-16 11:46:21 +0900198namespace.vndk.search.paths += /system/${LIB}/vndk-sp%VNDK_VER%
Jiyong Park2498e1b2017-12-12 22:11:47 +0900199
200namespace.vndk.permitted.paths = /odm/${LIB}/hw
201namespace.vndk.permitted.paths += /odm/${LIB}/egl
202namespace.vndk.permitted.paths += /vendor/${LIB}/hw
203namespace.vndk.permitted.paths += /vendor/${LIB}/egl
204# This is exceptionally required since android.hidl.memory@1.0-impl.so is here
Justin Yuncbbf1952018-01-16 11:46:21 +0900205namespace.vndk.permitted.paths += /system/${LIB}/vndk-sp%VNDK_VER%/hw
Jiyong Park2498e1b2017-12-12 22:11:47 +0900206
Jiyong Park60a29662017-12-13 16:59:21 +0900207namespace.vndk.asan.search.paths = /data/asan/odm/${LIB}/vndk-sp
208namespace.vndk.asan.search.paths += /odm/${LIB}/vndk-sp
209namespace.vndk.asan.search.paths += /data/asan/vendor/${LIB}/vndk-sp
210namespace.vndk.asan.search.paths += /vendor/${LIB}/vndk-sp
Justin Yuncbbf1952018-01-16 11:46:21 +0900211namespace.vndk.asan.search.paths += /data/asan/system/${LIB}/vndk-sp%VNDK_VER%
212namespace.vndk.asan.search.paths += /system/${LIB}/vndk-sp%VNDK_VER%
Jiyong Park2498e1b2017-12-12 22:11:47 +0900213
214namespace.vndk.asan.permitted.paths = /data/asan/odm/${LIB}/hw
215namespace.vndk.asan.permitted.paths += /odm/${LIB}/hw
216namespace.vndk.asan.permitted.paths += /data/asan/odm/${LIB}/egl
217namespace.vndk.asan.permitted.paths += /odm/${LIB}/egl
218namespace.vndk.asan.permitted.paths += /data/asan/vendor/${LIB}/hw
219namespace.vndk.asan.permitted.paths += /vendor/${LIB}/hw
220namespace.vndk.asan.permitted.paths += /data/asan/vendor/${LIB}/egl
221namespace.vndk.asan.permitted.paths += /vendor/${LIB}/egl
222
Justin Yuncbbf1952018-01-16 11:46:21 +0900223namespace.vndk.asan.permitted.paths += /data/asan/system/${LIB}/vndk-sp%VNDK_VER%/hw
224namespace.vndk.asan.permitted.paths += /system/${LIB}/vndk-sp%VNDK_VER%/hw
Justin Yun24c29f12017-06-16 18:11:35 +0900225
Logan Chien86677472018-03-29 14:08:48 +0800226# The "vndk" namespace links to "default" namespace for LLNDK libs and links to
227# "sphal" namespace for vendor libs. The ordering matters. The "default"
228# namespace has higher priority than the "sphal" namespace.
229namespace.vndk.links = default,sphal
230
Justin Yun24c29f12017-06-16 18:11:35 +0900231# When these NDK libs are required inside this namespace, then it is redirected
232# to the default namespace. This is possible since their ABI is stable across
233# Android releases.
Jiyong Park2498e1b2017-12-12 22:11:47 +0900234namespace.vndk.link.default.shared_libs = %LLNDK_LIBRARIES%
235namespace.vndk.link.default.shared_libs += %SANITIZER_RUNTIME_LIBRARIES%
Justin Yun24c29f12017-06-16 18:11:35 +0900236
Logan Chien86677472018-03-29 14:08:48 +0800237# Allow VNDK-SP extensions to use vendor libraries
238namespace.vndk.link.sphal.allow_all_shared_libs = true
239
Justin Yun24c29f12017-06-16 18:11:35 +0900240###############################################################################
241# Namespace config for vendor processes. In O, no restriction is enforced for
242# them. However, in O-MR1, access to /system/${LIB} will not be allowed to
243# the default namespace. 'system' namespace will be added to give limited
244# (LL-NDK only) access.
245###############################################################################
246[vendor]
Logan Chien225b71d2017-12-15 22:19:57 +0800247additional.namespaces = system,vndk
Justin Yun24c29f12017-06-16 18:11:35 +0900248
249###############################################################################
250# "default" namespace
251#
Jiyong Parkad7ddd52017-12-07 09:59:48 +0900252# This is the default linker namespace for a vendor process (a process started
253# from /vendor/bin/*). The main executable and the libs under /vendor/lib[64]
254# are loaded directly into this namespace. However, other libs under the system
255# partition (VNDK and LLNDK libraries) are not loaded here but from the
256# separate namespace 'system'. The delegation to the system namespace is done
257# via the 'namespace.default.link.system.shared_libs' property below.
Justin Yun24c29f12017-06-16 18:11:35 +0900258###############################################################################
259namespace.default.isolated = true
260namespace.default.visible = true
261
Jiyong Park2498e1b2017-12-12 22:11:47 +0900262namespace.default.search.paths = /odm/${LIB}
Jiyong Park2498e1b2017-12-12 22:11:47 +0900263namespace.default.search.paths += /vendor/${LIB}
Justin Yun24c29f12017-06-16 18:11:35 +0900264
Jiyong Park2498e1b2017-12-12 22:11:47 +0900265namespace.default.permitted.paths = /odm
266namespace.default.permitted.paths += /vendor
267
268namespace.default.asan.search.paths = /data/asan/odm/${LIB}
269namespace.default.asan.search.paths += /odm/${LIB}
Jiyong Park2498e1b2017-12-12 22:11:47 +0900270namespace.default.asan.search.paths += /data/asan/vendor/${LIB}
271namespace.default.asan.search.paths += /vendor/${LIB}
Jiyong Park2498e1b2017-12-12 22:11:47 +0900272
Jiyong Park2498e1b2017-12-12 22:11:47 +0900273namespace.default.asan.permitted.paths = /data/asan/odm
274namespace.default.asan.permitted.paths += /odm
275namespace.default.asan.permitted.paths += /data/asan/vendor
276namespace.default.asan.permitted.paths += /vendor
Justin Yun24c29f12017-06-16 18:11:35 +0900277
Logan Chien225b71d2017-12-15 22:19:57 +0800278namespace.default.links = system,vndk
279namespace.default.link.system.shared_libs = %LLNDK_LIBRARIES%
280namespace.default.link.vndk.shared_libs = %VNDK_SAMEPROCESS_LIBRARIES%
281namespace.default.link.vndk.shared_libs += %VNDK_CORE_LIBRARIES%
282
283###############################################################################
284# "vndk" namespace
285#
286# This namespace is where VNDK and VNDK-SP libraries are loaded for
287# a vendor process.
288###############################################################################
289namespace.vndk.isolated = false
290
Logan Chien91b3fb42018-01-11 20:00:37 +0800291namespace.vndk.search.paths = /odm/${LIB}/vndk
292namespace.vndk.search.paths += /odm/${LIB}/vndk-sp
293namespace.vndk.search.paths += /vendor/${LIB}/vndk
294namespace.vndk.search.paths += /vendor/${LIB}/vndk-sp
295namespace.vndk.search.paths += /system/${LIB}/vndk-sp%VNDK_VER%
Justin Yuncbbf1952018-01-16 11:46:21 +0900296namespace.vndk.search.paths += /system/${LIB}/vndk%VNDK_VER%
Logan Chien225b71d2017-12-15 22:19:57 +0800297
Logan Chien91b3fb42018-01-11 20:00:37 +0800298namespace.vndk.asan.search.paths = /data/asan/odm/${LIB}/vndk
299namespace.vndk.asan.search.paths += /odm/${LIB}/vndk
300namespace.vndk.asan.search.paths += /data/asan/odm/${LIB}/vndk-sp
301namespace.vndk.asan.search.paths += /odm/${LIB}/vndk-sp
302namespace.vndk.asan.search.paths += /data/asan/vendor/${LIB}/vndk
303namespace.vndk.asan.search.paths += /vendor/${LIB}/vndk
304namespace.vndk.asan.search.paths += /data/asan/vendor/${LIB}/vndk-sp
305namespace.vndk.asan.search.paths += /vendor/${LIB}/vndk-sp
306namespace.vndk.asan.search.paths += /data/asan/system/${LIB}/vndk-sp%VNDK_VER%
Justin Yuncbbf1952018-01-16 11:46:21 +0900307namespace.vndk.asan.search.paths += /system/${LIB}/vndk-sp%VNDK_VER%
308namespace.vndk.asan.search.paths += /data/asan/system/${LIB}/vndk%VNDK_VER%
309namespace.vndk.asan.search.paths += /system/${LIB}/vndk%VNDK_VER%
Logan Chien225b71d2017-12-15 22:19:57 +0800310
311# When these NDK libs are required inside this namespace, then it is redirected
312# to the system namespace. This is possible since their ABI is stable across
313# Android releases.
Logan Chienea4a2bd2018-01-18 12:06:14 +0800314namespace.vndk.links = system,default
Logan Chien225b71d2017-12-15 22:19:57 +0800315namespace.vndk.link.system.shared_libs = %LLNDK_LIBRARIES%
316namespace.vndk.link.system.shared_libs += %SANITIZER_RUNTIME_LIBRARIES%
Justin Yun24c29f12017-06-16 18:11:35 +0900317
Logan Chienea4a2bd2018-01-18 12:06:14 +0800318namespace.vndk.link.default.allow_all_shared_libs = true
319
Justin Yun24c29f12017-06-16 18:11:35 +0900320###############################################################################
321# "system" namespace
322#
Jiyong Parkad7ddd52017-12-07 09:59:48 +0900323# This namespace is where system libs (VNDK and LLNDK libs) are loaded for
324# a vendor process.
Justin Yun24c29f12017-06-16 18:11:35 +0900325###############################################################################
326namespace.system.isolated = false
Justin Yun24c29f12017-06-16 18:11:35 +0900327
Inseob Kim67cb0562018-05-04 11:39:12 +0900328namespace.system.search.paths = /system/${LIB}
329namespace.system.search.paths += /product/${LIB}
Jiyong Park2498e1b2017-12-12 22:11:47 +0900330
Logan Chien225b71d2017-12-15 22:19:57 +0800331namespace.system.asan.search.paths = /data/asan/system/${LIB}
Jiyong Park2498e1b2017-12-12 22:11:47 +0900332namespace.system.asan.search.paths += /system/${LIB}
Inseob Kim67cb0562018-05-04 11:39:12 +0900333namespace.system.asan.search.paths += /data/asan/product/${LIB}
334namespace.system.asan.search.paths += /product/${LIB}
Jiyong Parkd7e6cb22018-03-20 01:12:31 +0900335
336###############################################################################
337# Namespace config for binaries under /postinstall.
338# Only one default namespace is defined and it has no directories other than
339# /system/lib in the search paths. This is because linker calls realpath on the
340# search paths and this causes selinux denial if the paths (/vendor, /odm) are
341# not allowed to the poinstall binaries. There is no reason to allow the
342# binaries to access the paths.
343###############################################################################
344[postinstall]
345namespace.default.isolated = false
Inseob Kim67cb0562018-05-04 11:39:12 +0900346namespace.default.search.paths = /system/${LIB}
347namespace.default.search.paths += /product/${LIB}