Pierre-Hugues Husson | 5fcaeb3 | 2018-02-14 22:05:41 +0100 | [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. |
| 7 | dir.system = /system/bin/ |
| 8 | dir.system = /system/xbin/ |
| 9 | dir.vendor = /vendor/bin/ |
| 10 | dir.vendor = /data/nativetest/vendor |
| 11 | dir.vendor = /data/nativetest64/vendor |
| 12 | dir.vendor = /data/benchmarktest/vendor |
| 13 | dir.vendor = /data/benchmarktest64/vendor |
| 14 | dir.system = /data/nativetest |
| 15 | dir.system = /data/nativetest64 |
| 16 | dir.system = /data/benchmarktest |
| 17 | dir.system = /data/benchmarktest64 |
| 18 | |
| 19 | [system] |
| 20 | additional.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 | ############################################################################### |
| 28 | namespace.default.isolated = false |
| 29 | namespace.default.search.paths = /system/${LIB}:/vendor/${LIB} |
| 30 | namespace.default.permitted.paths = /system/${LIB}:/vendor/${LIB} |
| 31 | |
| 32 | namespace.default.asan.search.paths = /data/asan/system/${LIB}:/system/${LIB}:/data/asan/vendor/${LIB}:/vendor/${LIB} |
| 33 | namespace.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 | ############################################################################### |
| 58 | namespace.sphal.isolated = true |
| 59 | namespace.sphal.visible = true |
| 60 | namespace.sphal.search.paths = /vendor/${LIB}/egl:/vendor/${LIB}/hw:/vendor/${LIB} |
Pierre-Hugues Husson | 2623dc5 | 2018-08-07 12:49:42 +0200 | [diff] [blame] | 61 | namespace.sphal.permitted.paths = /vendor/${LIB}:/system/${LIB}/vndk-sp-27/hw |
Pierre-Hugues Husson | 5fcaeb3 | 2018-02-14 22:05:41 +0100 | [diff] [blame] | 62 | |
| 63 | 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} |
| 64 | namespace.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. |
| 68 | namespace.sphal.links = default,vndk,rs |
| 69 | |
| 70 | # WARNING: only NDK libs can be listed here. |
| 71 | namespace.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. |
| 74 | namespace.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 |
| 77 | namespace.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 | ############################################################################### |
| 87 | namespace.rs.isolated = true |
| 88 | namespace.rs.visible = true |
Pierre-Hugues Husson | 2623dc5 | 2018-08-07 12:49:42 +0200 | [diff] [blame] | 89 | namespace.rs.search.paths = /vendor/${LIB}/vndk-sp:/system/${LIB}/vndk-sp-27:/vendor/${LIB} |
Pierre-Hugues Husson | 5fcaeb3 | 2018-02-14 22:05:41 +0100 | [diff] [blame] | 90 | namespace.rs.permitted.paths = /vendor/${LIB}:/data |
| 91 | |
Pierre-Hugues Husson | 2623dc5 | 2018-08-07 12:49:42 +0200 | [diff] [blame] | 92 | 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} |
Pierre-Hugues Husson | 5fcaeb3 | 2018-02-14 22:05:41 +0100 | [diff] [blame] | 93 | namespace.rs.asan.permitted.paths = /data/asan/vendor/${LIB}:/vendor/${LIB}:/data |
| 94 | |
| 95 | namespace.rs.links = default,vndk |
| 96 | namespace.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 |
| 97 | namespace.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 | ############################################################################### |
| 104 | namespace.vndk.isolated = true |
| 105 | namespace.vndk.visible = true |
Pierre-Hugues Husson | 2623dc5 | 2018-08-07 12:49:42 +0200 | [diff] [blame] | 106 | namespace.vndk.search.paths = /vendor/${LIB}/vndk-sp:/system/${LIB}/vndk-sp-27 |
Pierre-Hugues Husson | 5fcaeb3 | 2018-02-14 22:05:41 +0100 | [diff] [blame] | 107 | namespace.vndk.permitted.paths = /vendor/${LIB}/hw:/vendor/${LIB}/egl |
| 108 | |
| 109 | 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 |
| 110 | namespace.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. |
| 115 | namespace.vndk.links = default |
| 116 | namespace.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] |
| 125 | namespace.default.isolated = false |
Pierre-Hugues Husson | 2623dc5 | 2018-08-07 12:49:42 +0200 | [diff] [blame] | 126 | namespace.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 Husson | 5fcaeb3 | 2018-02-14 22:05:41 +0100 | [diff] [blame] | 127 | |
| 128 | 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/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} |