Home | History | Annotate | Download | only in apex
      1 # Copyright (C) 2019 The Android Open Source Project
      2 #
      3 # Bionic loader config file for the media swcodec APEX.
      4 #
      5 # There are no versioned APEX paths here - this APEX module does not support
      6 # having several versions mounted.
      7 
      8 dir.swcodec = /apex/com.android.media.swcodec/bin/
      9 
     10 [swcodec]
     11 additional.namespaces = platform,sphal
     12 
     13 ###############################################################################
     14 # "default" namespace
     15 #
     16 # This namespace is for the binaries and libraries on the swcodec APEX.
     17 ###############################################################################
     18 
     19 namespace.default.isolated = true
     20 namespace.default.visible = true
     21 
     22 namespace.default.search.paths      = /apex/com.android.media.swcodec/${LIB}
     23 namespace.default.asan.search.paths = /apex/com.android.media.swcodec/${LIB}
     24 
     25 namespace.default.links = platform
     26 
     27 # TODO: replace the following when apex has a way to auto-generate this list
     28 # namespace.default.link.platform.shared_libs  = %LLNDK_LIBRARIES%
     29 # namespace.default.link.platform.shared_libs += %SANITIZER_RUNTIME_LIBRARIES%
     30 namespace.default.link.platform.shared_libs = libEGL.so:libGLESv1_CM.so:libGLESv2.so:libGLESv3.so:libRS.so:libandroid_net.so:libc.so:libcgrouprc.so:libclang_rt.asan-aarch64-android.so:libclang_rt.asan-arm-android.so:libclang_rt.hwasan-aarch64-android.so:libclang_rt.asan-i686-android.so:libclang_rt.asan-x86_64-android.so:libdl.so:libft2.so:liblog.so:libm.so:libmediandk.so:libnativewindow.so:libneuralnetworks.so:libsync.so:libvndksupport.so:libdl_android.so:libvulkan.so
     31 
     32 ###############################################################################
     33 # "platform" namespace
     34 #
     35 # This namespace is for linking to LLNDK and ASAN libraries on the system.
     36 ###############################################################################
     37 
     38 namespace.platform.isolated = true
     39 
     40 namespace.platform.search.paths = /system/${LIB}
     41 namespace.platform.asan.search.paths  = /data/asan/system/${LIB}
     42 namespace.platform.asan.search.paths +=           /system/${LIB}
     43 
     44 # /system/lib/libc.so, etc are symlinks to /apex/com.android.lib/lib/bionic/libc.so, etc.
     45 # Add /apex/... pat to the permitted paths because linker uses realpath(3)
     46 # to check the accessibility of the lib. We could add this to search.paths
     47 # instead but that makes the resolution of bionic libs be dependent on
     48 # the order of /system/lib and /apex/... in search.paths. If /apex/...
     49 # is after /system/lib, then /apex/... is never tried because libc.so
     50 # is always found in /system/lib but fails to pass the accessibility test
     51 # because of its realpath.  It's better to not depend on the ordering if
     52 # possible.
     53 namespace.platform.permitted.paths = /apex/com.android.runtime/${LIB}/bionic
     54 namespace.platform.asan.permitted.paths = /apex/com.android.runtime/${LIB}/bionic
     55 
     56 ###############################################################################
     57 # "sphal" namespace
     58 #
     59 ###############################################################################
     60 namespace.sphal.isolated = true
     61 namespace.sphal.visible = true
     62 
     63 # Keep the below in sync with "sphal" namespace in system's /etc/ld.config.txt
     64 # Codec2 has dependencies on some SP-hals (eg. android.hardware.graphics.mapper (a] 2.0)
     65 # These are dlopen'ed by libvndksupport.so.
     66 namespace.sphal.search.paths  = /odm/${LIB}
     67 namespace.sphal.search.paths += /vendor/${LIB}
     68 
     69 namespace.sphal.permitted.paths  = /odm/${LIB}
     70 namespace.sphal.permitted.paths += /vendor/${LIB}
     71 namespace.sphal.permitted.paths += /vendor/${LIB}/hw
     72 namespace.sphal.permitted.paths += /system/vendor/${LIB}
     73 
     74 namespace.sphal.asan.search.paths  = /data/asan/odm/${LIB}
     75 namespace.sphal.asan.search.paths +=           /odm/${LIB}
     76 namespace.sphal.asan.search.paths += /data/asan/vendor/${LIB}
     77 namespace.sphal.asan.search.paths +=           /vendor/${LIB}
     78 
     79 namespace.sphal.asan.permitted.paths  = /data/asan/odm/${LIB}
     80 namespace.sphal.asan.permitted.paths +=           /odm/${LIB}
     81 namespace.sphal.asan.permitted.paths += /data/asan/vendor/${LIB}
     82 namespace.sphal.asan.permitted.paths +=           /vendor/${LIB}
     83 
     84 # Keep the below in sync with "vndk" namespace in system's /etc/ld.config.txt
     85 # System's sphal namespace links to vndk namespace for %VNDK_SAMEPROCESS_LIBRARIES%,
     86 # since we don't have a good way to auto-expand %VNDK_SAMEPROCESS_LIBRARIES%,
     87 # we'll add the vndk paths below.
     88 
     89 namespace.sphal.search.paths += /odm/${LIB}/vndk-sp
     90 namespace.sphal.search.paths += /vendor/${LIB}/vndk-sp
     91 namespace.sphal.search.paths += /system/${LIB}/vndk-sp${VNDK_VER}
     92 
     93 namespace.sphal.permitted.paths += /odm/${LIB}/hw
     94 namespace.sphal.permitted.paths += /odm/${LIB}/egl
     95 namespace.sphal.permitted.paths += /vendor/${LIB}/hw
     96 namespace.sphal.permitted.paths += /vendor/${LIB}/egl
     97 namespace.sphal.permitted.paths += /system/vendor/${LIB}/hw
     98 namespace.sphal.permitted.paths += /system/vendor/${LIB}/egl
     99 # This is exceptionally required since android.hidl.memory (a] 1.0-impl.so is here
    100 namespace.sphal.permitted.paths += /system/${LIB}/vndk-sp${VNDK_VER}/hw
    101 
    102 namespace.sphal.asan.search.paths += /data/asan/odm/${LIB}/vndk-sp
    103 namespace.sphal.asan.search.paths +=           /odm/${LIB}/vndk-sp
    104 namespace.sphal.asan.search.paths += /data/asan/vendor/${LIB}/vndk-sp
    105 namespace.sphal.asan.search.paths +=           /vendor/${LIB}/vndk-sp
    106 namespace.sphal.asan.search.paths += /data/asan/system/${LIB}/vndk-sp${VNDK_VER}
    107 namespace.sphal.asan.search.paths +=           /system/${LIB}/vndk-sp${VNDK_VER}
    108 
    109 namespace.sphal.asan.permitted.paths += /data/asan/odm/${LIB}/hw
    110 namespace.sphal.asan.permitted.paths +=           /odm/${LIB}/hw
    111 namespace.sphal.asan.permitted.paths += /data/asan/odm/${LIB}/egl
    112 namespace.sphal.asan.permitted.paths +=           /odm/${LIB}/egl
    113 namespace.sphal.asan.permitted.paths += /data/asan/vendor/${LIB}/hw
    114 namespace.sphal.asan.permitted.paths +=           /vendor/${LIB}/hw
    115 namespace.sphal.asan.permitted.paths += /data/asan/vendor/${LIB}/egl
    116 namespace.sphal.asan.permitted.paths +=           /vendor/${LIB}/egl
    117 
    118 namespace.sphal.asan.permitted.paths += /data/asan/system/${LIB}/vndk-sp${VNDK_VER}/hw
    119 namespace.sphal.asan.permitted.paths +=           /system/${LIB}/vndk-sp${VNDK_VER}/hw
    120 
    121 # Once in this namespace, access to libraries in /system/lib is restricted. Only
    122 # libs listed here can be used.
    123 namespace.sphal.links = platform
    124 
    125 # TODO: replace the following when apex has a way to auto-generate this list
    126 # namespace.sphal.link.platform.shared_libs  = %LLNDK_LIBRARIES%
    127 # namespace.sphal.link.platform.shared_libs += %SANITIZER_RUNTIME_LIBRARIES%
    128 namespace.sphal.link.platform.shared_libs = libEGL.so:libGLESv1_CM.so:libGLESv2.so:libGLESv3.so:libRS.so:libandroid_net.so:libc.so:libcgrouprc.so:libclang_rt.asan-aarch64-android.so:libclang_rt.asan-arm-android.so:libclang_rt.hwasan-aarch64-android.so:libclang_rt.asan-i686-android.so:libclang_rt.asan-x86_64-android.so:libdl.so:libft2.so:liblog.so:libm.so:libmediandk.so:libnativewindow.so:libneuralnetworks.so:libsync.so:libvndksupport.so:libvulkan.so
    129 
    130 # Add a link for libz.so which is llndk on devices where VNDK is not enforced.
    131 namespace.sphal.link.platform.shared_libs += libz.so
    132