Age | Commit message (Collapse) | Author |
|
Bug: 137364733
Test: m
Change-Id: I8fc0796745f7310f477fe9f8b0821586742dd9c0
|
|
Add temporary public visibility for libraries.
Update bpfmt for ART's repohooks.
Bug: 137364733
Test: m nothing
Test: copy libs to art/, create a CL, run repohooks, m nothing.
Change-Id: Ib9a280136e4b992fe17b8943cf404c9c803efb8d
|
|
|
|
Bug: 137364733
Test: m
Change-Id: Ia3badccda5e6ca139d889c3c7b5aa8a9ab79ef38
|
|
Remove the kludge in libnativeloader to deal with the inconsistency wrt the
name of the APEX package.
Test: Build & boot
Test: atest system/core/libnativeloader (on cf_x86_phone)
Bug: 139408016
Change-Id: I6115b49237c78c2ea4aa943ca4fe0b296b5a2b62
|
|
|
|
This change fixes a bug that public libs from APEXes are never
pre-loaded. This was happening because those libs are removed by
InitDefaultPublicLibraries which was originaly designed for listing up
the libs that needs to be provided to the app namespace from the default
namespace. Since the libs from APEXes are not available from the default
namespace, but from their own namespaces (e.g."runtime", etc.), the
removal was fine. But the problem happend when the same function is
parameterized (with bool for_preload) and used to get the libs for
preloading.
This change fixes the problem by not removing the libs from APEXes when
the function is called with for_preload == true.
Bug: 141847343
Test: m
Change-Id: I9edf2f94bac473ac7d0651514a2dabe976f81058
|
|
|
|
Test: N/A
Change-Id: I7766ebaafa193b90096c5061adbf67eaf26e651c
|
|
This is just to permit moving under art/. We'll back these out after
the move (assuming it's not too much gratuitous churn).
Bug: 141749154
Test: symlink libraries under art/, m cpplint-art-all
Change-Id: Ibd4882f416072076d4605bc329192f0bc1b196fb
|
|
Has been replaced by better name libnativeloader-headers.
Test: m checkbuild
Change-Id: I922530812dbe4f0b30793241a8e1d5c874a75730
|
|
Test: Build & boot
Test: atest CtsJniTestCases
Bug: 135753770
Exempt-From-Owner-Approval: Approved internally
Change-Id: Ic59b7bc8aae7ce521cf3ec9df4ab72aa611d0b75
Merged-In: Ic59b7bc8aae7ce521cf3ec9df4ab72aa611d0b75
|
|
A lib with 'nopreload' option in public.libraries.txt is not preloaded
during zygote. This is useful for seldom used public libraries; they
don't contribute to the zygote startup time and only affect the apps
that they are used.
Bug: 132911956
Test: libnativeloader_test
Change-Id: I6f97c90e6721aec7f2f96c8fc7b963b34f8edd3e
|
|
Explicitly initialize the pointer member `app_main_namespace_` of the
class LibraryNamespaces.
Test: atest libnativeloader_tests
Change-Id: I3932e7fb3c4074a127fcdbdedbd9c88652a7e36c
|
|
Don't create anonymous namespace separately, use the first namespace
that is created for app classloader as the anonymous namespace.
Note that the anonymous namespace is set via the new
ANDROID_NAMESPACE_TYPE_ALSO_USED_AS_ANONYMOUS. I didn't creat a new
function like android_set_anonymous_namespace as it requires uprev of
the libnativebridge interface and makes it harder to delete the old
android_init_anonymous_namespace as we have to keep it until all
proprietary bridged loaders are updated.
Bug: 130388701
Test: CtsBionicTestCases
Test: run games on http://www.monogame.net/showcase/?Android
Change-Id: I0fdd614365eaa56c4ab47538bf3772d94bd9ae55
|
|
This fixes a regression caused by 8f4afc8298ebae34e8f944a0807943997908c67d
that libnativeloader can't no longer handle the case that it has failed
to find the default namespace. Previously before the change,
libnativeloader continued to use nullptr as the parent namespace which
is reconized as the default namespace inside the linker.
This change recovers the previous behavior. When the default namespace
is not found, NativeLoaderNamespace object is constructed from nullptr.
Bug: 138607234
Test: run app-compat/app-startup-gce on cf_x86_phone using forrest
Change-Id: If518fbc055399b73e7d3a6b45ace0f71e9c25dae
(cherry picked from commit db825ceba694eb6abe4ecff45fc4e1121646385f)
Merged-In: If518fbc055399b73e7d3a6b45ace0f71e9c25dae
|
|
|
|
|
|
When a new namespace is added to ld.config.txt, it has to be reflected
to native_loader_test.cpp. However, failing to do so crashes the test
instead of showing an error message that the namespace hasn't been
added.
Fixing the issue by not returning nullptr when the namespace isn't
found.
Bug: 138304345
Test: libnativeloader_test
Change-Id: I9eee1293956caac69f95a946604a2e6f665bde89
|
|
Remove the out parameters for error messages using Result<T>.
Bug: 130388701
Test: libnativeloader_test
Change-Id: Idbaf391c183fb20d5e1d7c96f3a4ccbf9745b7e6
|
|
Just before the test is enabled, the neuralnetwork namespace was added
by https://android-review.googlesource.com/c/platform/system/core/+/1014637.
This is breaking the libnativeloader_test.
Fix the test by adding the code for the new namespace.
Bug: 138304345
Test: libnativeloader_test on aosp_cf_x86_phone
Change-Id: Ifa762e395a3b9b5debdbcfcbcb395eeda3a1b2a4
|
|
|
|
Bug: 130388701
Test: watch TH to see if libnativeloader_test is running
Change-Id: I0940d13ec4e5c680ce1dbf2f5980b3b20080f7e4
|
|
The link to the spahal namespace is not done when there is no lib in
vendor/etc/public.libraries.txt
Bug: 130388701
Test: libnativeloader_test on cuttlefish
Change-Id: I38f2d01305bca5ea942573484a0e0b9b44b1c0be
|
|
Makes updated libneuralnetworks.so in /apex/com.android.neuralnetworks/{LIB}
loadable from all relevant namespaces.
Test: Verified that right library is being loaded using lsof and
Test: verbose debug logs from bionic/ld.
Bug: 137320025
Change-Id: I38140bb9915a3f85f10456e15ed0f492dbdba802
|
|
This reverts commit 4ec2b289834e37a518a1d9a006fccefd78c2370d.
Bug: 137881576
Bug: 130388701
Test: libnativeloader_test
Test: m libnativeloader_test on full-eng
Change-Id: Ib96f7235845b68cde713af278313c5aa751ff738
|
|
This reverts commit 6b6437bab55228c587fab8323a6dafd9f86e1434.
Reason for revert: <INSERT REASONING HERE>
Change-Id: Ice571bf7379743d516e0185fd9f1f0ffb284240a
|
|
libnativeloader hasn't had a unit test. Now we have it. The unittest
mocks calls to libdl, libbridgedloader, and JNI using gmock.
Not all tests are added yet. To ease the review, a few tests for core
scenarios are added.
Bug: 130388701
Test: libnativeloader_test
Change-Id: I518512047da66b44bc99cec26e2c34ba4985cca3
|
|
The `char* path` argument of OpenNativeLibrary() can be nullptr. We are
constructing std::string from the path, which is a bug. Fixing it by
using char* without converting it to std::string.
Test: run-gtests.sh
JniCompilerTest.CompileAndRunIntMethodThroughStubNormalCompiler
is successful.
Change-Id: I91249da7c1a72a2dff9bc77e477b465e0c7ee056
|
|
Bug: 130388701
Test: N/A
Change-Id: Idb6ef31d72041759d42b9e8fb504af2103c149e3
|
|
This change is to be in sync with other libraries in system/core.
External headers are included via #include <...> rather
than #include "...", which is for headers from the current library.
Bug: 130388701
Test: build & pass presubmit tests
Change-Id: Ifb87ebaea1b0ff95e2e79352e6a42e3bfd949c52
|
|
NativeLoaderNamespace fully abstracts the non-bridged (so called
android-) and bridged namespaces.
Bug: 130388701
Test: build & pass presubmit tests
Change-Id: I3d5ca7515711e7638f4a5ab4d3a150185c3d17ac
|
|
- *_public_libraries() are now thread-safe
- removed some of the duplicated code
Bug: 130388701
Test: build & pass presubmit tests
Change-Id: I34b5149f75e28bb892cffe8fd9070be886d2f9bd
|
|
- shorten the long const variables
- merge {oem|product}_public_libraries into extended_public_libraries
Bug: 130388701
Test: build & pass presubmit tests
Change-Id: I43be555041466118f2b2d188f5da3ff0d8ed7d8d
|
|
Introduce utils.h to have common routines.
Bug: 130388701
Test: build & pass presubmit tests
Change-Id: Ic40da64fefc1f2216bdea9ea93a15e5abb8f23a4
|
|
Functions for reading the public libraries list are moved out of
library_namespace.cpp to public_libraries.cpp.
In addition, library-local symbols are moved from android namespace to
android::nativeloader namespace.
Bug: 130388701
Test: build & pass presubmit tests
Change-Id: If82419598304d56d29bfec4ef553443c788d0f53
|
|
native_loader.cpp is too crowded. Move the classes
NativeLoaderNamespaces and LibraryNamespaces out of native_loader.cpp to
their own source files.
This change does not alter any functionality.
Bug: 130388701
Test: m, presubmit tests
Change-Id: Ibc61ec0dc6727af7cac865b1971ebf1befac6855
|
|
This relands http://r.android.com/951440:
This affected binaries in the Runtime APEX, where the platform namespace is
"platform" rather than "default".
Also extend ANDROID_ADDITIONAL_PUBLIC_LIBRARIES to create links to both to
platform and runtime namespaces, so that it can be used to open up access to
internal libraries in the Runtime APEX as well, which is used by ART gtests
and run tests.
Also update some comments in the ld.config*.txt files to accurately explain
why some namespaces need to be visible, and some other minor changes for
consistency. There are no semantically significant changes in those files.
Test: Flash and boot
Test: Run an ART run test with the internal libarttest.so library
Test: lunch aosp_cf_x86_phone-eng;
atest android.compilation.cts.AdbRootDependentCompilationTest#testCompile_curProfile \
com.android.cts.dexmetadata.InstallDexMetadataHostTest#testProfileSnapshotAfterInstall \
installd_dexopt_test
Bug: 130293232
Bug: 121117762
Change-Id: I3d9f2102a03e83843e15bc78b5ad347220c52769
|
|
namespace.""
|
|
This reverts commit 4ca0ca67bf466381e59865137e6811e863002984.
Reason for revert: Breaks android.compilation.cts.AdbRootDependentCompilationTest#testCompile_curProfile and others: http://g/art-team/R2nEDA1Ka_s
Change-Id: Ia6285648133d21e61040efafc73cac97d702a7c4
|
|
|
|
This affected binaries in the Runtime APEX, where the platform namespace is
"platform" rather than "default".
Also extend ANDROID_ADDITIONAL_PUBLIC_LIBRARIES to create links to both to
platform and runtime namespaces, so that it can be used to open up access to
internal libraries in the Runtime APEX as well, which is used by ART gtests
and run tests.
Also update some comments in the ld.config*.txt files to accurately explain
why some namespaces need to be visible, and some other minor changes for
consistency. There are no semantically significant changes in those files.
Test: Flash and boot
Test: Run an ART run test with the internal libarttest.so library
Bug: 130293232
Bug: 121117762
Change-Id: I7ebaf5370dd0f533b1bb5f0e67e7c3c1df48e512
|
|
Create the anonymous namespace only from a non-empty library path.
This is a better heuristic than the current "first-come" one. It
allows creating classloaders that are not directly related to an
app's "main" classloader, that is, do not have any library path.
This is the case, for example, for shared libraries, including
preloaded ones.
Longer-term, the anonymous namespace creation should be made
explicit, so that the framework can have full control.
Bug: 130623656
Test: m
Test: manual
Change-Id: I8251363b372e365d10ae09d23df93d76388ac7f9
|
|
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 e3d0383d38fbac339a6a2ef02403836e41a11cd3)
|
|
Some of the legacy devices may not have vndk namespace. To make this
work, libnativeloader should not fail when it fails to search for vndk
namespace.
Bug: 129011845
Test: m -j
Change-Id: I6f68aeb6ae84a00985cc20561b2fcdb461be9724
Merged-In: Id9147d4aeee9ba2b301b6893dea5884dce9c14fa
|
|
Currently libnativeloader appends vendor lib path if apk is from vendor
partition. Similar to this we should add product lib path if apk if from product partition.
Bug: 124705551
Test: m -j && tested from crosshatch with product apps (such as Wallpaper)
Change-Id: I8c3473f1f70b1c22dcaed7eb2d5f9c3deee9e1a5
Merged-In: I8690167ca8098015c8ae4bbb4f028404c5e94dc0
|
|
Passing nullptr as parent namespace to android_create_namespace makes it use
the namespace of the caller as parent, which typically is the runtime
namespace. That in turn causes classloader-namespace to inherit any
libraries in the shared group of the runtime namespace, i.e. any libraries
that have been loaded in it with RTLD_GLOBAL or DF_1_GLOBAL up to that
point.
Let's instead pass the platform namespace from the linker config as fallback
when a parent namespace cannot be found. That is also what happened before
libnativeloader moved into the runtime namespace.
Test: Flash and boot
Test: atest CtsJniTestCases (on cuttlefish and taimen)
Bug: 124501296
Change-Id: If2faee74e2bdcf95d19516faec340fedcdd07e29
|
|
libnativeloader is in the Runtime Module, libcutils is not.
Dependency was on property_get so moving to libbase equivalent.
Bug: b/125323247
Test: m -j100
Change-Id: I295ffa14b475a193a851db89dbb3b4c9cc0183d2
|
|
* changes:
Linker namespace changes for moving ICU4C to APEX
Remove the public libs in runtime namespace
|
|
libnativeloader_lazy and libnativebridge_lazy are shim libraries for
libnativeloader and libnativebridge, respectively.
The shim libraries provides the same APIs as their counterparts, but
when the APIs are called, the APIs from the real libraries are
loaded/linked/and executed using dlopen/dlsym.
Bug: 123403798
Bug: 124250621
Test: m
Test: device boots to the UI
Test: mma under system/core/libnativebridge with aosp_cf_x86
adb sync; execute all tests under
/data/nativetest/libnativebridge-lazy-tests
All passes except NativeBridgeTest.V2_Signal which is also failing
in /data/nativetest/libnativebridge-tests.
Change-Id: Ic6484784eaa7872dcdd2decbb30943fb34c1abd7
|