vendor apk is unbundled

Vendor apks has been regarded as bundled apps and thus provided with all
internal libraries under /system/lib and /vendor/lib. However, in new
devices where Treble is fully enabled, system and vendor partitions are
no longer bundled together; system partition can be updated
independently from the vendor partition.

In that case, the apks in vendor partition are considered as unbundled
so that access to /system/lib is limited.

In addition, when the linker namespace is created for apks, information
on whether the apk is in vendor partition or not is given to the
libnativeloader library. The information is used to conditionally
configure the linker namespace for vendors. For examle, vendor apks are
allowed to access /vendor/lib even though they are considered as
unbundled; because vendor apks and vendor libs are still bundled
together in the same vendor partition.

Bug: 63553457
Test: 1) set target as 2017 pixel
2) m -j CtsVendorJniTestCases
3) copy the built apk into /vendor/app/CtsVendorJniTestCases
4) reboot / factory reset
5) adb shell am instrument -w android.jni.vendor.cts

Change-Id: Iadd34af2878c507d4d6ec50153abef4e65604ac9
3 files changed