blob: 4aec85c98d11fb104e6d26b0c0b48dca7829dea9 [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
27[system]
28additional.namespaces = sphal,vndk,rs
29
30###############################################################################
31# "default" namespace
32#
Jiyong Park55f05d72017-08-28 14:42:49 +090033# Framework-side code runs in this namespace. Libs from /vendor partition
Justin Yun24c29f12017-06-16 18:11:35 +090034# can't be loaded in this namespace.
35###############################################################################
Jiyong Park55f05d72017-08-28 14:42:49 +090036namespace.default.isolated = true
Justin Yun24c29f12017-06-16 18:11:35 +090037
Jiyong Park2498e1b2017-12-12 22:11:47 +090038namespace.default.search.paths = /system/${LIB}
39
40# We can't have entire /system/${LIB} as permitted paths because doing so
41# makes it possible to load libs in /system/${LIB}/vndk* directories by
42# their absolute paths (e.g. dlopen("/system/lib/vndk/libbase.so");).
43# VNDK libs are built with previous versions of Android and thus must not be
44# loaded into this namespace where libs built with the current version of
45# Android are loaded. Mixing the two types of libs in the same namespace can
46# cause unexpected problem.
47namespace.default.permitted.paths = /system/${LIB}/drm
48namespace.default.permitted.paths += /system/${LIB}/extractors
49namespace.default.permitted.paths += /system/${LIB}/hw
50# These are where odex files are located. libart has to be able to dlopen the files
51namespace.default.permitted.paths += /system/framework
52namespace.default.permitted.paths += /system/app
53namespace.default.permitted.paths += /system/priv-app
54namespace.default.permitted.paths += /vendor/framework
55namespace.default.permitted.paths += /vendor/app
56namespace.default.permitted.paths += /vendor/priv-app
57namespace.default.permitted.paths += /oem/app
58namespace.default.permitted.paths += /data
59namespace.default.permitted.paths += /mnt/expand
60
61namespace.default.asan.search.paths = /data/asan/system/${LIB}
62namespace.default.asan.search.paths += /system/${LIB}
63
64namespace.default.asan.permitted.paths = /data
65namespace.default.asan.permitted.paths += /system/${LIB}/drm
66namespace.default.asan.permitted.paths += /system/${LIB}/extractors
67namespace.default.asan.permitted.paths += /system/${LIB}/hw
68namespace.default.asan.permitted.paths += /system/framework
69namespace.default.asan.permitted.paths += /system/app
70namespace.default.asan.permitted.paths += /system/priv-app
71namespace.default.asan.permitted.paths += /vendor/framework
72namespace.default.asan.permitted.paths += /vendor/app
73namespace.default.asan.permitted.paths += /vendor/priv-app
74namespace.default.asan.permitted.paths += /oem/app
75namespace.default.asan.permitted.paths += /mnt/expand
Justin Yun24c29f12017-06-16 18:11:35 +090076
77###############################################################################
78# "sphal" namespace
79#
80# SP-HAL(Sameprocess-HAL)s are the only vendor libraries that are allowed to be
81# loaded inside system processes. libEGL_<chipset>.so, libGLESv2_<chipset>.so,
82# android.hardware.graphics.mapper@2.0-impl.so, etc are SP-HALs.
83#
84# This namespace is exclusivly for SP-HALs. When the framework tries to dynami-
85# cally load SP-HALs, android_dlopen_ext() is used to explicitly specifying
86# that they should be searched and loaded from this namespace.
87#
88# Note that there is no link from the default namespace to this namespace.
89###############################################################################
90namespace.sphal.isolated = true
91namespace.sphal.visible = true
Justin Yun24c29f12017-06-16 18:11:35 +090092
Jiyong Park2498e1b2017-12-12 22:11:47 +090093namespace.sphal.search.paths = /odm/${LIB}
94namespace.sphal.search.paths += /vendor/${LIB}
95
96namespace.sphal.permitted.paths = /odm/${LIB}
97namespace.sphal.permitted.paths += /vendor/${LIB}
98
99namespace.sphal.asan.search.paths = /data/asan/odm/${LIB}
100namespace.sphal.asan.search.paths += /odm/${LIB}
101namespace.sphal.asan.search.paths += /data/asan/vendor/${LIB}
102namespace.sphal.asan.search.paths += /vendor/${LIB}
103
104namespace.sphal.asan.permitted.paths = /data/asan/odm/${LIB}
105namespace.sphal.asan.permitted.paths += /odm/${LIB}
106namespace.sphal.asan.permitted.paths += /data/asan/vendor/${LIB}
107namespace.sphal.asan.permitted.paths += /vendor/${LIB}
Justin Yun24c29f12017-06-16 18:11:35 +0900108
109# Once in this namespace, access to libraries in /system/lib is restricted. Only
110# libs listed here can be used.
111namespace.sphal.links = default,vndk,rs
112
Jiyong Park2498e1b2017-12-12 22:11:47 +0900113namespace.sphal.link.default.shared_libs = %LLNDK_LIBRARIES%
114namespace.sphal.link.default.shared_libs += %SANITIZER_RUNTIME_LIBRARIES%
Justin Yun24c29f12017-06-16 18:11:35 +0900115
Jiyong Park36798462017-08-04 19:08:06 +0900116namespace.sphal.link.vndk.shared_libs = %VNDK_SAMEPROCESS_LIBRARIES%
Justin Yun24c29f12017-06-16 18:11:35 +0900117
118# Renderscript gets separate namespace
119namespace.sphal.link.rs.shared_libs = libRS_internal.so
120
121###############################################################################
122# "rs" namespace
123#
124# This namespace is exclusively for Renderscript internal libraries.
125# This namespace has slightly looser restriction than the vndk namespace because
126# of the genuine characteristics of Renderscript; /data is in the permitted path
127# to load the compiled *.so file and libmediandk.so can be used here.
128###############################################################################
129namespace.rs.isolated = true
130namespace.rs.visible = true
Justin Yun24c29f12017-06-16 18:11:35 +0900131
Jiyong Park60a29662017-12-13 16:59:21 +0900132namespace.rs.search.paths = /odm/${LIB}/vndk-sp
133namespace.rs.search.paths += /vendor/${LIB}/vndk-sp
Justin Yuncbbf1952018-01-16 11:46:21 +0900134namespace.rs.search.paths += /system/${LIB}/vndk-sp%VNDK_VER%
Jiyong Park2498e1b2017-12-12 22:11:47 +0900135namespace.rs.search.paths += /odm/${LIB}
136namespace.rs.search.paths += /vendor/${LIB}
137
138namespace.rs.permitted.paths = /odm/${LIB}
139namespace.rs.permitted.paths += /vendor/${LIB}
140namespace.rs.permitted.paths += /data
141
Jiyong Park60a29662017-12-13 16:59:21 +0900142namespace.rs.asan.search.paths = /data/asan/odm/${LIB}/vndk-sp
143namespace.rs.asan.search.paths += /odm/${LIB}/vndk-sp
144namespace.rs.asan.search.paths += /data/asan/vendor/${LIB}/vndk-sp
145namespace.rs.asan.search.paths += /vendor/${LIB}/vndk-sp
Justin Yuncbbf1952018-01-16 11:46:21 +0900146namespace.rs.asan.search.paths += /data/asan/system/${LIB}/vndk-sp%VNDK_VER%
147namespace.rs.asan.search.paths += /system/${LIB}/vndk-sp%VNDK_VER%
Jiyong Park2498e1b2017-12-12 22:11:47 +0900148namespace.rs.asan.search.paths += /data/asan/odm/${LIB}
149namespace.rs.asan.search.paths += /odm/${LIB}
150namespace.rs.asan.search.paths += /data/asan/vendor/${LIB}
151namespace.rs.asan.search.paths += /vendor/${LIB}
152
153namespace.rs.asan.permitted.paths = /data/asan/odm/${LIB}
154namespace.rs.asan.permitted.paths += /odm/${LIB}
155namespace.rs.asan.permitted.paths += /data/asan/vendor/${LIB}
156namespace.rs.asan.permitted.paths += /vendor/${LIB}
157namespace.rs.asan.permitted.paths += /data
Justin Yun24c29f12017-06-16 18:11:35 +0900158
159namespace.rs.links = default,vndk
Jiyong Park2498e1b2017-12-12 22:11:47 +0900160
161namespace.rs.link.default.shared_libs = %LLNDK_LIBRARIES%
162namespace.rs.link.default.shared_libs += %SANITIZER_RUNTIME_LIBRARIES%
Jiyong Parkad7ddd52017-12-07 09:59:48 +0900163# Private LLNDK libs (e.g. libft2.so) are exceptionally allowed to this
164# namespace because RS framework libs are using them.
165namespace.rs.link.default.shared_libs += %PRIVATE_LLNDK_LIBRARIES%
Jiyong Park2498e1b2017-12-12 22:11:47 +0900166
Jiyong Park36798462017-08-04 19:08:06 +0900167namespace.rs.link.vndk.shared_libs = %VNDK_SAMEPROCESS_LIBRARIES%
Justin Yun24c29f12017-06-16 18:11:35 +0900168
169###############################################################################
170# "vndk" namespace
171#
172# This namespace is exclusively for vndk-sp libs.
173###############################################################################
174namespace.vndk.isolated = true
Jiyong Parka07f3052017-08-22 10:26:10 +0900175namespace.vndk.visible = true
Justin Yun24c29f12017-06-16 18:11:35 +0900176
Jiyong Park60a29662017-12-13 16:59:21 +0900177namespace.vndk.search.paths = /odm/${LIB}/vndk-sp
178namespace.vndk.search.paths += /vendor/${LIB}/vndk-sp
Justin Yuncbbf1952018-01-16 11:46:21 +0900179namespace.vndk.search.paths += /system/${LIB}/vndk-sp%VNDK_VER%
Jiyong Park2498e1b2017-12-12 22:11:47 +0900180
181namespace.vndk.permitted.paths = /odm/${LIB}/hw
182namespace.vndk.permitted.paths += /odm/${LIB}/egl
183namespace.vndk.permitted.paths += /vendor/${LIB}/hw
184namespace.vndk.permitted.paths += /vendor/${LIB}/egl
185# This is exceptionally required since android.hidl.memory@1.0-impl.so is here
Justin Yuncbbf1952018-01-16 11:46:21 +0900186namespace.vndk.permitted.paths += /system/${LIB}/vndk-sp%VNDK_VER%/hw
Jiyong Park2498e1b2017-12-12 22:11:47 +0900187
Jiyong Park60a29662017-12-13 16:59:21 +0900188namespace.vndk.asan.search.paths = /data/asan/odm/${LIB}/vndk-sp
189namespace.vndk.asan.search.paths += /odm/${LIB}/vndk-sp
190namespace.vndk.asan.search.paths += /data/asan/vendor/${LIB}/vndk-sp
191namespace.vndk.asan.search.paths += /vendor/${LIB}/vndk-sp
Justin Yuncbbf1952018-01-16 11:46:21 +0900192namespace.vndk.asan.search.paths += /data/asan/system/${LIB}/vndk-sp%VNDK_VER%
193namespace.vndk.asan.search.paths += /system/${LIB}/vndk-sp%VNDK_VER%
Jiyong Park2498e1b2017-12-12 22:11:47 +0900194
195namespace.vndk.asan.permitted.paths = /data/asan/odm/${LIB}/hw
196namespace.vndk.asan.permitted.paths += /odm/${LIB}/hw
197namespace.vndk.asan.permitted.paths += /data/asan/odm/${LIB}/egl
198namespace.vndk.asan.permitted.paths += /odm/${LIB}/egl
199namespace.vndk.asan.permitted.paths += /data/asan/vendor/${LIB}/hw
200namespace.vndk.asan.permitted.paths += /vendor/${LIB}/hw
201namespace.vndk.asan.permitted.paths += /data/asan/vendor/${LIB}/egl
202namespace.vndk.asan.permitted.paths += /vendor/${LIB}/egl
203
Justin Yuncbbf1952018-01-16 11:46:21 +0900204namespace.vndk.asan.permitted.paths += /data/asan/system/${LIB}/vndk-sp%VNDK_VER%/hw
205namespace.vndk.asan.permitted.paths += /system/${LIB}/vndk-sp%VNDK_VER%/hw
Justin Yun24c29f12017-06-16 18:11:35 +0900206
207# When these NDK libs are required inside this namespace, then it is redirected
208# to the default namespace. This is possible since their ABI is stable across
209# Android releases.
210namespace.vndk.links = default
Jiyong Park2498e1b2017-12-12 22:11:47 +0900211namespace.vndk.link.default.shared_libs = %LLNDK_LIBRARIES%
212namespace.vndk.link.default.shared_libs += %SANITIZER_RUNTIME_LIBRARIES%
Justin Yun24c29f12017-06-16 18:11:35 +0900213
214###############################################################################
215# Namespace config for vendor processes. In O, no restriction is enforced for
216# them. However, in O-MR1, access to /system/${LIB} will not be allowed to
217# the default namespace. 'system' namespace will be added to give limited
218# (LL-NDK only) access.
219###############################################################################
220[vendor]
Logan Chien225b71d2017-12-15 22:19:57 +0800221additional.namespaces = system,vndk
Justin Yun24c29f12017-06-16 18:11:35 +0900222
223###############################################################################
224# "default" namespace
225#
Jiyong Parkad7ddd52017-12-07 09:59:48 +0900226# This is the default linker namespace for a vendor process (a process started
227# from /vendor/bin/*). The main executable and the libs under /vendor/lib[64]
228# are loaded directly into this namespace. However, other libs under the system
229# partition (VNDK and LLNDK libraries) are not loaded here but from the
230# separate namespace 'system'. The delegation to the system namespace is done
231# via the 'namespace.default.link.system.shared_libs' property below.
Justin Yun24c29f12017-06-16 18:11:35 +0900232###############################################################################
233namespace.default.isolated = true
234namespace.default.visible = true
235
Jiyong Park2498e1b2017-12-12 22:11:47 +0900236namespace.default.search.paths = /odm/${LIB}
Jiyong Park2498e1b2017-12-12 22:11:47 +0900237namespace.default.search.paths += /vendor/${LIB}
Justin Yun24c29f12017-06-16 18:11:35 +0900238
Jiyong Park2498e1b2017-12-12 22:11:47 +0900239namespace.default.permitted.paths = /odm
240namespace.default.permitted.paths += /vendor
241
242namespace.default.asan.search.paths = /data/asan/odm/${LIB}
243namespace.default.asan.search.paths += /odm/${LIB}
Jiyong Park2498e1b2017-12-12 22:11:47 +0900244namespace.default.asan.search.paths += /data/asan/vendor/${LIB}
245namespace.default.asan.search.paths += /vendor/${LIB}
Jiyong Park2498e1b2017-12-12 22:11:47 +0900246
Jiyong Park2498e1b2017-12-12 22:11:47 +0900247namespace.default.asan.permitted.paths = /data/asan/odm
248namespace.default.asan.permitted.paths += /odm
249namespace.default.asan.permitted.paths += /data/asan/vendor
250namespace.default.asan.permitted.paths += /vendor
Justin Yun24c29f12017-06-16 18:11:35 +0900251
Logan Chien225b71d2017-12-15 22:19:57 +0800252namespace.default.links = system,vndk
253namespace.default.link.system.shared_libs = %LLNDK_LIBRARIES%
254namespace.default.link.vndk.shared_libs = %VNDK_SAMEPROCESS_LIBRARIES%
255namespace.default.link.vndk.shared_libs += %VNDK_CORE_LIBRARIES%
256
257###############################################################################
258# "vndk" namespace
259#
260# This namespace is where VNDK and VNDK-SP libraries are loaded for
261# a vendor process.
262###############################################################################
263namespace.vndk.isolated = false
264
Logan Chien91b3fb42018-01-11 20:00:37 +0800265namespace.vndk.search.paths = /odm/${LIB}/vndk
266namespace.vndk.search.paths += /odm/${LIB}/vndk-sp
267namespace.vndk.search.paths += /vendor/${LIB}/vndk
268namespace.vndk.search.paths += /vendor/${LIB}/vndk-sp
269namespace.vndk.search.paths += /system/${LIB}/vndk-sp%VNDK_VER%
Justin Yuncbbf1952018-01-16 11:46:21 +0900270namespace.vndk.search.paths += /system/${LIB}/vndk%VNDK_VER%
Logan Chien225b71d2017-12-15 22:19:57 +0800271
Logan Chien91b3fb42018-01-11 20:00:37 +0800272namespace.vndk.asan.search.paths = /data/asan/odm/${LIB}/vndk
273namespace.vndk.asan.search.paths += /odm/${LIB}/vndk
274namespace.vndk.asan.search.paths += /data/asan/odm/${LIB}/vndk-sp
275namespace.vndk.asan.search.paths += /odm/${LIB}/vndk-sp
276namespace.vndk.asan.search.paths += /data/asan/vendor/${LIB}/vndk
277namespace.vndk.asan.search.paths += /vendor/${LIB}/vndk
278namespace.vndk.asan.search.paths += /data/asan/vendor/${LIB}/vndk-sp
279namespace.vndk.asan.search.paths += /vendor/${LIB}/vndk-sp
280namespace.vndk.asan.search.paths += /data/asan/system/${LIB}/vndk-sp%VNDK_VER%
Justin Yuncbbf1952018-01-16 11:46:21 +0900281namespace.vndk.asan.search.paths += /system/${LIB}/vndk-sp%VNDK_VER%
282namespace.vndk.asan.search.paths += /data/asan/system/${LIB}/vndk%VNDK_VER%
283namespace.vndk.asan.search.paths += /system/${LIB}/vndk%VNDK_VER%
Logan Chien225b71d2017-12-15 22:19:57 +0800284
285# When these NDK libs are required inside this namespace, then it is redirected
286# to the system namespace. This is possible since their ABI is stable across
287# Android releases.
Logan Chienea4a2bd2018-01-18 12:06:14 +0800288namespace.vndk.links = system,default
Logan Chien225b71d2017-12-15 22:19:57 +0800289namespace.vndk.link.system.shared_libs = %LLNDK_LIBRARIES%
290namespace.vndk.link.system.shared_libs += %SANITIZER_RUNTIME_LIBRARIES%
Justin Yun24c29f12017-06-16 18:11:35 +0900291
Logan Chienea4a2bd2018-01-18 12:06:14 +0800292namespace.vndk.link.default.allow_all_shared_libs = true
293
Justin Yun24c29f12017-06-16 18:11:35 +0900294###############################################################################
295# "system" namespace
296#
Jiyong Parkad7ddd52017-12-07 09:59:48 +0900297# This namespace is where system libs (VNDK and LLNDK libs) are loaded for
298# a vendor process.
Justin Yun24c29f12017-06-16 18:11:35 +0900299###############################################################################
300namespace.system.isolated = false
Justin Yun24c29f12017-06-16 18:11:35 +0900301
Logan Chien225b71d2017-12-15 22:19:57 +0800302namespace.system.search.paths = /system/${LIB}
Jiyong Park2498e1b2017-12-12 22:11:47 +0900303
Logan Chien225b71d2017-12-15 22:19:57 +0800304namespace.system.asan.search.paths = /data/asan/system/${LIB}
Jiyong Park2498e1b2017-12-12 22:11:47 +0900305namespace.system.asan.search.paths += /system/${LIB}