Commit graph

13 commits

Author SHA1 Message Date
Vic Yang
a117f25b4e libvndksupport: Add android_is_in_vendor_process()
In preparation for cleaning up conditionally compiled VNDK libraries,
we need a function that determines if the current process is running in
the system process or the vendor process.

Bug: 119423884
Test: Add a dummy VNDK library that prints different string in system
      vs vendor process.  Use the library in different processs and
      check the output.

Change-Id: Ic00927d8eadd2a21fcba9cb64cc93eaadd5bdd2d
2019-02-12 20:28:38 -08:00
Dongwon Kang
9dff515bdb Exclude libvndksupport from APEXes.
Test: build, boot, and checked mount paths.
Bug: 123948402
Change-Id: I687dde4f3d1a7971f68c7c536de5002dcdaecfa4
2019-02-11 11:14:11 -08:00
Elliott Hughes
dc699a269f bpfmt.
Bug: N/A
Test: builds
Change-Id: I89ad00e1c4c7e0767bc80a7ac7935a4d55e090ac
2018-02-16 17:58:14 -08:00
Elliott Hughes
693d63f9cf Add OWNERS.
Bug: N/A
Test: N/A
Change-Id: Ie785058c0f5eb9b4086c98ccba6e63e3ed411b65
2017-12-07 13:30:03 -08:00
Yifan Hong
1ccdb7d92a libvndksupport: do not use functions from android/dlext.h
... if they are not available. Use weak symbols and do not call the
following functions when they are not defined:

* android_dlopen_ext
* android_get_exported_namespace
Test: links
Test: boots

Change-Id: I653548bac61a0eba001f72bab969b5b858bd1553
2017-11-10 13:19:37 -08:00
Justin Yun
090b593a8d Make libvndksupport look for default namespace as well.
In vendor process, libvndksupport must look for "default" namespace,
instead of "sphal" namespace to open hal libraries.

Bug: 63411330
Test: Boot the device.
Change-Id: I26208b6f47708f83e0679fd72ca7471ade84fff9
Merged-In: I26208b6f47708f83e0679fd72ca7471ade84fff9
2017-11-09 18:07:47 -08:00
Justin Yun
a34bd0561d libvndksupport: Change log level and message.
If no 'sphal' namespace exist, the sphal library may be found in
current namespace.
Change the log level and message to note this.

Bug: 64162324
Test: Check log message for vndksupport tag.
Change-Id: I5ed6ba1e48f99e7d11d80a465177ac9f3a7fbd97
Merged-In: I5ed6ba1e48f99e7d11d80a465177ac9f3a7fbd97
2017-11-09 18:07:41 -08:00
Chih-Hung Hsieh
122352d983 Use -Werror in system/core
* Move -Wall -Werror from cppflags to cflags.
* Fix/suppress warning on unused variables.

Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I1e05e96a1d0bcb2ccef1ce456504b3af57167cc5
2017-11-01 11:32:55 -07:00
Jiyong Park
76080e7115 Merge "fix: ATRACE does not work for libs loaded in sphal namespace" into oc-dev am: b560e6db6a
am: 94baf7270a

Change-Id: I5042241c4239800a4b8ff1f18db1ab66b029c5c3
2017-05-31 00:46:42 +00:00
Jiyong Park
0b3c24bd4f fix: ATRACE does not work for libs loaded in sphal namespace
From O, libutils.so is loaded twice. Once in the default namespace and
once in the sphal namespace for vendor libs. However, since the
framework only communicates with the instance loaded in the default
namespace, report_sysprop_change() event is not notified to the instance
in sphal namespace. This causes ATRACE to not work for vendor libs
loaded in sphal namespace.

So, the instance loaded in default namespace now explicitly redirects
the event to the other instance.

Bug: 62084107
Test: start an app, run 'adb shell atrace gfx --stream'. atrace from the
graphics driver are visible.

Change-Id: Ia6c2ca6bcb9a8849ebb09b5c38d60480c92d4571
2017-05-27 15:32:01 +09:00
Justin Yun
17baed1012 libvndksupport: Do not lookup default namespace for sphal failure
Instead of looking up default namespace for the failure of loading
sphal libs, report failure. This is only for the devices that have
sphal namespace.

Bug: 38435840
Test: sailfish builds and boots
Test: libvndksupport-tests passes
Change-Id: Ibbff5f2d5d83f6482f98677a5492777db6416967
2017-05-24 01:32:51 +00:00
Jiyong Park
8902f7571a add libvndksupport
libvndksupport is a new LL-NDK library that provides vendor-visible APIs
for platform-only functionalities of other LL-NDK libraries. Currently,
it provides android_(load|unload)_sphal_library which abstracts the
platform-only APIs of libdl (android_get_exported_namespace, etc.)

Bug: 37323945
Test: sailfish builds and boots
Test: libvndksupport-tests passes

Merged-In: I6d2911b57e009d0c842554933aac87d6573ffcbf
Change-Id: I6d2911b57e009d0c842554933aac87d6573ffcbf
(cherry picked from commit 7130e13262)
2017-05-15 11:35:30 +09:00
Jiyong Park
7130e13262 add libvndksupport
libvndksupport is a new LL-NDK library that provides vendor-visible APIs
for platform-only functionalities of other LL-NDK libraries. Currently,
it provides android_(load|unload)_sphal_library which abstracts the
platform-only APIs of libdl (android_get_exported_namespace, etc.)

Bug: 37323945
Test: sailfish builds and boots
Test: libvndksupport-tests passes

Change-Id: I6d2911b57e009d0c842554933aac87d6573ffcbf
2017-05-11 15:08:56 +09:00