Commit Graph

78 Commits

Author SHA1 Message Date
Elliott Hughes 54f2e52ab5 Merge "Add comments to "public.libraries.*.txt"." am: e7b8fc22af am: 601e5ac55b
am: 3cdb21a8c7

Change-Id: I049c98243b522b8c3fcb64d917ff64a1e6d576c0
2017-08-02 19:52:26 +00:00
Elliott Hughes 601e5ac55b Merge "Add comments to "public.libraries.*.txt"."
am: e7b8fc22af

Change-Id: I8519a128238758433d194f35f6090633aeb85f0a
2017-08-02 19:43:01 +00:00
Elliott Hughes bd0ad88202 Add comments to "public.libraries.*.txt".
Folks don't know how to add public native API. Point them in the right
direction.

Bug: 63905942
Test: boots
Change-Id: I5e1f04fb852348255a2f7f87aa961948c41c47fd
2017-07-28 18:07:44 -07:00
Jiyong Park c034a43d44 Add [test] section for /data/[nativetest|benchmarktest]
We have both system and vendor tests in the same directory
/data/nativetest. Since we can't distinguish system and vendor tests at
runtime, we choose to run all of them with the legacy namespace
configuration where /system/lib and /vendor/lib are both accessible
without any restriction. Furthermore, /system/lib/vndk-sp is added to
the list of accessible directories for tests since some libs (such as
libion.so) exist only in the directory but not in /system/lib.

This will change in the future when we install system and vendor tests
into different directories (vendor tests goes into ./vendor subdir).
Then, we will run the tests with [system] or [vendor] configurations
depending on their paths.

