Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 1 | # 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 |
| 7 | # absolution path of an executable is selected. |
| 8 | dir.system = /system/bin/ |
| 9 | dir.system = /system/xbin/ |
| 10 | dir.vendor = /vendor/bin/ |
| 11 | dir.vendor = /data/nativetest/vendor |
| 12 | dir.vendor = /data/nativetest64/vendor |
| 13 | dir.vendor = /data/benchmarktest/vendor |
| 14 | dir.vendor = /data/benchmarktest64/vendor |
| 15 | dir.system = /data/nativetest |
| 16 | dir.system = /data/nativetest64 |
| 17 | dir.system = /data/benchmarktest |
| 18 | dir.system = /data/benchmarktest64 |
| 19 | |
| 20 | [system] |
| 21 | additional.namespaces = sphal,vndk,rs |
| 22 | |
| 23 | ############################################################################### |
| 24 | # "default" namespace |
| 25 | # |
Jiyong Park | 55f05d7 | 2017-08-28 14:42:49 +0900 | [diff] [blame] | 26 | # Framework-side code runs in this namespace. Libs from /vendor partition |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 27 | # can't be loaded in this namespace. |
| 28 | ############################################################################### |
Jiyong Park | 55f05d7 | 2017-08-28 14:42:49 +0900 | [diff] [blame] | 29 | namespace.default.isolated = true |
| 30 | # TODO(b/63553457): remove /vendor/lib from the search path. For now, this is |
| 31 | # required since the classloader namespace for vendor apks should have access |
| 32 | # vendor libraries in the directory. These search paths are copied to the search |
| 33 | # paths of the classloader namespace. |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 34 | namespace.default.search.paths = /system/${LIB}:/vendor/${LIB} |
Jiyong Park | 55f05d7 | 2017-08-28 14:42:49 +0900 | [diff] [blame] | 35 | # /vendor/app, /vendor/framework were added since libart should be able to dlopen |
| 36 | # the odex files from the directory. |
| 37 | namespace.default.permitted.paths = /system/${LIB}/drm:/system/${LIB}/hw:/system/framework:/system/app:/system/priv-app:/vendor/app:/vendor/framework:/oem/app:/data:/mnt/expand |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 38 | |
| 39 | namespace.default.asan.search.paths = /data/asan/system/${LIB}:/system/${LIB}:/data/asan/vendor/${LIB}:/vendor/${LIB} |
Jiyong Park | 55f05d7 | 2017-08-28 14:42:49 +0900 | [diff] [blame] | 40 | namespace.default.asan.permitted.paths = /data:/system/${LIB}/drm:/system/${LIB}/hw:/system/framework:/system/app:/system/priv-app:/vendor/app:/vendor/framework:/oem/app:/mnt/expand |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 41 | |
| 42 | ############################################################################### |
| 43 | # "sphal" namespace |
| 44 | # |
| 45 | # SP-HAL(Sameprocess-HAL)s are the only vendor libraries that are allowed to be |
| 46 | # loaded inside system processes. libEGL_<chipset>.so, libGLESv2_<chipset>.so, |
| 47 | # android.hardware.graphics.mapper@2.0-impl.so, etc are SP-HALs. |
| 48 | # |
| 49 | # This namespace is exclusivly for SP-HALs. When the framework tries to dynami- |
| 50 | # cally load SP-HALs, android_dlopen_ext() is used to explicitly specifying |
| 51 | # that they should be searched and loaded from this namespace. |
| 52 | # |
| 53 | # Note that there is no link from the default namespace to this namespace. |
| 54 | ############################################################################### |
| 55 | namespace.sphal.isolated = true |
| 56 | namespace.sphal.visible = true |
| 57 | namespace.sphal.search.paths = /vendor/${LIB}/egl:/vendor/${LIB}/hw:/vendor/${LIB} |
| 58 | namespace.sphal.permitted.paths = /vendor/${LIB}:/system/${LIB}/vndk-sp/hw |
| 59 | |
| 60 | namespace.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} |
| 61 | namespace.sphal.asan.permitted.paths = /data/asan/vendor/${LIB}:/vendor/${LIB} |
| 62 | |
| 63 | # Once in this namespace, access to libraries in /system/lib is restricted. Only |
| 64 | # libs listed here can be used. |
| 65 | namespace.sphal.links = default,vndk,rs |
| 66 | |
| 67 | # WARNING: only NDK libs can be listed here. |
Jiyong Park | 3679846 | 2017-08-04 19:08:06 +0900 | [diff] [blame] | 68 | namespace.sphal.link.default.shared_libs = %LLNDK_LIBRARIES% |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 69 | |
| 70 | # WARNING: only VNDK-SP libs can be listed here. DO NOT EDIT this line. |
Jiyong Park | 3679846 | 2017-08-04 19:08:06 +0900 | [diff] [blame] | 71 | namespace.sphal.link.vndk.shared_libs = %VNDK_SAMEPROCESS_LIBRARIES% |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 72 | |
| 73 | # Renderscript gets separate namespace |
| 74 | namespace.sphal.link.rs.shared_libs = libRS_internal.so |
| 75 | |
| 76 | ############################################################################### |
| 77 | # "rs" namespace |
| 78 | # |
| 79 | # This namespace is exclusively for Renderscript internal libraries. |
| 80 | # This namespace has slightly looser restriction than the vndk namespace because |
| 81 | # of the genuine characteristics of Renderscript; /data is in the permitted path |
| 82 | # to load the compiled *.so file and libmediandk.so can be used here. |
| 83 | ############################################################################### |
| 84 | namespace.rs.isolated = true |
| 85 | namespace.rs.visible = true |
| 86 | namespace.rs.search.paths = /vendor/${LIB}/vndk-sp:/system/${LIB}/vndk-sp:/vendor/${LIB} |
| 87 | namespace.rs.permitted.paths = /vendor/${LIB}:/data |
| 88 | |
| 89 | namespace.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} |
| 90 | namespace.rs.asan.permitted.paths = /data/asan/vendor/${LIB}:/vendor/${LIB}:/data |
| 91 | |
| 92 | namespace.rs.links = default,vndk |
Jiyong Park | 3679846 | 2017-08-04 19:08:06 +0900 | [diff] [blame] | 93 | namespace.rs.link.default.shared_libs = %LLNDK_LIBRARIES% |
| 94 | namespace.rs.link.vndk.shared_libs = %VNDK_SAMEPROCESS_LIBRARIES% |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 95 | |
| 96 | ############################################################################### |
| 97 | # "vndk" namespace |
| 98 | # |
| 99 | # This namespace is exclusively for vndk-sp libs. |
| 100 | ############################################################################### |
| 101 | namespace.vndk.isolated = true |
| 102 | namespace.vndk.search.paths = /vendor/${LIB}/vndk-sp:/system/${LIB}/vndk-sp |
| 103 | namespace.vndk.permitted.paths = /vendor/${LIB}/hw:/vendor/${LIB}/egl |
| 104 | |
| 105 | namespace.vndk.asan.search.paths = /data/asan/vendor/${LIB}/vndk-sp:/vendor/${LIB}/vndk-sp:/data/asan/system/${LIB}/vndk-sp:/system/${LIB}/vndk-sp |
| 106 | namespace.vndk.asan.permitted.paths = /data/asan/vendor/${LIB}/hw:/vendor/${LIB}/hw:/data/asan/vendor/${LIB}/egl:/vendor/${LIB}/egl |
| 107 | |
| 108 | # When these NDK libs are required inside this namespace, then it is redirected |
| 109 | # to the default namespace. This is possible since their ABI is stable across |
| 110 | # Android releases. |
| 111 | namespace.vndk.links = default |
Jiyong Park | 3679846 | 2017-08-04 19:08:06 +0900 | [diff] [blame] | 112 | namespace.vndk.link.default.shared_libs = %LLNDK_LIBRARIES% |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 113 | |
| 114 | ############################################################################### |
| 115 | # Namespace config for vendor processes. In O, no restriction is enforced for |
| 116 | # them. However, in O-MR1, access to /system/${LIB} will not be allowed to |
| 117 | # the default namespace. 'system' namespace will be added to give limited |
| 118 | # (LL-NDK only) access. |
| 119 | ############################################################################### |
| 120 | [vendor] |
| 121 | additional.namespaces = system |
| 122 | |
| 123 | ############################################################################### |
| 124 | # "default" namespace |
| 125 | # |
| 126 | # Vendor-side code runs in this namespace. |
| 127 | ############################################################################### |
| 128 | namespace.default.isolated = true |
| 129 | namespace.default.visible = true |
| 130 | |
Justin Yun | 3094de9 | 2017-08-25 12:30:44 +0900 | [diff] [blame] | 131 | namespace.default.search.paths = /vendor/${LIB}/hw:/vendor/${LIB}/egl:/vendor/${LIB}:/vendor/${LIB}/vndk:/system/${LIB}/vndk:/vendor/${LIB}/vndk-sp:/system/${LIB}/vndk-sp |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 132 | namespace.default.permitted.paths = /vendor:/system/${LIB}/vndk:/system/${LIB}/vndk-sp |
| 133 | |
Justin Yun | 3094de9 | 2017-08-25 12:30:44 +0900 | [diff] [blame] | 134 | namespace.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/vendor/${LIB}/vndk:/vendor/${LIB}/vndk:/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 |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 135 | namespace.default.asan.permitted.paths = /data/asan/vendor:/vendor:/data/asan/system/${LIB}/vndk:/system/${LIB}/vndk:/data/asan/system/${LIB}/vndk-sp:/system/${LIB}/vndk-sp |
| 136 | |
| 137 | namespace.default.links = system |
Jiyong Park | 3679846 | 2017-08-04 19:08:06 +0900 | [diff] [blame] | 138 | namespace.default.link.system.shared_libs = %LLNDK_LIBRARIES%:libmedia.so:libandroid_runtime.so |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 139 | # libmedia.so must be removed after we have fix for lib-dplmedia.so (b/64427765) |
| 140 | # libandroid_runtime.so must be removed after we have a fix for qseeproxydaemon (b/64820887) |
| 141 | |
| 142 | ############################################################################### |
| 143 | # "system" namespace |
| 144 | # |
| 145 | # This is for vendor process to use LL-NDK in system partition. |
| 146 | ############################################################################### |
| 147 | namespace.system.isolated = false |
| 148 | namespace.system.search.paths = /system/${LIB} |
| 149 | namespace.system.permitted.paths = /system/${LIB} |
| 150 | |
| 151 | namespace.system.asan.search.paths = /data/asan/system/${LIB}:/system/${LIB} |
| 152 | namespace.system.asan.permitted.paths = /data/asan/system/${LIB}:/system/${LIB} |