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 |
Steven Moreland | ab338c1 | 2017-11-28 12:41:56 -0800 | [diff] [blame] | 7 | # absolute path of an executable is selected. |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 8 | dir.system = /system/bin/ |
| 9 | dir.system = /system/xbin/ |
Doheon Lee | cccad0b | 2018-06-19 15:23:21 +0900 | [diff] [blame] | 10 | dir.system = /%PRODUCT%/bin/ |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 11 | |
| 12 | dir.vendor = /odm/bin/ |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 13 | dir.vendor = /vendor/bin/ |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 14 | dir.vendor = /data/nativetest/odm |
| 15 | dir.vendor = /data/nativetest64/odm |
| 16 | dir.vendor = /data/benchmarktest/odm |
| 17 | dir.vendor = /data/benchmarktest64/odm |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 18 | dir.vendor = /data/nativetest/vendor |
| 19 | dir.vendor = /data/nativetest64/vendor |
| 20 | dir.vendor = /data/benchmarktest/vendor |
| 21 | dir.vendor = /data/benchmarktest64/vendor |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 22 | |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 23 | dir.system = /data/nativetest |
| 24 | dir.system = /data/nativetest64 |
| 25 | dir.system = /data/benchmarktest |
| 26 | dir.system = /data/benchmarktest64 |
Martin Stjernholm | 4a7138f | 2019-02-01 17:02:05 +0000 | [diff] [blame] | 27 | # TODO(b/123864775): Ensure tests are run from one of the directories above and |
| 28 | # remove this. |
| 29 | dir.system = /data/local/tmp |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 30 | |
Jiyong Park | d7e6cb2 | 2018-03-20 01:12:31 +0900 | [diff] [blame] | 31 | dir.postinstall = /postinstall |
| 32 | |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 33 | [system] |
chenbruce | aa87fd5 | 2019-01-24 13:01:21 +0800 | [diff] [blame] | 34 | additional.namespaces = runtime,conscrypt,media,resolv,sphal,vndk,rs |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 35 | |
| 36 | ############################################################################### |
| 37 | # "default" namespace |
| 38 | # |
Jiyong Park | 55f05d7 | 2017-08-28 14:42:49 +0900 | [diff] [blame] | 39 | # Framework-side code runs in this namespace. Libs from /vendor partition |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 40 | # can't be loaded in this namespace. |
| 41 | ############################################################################### |
Jiyong Park | 55f05d7 | 2017-08-28 14:42:49 +0900 | [diff] [blame] | 42 | namespace.default.isolated = true |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 43 | |
Roland Levillain | 9b79db5 | 2018-12-11 10:20:33 +0000 | [diff] [blame] | 44 | namespace.default.search.paths = /system/${LIB} |
Doheon Lee | cccad0b | 2018-06-19 15:23:21 +0900 | [diff] [blame] | 45 | namespace.default.search.paths += /%PRODUCT%/${LIB} |
Dario Freni | ad58bf9 | 2018-08-17 00:20:11 +0100 | [diff] [blame] | 46 | namespace.default.search.paths += /%PRODUCT_SERVICES%/${LIB} |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 47 | |
| 48 | # We can't have entire /system/${LIB} as permitted paths because doing so |
| 49 | # makes it possible to load libs in /system/${LIB}/vndk* directories by |
| 50 | # their absolute paths (e.g. dlopen("/system/lib/vndk/libbase.so");). |
| 51 | # VNDK libs are built with previous versions of Android and thus must not be |
| 52 | # loaded into this namespace where libs built with the current version of |
| 53 | # Android are loaded. Mixing the two types of libs in the same namespace can |
| 54 | # cause unexpected problem. |
| 55 | namespace.default.permitted.paths = /system/${LIB}/drm |
| 56 | namespace.default.permitted.paths += /system/${LIB}/extractors |
| 57 | namespace.default.permitted.paths += /system/${LIB}/hw |
Doheon Lee | cccad0b | 2018-06-19 15:23:21 +0900 | [diff] [blame] | 58 | namespace.default.permitted.paths += /%PRODUCT%/${LIB} |
Dario Freni | ad58bf9 | 2018-08-17 00:20:11 +0100 | [diff] [blame] | 59 | namespace.default.permitted.paths += /%PRODUCT_SERVICES%/${LIB} |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 60 | # These are where odex files are located. libart has to be able to dlopen the files |
| 61 | namespace.default.permitted.paths += /system/framework |
| 62 | namespace.default.permitted.paths += /system/app |
| 63 | namespace.default.permitted.paths += /system/priv-app |
| 64 | namespace.default.permitted.paths += /vendor/framework |
| 65 | namespace.default.permitted.paths += /vendor/app |
| 66 | namespace.default.permitted.paths += /vendor/priv-app |
Bowgo Tsai | 39476ff | 2018-03-14 16:19:03 +0800 | [diff] [blame] | 67 | namespace.default.permitted.paths += /odm/framework |
| 68 | namespace.default.permitted.paths += /odm/app |
| 69 | namespace.default.permitted.paths += /odm/priv-app |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 70 | namespace.default.permitted.paths += /oem/app |
Doheon Lee | cccad0b | 2018-06-19 15:23:21 +0900 | [diff] [blame] | 71 | namespace.default.permitted.paths += /%PRODUCT%/framework |
| 72 | namespace.default.permitted.paths += /%PRODUCT%/app |
| 73 | namespace.default.permitted.paths += /%PRODUCT%/priv-app |
Dario Freni | ad58bf9 | 2018-08-17 00:20:11 +0100 | [diff] [blame] | 74 | namespace.default.permitted.paths += /%PRODUCT_SERVICES%/framework |
| 75 | namespace.default.permitted.paths += /%PRODUCT_SERVICES%/app |
| 76 | namespace.default.permitted.paths += /%PRODUCT_SERVICES%/priv-app |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 77 | namespace.default.permitted.paths += /data |
| 78 | namespace.default.permitted.paths += /mnt/expand |
Jiyong Park | 6866041 | 2019-01-16 23:00:59 +0900 | [diff] [blame] | 79 | namespace.default.permitted.paths += /bionic/${LIB} |
| 80 | namespace.default.permitted.paths += /system/${LIB}/bootstrap |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 81 | |
| 82 | namespace.default.asan.search.paths = /data/asan/system/${LIB} |
| 83 | namespace.default.asan.search.paths += /system/${LIB} |
Anton Hansson | 2dae6f0 | 2019-02-05 12:36:58 +0000 | [diff] [blame] | 84 | namespace.default.asan.search.paths += /data/asan/%PRODUCT%/${LIB} |
Anton Hansson | 0244428 | 2018-09-19 00:39:39 +0100 | [diff] [blame] | 85 | namespace.default.asan.search.paths += /%PRODUCT%/${LIB} |
Anton Hansson | 2dae6f0 | 2019-02-05 12:36:58 +0000 | [diff] [blame] | 86 | namespace.default.asan.search.paths += /data/asan/%PRODUCT_SERVICES%/${LIB} |
Anton Hansson | 0244428 | 2018-09-19 00:39:39 +0100 | [diff] [blame] | 87 | namespace.default.asan.search.paths += /%PRODUCT_SERVICES%/${LIB} |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 88 | |
| 89 | namespace.default.asan.permitted.paths = /data |
| 90 | namespace.default.asan.permitted.paths += /system/${LIB}/drm |
| 91 | namespace.default.asan.permitted.paths += /system/${LIB}/extractors |
| 92 | namespace.default.asan.permitted.paths += /system/${LIB}/hw |
| 93 | namespace.default.asan.permitted.paths += /system/framework |
| 94 | namespace.default.asan.permitted.paths += /system/app |
| 95 | namespace.default.asan.permitted.paths += /system/priv-app |
| 96 | namespace.default.asan.permitted.paths += /vendor/framework |
| 97 | namespace.default.asan.permitted.paths += /vendor/app |
| 98 | namespace.default.asan.permitted.paths += /vendor/priv-app |
Bowgo Tsai | 39476ff | 2018-03-14 16:19:03 +0800 | [diff] [blame] | 99 | namespace.default.asan.permitted.paths += /odm/framework |
| 100 | namespace.default.asan.permitted.paths += /odm/app |
| 101 | namespace.default.asan.permitted.paths += /odm/priv-app |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 102 | namespace.default.asan.permitted.paths += /oem/app |
Doheon Lee | cccad0b | 2018-06-19 15:23:21 +0900 | [diff] [blame] | 103 | namespace.default.asan.permitted.paths += /%PRODUCT%/${LIB} |
| 104 | namespace.default.asan.permitted.paths += /%PRODUCT%/framework |
| 105 | namespace.default.asan.permitted.paths += /%PRODUCT%/app |
| 106 | namespace.default.asan.permitted.paths += /%PRODUCT%/priv-app |
Dario Freni | ad58bf9 | 2018-08-17 00:20:11 +0100 | [diff] [blame] | 107 | namespace.default.asan.permitted.paths += /%PRODUCT_SERVICES%/${LIB} |
| 108 | namespace.default.asan.permitted.paths += /%PRODUCT_SERVICES%/framework |
| 109 | namespace.default.asan.permitted.paths += /%PRODUCT_SERVICES%/app |
| 110 | namespace.default.asan.permitted.paths += /%PRODUCT_SERVICES%/priv-app |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 111 | namespace.default.asan.permitted.paths += /mnt/expand |
Jiyong Park | 6866041 | 2019-01-16 23:00:59 +0900 | [diff] [blame] | 112 | namespace.default.asan.permitted.paths += /bionic/${LIB} |
| 113 | namespace.default.asan.permitted.paths += /system/${LIB}/bootstrap |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 114 | |
Martin Stjernholm | e71d91e | 2018-12-19 20:39:09 +0000 | [diff] [blame] | 115 | # Keep in sync with ld.config.txt in the com.android.runtime APEX. |
chenbruce | d771740 | 2019-01-29 11:52:41 +0800 | [diff] [blame] | 116 | # If a shared library or an executable requests a shared library that |
| 117 | # cannot be loaded into the default namespace, the dynamic linker tries |
| 118 | # to load the shared library from the runtime namespace.And then, if the |
| 119 | # shared library cannot be loaded from the runtime namespace either, the |
| 120 | # dynamic linker tries to load the shared library from the resolv namespace. |
| 121 | # Finally, if all attempts fail, the dynamic linker returns an error. |
chenbruce | aa87fd5 | 2019-01-24 13:01:21 +0800 | [diff] [blame] | 122 | namespace.default.links = runtime,resolv |
Martin Stjernholm | 1fc8a55 | 2019-01-22 14:32:46 +0000 | [diff] [blame] | 123 | # Visible because some libraries are dlopen'ed, e.g. libopenjdk is dlopen'ed by |
| 124 | # libart. |
| 125 | namespace.default.visible = true |
Jiyong Park | 3fa8415 | 2019-01-03 22:08:40 +0900 | [diff] [blame] | 126 | namespace.default.link.runtime.shared_libs = libart.so:libartd.so |
Martin Stjernholm | c02464c | 2019-01-17 21:26:48 +0000 | [diff] [blame] | 127 | namespace.default.link.runtime.shared_libs += libdexfile_external.so |
Martin Stjernholm | e71d91e | 2018-12-19 20:39:09 +0000 | [diff] [blame] | 128 | namespace.default.link.runtime.shared_libs += libnativebridge.so |
| 129 | namespace.default.link.runtime.shared_libs += libnativehelper.so |
| 130 | namespace.default.link.runtime.shared_libs += libnativeloader.so |
| 131 | |
chenbruce | d771740 | 2019-01-29 11:52:41 +0800 | [diff] [blame] | 132 | # When libnetd_resolv.so can't be found in the default namespace, search for it |
| 133 | # in the resolv namespace. Don't allow any other libraries from the resolv namespace |
| 134 | # to be loaded in the default namespace. |
chenbruce | aa87fd5 | 2019-01-24 13:01:21 +0800 | [diff] [blame] | 135 | namespace.default.link.resolv.shared_libs = libnetd_resolv.so |
| 136 | |
Martin Stjernholm | e71d91e | 2018-12-19 20:39:09 +0000 | [diff] [blame] | 137 | ############################################################################### |
| 138 | # "runtime" APEX namespace |
| 139 | # |
| 140 | # This namespace exposes externally accessible libraries from the Runtime APEX. |
| 141 | ############################################################################### |
| 142 | namespace.runtime.isolated = true |
Nicolas Geoffray | a9b4f2b | 2019-01-26 01:06:43 +0000 | [diff] [blame] | 143 | namespace.runtime.visible = true |
Martin Stjernholm | e71d91e | 2018-12-19 20:39:09 +0000 | [diff] [blame] | 144 | |
| 145 | # Keep in sync with ld.config.txt in the com.android.runtime APEX. |
| 146 | namespace.runtime.search.paths = /apex/com.android.runtime/${LIB} |
Jiyong Park | 59e355c | 2019-01-24 15:08:06 +0900 | [diff] [blame] | 147 | namespace.runtime.asan.search.paths = /apex/com.android.runtime/${LIB} |
Martin Stjernholm | e71d91e | 2018-12-19 20:39:09 +0000 | [diff] [blame] | 148 | namespace.runtime.links = default |
| 149 | # TODO(b/119867084): Restrict to Bionic dlopen dependencies and PALette library |
| 150 | # when it exists. |
| 151 | namespace.runtime.link.default.allow_all_shared_libs = true |
| 152 | |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 153 | ############################################################################### |
Dongwon Kang | c19263b | 2019-01-21 10:47:39 -0800 | [diff] [blame] | 154 | # "media" APEX namespace |
| 155 | # |
| 156 | # This namespace is for libraries within the media APEX. |
| 157 | ############################################################################### |
| 158 | namespace.media.isolated = true |
| 159 | namespace.media.visible = true |
| 160 | |
| 161 | namespace.media.search.paths = /apex/com.android.media/${LIB} |
Jiyong Park | 59e355c | 2019-01-24 15:08:06 +0900 | [diff] [blame] | 162 | namespace.media.asan.search.paths = /apex/com.android.media/${LIB} |
Dongwon Kang | c19263b | 2019-01-21 10:47:39 -0800 | [diff] [blame] | 163 | |
| 164 | namespace.media.links = default |
| 165 | namespace.media.link.default.shared_libs = %LLNDK_LIBRARIES% |
| 166 | namespace.media.link.default.shared_libs += libandroid.so |
| 167 | namespace.media.link.default.shared_libs += libbinder_ndk.so |
Ray Essick | baa0ce3 | 2019-01-24 13:03:02 -0800 | [diff] [blame] | 168 | namespace.media.link.default.shared_libs += libmediametrics.so |
Dongwon Kang | c19263b | 2019-01-21 10:47:39 -0800 | [diff] [blame] | 169 | namespace.media.link.default.shared_libs += %SANITIZER_RUNTIME_LIBRARIES% |
| 170 | |
| 171 | ############################################################################### |
Nicolas Geoffray | 890e3bf | 2019-01-22 09:11:57 +0000 | [diff] [blame] | 172 | # "conscrypt" APEX namespace |
| 173 | # |
| 174 | # This namespace is for libraries within the conscrypt APEX. |
| 175 | ############################################################################### |
| 176 | namespace.conscrypt.isolated = true |
| 177 | namespace.conscrypt.visible = true |
| 178 | |
Nicolas Geoffray | 88bdf80 | 2019-01-22 14:52:51 +0000 | [diff] [blame] | 179 | # Keep in sync with ld.config.txt in the com.android.runtime APEX. |
Nicolas Geoffray | 890e3bf | 2019-01-22 09:11:57 +0000 | [diff] [blame] | 180 | namespace.conscrypt.search.paths = /apex/com.android.conscrypt/${LIB} |
Jiyong Park | 59e355c | 2019-01-24 15:08:06 +0900 | [diff] [blame] | 181 | namespace.conscrypt.asan.search.paths = /apex/com.android.conscrypt/${LIB} |
Pete Bentley | 7b967bf | 2019-01-30 18:35:48 +0000 | [diff] [blame] | 182 | namespace.conscrypt.links = runtime,default |
| 183 | namespace.conscrypt.link.runtime.shared_libs = libjavacore.so |
Nicolas Geoffray | 88bdf80 | 2019-01-22 14:52:51 +0000 | [diff] [blame] | 184 | namespace.conscrypt.link.default.shared_libs = libc.so |
| 185 | namespace.conscrypt.link.default.shared_libs += libm.so |
| 186 | namespace.conscrypt.link.default.shared_libs += libdl.so |
Nicolas Geoffray | 890e3bf | 2019-01-22 09:11:57 +0000 | [diff] [blame] | 187 | |
| 188 | ############################################################################### |
chenbruce | aa87fd5 | 2019-01-24 13:01:21 +0800 | [diff] [blame] | 189 | # "resolv" APEX namespace |
| 190 | # |
| 191 | # This namespace is for libraries within the resolv APEX. |
| 192 | ############################################################################### |
| 193 | namespace.resolv.isolated = true |
| 194 | namespace.resolv.visible = true |
| 195 | |
| 196 | namespace.resolv.search.paths = /apex/com.android.resolv/${LIB} |
| 197 | namespace.resolv.asan.search.paths = /apex/com.android.resolv/${LIB} |
| 198 | namespace.resolv.links = default |
| 199 | namespace.resolv.link.default.shared_libs = libc.so |
| 200 | namespace.resolv.link.default.shared_libs += libm.so |
| 201 | namespace.resolv.link.default.shared_libs += libdl.so |
| 202 | namespace.resolv.link.default.shared_libs += libbinder_ndk.so |
Dongwon Kang | 9dff515 | 2019-02-08 14:00:35 -0800 | [diff] [blame^] | 203 | namespace.resolv.link.default.shared_libs += libvndksupport.so |
chenbruce | aa87fd5 | 2019-01-24 13:01:21 +0800 | [diff] [blame] | 204 | |
| 205 | ############################################################################### |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 206 | # "sphal" namespace |
| 207 | # |
| 208 | # SP-HAL(Sameprocess-HAL)s are the only vendor libraries that are allowed to be |
| 209 | # loaded inside system processes. libEGL_<chipset>.so, libGLESv2_<chipset>.so, |
| 210 | # android.hardware.graphics.mapper@2.0-impl.so, etc are SP-HALs. |
| 211 | # |
| 212 | # This namespace is exclusivly for SP-HALs. When the framework tries to dynami- |
| 213 | # cally load SP-HALs, android_dlopen_ext() is used to explicitly specifying |
| 214 | # that they should be searched and loaded from this namespace. |
| 215 | # |
| 216 | # Note that there is no link from the default namespace to this namespace. |
| 217 | ############################################################################### |
| 218 | namespace.sphal.isolated = true |
| 219 | namespace.sphal.visible = true |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 220 | |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 221 | namespace.sphal.search.paths = /odm/${LIB} |
| 222 | namespace.sphal.search.paths += /vendor/${LIB} |
Jesse Hall | bdebda2 | 2019-01-31 17:50:17 -0800 | [diff] [blame] | 223 | namespace.sphal.search.paths += /vendor/${LIB}/hw |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 224 | |
| 225 | namespace.sphal.permitted.paths = /odm/${LIB} |
| 226 | namespace.sphal.permitted.paths += /vendor/${LIB} |
| 227 | |
| 228 | namespace.sphal.asan.search.paths = /data/asan/odm/${LIB} |
| 229 | namespace.sphal.asan.search.paths += /odm/${LIB} |
| 230 | namespace.sphal.asan.search.paths += /data/asan/vendor/${LIB} |
| 231 | namespace.sphal.asan.search.paths += /vendor/${LIB} |
| 232 | |
| 233 | namespace.sphal.asan.permitted.paths = /data/asan/odm/${LIB} |
| 234 | namespace.sphal.asan.permitted.paths += /odm/${LIB} |
| 235 | namespace.sphal.asan.permitted.paths += /data/asan/vendor/${LIB} |
| 236 | namespace.sphal.asan.permitted.paths += /vendor/${LIB} |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 237 | |
| 238 | # Once in this namespace, access to libraries in /system/lib is restricted. Only |
| 239 | # libs listed here can be used. |
Jiyong Park | 3fa8415 | 2019-01-03 22:08:40 +0900 | [diff] [blame] | 240 | namespace.sphal.links = default,vndk,rs |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 241 | |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 242 | namespace.sphal.link.default.shared_libs = %LLNDK_LIBRARIES% |
| 243 | namespace.sphal.link.default.shared_libs += %SANITIZER_RUNTIME_LIBRARIES% |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 244 | |
Jiyong Park | 3679846 | 2017-08-04 19:08:06 +0900 | [diff] [blame] | 245 | namespace.sphal.link.vndk.shared_libs = %VNDK_SAMEPROCESS_LIBRARIES% |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 246 | |
| 247 | # Renderscript gets separate namespace |
| 248 | namespace.sphal.link.rs.shared_libs = libRS_internal.so |
| 249 | |
| 250 | ############################################################################### |
| 251 | # "rs" namespace |
| 252 | # |
| 253 | # This namespace is exclusively for Renderscript internal libraries. |
| 254 | # This namespace has slightly looser restriction than the vndk namespace because |
| 255 | # of the genuine characteristics of Renderscript; /data is in the permitted path |
| 256 | # to load the compiled *.so file and libmediandk.so can be used here. |
| 257 | ############################################################################### |
| 258 | namespace.rs.isolated = true |
| 259 | namespace.rs.visible = true |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 260 | |
Jiyong Park | 60a2966 | 2017-12-13 16:59:21 +0900 | [diff] [blame] | 261 | namespace.rs.search.paths = /odm/${LIB}/vndk-sp |
| 262 | namespace.rs.search.paths += /vendor/${LIB}/vndk-sp |
Justin Yun | cbbf195 | 2018-01-16 11:46:21 +0900 | [diff] [blame] | 263 | namespace.rs.search.paths += /system/${LIB}/vndk-sp%VNDK_VER% |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 264 | namespace.rs.search.paths += /odm/${LIB} |
| 265 | namespace.rs.search.paths += /vendor/${LIB} |
| 266 | |
| 267 | namespace.rs.permitted.paths = /odm/${LIB} |
| 268 | namespace.rs.permitted.paths += /vendor/${LIB} |
| 269 | namespace.rs.permitted.paths += /data |
| 270 | |
Jiyong Park | 60a2966 | 2017-12-13 16:59:21 +0900 | [diff] [blame] | 271 | namespace.rs.asan.search.paths = /data/asan/odm/${LIB}/vndk-sp |
| 272 | namespace.rs.asan.search.paths += /odm/${LIB}/vndk-sp |
| 273 | namespace.rs.asan.search.paths += /data/asan/vendor/${LIB}/vndk-sp |
| 274 | namespace.rs.asan.search.paths += /vendor/${LIB}/vndk-sp |
Justin Yun | cbbf195 | 2018-01-16 11:46:21 +0900 | [diff] [blame] | 275 | namespace.rs.asan.search.paths += /data/asan/system/${LIB}/vndk-sp%VNDK_VER% |
| 276 | namespace.rs.asan.search.paths += /system/${LIB}/vndk-sp%VNDK_VER% |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 277 | namespace.rs.asan.search.paths += /data/asan/odm/${LIB} |
| 278 | namespace.rs.asan.search.paths += /odm/${LIB} |
| 279 | namespace.rs.asan.search.paths += /data/asan/vendor/${LIB} |
| 280 | namespace.rs.asan.search.paths += /vendor/${LIB} |
| 281 | |
| 282 | namespace.rs.asan.permitted.paths = /data/asan/odm/${LIB} |
| 283 | namespace.rs.asan.permitted.paths += /odm/${LIB} |
| 284 | namespace.rs.asan.permitted.paths += /data/asan/vendor/${LIB} |
| 285 | namespace.rs.asan.permitted.paths += /vendor/${LIB} |
| 286 | namespace.rs.asan.permitted.paths += /data |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 287 | |
Jiyong Park | 3fa8415 | 2019-01-03 22:08:40 +0900 | [diff] [blame] | 288 | namespace.rs.links = default,vndk |
Martin Stjernholm | e71d91e | 2018-12-19 20:39:09 +0000 | [diff] [blame] | 289 | |
| 290 | namespace.rs.link.default.shared_libs = %LLNDK_LIBRARIES% |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 291 | namespace.rs.link.default.shared_libs += %SANITIZER_RUNTIME_LIBRARIES% |
Jiyong Park | ad7ddd5 | 2017-12-07 09:59:48 +0900 | [diff] [blame] | 292 | # Private LLNDK libs (e.g. libft2.so) are exceptionally allowed to this |
| 293 | # namespace because RS framework libs are using them. |
| 294 | namespace.rs.link.default.shared_libs += %PRIVATE_LLNDK_LIBRARIES% |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 295 | |
Jiyong Park | 3679846 | 2017-08-04 19:08:06 +0900 | [diff] [blame] | 296 | namespace.rs.link.vndk.shared_libs = %VNDK_SAMEPROCESS_LIBRARIES% |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 297 | |
| 298 | ############################################################################### |
| 299 | # "vndk" namespace |
| 300 | # |
| 301 | # This namespace is exclusively for vndk-sp libs. |
| 302 | ############################################################################### |
| 303 | namespace.vndk.isolated = true |
Jiyong Park | a07f305 | 2017-08-22 10:26:10 +0900 | [diff] [blame] | 304 | namespace.vndk.visible = true |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 305 | |
Jiyong Park | 60a2966 | 2017-12-13 16:59:21 +0900 | [diff] [blame] | 306 | namespace.vndk.search.paths = /odm/${LIB}/vndk-sp |
| 307 | namespace.vndk.search.paths += /vendor/${LIB}/vndk-sp |
Justin Yun | cbbf195 | 2018-01-16 11:46:21 +0900 | [diff] [blame] | 308 | namespace.vndk.search.paths += /system/${LIB}/vndk-sp%VNDK_VER% |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 309 | |
| 310 | namespace.vndk.permitted.paths = /odm/${LIB}/hw |
| 311 | namespace.vndk.permitted.paths += /odm/${LIB}/egl |
| 312 | namespace.vndk.permitted.paths += /vendor/${LIB}/hw |
| 313 | namespace.vndk.permitted.paths += /vendor/${LIB}/egl |
| 314 | # This is exceptionally required since android.hidl.memory@1.0-impl.so is here |
Justin Yun | cbbf195 | 2018-01-16 11:46:21 +0900 | [diff] [blame] | 315 | namespace.vndk.permitted.paths += /system/${LIB}/vndk-sp%VNDK_VER%/hw |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 316 | |
Jiyong Park | 60a2966 | 2017-12-13 16:59:21 +0900 | [diff] [blame] | 317 | namespace.vndk.asan.search.paths = /data/asan/odm/${LIB}/vndk-sp |
| 318 | namespace.vndk.asan.search.paths += /odm/${LIB}/vndk-sp |
| 319 | namespace.vndk.asan.search.paths += /data/asan/vendor/${LIB}/vndk-sp |
| 320 | namespace.vndk.asan.search.paths += /vendor/${LIB}/vndk-sp |
Justin Yun | cbbf195 | 2018-01-16 11:46:21 +0900 | [diff] [blame] | 321 | namespace.vndk.asan.search.paths += /data/asan/system/${LIB}/vndk-sp%VNDK_VER% |
| 322 | namespace.vndk.asan.search.paths += /system/${LIB}/vndk-sp%VNDK_VER% |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 323 | |
| 324 | namespace.vndk.asan.permitted.paths = /data/asan/odm/${LIB}/hw |
| 325 | namespace.vndk.asan.permitted.paths += /odm/${LIB}/hw |
| 326 | namespace.vndk.asan.permitted.paths += /data/asan/odm/${LIB}/egl |
| 327 | namespace.vndk.asan.permitted.paths += /odm/${LIB}/egl |
| 328 | namespace.vndk.asan.permitted.paths += /data/asan/vendor/${LIB}/hw |
| 329 | namespace.vndk.asan.permitted.paths += /vendor/${LIB}/hw |
| 330 | namespace.vndk.asan.permitted.paths += /data/asan/vendor/${LIB}/egl |
| 331 | namespace.vndk.asan.permitted.paths += /vendor/${LIB}/egl |
| 332 | |
Justin Yun | cbbf195 | 2018-01-16 11:46:21 +0900 | [diff] [blame] | 333 | namespace.vndk.asan.permitted.paths += /data/asan/system/${LIB}/vndk-sp%VNDK_VER%/hw |
| 334 | namespace.vndk.asan.permitted.paths += /system/${LIB}/vndk-sp%VNDK_VER%/hw |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 335 | |
Jiyong Park | 3fa8415 | 2019-01-03 22:08:40 +0900 | [diff] [blame] | 336 | # The "vndk" namespace links to "default" namespace for LLNDK libs and links to |
| 337 | # "sphal" namespace for vendor libs. The ordering matters. The "default" |
| 338 | # namespace has higher priority than the "sphal" namespace. |
| 339 | namespace.vndk.links = default,sphal |
Logan Chien | 8667747 | 2018-03-29 14:08:48 +0800 | [diff] [blame] | 340 | |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 341 | # When these NDK libs are required inside this namespace, then it is redirected |
| 342 | # to the default namespace. This is possible since their ABI is stable across |
| 343 | # Android releases. |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 344 | namespace.vndk.link.default.shared_libs = %LLNDK_LIBRARIES% |
| 345 | namespace.vndk.link.default.shared_libs += %SANITIZER_RUNTIME_LIBRARIES% |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 346 | |
Logan Chien | 8667747 | 2018-03-29 14:08:48 +0800 | [diff] [blame] | 347 | # Allow VNDK-SP extensions to use vendor libraries |
| 348 | namespace.vndk.link.sphal.allow_all_shared_libs = true |
| 349 | |
Martin Stjernholm | e71d91e | 2018-12-19 20:39:09 +0000 | [diff] [blame] | 350 | |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 351 | ############################################################################### |
| 352 | # Namespace config for vendor processes. In O, no restriction is enforced for |
| 353 | # them. However, in O-MR1, access to /system/${LIB} will not be allowed to |
| 354 | # the default namespace. 'system' namespace will be added to give limited |
| 355 | # (LL-NDK only) access. |
| 356 | ############################################################################### |
| 357 | [vendor] |
Martin Stjernholm | c02464c | 2019-01-17 21:26:48 +0000 | [diff] [blame] | 358 | additional.namespaces = runtime,system,vndk |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 359 | |
| 360 | ############################################################################### |
| 361 | # "default" namespace |
| 362 | # |
Jiyong Park | ad7ddd5 | 2017-12-07 09:59:48 +0900 | [diff] [blame] | 363 | # This is the default linker namespace for a vendor process (a process started |
| 364 | # from /vendor/bin/*). The main executable and the libs under /vendor/lib[64] |
| 365 | # are loaded directly into this namespace. However, other libs under the system |
| 366 | # partition (VNDK and LLNDK libraries) are not loaded here but from the |
| 367 | # separate namespace 'system'. The delegation to the system namespace is done |
| 368 | # via the 'namespace.default.link.system.shared_libs' property below. |
Justin Yun | 5579bf1 | 2019-01-25 19:19:36 +0900 | [diff] [blame] | 369 | # |
| 370 | # '#VNDK27#' TAG is only for building ld.config.27.txt for backward |
| 371 | # compatibility. (TODO:b/123390078) Move them to a separate file. |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 372 | ############################################################################### |
| 373 | namespace.default.isolated = true |
| 374 | namespace.default.visible = true |
| 375 | |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 376 | namespace.default.search.paths = /odm/${LIB} |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 377 | namespace.default.search.paths += /vendor/${LIB} |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 378 | |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 379 | namespace.default.permitted.paths = /odm |
| 380 | namespace.default.permitted.paths += /vendor |
Justin Yun | 5579bf1 | 2019-01-25 19:19:36 +0900 | [diff] [blame] | 381 | #VNDK27#namespace.default.search.paths += /vendor/${LIB}/hw |
| 382 | #VNDK27#namespace.default.search.paths += /vendor/${LIB}/egl |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 383 | |
| 384 | namespace.default.asan.search.paths = /data/asan/odm/${LIB} |
| 385 | namespace.default.asan.search.paths += /odm/${LIB} |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 386 | namespace.default.asan.search.paths += /data/asan/vendor/${LIB} |
| 387 | namespace.default.asan.search.paths += /vendor/${LIB} |
Justin Yun | 5579bf1 | 2019-01-25 19:19:36 +0900 | [diff] [blame] | 388 | #VNDK27#namespace.default.asan.search.paths += /data/asan/vendor/${LIB}/hw |
| 389 | #VNDK27#namespace.default.asan.search.paths += /vendor/${LIB}/hw |
| 390 | #VNDK27#namespace.default.asan.search.paths += /data/asan/vendor/${LIB}/egl |
| 391 | #VNDK27#namespace.default.asan.search.paths += /vendor/${LIB}/egl |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 392 | |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 393 | namespace.default.asan.permitted.paths = /data/asan/odm |
| 394 | namespace.default.asan.permitted.paths += /odm |
| 395 | namespace.default.asan.permitted.paths += /data/asan/vendor |
| 396 | namespace.default.asan.permitted.paths += /vendor |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 397 | |
Jiyong Park | 3fa8415 | 2019-01-03 22:08:40 +0900 | [diff] [blame] | 398 | namespace.default.links = system,vndk |
Logan Chien | 225b71d | 2017-12-15 22:19:57 +0800 | [diff] [blame] | 399 | namespace.default.link.system.shared_libs = %LLNDK_LIBRARIES% |
| 400 | namespace.default.link.vndk.shared_libs = %VNDK_SAMEPROCESS_LIBRARIES% |
| 401 | namespace.default.link.vndk.shared_libs += %VNDK_CORE_LIBRARIES% |
| 402 | |
| 403 | ############################################################################### |
Martin Stjernholm | c02464c | 2019-01-17 21:26:48 +0000 | [diff] [blame] | 404 | # "runtime" APEX namespace |
| 405 | # |
| 406 | # This namespace exposes externally accessible libraries from the Runtime APEX. |
| 407 | ############################################################################### |
| 408 | namespace.runtime.isolated = true |
| 409 | |
| 410 | # Keep in sync with ld.config.txt in the com.android.runtime APEX. |
| 411 | namespace.runtime.search.paths = /apex/com.android.runtime/${LIB} |
| 412 | namespace.runtime.links = system |
| 413 | # TODO(b/119867084): Restrict to Bionic dlopen dependencies and PALette library |
| 414 | # when it exists. |
| 415 | namespace.runtime.link.system.allow_all_shared_libs = true |
| 416 | |
| 417 | ############################################################################### |
Logan Chien | 225b71d | 2017-12-15 22:19:57 +0800 | [diff] [blame] | 418 | # "vndk" namespace |
| 419 | # |
| 420 | # This namespace is where VNDK and VNDK-SP libraries are loaded for |
| 421 | # a vendor process. |
| 422 | ############################################################################### |
| 423 | namespace.vndk.isolated = false |
| 424 | |
Logan Chien | 91b3fb4 | 2018-01-11 20:00:37 +0800 | [diff] [blame] | 425 | namespace.vndk.search.paths = /odm/${LIB}/vndk |
| 426 | namespace.vndk.search.paths += /odm/${LIB}/vndk-sp |
| 427 | namespace.vndk.search.paths += /vendor/${LIB}/vndk |
| 428 | namespace.vndk.search.paths += /vendor/${LIB}/vndk-sp |
| 429 | namespace.vndk.search.paths += /system/${LIB}/vndk-sp%VNDK_VER% |
Justin Yun | cbbf195 | 2018-01-16 11:46:21 +0900 | [diff] [blame] | 430 | namespace.vndk.search.paths += /system/${LIB}/vndk%VNDK_VER% |
Logan Chien | 225b71d | 2017-12-15 22:19:57 +0800 | [diff] [blame] | 431 | |
Logan Chien | 91b3fb4 | 2018-01-11 20:00:37 +0800 | [diff] [blame] | 432 | namespace.vndk.asan.search.paths = /data/asan/odm/${LIB}/vndk |
| 433 | namespace.vndk.asan.search.paths += /odm/${LIB}/vndk |
| 434 | namespace.vndk.asan.search.paths += /data/asan/odm/${LIB}/vndk-sp |
| 435 | namespace.vndk.asan.search.paths += /odm/${LIB}/vndk-sp |
| 436 | namespace.vndk.asan.search.paths += /data/asan/vendor/${LIB}/vndk |
| 437 | namespace.vndk.asan.search.paths += /vendor/${LIB}/vndk |
| 438 | namespace.vndk.asan.search.paths += /data/asan/vendor/${LIB}/vndk-sp |
| 439 | namespace.vndk.asan.search.paths += /vendor/${LIB}/vndk-sp |
| 440 | namespace.vndk.asan.search.paths += /data/asan/system/${LIB}/vndk-sp%VNDK_VER% |
Justin Yun | cbbf195 | 2018-01-16 11:46:21 +0900 | [diff] [blame] | 441 | namespace.vndk.asan.search.paths += /system/${LIB}/vndk-sp%VNDK_VER% |
| 442 | namespace.vndk.asan.search.paths += /data/asan/system/${LIB}/vndk%VNDK_VER% |
| 443 | namespace.vndk.asan.search.paths += /system/${LIB}/vndk%VNDK_VER% |
Logan Chien | 225b71d | 2017-12-15 22:19:57 +0800 | [diff] [blame] | 444 | |
| 445 | # When these NDK libs are required inside this namespace, then it is redirected |
| 446 | # to the system namespace. This is possible since their ABI is stable across |
| 447 | # Android releases. |
Jiyong Park | 3fa8415 | 2019-01-03 22:08:40 +0900 | [diff] [blame] | 448 | namespace.vndk.links = system,default |
Martin Stjernholm | e71d91e | 2018-12-19 20:39:09 +0000 | [diff] [blame] | 449 | |
Logan Chien | 225b71d | 2017-12-15 22:19:57 +0800 | [diff] [blame] | 450 | namespace.vndk.link.system.shared_libs = %LLNDK_LIBRARIES% |
| 451 | namespace.vndk.link.system.shared_libs += %SANITIZER_RUNTIME_LIBRARIES% |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 452 | |
Logan Chien | ea4a2bd | 2018-01-18 12:06:14 +0800 | [diff] [blame] | 453 | namespace.vndk.link.default.allow_all_shared_libs = true |
| 454 | |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 455 | ############################################################################### |
| 456 | # "system" namespace |
| 457 | # |
Jiyong Park | ad7ddd5 | 2017-12-07 09:59:48 +0900 | [diff] [blame] | 458 | # This namespace is where system libs (VNDK and LLNDK libs) are loaded for |
| 459 | # a vendor process. |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 460 | ############################################################################### |
| 461 | namespace.system.isolated = false |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 462 | |
Roland Levillain | 9b79db5 | 2018-12-11 10:20:33 +0000 | [diff] [blame] | 463 | namespace.system.search.paths = /system/${LIB} |
Doheon Lee | cccad0b | 2018-06-19 15:23:21 +0900 | [diff] [blame] | 464 | namespace.system.search.paths += /%PRODUCT%/${LIB} |
Dario Freni | ad58bf9 | 2018-08-17 00:20:11 +0100 | [diff] [blame] | 465 | namespace.system.search.paths += /%PRODUCT_SERVICES%/${LIB} |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 466 | |
Logan Chien | 225b71d | 2017-12-15 22:19:57 +0800 | [diff] [blame] | 467 | namespace.system.asan.search.paths = /data/asan/system/${LIB} |
Jiyong Park | 2498e1b | 2017-12-12 22:11:47 +0900 | [diff] [blame] | 468 | namespace.system.asan.search.paths += /system/${LIB} |
Inseob Kim | 67cb056 | 2018-05-04 11:39:12 +0900 | [diff] [blame] | 469 | namespace.system.asan.search.paths += /data/asan/product/${LIB} |
Anton Hansson | 0244428 | 2018-09-19 00:39:39 +0100 | [diff] [blame] | 470 | namespace.system.asan.search.paths += /%PRODUCT%/${LIB} |
Anton Hansson | ece0a74 | 2018-09-19 00:51:20 +0100 | [diff] [blame] | 471 | namespace.system.asan.search.paths += /data/asan/product_services/${LIB} |
| 472 | namespace.system.asan.search.paths += /%PRODUCT_SERVICES%/${LIB} |
Jiyong Park | d7e6cb2 | 2018-03-20 01:12:31 +0900 | [diff] [blame] | 473 | |
Martin Stjernholm | c02464c | 2019-01-17 21:26:48 +0000 | [diff] [blame] | 474 | namespace.system.links = runtime |
Martin Stjernholm | 60b259b | 2019-01-31 11:55:20 +0000 | [diff] [blame] | 475 | namespace.system.link.runtime.shared_libs = libdexfile_external.so |
| 476 | namespace.system.link.runtime.shared_libs += libnativebridge.so |
| 477 | namespace.system.link.runtime.shared_libs += libnativehelper.so |
| 478 | namespace.system.link.runtime.shared_libs += libnativeloader.so |
Martin Stjernholm | c02464c | 2019-01-17 21:26:48 +0000 | [diff] [blame] | 479 | |
Jiyong Park | d7e6cb2 | 2018-03-20 01:12:31 +0900 | [diff] [blame] | 480 | ############################################################################### |
| 481 | # Namespace config for binaries under /postinstall. |
Jiyong Park | 3fa8415 | 2019-01-03 22:08:40 +0900 | [diff] [blame] | 482 | # Only default namespace is defined and default has no directories |
Martin Stjernholm | e71d91e | 2018-12-19 20:39:09 +0000 | [diff] [blame] | 483 | # other than /system/lib in the search paths. This is because linker calls |
| 484 | # realpath on the search paths and this causes selinux denial if the paths |
| 485 | # (/vendor, /odm) are not allowed to the postinstall binaries. There is no |
| 486 | # reason to allow the binaries to access the paths. |
Jiyong Park | d7e6cb2 | 2018-03-20 01:12:31 +0900 | [diff] [blame] | 487 | ############################################################################### |
| 488 | [postinstall] |
| 489 | namespace.default.isolated = false |
Roland Levillain | 9b79db5 | 2018-12-11 10:20:33 +0000 | [diff] [blame] | 490 | namespace.default.search.paths = /system/${LIB} |
Doheon Lee | cccad0b | 2018-06-19 15:23:21 +0900 | [diff] [blame] | 491 | namespace.default.search.paths += /%PRODUCT%/${LIB} |
Dario Freni | ad58bf9 | 2018-08-17 00:20:11 +0100 | [diff] [blame] | 492 | namespace.default.search.paths += /%PRODUCT_SERVICES%/${LIB} |