| Age | Commit message (Collapse) | Author |
|
Should fix `Cannot invoke "String.split(String)" because "pathList" is
null` seen in those cases.
Change-Id: I4bcd4e7c905017e25f83a47790d8552c7d94258e
Test: presubmits
Bug: 395130114
|
|
Bug: 354921003
Test: atest libnativeloader_e2e_tests
Change-Id: I0abfe10e8673c25fc63e377b784a0626f02e0896
|
|
(reland 2).
For both packages and shared Java libs in system image partitions
(system, product, vendor), load native libraries from the same
partition by using the linker namespace for that partition ("default"
or "system", "product", "sphal", respectively).
This is only done for native libraries in the <partition root>/lib(64)
directories when specified by an absolute path (i.e. use
java.lang.System.load rather than loadLibrary). Otherwise it's looked
up using the classloader namespace for the package, as before.
Since only loads with absolute paths are affected, compat issues are
unlikely. However to be on the safe side it's only enabled for SDK
level 35 (VIC) and later (regardless of targetSdkVersion of the
package, because the affected code is in system image partitions).
This relands https://r.android.com/2933611 but keeps the vendor and
product API domain checks unchanged in the CreateClassLoaderNamespace
code paths (cf. b/326631342).
Test: atest libnativeloader_e2e_tests \
libnativeloader_test libnativeloader_lazy_test
Test: libnativeloader_e2e_tests on S, Sv2, T, and U platforms in CI
Test: ImsServiceEntitlementUnitTests
Bug: 237577392
Change-Id: I246101c1663d81089d9b4ae9450c28d564a7603a
|
|
Revert submission 2933611-libnativeloader-shared-syslibs
Reason for revert: Fixing test breakage b/326622518, b/326631342
Reverted changes: /q/submissionid:2933611-libnativeloader-shared-syslibs
Change-Id: I746478191c0e3a2d1a36d87e7a3db980de196420
|
|
(reland).
For both packages and shared java libs in system image partitions
(system, product, vendor), load native libraries from the same
partition by using the linker namespace for that partition ("default"
or "system", "product", "sphal", respectively).
This is only done for native libraries in the <partition root>/lib(64)
directories when specified by an absolute path (i.e. use
java.lang.System.load rather than loadLibrary). Otherwise it's looked
up using the classloader namespace for the package, as before.
Since only loads with absolute paths are affected, compat issues are
unlikely. However to be on the safe side it's only enabled for SDK
level 35 (VIC) and later (regardless of targetSdkVersion of the
package, because the affected code is in system image partitions).
This is based on a reland of
commit 453b9fe909c22eb0f01b3072a5213dd46aed6f45, but with a different
solution. It also extends the approach to work for vendor and product
partitions.
Test: atest libnativeloader_e2e_tests \
libnativeloader_test libnativeloader_lazy_test
Test: libnativeloader_e2e_tests on S, Sv2, T, and U platforms in CI
Bug: 237577392
Change-Id: If8b74503edfa9229b9eada73968b7d7b5c75ca10
|
|
https://r.android.com/2962585 added new tests, but some of them fail on
S on sargo since the product partition comes from R and doesn't have
its own linker namespace.
Also switch version checks to use com.android.modules.utils.build.SdkLevel
to correctly handle pre-release codenames.
Test: libnativeloader_e2e_tests on AOSP with temporary code to verify
that TestUtils.productAppsAreShared() returns false
Test: libnativeloader_e2e_tests on sargo in heavy presubmit
Test: libnativeloader_e2e_tests on Cuttlefish S image in heavy presubmit
Bug: 325619263
Bug: 237577392
Change-Id: I7cc7d0a6288b10b5f70c6c674f88287b2489be75
|
|
Introduce a base class for common tests for all apps.
This just "documents" current behaviour as a preparation for a later CL
that will change the logic for loading private native libs.
Test: atest libnativeloader_e2e_tests
Bug: 237577392
Change-Id: I80fd10f1d980fd79d0f6f544ec6f776987531ee6
|
|
It doesn't matter if the load failed due to not finding the library or
due to finding it in the wrong linker namespace.
Add tests to check existence of private libs as a safeguard so that we
don't error out for the wrong reason.
Test: atest libnativeloader_e2e_tests
Bug: 237577392
Change-Id: I70ebffe2763d2e5e87c45c1cf94c3b268c795fdd
|
|
- Support for public libraries in /product was added with
https://r.android.com/1789089 in T. The ProductAppTest app, being
installed in /product/app, can still access them since it's in the
same partition.
- Apps in /product/app were loaded with shared library namespaces in
S, so we cannot test cases where loading of private product, system,
and system_ext libraries should fail in ProductAppTest.java.
Also use min_sdk_version and a far future target_sdk_version for the
test apps to make them run on both development and release platforms,
without compat mode.
Test: libnativeloader_e2e_tests on S, T, and U in heavy presubmits
Bug: 259700260
Change-Id: I21d785d94132af09305c71ed038c74d7b5d58fcc
|
|
Directly extending the search path to /system/${LIB} for system APKs
may result in system libs being loaded in an app classloader namespace
rather than the system namespace. If those libs then depend on other
non-public libraries, e.g. in APEXes, that are only accessible through
links from the system namespace, then those dependencies will fail to
load because the app classloader namespace doesn't have the same links.
This CL functionally undoes https://r.android.com/2211602, but only
disables tests that break, and adds some tests to exercise the
situation above.
Also change native libs in the test to use `min_sdk_version` rather
than `sdk_version`, because now when they contain code they need an
NDK, and one with exactly version 31 is normally not available in the
build. (Otoh, the java libraries with `product_specific: true` or
`vendor: true` aren't allowed to use `min_sdk_version`.)
Test: atest -a libnativeloader_test libnativeloader_lazy_test \
libnativeloader_e2e_tests
Bug: 258340826
Bug: 237577392
Change-Id: I95a3fbc6c8021c037fffda1423aa90c62973ec89
|
|
Test: atest libnativeloader_e2e_tests
Bug: 258340826
Change-Id: I2759a29d83b04e69bc0678e50eb154d117c1323c
|
|
absolute paths (reland).
This relands https://r.android.com/2304014 with a more reliable way of
determining the native library directory ("lib" or "lib64").
Test: atest libnativeloader_e2e_tests
Bug: 258340826
Change-Id: I8823c93cafa4747ef24ee57a3fcfeebe0f5788c7
|
|
This reverts commit c09e656f28e0787afd404ef03ba92b73d4117434.
Reason for revert: b/259726812
Change-Id: I75091cf421011a888e9f9514b58e0e9328542082
|
|
absolute paths.
Test: atest libnativeloader_e2e_tests
Bug: 258340826
Change-Id: I825a9f41269bc501ec633ef25ebe205d3a0a7a73
|
|
problem.
TestInformation can be retrieved with getTestInformation in individual
tests.
Also remove a leftover setenforce call that was missed in
https://r.android.com/2239933. This uncovered a problem where
remountSystemWritable() could reboot the device back to enforcing state
after DisableSELinuxTargetPreparer, so move the remount too to a
preparer.
Test: atest libnativeloader_e2e_tests
Bug: 137356719
Change-Id: I2ac05e162230717fb1d2f75efaf9e22f2c23f863
|
|
shared libs.
Both product and vendor shared libs can already load native libs in
their own partitions, so no libnativeloader change is necessary.
Test: atest libnativeloader_e2e_tests
Bug: 237577392
Change-Id: Icd5926044be1b08a0b66ec4a0f2cacc9848cb29d
|
|
In particular this addresses the case when an app without a shared
namespace loads a shared system library that in turn loads a system JNI
library.
Give full access both ways between /system and /system_ext libraries,
and add a shared system_ext library and loading from system_ext to test
that.
Test: atest libnativeloader_e2e_tests
Bug: 237577392
Change-Id: Ief4e24dadbadd26c5602c9e593276fae01bd7038
|
|
One test case in each app that tries to load them directly, and another
one that goes through a shared library in the system partition.
Also set the appropriate Soong properties on the test apps, for what it
may be worth (doesn't seem to have any effect that we don't get by just
pushing them to the various partitions).
Test: atest libnativeloader_e2e_tests
Bug: 137356719
Bug: 237577392
Change-Id: I9e2c8162e0f0928020355a507b90f0fa76bf6b6b
|
|
As opposed to the other apps, it's installed the normal way after the
system server has been restarted.
At the same time switch to using data dependencies instead of java
resources for the test apps.
Test: atest libnativeloader_e2e_tests
Bug: 137356719
Bug: 237577392
Change-Id: Ia89748f87a53418a8ec324a7934064ca34821e8f
|
|
Remove the use of SDK version 30 in the test apps and add the requisite
<uses-native-library> instead. Also test some cases when they are
missing.
Test: atest libnativeloader_e2e_tests
Bug: 137356719
Change-Id: I506351999de736fd0c40adf34b4745e3a263762a
|
|
To be used more in later CLs.
Test: atest libnativeloader_e2e_tests
Bug: 137356719
Bug: 237577392
Change-Id: I35ef7df45e6337d4eed91a82d561df5f48784670
|
|
`ro.bionic.arch` is just the "top level" arch type, e.g. `arm64`, but
for the arch-specific directories for JNI libs in the APKs we need the
full ABI, e.g. `arm64-v8a`.
Test: atest libnativeloader_e2e_tests
(Can't get it to actually exercise the fallback though - I don't know
what does.)
Bug: 137356719
Change-Id: Id3450a7bf542e9353e25a3bd4c092be346f4416d
|
|
Test: atest -a libnativeloader_e2e_tests
Bug: 237572732
Change-Id: I93e38e81ef6f37a4dbf78833e83ec5a02d6b8211
|
|
and /product.
In /system_ext we run the same tests as in /system, because there
shouldn't be any difference between them.
For /product this records how it currently works, not what we want when
b/237572732 is fixed.
Test: atest -a libnativeloader_e2e_tests
Bug: 237572732
Change-Id: I4f35c8e3b271e7bf300d410e6952a4d9073fec6b
|
|
before https://r.android.com/2160662.
The load failures of the libraries in /product are due to missing
uses_library dependencies, which is enforced in SDK 31 and later. To
make these tests comparable with the old ones, downgrade the test apps
to SDK 30. Another reason for it is that I haven't had any luck with
adding <uses-native-library> to the app manifests.
These results are the same as the old manual tests, which has been
verified by running them with a small patch
https://r.android.com/2166263. Full output in
http://go/paste/4596862691573760.
Test: atest libnativeloader_e2e_tests:
Bug: 137356719
Change-Id: I4c8492d36fc89654ba82f58d7a560dd0254db031
|
|
Replace the manual runtest.sh script with something that tradefed can
run. It requires root and will remount, push .so libraries and
public.libraries*txt files to any path they need to go to, and then do
a soft reboot.
Since libraries are pushed to the test locations rather than being
installed through LOCAL_MODULE_PATH, the shared libraries in the build
don't matter, and the same one is now used for all locations. That
means it no longer exercises the `product_specific` Soong property for
the two product libraries.
Test: atest libnativeloader_e2e_tests
Bug: 137356719
Change-Id: Ida1c70cb282946d72736da5cab0c751b60f0b03a
|
|
This change moves system/core/libnative{bridge,loader} under art/.
Bug: 137364733
Test: m
Change-Id: I9be7333d00fcd3f36cd80520e50a30ea840187ad
|