blob: f241e298271732ee040e11db5cd5d527ca0065df [file] [log] [blame]
Pierre-Hugues Husson5fcaeb32018-02-14 22:05:41 +01001# Copyright (C) 2017 The Android Open Source Project
2#
3# Bionic loader config file.
4#
5
6# Don't change the order here.
7dir.system = /system/bin/
8dir.system = /system/xbin/
9dir.vendor = /vendor/bin/
10dir.vendor = /data/nativetest/vendor
11dir.vendor = /data/nativetest64/vendor
12dir.vendor = /data/benchmarktest/vendor
13dir.vendor = /data/benchmarktest64/vendor
14dir.system = /data/nativetest
15dir.system = /data/nativetest64
16dir.system = /data/benchmarktest
17dir.system = /data/benchmarktest64
18
19[system]
20additional.namespaces = sphal,vndk,rs
21
22###############################################################################
23# "default" namespace
24#
25# Framework-side code runs in this namespace. Anything from /vendor partition
26# can't be loaded in this namespace.
27###############################################################################
28namespace.default.isolated = false
29namespace.default.search.paths = /system/${LIB}:/vendor/${LIB}
30namespace.default.permitted.paths = /system/${LIB}:/vendor/${LIB}
31
32namespace.default.asan.search.paths = /data/asan/system/${LIB}:/system/${LIB}:/data/asan/vendor/${LIB}:/vendor/${LIB}
33namespace.default.asan.permitted.paths = /data/asan/system/${LIB}:/system/${LIB}:/data/asan/vendor/${LIB}:/vendor/${LIB}
34
35# TODO(b/37013858): remove all dependencies to /vendor/lib from system processes
36# When this is done, comment out following three lines and remove the three
37# lines above
38#namespace.default.isolated = true
39#namespace.default.search.paths = /system/${LIB}
40#namespace.default.permitted.paths = /system/${LIB}
41#
42#namespace.default.asan.search.paths = /data/asan/system/${LIB}:/system/${LIB}
43#namespace.default.asan.permitted.paths = /data/asan/system/${LIB}:/system/${LIB}
44
45###############################################################################
46# "sphal" namespace
47#
48# SP-HAL(Sameprocess-HAL)s are the only vendor libraries that are allowed to be
49# loaded inside system processes. libEGL_<chipset>.so, libGLESv2_<chipset>.so,
50# android.hardware.graphics.mapper@2.0-impl.so, etc are SP-HALs.
51#
52# This namespace is exclusivly for SP-HALs. When the framework tries to dynami-
53# cally load SP-HALs, android_dlopen_ext() is used to explicitly specifying
54# that they should be searched and loaded from this namespace.
55#
56# Note that there is no link from the default namespace to this namespace.
57###############################################################################
58namespace.sphal.isolated = true
59namespace.sphal.visible = true
60namespace.sphal.search.paths = /vendor/${LIB}/egl:/vendor/${LIB}/hw:/vendor/${LIB}
Pierre-Hugues Husson2623dc52018-08-07 12:49:42 +020061namespace.sphal.permitted.paths = /vendor/${LIB}:/system/${LIB}/vndk-sp-27/hw
Pierre-Hugues Husson5fcaeb32018-02-14 22:05:41 +010062
63namespace.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}
64namespace.sphal.asan.permitted.paths = /data/asan/vendor/${LIB}:/vendor/${LIB}
65
66# Once in this namespace, access to libraries in /system/lib is restricted. Only
67# libs listed here can be used.
68namespace.sphal.links = default,vndk,rs
69
70# WARNING: only NDK libs can be listed here.
71namespace.sphal.link.default.shared_libs = libc.so:libm.so:libdl.so:libstdc++.so:liblog.so:libnativewindow.so:libEGL.so:libsync.so:libGLESv1_CM.so:libGLESv2.so:libvndksupport.so:libz.so
72
73# WARNING: only VNDK-SP libs can be listed here. DO NOT EDIT this line.
74namespace.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
75
76# Renderscript gets separate namespace
77namespace.sphal.link.rs.shared_libs = libRS_internal.so
78
79###############################################################################
80# "rs" namespace
81#
82# This namespace is exclusively for Renderscript internal libraries.
83# This namespace has slightly looser restriction than the vndk namespace because
84# of the genuine characteristics of Renderscript; /data is in the permitted path
85# to load the compiled *.so file and libmediandk.so can be used here.
86###############################################################################
87namespace.rs.isolated = true
88namespace.rs.visible = true
Pierre-Hugues Husson2623dc52018-08-07 12:49:42 +020089namespace.rs.search.paths = /vendor/${LIB}/vndk-sp:/system/${LIB}/vndk-sp-27:/vendor/${LIB}
Pierre-Hugues Husson5fcaeb32018-02-14 22:05:41 +010090namespace.rs.permitted.paths = /vendor/${LIB}:/data
91
Pierre-Hugues Husson2623dc52018-08-07 12:49:42 +020092namespace.rs.asan.search.paths = /data/asan/vendor/${LIB}/vndk-sp:/vendor/${LIB}/vndk-sp:/data/asan/system/${LIB}/vndk-sp-27:/system/${LIB}/vndk-sp-27:/data/asan/vendor/${LIB}:/vendor/${LIB}
Pierre-Hugues Husson5fcaeb32018-02-14 22:05:41 +010093namespace.rs.asan.permitted.paths = /data/asan/vendor/${LIB}:/vendor/${LIB}:/data
94
95namespace.rs.links = default,vndk
96namespace.rs.link.default.shared_libs = libc.so:libm.so:libdl.so:libstdc++.so:liblog.so:libnativewindow.so:libEGL.so:libsync.so:libGLESv1_CM.so:libGLESv2.so:libmediandk.so:libvndksupport.so:libz.so:libft2.so
97namespace.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
98
99###############################################################################
100# "vndk" namespace
101#
102# This namespace is exclusively for vndk-sp libs.
103###############################################################################
104namespace.vndk.isolated = true
105namespace.vndk.visible = true
Pierre-Hugues Husson2623dc52018-08-07 12:49:42 +0200106namespace.vndk.search.paths = /vendor/${LIB}/vndk-sp:/system/${LIB}/vndk-sp-27
Pierre-Hugues Husson5fcaeb32018-02-14 22:05:41 +0100107namespace.vndk.permitted.paths = /vendor/${LIB}/hw:/vendor/${LIB}/egl
108
109namespace.vndk.asan.search.paths = /data/asan/vendor/${LIB}/vndk-sp:/vendor/${LIB}/vndk-sp:/data/asan/system/${LIB}/vndk-sp:/system/${LIB}/vndk-sp
110namespace.vndk.asan.permitted.paths = /data/asan/vendor/${LIB}/hw:/vendor/${LIB}/hw:/data/asan/vendor/${LIB}/egl:/vendor/${LIB}/egl
111
112# When these NDK libs are required inside this namespace, then it is redirected
113# to the default namespace. This is possible since their ABI is stable across
114# Android releases.
115namespace.vndk.links = default
116namespace.vndk.link.default.shared_libs = android.hidl.memory@1.0-impl.so:libc.so:libm.so:libdl.so:libstdc++.so:liblog.so:libnativewindow.so:libEGL.so:libsync.so:libvndksupport.so:libz.so
117
118###############################################################################
119# Namespace config for vendor processes. In O, no restriction is enforced for
120# them. However, in O-MR1, access to /system/${LIB} will not be allowed to
121# the default namespace. 'system' namespace will be added to give limited
122# (LL-NDK only) access.
123###############################################################################
124[vendor]
125namespace.default.isolated = false
Pierre-Hugues Husson2623dc52018-08-07 12:49:42 +0200126namespace.default.search.paths = /vendor/${LIB}/hw:/vendor/${LIB}/egl:/vendor/${LIB}:/system/${LIB}/vndk-27:/vendor/${LIB}/vndk-sp:/system/${LIB}/vndk-sp-27:/system/${LIB}
Pierre-Hugues Husson5fcaeb32018-02-14 22:05:41 +0100127
128namespace.default.asan.search.paths = /data/asan/vendor/${LIB}/hw:/vendor/${LIB}/hw:/data/asan/vendor/${LIB}/egl:/vendor/${LIB}/egl:/data/asan/vendor/${LIB}:/vendor/${LIB}:/data/asan/system/${LIB}/vndk:/system/${LIB}/vndk:/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}