Bug: 63597267
Test: run bionic-unit-tests
Test: run linker-unit-tests
Change-Id: I810003b2da0b30335200c130f484ea7b041f9f80
2017-07-20 15:28:00 +09:00
Jiyong Park 9d1e50b809 /data/nativetest[64] processes are running with the new ns config
Native tests under /data/nativetest[64] directory is now running with
the same linker namespace configuration as /system/bin/* processes.

This allows us to stop mimicing the linker namespace configuration of the
/system/bin/* processes using LD_LIBRARY_PATH.

Bug: 63597267
Test: run bionic-unit-tests
Test: run linker-unit-tests
Change-Id: If8e2ed0b8016e4e07bf6829735b8e02f952042d0
2017-07-18 16:45:05 +09:00
Logan Chien f499bcdde7 Revert "Move libz to vndk-sp"
This commit removes libz.so from the exported libs of "vndk" linker
namespace and export libz.so from "default" linker namespace instead.

We have to remove libz.so from vndk-sp because we don't have a good
mechanism to stop "classloader" linker namespace from loading
/system/lib[64]/vndk-sp/libz.so.  Other alternatives require significant
changes to dynamic linker or CTS test cases.

Let's temporarily revert the commit to fix b/62195853 for oc-dr1-dev.
The long-term solution will be discussed in b/37617391.

This reverts commit 63226400f3.

Bug: 62195853
Bug: 37617391
Test: Boot sailfish to home screen.
Change-Id: I4a97819b080f7091b633152d4a11353b24c463ee
2017-07-05 11:18:13 +08:00
Logan Chien 735a32e30e ld-config: Export android.hidl.memory@1.0-impl
am: fb2a4f0874

Change-Id: Ib23a91581514f275642cb05afddbfc5324bca3bb
2017-06-23 05:07:34 +00:00
Logan Chien fb2a4f0874 ld-config: Export android.hidl.memory@1.0-impl
This commit exports android.hidl.memory@1.0-impl.so from default linker
namespace to vndk (VNDK-SP) linker namespace.  This fixes
libhidlmemory.so failure.

Note: Exposing android.hidl.memory@1.0-impl.so from default linker
namespace to vndk (VNDK-SP) linker namespace shall be fine because its
APIs are frozen and won't be changed in the future.

Note: android.hidl.memory@1.0-impl.so is NOT exported to sphal linker
namespace.

Bug: 35107583
Bug: 62778280
Test: Write a test SP-HAL lib which links libhidlmemory.so, load that
SP-HAL lib into system executable, and make sure mapMemory() works.
Test: sailfish boots w/o problems.

Merged-In: Ia36350dcf1f8c8dc6d7bf2c7a6ae65e0ebaef578
Merged-In: Iddb723558c3a814a905cd42797594a707bc651da
Change-Id: I69034595b2cd355e786ce7943fed7dddf1b12525
(cherry picked from commit bd7503dae7)
(cherry picked from commit 3251e582f2)
2017-06-22 20:13:01 +08:00
Logan Chien bd7503dae7 ld-config: Export android.hidl.memory@1.0-impl
This commit exports android.hidl.memory@1.0-impl.so from default linker
namespace to vndk (VNDK-SP) linker namespace.  This fixes
libhidlmemory.so failure.

Note: Exposing android.hidl.memory@1.0-impl.so from default linker
namespace to vndk (VNDK-SP) linker namespace shall be fine because its
APIs are frozen and won't be changed in the future.

Note: android.hidl.memory@1.0-impl.so is NOT exported to sphal linker
namespace.

Bug: 35107583
Bug: 62778280
Test: Write a test SP-HAL lib which links libhidlmemory.so, load that
SP-HAL lib into system executable, and make sure mapMemory() works.
Test: sailfish boots w/o problems.

Change-Id: Ia36350dcf1f8c8dc6d7bf2c7a6ae65e0ebaef578
2017-06-22 20:12:21 +08:00
Logan Chien 7b66b21773 ld-config: Add HIDL memory libs to VNDK-SP
This commit adds libhidlmemory.so and android.hidl.memory@1.0.so to the
exported libs of the `vndk` linker namespace (aka. VNDK-SP).  This is
necessary because some vendors' GLES implementation uses
libhidlmemory.so.  Check http://b/35107583#comment15 for the context.

Bug: 35107583
Test: sailfish boots

Merged-In: Idb5ba4ed4a89795e0e6105d55a84e7f6bbffff51
Change-Id: I1556b7499bd981af995f000519b7a314c70567d1
2017-06-21 20:15:36 +08:00
Logan Chien d7a6fb9383 ld-config: Add HIDL memory libs to VNDK-SP
This commit adds libhidlmemory.so and android.hidl.memory@1.0.so to the
exported libs of the `vndk` linker namespace (aka. VNDK-SP).  This is
necessary because some vendors' GLES implementation uses
libhidlmemory.so.  Check http://b/35107583#comment15 for the context.

Bug: 35107583
Test: sailfish boots
Change-Id: Idb5ba4ed4a89795e0e6105d55a84e7f6bbffff51
2017-06-21 20:13:08 +08:00
Logan Chien ea2719f9f1 ld-config: Add HIDL memory libs to VNDK-SP
This commit adds libhidlmemory.so and android.hidl.memory@1.0.so to the
exported libs of the `vndk` linker namespace (aka. VNDK-SP).  This is
necessary because some vendors' GLES implementation uses
libhidlmemory.so.  Check http://b/35107583#comment15 for the context.

Bug: 35107583
Test: sailfish boots

Merged-In: Idb5ba4ed4a89795e0e6105d55a84e7f6bbffff51
Merged-In: I1556b7499bd981af995f000519b7a314c70567d1
Change-Id: I5af7c954d432a2e8de6c6b744cedbada836bbd98
2017-06-21 20:10:56 +08:00
Jiyong Park 9242f68c0d Don't allow libui.so to RS drivers.
libui.so is not VNDK-SP, so it must not be allowed to RS drivers.

Bug: 37550338
Test: camerascript app works well in 2017 pixel devices
Change-Id: I34971baebdc91f11935d1eb4ddd07d89d4c38958
2017-06-09 17:38:28 +09:00
Logan Chien 184505597f Add libion.so to vndk-sp
This commit adds libion.so to VNDK-SP so that some vendor's
gralloc.${chipset}.so can run without problems.

Bug: 62280700
Test: Boots a device from our partners
Merged-In: I2bcfe40ed9342de6d81dd310313e984a2c64964b
Change-Id: Ib745dfe52107d792296426b097e13b7c7755d88c
2017-06-07 18:31:49 +08:00
Logan Chien 40624c5d1d Add libion.so to vndk-sp
This commit adds libion.so to VNDK-SP so that some vendor's
gralloc.${chipset}.so can run without problems.

Bug: 62280700
Test: Boots a device from our partners
Merged-In: Ib745dfe52107d792296426b097e13b7c7755d88c
Merged-In: I2bcfe40ed9342de6d81dd310313e984a2c64964b
Change-Id: If30657b93157a2abea29fadcdb0004b37ad9eaf2
2017-06-07 18:13:32 +08:00
Logan Chien 5c880b948e Add libion.so to vndk-sp
This commit adds libion.so to VNDK-SP so that some vendor's
gralloc.${chipset}.so can run without problems.

Bug: 62280700
Test: Boots a device from our partners
Change-Id: I2bcfe40ed9342de6d81dd310313e984a2c64964b
2017-06-07 18:09:37 +08:00
Logan Chien 948624faca Merge "Move libz to vndk-sp" 2017-05-24 02:19:41 +00:00
Jiyong Park ee7da4f37d Allow vndk-sp to be extended by vendors
am: eb9694a2d1

Change-Id: I35e4a6f0f7a712e01923a9e1d3456c81d5c0367a
2017-05-17 16:52:13 +00:00
Jiyong Park eb9694a2d1 Allow vndk-sp to be extended by vendors
Exteded vndk-sp should go to /vendor/lib/vndk-sp.

Bug: 37940694
Test: sailfish builds and boots
Test: manually copying a lib from /system/lib/vndk-sp to
/vendor/lib/vndk-sp. Check that the copied one in /vendor partition is
loaded instead of the original one.

Change-Id: Ia5dd6f35bd31d4a20a794bec148e1fc3c6d7b72b
2017-05-18 01:42:27 +09:00
Jiyong Park c9c527f81f resolve merge conflicts of fbe942724 to oc-dev-plus-aosp
Test: I solemnly swear I tested this conflict resolution.
Merged-In: I137c17d55940b783eab6d0125bc4d26b96bcc2f2
Change-Id: I90c3ff7c82a9b53ce00057fd87cf227d5faf0975
2017-05-17 14:29:44 +09:00
Logan Chien 63226400f3 Move libz to vndk-sp
This commit moves libz.so from default namespace to vndk namespace.
Accodring to b/37617391, libz.so is not as stable as we thought, thus
it should be vndk-sp instead of ll-ndk.

Bug: 37617391
Test: sailfish builds, boots, no new dynamic linker errors in log
Change-Id: I3922895a169303c33914a8a0f4b50cb993a724c9
2017-05-15 13:41:19 +08:00
Jiyong Park 15d7483bb7 add libvndksupport.so to ll-ndk
libvndksupport.so is a new member of ll-ndk.

Bug: 37323945
Test: sailfish builds and boots

Merged-In: Ic5db48292a30a6face7f263d939f27a0760240b1
Change-Id: Ic5db48292a30a6face7f263d939f27a0760240b1
(cherry picked from commit 7000859b7c)
2017-05-15 11:35:34 +09:00
Jiyong Park abaab6ff03 libbacktrace is VNDK-SP
libbacktrace and its dependents are now VNDK-SP. Since they are in
/vendor/lib/vndk-sp directory, they are accessible directly from the
vndk namespace. Therefore, libbacktrace is removed from the exported
shared libs list of the default namespace.

Bug: 37413104
Test: sailfish builds and boots
Merged-In: I137c17d55940b783eab6d0125bc4d26b96bcc2f2
Change-Id: I137c17d55940b783eab6d0125bc4d26b96bcc2f2
(cherry picked from commit b2a4b8cd18)
2017-05-15 11:35:34 +09:00
Jiyong Park 7000859b7c add libvndksupport.so to ll-ndk
libvndksupport.so is a new member of ll-ndk.

Bug: 37323945
Test: sailfish builds and boots

Change-Id: Ic5db48292a30a6face7f263d939f27a0760240b1
2017-05-11 15:09:02 +09:00
Jiyong Park b2a4b8cd18 libbacktrace is VNDK-SP
libbacktrace and its dependents are now VNDK-SP. Since they are in
/vendor/lib/vndk-sp directory, they are accessible directly from the
vndk namespace. Therefore, libbacktrace is removed from the exported
shared libs list of the default namespace.

Bug: 37413104
Test: sailfish builds and boots
Change-Id: I137c17d55940b783eab6d0125bc4d26b96bcc2f2
2017-05-08 10:40:14 +09:00
Steven Moreland 55337fd5cc Remove redundant dependencies
android.hidl.base@1.0 and android.hidl.manager@1.0 are built into libhidltransport.

Test: boot internal marlin
Bug: 33276472
Change-Id: I32dc22607f2df5c71555161178865900b35fc75b
(cherry picked from commit fa5ea6a81a)
2017-05-04 15:25:02 +00:00
TreeHugger Robot 04df8f456c Merge "Remove redundant dependencies" 2017-05-04 08:56:29 +00:00
Steven Moreland fa5ea6a81a Remove redundant dependencies
android.hidl.base@1.0 and android.hidl.manager@1.0 are built into libhidltransport.

Test: boot internal marlin
Bug: 33276472
Change-Id: I32dc22607f2df5c71555161178865900b35fc75b
2017-05-03 10:24:58 -07:00
Jiyong Park c641e19c7e update /vendor/*/vndk-sp to /system/*/vndk-sp
Some paths weren't updated.

Bug: 37522144
Test: sailfish builds and boots
Change-Id: I7aeb5d6e0d61bbc6bde4e6f221e90b21ca422622
2017-05-03 11:53:03 +09:00
Jiyong Park bfa03ee9dc Relocate VNDK-SP to /system/lib/vndk-sp and add RS libs to VNDK-SP
VNDK-SP is relocated back to /system partition from /vendor partition,
following the original design.

In addition, the namespace for RenderScript is added. The namespace is
dedicated for loading VNDK-SP libs for RenderScript such as
libRS_internal.so. The reason for having a separate namespace is that
RenderScript requires more permitted paths (/data/*) which should not be
allowed for normal SP-HALs.

Bug: 37522144
Bug: 37550338
Test: sailfish builds and boots well
Test: lsof shows VNDK-SP libs are loaded from /system/lib/vndk-sp
Test: RenderScript app (CameraScript) runs well
Change-Id: Id139f626cafae2e43ee4eefc5a57a204e31bbbc9
2017-04-26 09:30:36 +09:00
Andreas Gampe c7c2d7bcd4 Linker: Add ASAN support to treble ld.config
Add asan counterparts.

Bug: 37579959
Test: m && m SANITIZE_TARGET=address
Merged-in: I23f05436b79fbcb3f6fa11d84c95fcd180fad3b3
Change-Id: I23f05436b79fbcb3f6fa11d84c95fcd180fad3b3
2017-04-25 21:59:37 +09:00
Jiyong Park 7b701de5e0 linker: don't allow libui to SP-HALs and fix warning
libui.so is not used by SP-HALs, so it is removed from the list of libs
exposed from the default namespace.

Also, this fixes a warning message "property value is empty" caused by
the automatically removed trailing '/' for the section 'legacy'. Since
the legacy behavior is already implemented by the linker itself, the
behavior doesn't need to specified in ld.config.txt.

Test: marlin/sailfish boots
Test: no warning message is shown
Change-Id: Ib679794d63b01c6794663dc88f1ab7e72cfb11d3
2017-04-18 08:16:03 +09:00
Jiyong Park 450cff4b68 Configure ld.config.txt for SP-HALs
Now, framework process (any process that is executing /system/bin/* or
/system/xbin/*) are started with three namespaces; default, sphal and
vndk.

default namespace is the namespace that is responsible for loading libs
from /system/lib. It can't load libs from other places such as
/vendor/lib. (However, we temporarily open the path since we haven't
finished the system partition cleanup, but will do eventually).

sphal namespace is the namespace where SP-HAL (Same-process HAL) is
loaded. SP-HAL are the only vendor libraries that are allowed to be
loaded inside framework processes. libEGL_<chipset>.so and
android.hardware.graphics.mapper@2.0-impl.so, etc are SP-HALs. When
framework needs to load those SP-HALs, it explicitly loads it from this
namespace using android_get_exported_namespace() and
android_dlopen_ext().

vndk namespace is the namespace for loading vndk-sp (Vendor-NDK for
Same-Process) libs, which is a small set of framework libraries that
SP-HALs can link against. These libraries are compiled for the same
version of Android that the vendor partition is compiled against.
SP-HALs can not use libraries other than vndk-sp and ndk libs.
Membership to vndk-sp and ndk are strictly closed.

Note that in a system, there are two copies of vndk-sp libs. One at
/system/lib and the other at /vendor/lib/vndk-sp. As a result, there can
be two instances of a same library in a process.

Also adds ld.config.legacy.txt which is used on non-Treble devices where
PRODUCT_FULL_TREBLE is not set to true.
Note, this split can be cleaned up further after b/37139976 is solved.

Bug: 34407260
Test: git diff HEAD:rootdir/etc/ld.config.legacy.txt
HEAD^:rootdir/etc/ld.config.txt => 0
Test: sailfish boots (because BOARD_VNDK_VERSION is not set to
'current')

Change-Id: I8331d94edc38f22c4f8abc66cdf2050af9d0605b
2017-04-14 16:39:36 +09:00
Dimitry Ivanov 0bc3add41b Merge "Add ld.config.txt to /system/etc" am: d444f8663d am: e6f9497cca
am: 7bbe56c46b

Change-Id: I17bd0af0e7acdb8f4cea33c29812825ec78d5f3f
2017-03-25 05:26:30 +00:00
Dimitry Ivanov ee34aecafe Add ld.config.txt to /system/etc
This file describes how loader should set up
default namespace for different kind of binaries.

Note that vendor and some of system binaries are
not yet ready for this config to be enabled - they
rely on libraries they shouldn't be relying upon.

Bug: http://b/30435785
Test: m
Change-Id: I7d5853a6b55db169be1dc2c38cc682711bf7f7f5
2017-03-17 12:27:37 -07:00
Jesse Hall d08467f341 Add NDK libsync to linker whitelists
Test: make
Change-Id: Idb9ddfce7032a3faef7213327d3160968d4a80ba
2017-03-08 21:51:39 -08:00
Mathias Agopian f77e32cb6f add libnativewindow to the linker whitelist
Test: compile
Bug: treble
Change-Id: I59c614ef045dad79e68bbf6fe86f786ecd14ce78
2017-03-02 19:16:42 -08:00
Phil Burk 73b4f8aeed libaaudio: changed name from liboboe
Bug: 34749573
Test: CTS test_aaudio.cpp
Change-Id: Ic95f21fcaf0f13e09f57dfb612d5bcc4755f447b
Signed-off-by: Phil Burk <philburk@google.com>
2017-02-10 17:26:20 +00:00
Phil Burk 815024d24e Oboe: make liboboe.so public
Bug: 30210002
Test: in frameworks/av/media/liboboe/tests

Change-Id: Id7d0b0eebf68bc5e93fc257c2f924205db57312c
Signed-off-by: Phil Burk <philburk@google.com>
2016-12-21 17:19:32 -08:00
Eino-Ville Talvala 5f31ca2231 Add camera2 NDK library to public library lists
It was dropped in the migration to the public.libraries format
NDK is the same on standard Android and Wear.

Bug: 27742249
Change-Id: I1eafbb649c0ccc5b9a93471fa387624d838bd3d0
2016-03-18 12:33:19 -07:00
Dimitry Ivanov dbae9a9b77 Add libvulkan.so to the list of public libraries
Accidentally dropped it in 4b0e963872

Bug: http://b/27546414
Change-Id: I28835ce3229f778387efedf269d7f32572e09184
2016-03-17 10:57:22 -07:00
Dimitry Ivanov 4b0e963872 Move list of public libraries to a config file
This list contains libraries that should directly or indirectly
be accessible to apps for the platform. Note that this list is
not device specific but rather device class specific.

For now we have 2 separate lists; one for Android Phones and Tablets,
and another one for Android Wear devices.

Bug: http://b/27546414
Bug: http://b/22548808
Change-Id: I83de5e3cf67392d0e9af66f70123898bd5997146
2016-03-17 09:45:52 -07:00
Elliott Hughes 2a87d2b155 Remove long-obsolete file.
Change-Id: I728cc13b4a7ac93f9c923d2fc9bda2bb65ffe99d
2015-04-23 20:57:12 -07:00
Yabin Cui 25147416bb Add ip6-localhost to /system/etc/hosts.
Bug: 18791191
Change-Id: Id7cad8cfccadeb319f0dc7dcba8148a457f9f87d
2015-01-13 14:38:21 -08:00
Elliott Hughes b120134bd1 Remove long-dead readtty.
Change-Id: I15ae14542214a3802d43892da0d03cfb33e63c96
2014-11-24 12:01:21 -08:00
Matthew Xie 7ee2e26eb9 Remove DBUS from make and header files
DBUS had been needed by bluetooth bluz stack. It is not needed after
we replaced bluez stack with bluedroid stack.
bug 6872904

Change-Id: I3fa41c1dd4ac80bc679d5950b3b20c7f6d12265f
2013-04-23 14:02:16 -07:00
Keun young Park f5eb803543 move goldfish stuffs to device/generic/goldfish
- each files will be pulled in emulator.mk as PRODUCT_COPY_FILES

Change-Id: I4772e2fd863e6d2663f477c3acd8a90cb95b498a
2013-03-05 11:16:36 -08:00
Elliott Hughes 334ad0ed49 Track the setsebool change in the emulator init.rc.
setsebool's syntax changed in November. This is the sole
caller in AOSP.

Change-Id: I0da608ee974bc3a9060372ef68a71c52726a44a6
2012-12-21 14:45:27 -08:00
Stephen Smalley 1eee419e7a Modify init.rc and init.goldfish.rc for SE Android.
Set the security context for the init process.
Restore the security contexts of /cache and /data in case they were reset.
Specify the security context for services launched from the rootfs since
we cannot label their executables.
If on the emulator, set a policy boolean and restore the context of
/sys/qemu_trace to allow accesses not normally permitted on a device.

Change-Id: I166ffc267e8e0543732e7118eb0fd4b031efac3b
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2012-07-26 15:37:45 -04:00
David 'Digit' Turner a503456526 emulator: Move qemu-props to core service
The qemu-props program is launched at boot to read a series of
system property assignments from the emulator and apply them.

This is necessary to deal with the dynamic nature of the emulated
platform (e.g. the screen density which depends on the skin and
cannot be hard-coded in the platform image).

This patch ensures that qemu-props is started before any other
service that may read one of these properties (e.g. surface flinger).
This is done by encapsulating the program into a 'core' service.
Core services are all stared before regular ones.

Before the patch, qemu-props was started manually inside a script
that is called from a late emulator-specific boot service
(goldfish-setup).

The problem was that sometimes qemu-props was run too late.
This resulted in random flakiness, especially when running
on a low-end host machine.

Fix for bug 2161189 (and probably a few others)

Change-Id: I2933a25dcb5fecbb1fc238f157264e621b8f295b
2011-09-16 00:25:16 +02:00