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