If someone is trying to use the sphal namespace, but it
isn't available, we should probably fix this code or add an
sphal namespace there or similar. Add log for more clarity.
Bug: N/A
Test: boot cuttlefish, this doesn't get logged
Change-Id: I2fd2cddc90f529218c99ede8daf2891d84ceb94c
Currently, for an API symbol to be accessible to APEXes, it needs to be
marked as either # systemapi or # apex. It was originally just # apex,
but we added # systemapi to clearly identify the origin of the APIs.
The intended use is
* #apex is for APEX-visible symbols that are defined in an APEX
* #systemapi is for APEX-visible symbols that are defined in the
platform (the non-updatable part)
This intention is documented build/soong/docs/map_files.md, but isn't
enforced at all.
With b/239274367, this is now enforced and therefore the #apex tags in
the platform library are replaced with `#systemapi`
This change does not alter any functionality.
Bug: 239274367
Test: m
Change-Id: Ibdb9122c9969749e055404078bc2280edaa7346d
Vendor APEX section should not separate SPHAL in generic, and also
default namespace does not contain vendor libs in the scope. This change
updates libvndksupport to check 'vendor' namespace when there is no
sphal namespace for vendor APEX section case.
Bug: 193861508
Test: AOSP CF x86_64 boot succeeded
Change-Id: I04cefc12be4c8ec261efb1688a8307b7061bf068
Remove the vestigial llndk_library modules and replace them with
properties in the llndk clause of the implementation cc_library.
Bug: 170784825
Test: m checkbuild
Test: compare out/soong/build.ninja
Change-Id: Ie3a1bffcf29bb1b6747f7f708826c61bd43ba5a1
Instead of assuming a module with the .llndk suffix exists, add an
llndk_stubs property to every cc_library module that has a
corresponding llndk_library. Also rename the llndk_library to have
an explicit .llndk suffix.
Bug: 170784825
Test: no changes to build.ninja (excluding comments) or Android-${TARGET_PRODUCT}.mk
Change-Id: Ifba79a1ae64a67a9d7393dac2fb012cd8af8e149
These weak symbols are no longer necessary because we no longer
need to statically link libvndksupport.
Furthermore, these symbols are not really optional when libvndksupport is
dynamically linked. When the library is linked with --as-needed the linker
may drop the reference to libdl_android.so, which leads to a failure to boot.
Bug: 146456667
Change-Id: I4d2290d8d0206e0d89665d4d872a7c53b3e1531b
The APIs that are tagged with # vndk are actually for LLNDK libraries.
Although LLNDK is part of VNDK, calling those APIs 'vndk' has given
users a wrong perception that the APIs don't need to be kept stable
because that's the norm for most of the VNDK libraries that are not
LLNDK.
In order to eliminate the misunderstanding, rename the tag to 'llndk' so
that people introducing new such API will realize what they are signing
themselves up for.
Bug: 143765505
Test: m
Merged-In: Iae2acdf1ff4097a64a5c6280797c66abb1d5a5e6
(cherry picked from commit 0e957b82c8)
Change-Id: Iae2acdf1ff4097a64a5c6280797c66abb1d5a5e6
Also: remove an obsolete comment from linker_test.cpp. The test program is
at /data/nativetest[64]/libvndksupport-tests/libvndksupport-tests, which
may will be in the system or legacy configuration, and either the "sphal"
or "default" namespace will be visible.
Bug: none
Test: run libvndksupport-tests, device boots
Change-Id: I5e33e5bf1402a0368e046b03827c216789b02c96
Android build system added support for building translated binaries
used on natively bridged targets (arm on x86 for example).
However in order to avoid building unnecessary binaries and libraries
for such architectures most modules do not support native bridge by default.
All needed modules have to explicitly indicate if they may be used as part
of translated binary build.
This change enabled native bridge support for libvndksupport
a dependency of libutils greylisted library (available for apps
targeting Android version < N).
Bug: http://b/77159578
Test: make
Change-Id: I8186718c5efee25261a9946ffb52df5f675bec26
platform private symbols have been moved to libdl_android.so
since they are not intended to be accessible from apps.
Test: make
Bug: http://b/129387775
Change-Id: I883a6d2ca588a258dd43efa766fad4e07428594e
(cherry picked from commit e3d0383d38)
Init is executed without ld.config.<ver>.txt loaded (since sysprop
service isn't up in order for it to read ro.vndk.version and know <ver>). It uses the hard-coded
namespaces in the linker and therefore, does not know about the vndk namespace. That does not mean
it is not a system process.
Bug: 124128212
Test: Boot up device with selinux enforced, use camera to take pictures/ record videos (sanity)
Test: Watch movies on youtube (sanity)
Change-Id: If8701af2ee5dfa3bb36d0ce0a17a23808d184d9f
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
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
... 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
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
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
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
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
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)
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