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 # 26 # Framework-side code runs in this namespace. Libs from /vendor partition 27 # can't be loaded in this namespace. 28 ############################################################################### 29 namespace.default.isolated = true 30 namespace.default.search.paths = /system/${LIB} 31 # /vendor/app, /vendor/framework were added since libart should be able to dlopen 32 # the odex files from the directory. 33 namespace.default.permitted.paths = /system/${LIB}/drm:/system/${LIB}/extractors:/system/${LIB}/hw:/system/framework:/system/app:/system/priv-app:/vendor/app:/vendor/framework:/oem/app:/data:/mnt/expand 34 35 namespace.default.asan.search.paths = /data/asan/system/${LIB}:/system/${LIB} 36 namespace.default.asan.permitted.paths = /data:/system/${LIB}/drm:/system/${LIB}/extractors:/system/${LIB}/hw:/system/framework:/system/app:/system/priv-app:/vendor/app:/vendor/framework:/oem/app:/mnt/expand 37 38 ############################################################################### 39 # "sphal" namespace 40 # 41 # SP-HAL(Sameprocess-HAL)s are the only vendor libraries that are allowed to be 42 # loaded inside system processes. libEGL_<chipset>.so, libGLESv2_<chipset>.so, 43 # android.hardware.graphics.mapper (a] 2.0-impl.so, etc are SP-HALs. 44 # 45 # This namespace is exclusivly for SP-HALs. When the framework tries to dynami- 46 # cally load SP-HALs, android_dlopen_ext() is used to explicitly specifying 47 # that they should be searched and loaded from this namespace. 48 # 49 # Note that there is no link from the default namespace to this namespace. 50 ############################################################################### 51 namespace.sphal.isolated = true 52 namespace.sphal.visible = true 53 namespace.sphal.search.paths = /vendor/${LIB}/egl:/vendor/${LIB}/hw:/vendor/${LIB} 54 namespace.sphal.permitted.paths = /vendor/${LIB}:/system/${LIB}/vndk-sp-27/hw 55 56 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} 57 namespace.sphal.asan.permitted.paths = /data/asan/vendor/${LIB}:/vendor/${LIB} 58 59 # Once in this namespace, access to libraries in /system/lib is restricted. Only 60 # libs listed here can be used. 61 namespace.sphal.links = default,vndk,rs 62 63 # WARNING: only NDK libs can be listed here. 64 namespace.sphal.link.default.shared_libs = libEGL.so:libGLESv1_CM.so:libGLESv2.so:libGLESv3.so:libRS.so:libandroid_net.so:libc.so:libdl.so:libft2.so:liblog.so:libm.so:libmediandk.so:libnativewindow.so:libsync.so:libvndksupport.so:libclang_rt.asan-x86_64-android.so:libclang_rt.ubsan_standalone-x86_64-android.so:libclang_rt.tsan-x86_64-android.so:libclang_rt.asan-i686-android.so:libclang_rt.ubsan_standalone-i686-android.so:libclang_rt.tsan-i686-android.so 65 66 # WARNING: only VNDK-SP libs can be listed here. DO NOT EDIT this line. 67 namespace.sphal.link.vndk.shared_libs = android.hardware.graphics.allocator (a] 2.0.so:android.hardware.graphics.common (a] 1.0.so:android.hardware.graphics.mapper (a] 2.0.so:android.hardware.renderscript (a] 1.0.so:android.hidl.memory (a] 1.0.so:android.hidl.memory (a] 1.0-impl.so:libRSCpuRef.so:libRSDriver.so:libRS_internal.so:libbacktrace.so:libbase.so:libbcinfo.so:libblas.so:libc++.so:libcompiler_rt.so:libcutils.so:libhardware.so:libhidlbase.so:libhidlmemory.so:libhidltransport.so:libhwbinder.so:libion.so:liblzma.so:libunwind.so:libutils.so:libz.so 68 69 # Renderscript gets separate namespace 70 namespace.sphal.link.rs.shared_libs = libRS_internal.so 71 72 ############################################################################### 73 # "rs" namespace 74 # 75 # This namespace is exclusively for Renderscript internal libraries. 76 # This namespace has slightly looser restriction than the vndk namespace because 77 # of the genuine characteristics of Renderscript; /data is in the permitted path 78 # to load the compiled *.so file and libmediandk.so can be used here. 79 ############################################################################### 80 namespace.rs.isolated = true 81 namespace.rs.visible = true 82 namespace.rs.search.paths = /vendor/${LIB}/vndk-sp:/system/${LIB}/vndk-sp-27:/vendor/${LIB} 83 namespace.rs.permitted.paths = /vendor/${LIB}:/data 84 85 namespace.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} 86 namespace.rs.asan.permitted.paths = /data/asan/vendor/${LIB}:/vendor/${LIB}:/data 87 88 namespace.rs.links = default,vndk 89 namespace.rs.link.default.shared_libs = libEGL.so:libGLESv1_CM.so:libGLESv2.so:libGLESv3.so:libRS.so:libandroid_net.so:libc.so:libdl.so:libft2.so:liblog.so:libm.so:libmediandk.so:libnativewindow.so:libsync.so:libvndksupport.so:libclang_rt.asan-x86_64-android.so:libclang_rt.ubsan_standalone-x86_64-android.so:libclang_rt.tsan-x86_64-android.so:libclang_rt.asan-i686-android.so:libclang_rt.ubsan_standalone-i686-android.so:libclang_rt.tsan-i686-android.so 90 namespace.rs.link.vndk.shared_libs = android.hardware.graphics.allocator (a] 2.0.so:android.hardware.graphics.common (a] 1.0.so:android.hardware.graphics.mapper (a] 2.0.so:android.hardware.renderscript (a] 1.0.so:android.hidl.memory (a] 1.0.so:android.hidl.memory (a] 1.0-impl.so:libRSCpuRef.so:libRSDriver.so:libRS_internal.so:libbacktrace.so:libbase.so:libbcinfo.so:libblas.so:libc++.so:libcompiler_rt.so:libcutils.so:libhardware.so:libhidlbase.so:libhidlmemory.so:libhidltransport.so:libhwbinder.so:libion.so:liblzma.so:libunwind.so:libutils.so:libz.so 91 92 ############################################################################### 93 # "vndk" namespace 94 # 95 # This namespace is exclusively for vndk-sp libs. 96 ############################################################################### 97 namespace.vndk.isolated = true 98 namespace.vndk.visible = true 99 namespace.vndk.search.paths = /vendor/${LIB}/vndk-sp:/system/${LIB}/vndk-sp-27 100 namespace.vndk.permitted.paths = /vendor/${LIB}/hw:/vendor/${LIB}/egl 101 102 namespace.vndk.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 103 namespace.vndk.asan.permitted.paths = /data/asan/vendor/${LIB}/hw:/vendor/${LIB}/hw:/data/asan/vendor/${LIB}/egl:/vendor/${LIB}/egl 104 105 # When these NDK libs are required inside this namespace, then it is redirected 106 # to the default namespace. This is possible since their ABI is stable across 107 # Android releases. 108 namespace.vndk.links = default 109 namespace.vndk.link.default.shared_libs = libEGL.so:libGLESv1_CM.so:libGLESv2.so:libGLESv3.so:libRS.so:libandroid_net.so:libc.so:libdl.so:libft2.so:liblog.so:libm.so:libmediandk.so:libnativewindow.so:libsync.so:libvndksupport.so:libclang_rt.asan-x86_64-android.so:libclang_rt.ubsan_standalone-x86_64-android.so:libclang_rt.tsan-x86_64-android.so:libclang_rt.asan-i686-android.so:libclang_rt.ubsan_standalone-i686-android.so:libclang_rt.tsan-i686-android.so 110 111 ############################################################################### 112 # Namespace config for vendor processes. In O, no restriction is enforced for 113 # them. However, in O-MR1, access to /system/${LIB} will not be allowed to 114 # the default namespace. 'system' namespace will be added to give limited 115 # (LL-NDK only) access. 116 ############################################################################### 117 [vendor] 118 additional.namespaces = system 119 120 ############################################################################### 121 # "default" namespace 122 # 123 # Vendor-side code runs in this namespace. 124 ############################################################################### 125 namespace.default.isolated = true 126 namespace.default.visible = true 127 128 namespace.default.search.paths = /vendor/${LIB}/hw:/vendor/${LIB}/egl:/vendor/${LIB}:/vendor/${LIB}/vndk:/system/${LIB}/vndk-27:/vendor/${LIB}/vndk-sp:/system/${LIB}/vndk-sp-27 129 namespace.default.permitted.paths = /vendor:/system/${LIB}/vndk-27:/system/${LIB}/vndk-sp-27 130 131 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-27:/system/${LIB}/vndk-27:/data/asan/vendor/${LIB}/vndk-sp:/vendor/${LIB}/vndk-sp:/data/asan/system/${LIB}/vndk-sp-27:/system/${LIB}/vndk-sp-27 132 namespace.default.asan.permitted.paths = /data/asan/vendor:/vendor:/data/asan/system/${LIB}/vndk-27:/system/${LIB}/vndk-27:/data/asan/system/${LIB}/vndk-sp-27:/system/${LIB}/vndk-sp-27 133 134 namespace.default.links = system 135 namespace.default.link.system.shared_libs = libEGL.so:libGLESv1_CM.so:libGLESv2.so:libGLESv3.so:libRS.so:libandroid_net.so:libc.so:libdl.so:libft2.so:liblog.so:libm.so:libmediandk.so:libnativewindow.so:libsync.so:libvndksupport.so 136 137 ############################################################################### 138 # "system" namespace 139 # 140 # This is for vendor process to use LL-NDK in system partition. 141 ############################################################################### 142 namespace.system.isolated = false 143 namespace.system.search.paths = /system/${LIB} 144 namespace.system.permitted.paths = /system/${LIB} 145 146 namespace.system.asan.search.paths = /data/asan/system/${LIB}:/system/${LIB} 147 namespace.system.asan.permitted.paths = /data/asan/system/${LIB}:/system/${LIB} 148