With b/144533348, there will be symlinks from libs in APEXes to the libs
in the system partition. This is to reduce the size of APEXes when the
APEX is bundled with the platform.
Adding the /system/lib to the permitted paths so that the realpaths of
the symlinks are allowed for the namespaces.
Note that this however does not open all libs in the system partition to
the APEX namespaces, because searching of the libs are NOT done in
/system/lib, but in /apex/<module>/lib directory.
Bug: 144533348
Test: m
Change-Id: I959d4312a7bc5427c4d84885fbac4bc235cffa86
Media swcodec apex module breaks when ag/9857054 is applied.
Apex can't auto generate namespace.*.link.platform. This patch
adds libbinder_ndk.so so ag/9857054 can be merged.
Bug: 146070048
Test: Compiles and boots with ag/9857054
Change-Id: I26645a46019904884657011bf385821837c06c44
With VNDK APEX, the path for VNDK libs has been changed
from /system/lib/vndk-VER to /apex/com.android.vndk.vVER/lib
But we need to keep older location since it should run on
older version of system due to APEX requirements.
When VNDK APEX is used, older location is just a symlink to a new
location. So we have to add a new location as permitted path. Otherwise,
linker would fail because it checks accessibility using realpath().
Test: add a vendor binary to /apex/com.android.media.swcodec/bin
which opens /system/lib/vndk-sp{VNDK_VER}/hw/android.hidl.memory@1.0-impl.so
via android_load_sphal_library()
Bug: 142912195
Change-Id: I13779679af5cf7f687a726afe0b6118e15cf1869
With VNDK APEX, the path to VNDK libs is changed from
/system/lib/vndk-VER to /apex/com.android.vndk.vVER/lib.
Bug: 141451661
Test: m && boot (tested with cuttlefish)
Change-Id: Id3a335ad1dfea71fb53ce80b96d550af8ac61760
Searching /apex/com.android.runtime/${LIB} in the platform namespace makes
its libraries visible in the wrong namespace - they should be in a separate
"runtime" namespace to keep separation. Furthermore, in R the directory
only contains Bionic internal dependencies that no external package should
depend upon.
However the directory cannot be removed from the search paths because this
linker config is in an APEX that needs to work on Q too, where it is used to
find libclang_rt.hwasan*.so. (The issue with the libraries being visible in
the wrong namespace applies to Q too, but it doesn't have any known
observable effects.)
Hence only add a comment to highlight that it should be cleaned up when the
code has branched and Q compatibility can be dropped.
Test: Build & boot
Bug: 140790209
Bug: 139408016
Change-Id: I2a5e6418977200c56d01f52c0d78dd820cc643a2
For devices disabling treble, some VNDK-SP libraries needs to be loaded
as LLNDK. The CL modifies ld.config.txt to allow to load them from sphal.
Bug: 140781725
Test: Boot and check logcat. No native crash from mediaswcodec
Change-Id: Iec24405ec78359d78f4e7f43d9d046f3c70ff129
The canonical location of the HWASAN runtime, an LL-NDK library, is being moved
to the runtime APEX. It is apparently the first LL-NDK library in the runtime
APEX that does not require a legacy symlink in /system/${LIB}. Therefore we
need to add the runtime APEX's ${LIB} directory to the various search paths
used by the linker so that the library can be loaded from the default and
sphal namespaces.
Bug: http://b/134459232
Test: Builds
Change-Id: I1f63e1a2a61e1717d00736ef431f3ec2a9334193
Merged-In: I1f63e1a2a61e1717d00736ef431f3ec2a9334193
(cherry picked from commit 61f5fdf5c9)
On devices where VNDK is not enforced, libz.so is llndk.
Test: stagefright -s -S /sdcard/crowd_350x350p50f32_200kbps_meta.webm
Bug: 133351160
Change-Id: I8a563f86fe820e49ed6bae4e7e0f4a64bf1bddfa
The canonical location of the HWASAN runtime, an LL-NDK library, is being moved
to the runtime APEX. It is apparently the first LL-NDK library in the runtime
APEX that does not require a legacy symlink in /system/${LIB}. Therefore we
need to add the runtime APEX's ${LIB} directory to the various search paths
used by the linker so that the library can be loaded from the default and
sphal namespaces.
Change-Id: I1f63e1a2a61e1717d00736ef431f3ec2a9334193
When running with asan, the platform namespace didn't have /system/lib,
but /data/asan/system/lib in its search paths. As a result, clang
runtime libraries like libclang-rt.asan-i686-android.so which are still
in /system/lib cound not be found.
Fixing the problem by adding /system/lib to the search paths after the
asan path.
Bug: 131170196
Test: check if mediaswcodec process is running in aosp_cf_x86_pasan
Change-Id: Iffe5d25613999a00ead5eb03c0efca1d6c9ce012
The default namespace need access to libdl_android.so from platform
namespace for libgraphicsenv.so
Bug: http://b/130373059
Test: boot a sailfish with the change wait until it gets to setup wizard
Change-Id: I55faa4b42f863dfbcc3b959d113cf481c7e2e337
Add sphal namespace for swcodec apex, and keep the search/
permitted paths in sync with system's sphal/vndk namespaces.
This change also removes libz.so from the list of shared libs
linking from default to platform namespace.
bug: 129552044
bug: 129095969
test: cts-tradefed run singleCommand cts -d --module CtsMediaTestCases --test android.media.cts.DecoderTest#testVp9HdrStaticMetadata
Change-Id: Id3148dacde43e4bd9c1782ffd67acb21ef095811
It is linked through libprocessgroup.
Test: CtsMediaTestCases:android.media.cts.MediaPlayer2Test#testPlayVideo
Bug: 123664216
Change-Id: I59672f1920cb4d4808d6e46ba2db30afdfcb39cb
Bind-mounting of the bionic files on /bionic/* paths no longer required
as there are direct symlinks from bionic files in /system partition to
the corresponding bionic files in the runtime APEX. e.g.,
/system/lib/libc.so -> /apex/com.android.runtime/lib/bionic/libc.so
Bug: 125549215
Bug: 127499775
Test: m; devices boots
Change-Id: I499df3a629e01680c1e1c8f0f4062efaec2ab277