In the case when VM is restarted all weak references
from the old VM become invalid. In such event NativeLoader
needs to clear the list of classloaders from old VM.
Bug: http://b/28453840
Bug: http://b/28449304
Change-Id: I2268c1e21cf940c57ddc5f0312f56b71aa702134
We previously relied on the fact that target sdk version 0
implies system_server, which is not true, target sdk version
may be set to 0 for other apps and it means 1 - the earliest
version of android. This change enables namespaces for
apps targeting all sdk version and for system_server.
Bug: http://b/27702070
Change-Id: I16fbdeb6868c7035aec71132c80c150c08ea2cc3
(cherry picked from commit 213676b880)
We previously relied on the fact that target sdk version 0
implies system_server, which is not true, target sdk version
may be set to 0 for other apps and it means 1 - the earliest
version of android. This change enables namespaces for
apps targeting all sdk version and for system_server.
Bug: http://b/27702070
Change-Id: I16fbdeb6868c7035aec71132c80c150c08ea2cc3
native_loader adds libraries specified in the
(optional) file: /vendor/etc/public.libraries.txt
to the list of public native libraries.
Bug: http://b/27073931
Change-Id: I927193cce99d48c3395bd0e6c373ae9fad0f13f4
(cherry picked from commit 617f495cf7)
native_loader adds libraries specified in the
(optional) file: /vendor/etc/public.libraries.txt
to the list of public native libraries.
Bug: http://b/27073931
Change-Id: I927193cce99d48c3395bd0e6c373ae9fad0f13f4
target_sdk_version=0 is a valid version, it basically
means 1 (the very first version of android) not current one.
Bug: http://b/27702070
Change-Id: Ib7843718f364b975e1d09a05377bf8580b407d9d
Allow custom classloaders to load native libraries
from anywhere under /data
Bug: http://b/27588281
Change-Id: Idb87b33361903f52b734ddd0ceaabe1ff9c281eb
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
(cherry picked from commit 4b0e963872)
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
Not all android devices ship with Webview. The requirement of
libwebviewchromium_plat_support.so to be loaded while initializing the
android namespace is therefore liable to cause a crash on devices that
don't support or use Webview. Therefore, this patch makes this
requirement conditional, but enabled by default.
To remove the dependency, device make files should add the following:
TARGET_IGNORE_WEBVIEW_CHROMIUM := true
Bug: 27336841
Bug: 27546414
Change-Id: Iaec1b58236356d981504ea8f716413ea334ca4f4
In the case when libartd.so is used libart.so does not have
to be included in the public namespace.
Bug: http://b/27496326
Change-Id: I464bafec1d9da5c3f3f03fef02af3f34bf377297
This change replaces lazy get-or-create logic for
linker namespaces with the explicit one.
ApplicationLoaders.getClassLoader(..) is now resposible for
the namespace initialization for PathClassLoaders.
Bug: http://b/27189432
Bug: http://b/22548808
Change-Id: Ife987c3ca1db33a47c20f363a5ed61512be8b5a7
(cherry picked from commit d047c925af)
This change replaces lazy get-or-create logic for
linker namespaces with the explicit one.
ApplicationLoaders.getClassLoader(..) is now resposible for
the namespace initialization for PathClassLoaders.
Bug: http://b/27189432
Bug: http://b/22548808
Change-Id: Ife987c3ca1db33a47c20f363a5ed61512be8b5a7
Shift responsibility of preloading native libraries to the user
of the library. This lets applications that do not use jni but
depend on libnative_loader.so to avoid unnecessary preloads of
public libraries which could be expensive.
Bug: http://b/27245894
Change-Id: I12a8100de5da639c068769bca21ecebff2b2d538
(cherry picked from commit 426799d770)
Shift responsibility of preloading native libraries to the user
of the library. This lets applications that do not use jni but
depend on libnative_loader.so to avoid unnecessary preloads of
public libraries which could be expensive.
Bug: http://b/27245894
Change-Id: I12a8100de5da639c068769bca21ecebff2b2d538
FindNamespaceByClassLoader returns android_namespace_t* to make
it suitable for exporting this functionality.
Bug: http://b/27189432
Change-Id: Ifef3de753192178e0184fb114596fe956fde2826
(cherry picked from commit 34fa704df4)
FindNamespaceByClassLoader returns android_namespace_t* to make
it suitable for exporting this functionality.
Bug: http://b/27189432
Change-Id: Ifef3de753192178e0184fb114596fe956fde2826
Add libart.so to the list of public libraries only for
apps targeting android M and below.
Bug: http://b/27210062
Bug: http://b/26436837
Change-Id: I1ed3b0335a343044a76273741ea8770dcce12ebe
Preload libraries needed by the public namespace
at the earlier stage. This saves time on
InitPublicNamespace and saves memory because
the libraries are linked before zygote fork.
Bug: http://b/26409579
Change-Id: I59153a4180b930f31b542d8d2cb17b5d63c36774
(cherry picked from commit d68c8e9f84)
Preload libraries needed by the public namespace
at the earlier stage. This saves time on
InitPublicNamespace and saves memory because
the libraries are linked before zygote fork.
Bug: http://b/26409579
Change-Id: I59153a4180b930f31b542d8d2cb17b5d63c36774
Note that with this change the linker will ignore
icu libraries provided by an app because public
libraries are always provided by system. At this point
it does not affect any apps because before Marshmallow
all of them were getting platform version of icu4c
libs anyways (they will be getting their own copy of the
library only in Marshmallow release).
Bug: http://b/26217329
Bug: http://b/26929349
Change-Id: I681cab43c9f28ec22319d9f0424bd3df00743a5f
Shared namespaces are used for bundled app classloaders.
Bug: http://b/22548808
Bug: http://b/26165097
Change-Id: I163033f70c50ef9ddb4164676c033ab30748964e
(cherry picked from commit ef4639c1a5)
Extracted native loader to separate library in order to
be able to reuse it for NativeActivities related native code
in libandroid_runtime.so
Bug: http://b/22548808
Change-Id: Ibcf5ddcdc5aba22e32e4b72887840e9c171c1986