<feed xmlns='http://www.w3.org/2005/Atom'>
<title>replicant/core/libnativeloader/native_loader.cpp, branch replicant-9</title>
<subtitle>Patches not merged yet, used for building and testing them
</subtitle>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/'/>
<entry>
<title>Support product-specific libraries</title>
<updated>2018-05-31T00:59:21+00:00</updated>
<author>
<name>Inseob Kim</name>
<email>inseob@google.com</email>
</author>
<published>2018-05-04T02:39:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=e5c2de355b3d37015f332af5fc97d535d97f9693'/>
<id>e5c2de355b3d37015f332af5fc97d535d97f9693</id>
<content type='text'>
Product-specific libraries in /product/lib can be exposed to Android
apps by adding the list of the libs into
/product/etc/public.libraries-&lt;companyname&gt;.txt. The libs MUST be named
as lib&lt;name&gt;.&lt;companyname&gt;.so.

Bug: 73095206
Test: with taimen
mma -j and runtest.sh. The libs are all loaded in system, but not in
vendor. After reinstalling app using adb -r and reopening app, only
libraries listed in .txt are loaded

Change-Id: I7c386813c72a7b225a7f244b6c5fec4ac0660fd3
Merged-In: I7c386813c72a7b225a7f244b6c5fec4ac0660fd3
(cherry picked from commit 67cb05654cfa677fd5db33ea0629a9496a9ae907)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Product-specific libraries in /product/lib can be exposed to Android
apps by adding the list of the libs into
/product/etc/public.libraries-&lt;companyname&gt;.txt. The libs MUST be named
as lib&lt;name&gt;.&lt;companyname&gt;.so.

Bug: 73095206
Test: with taimen
mma -j and runtest.sh. The libs are all loaded in system, but not in
vendor. After reinstalling app using adb -r and reopening app, only
libraries listed in .txt are loaded

Change-Id: I7c386813c72a7b225a7f244b6c5fec4ac0660fd3
Merged-In: I7c386813c72a7b225a7f244b6c5fec4ac0660fd3
(cherry picked from commit 67cb05654cfa677fd5db33ea0629a9496a9ae907)
</pre>
</div>
</content>
</entry>
<entry>
<title>Don't shared oem-defined libs to vendor apks</title>
<updated>2018-01-15T13:08:21+00:00</updated>
<author>
<name>Jiyong Park</name>
<email>jiyong@google.com</email>
</author>
<published>2018-01-15T12:14:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=e031994f2f7adfe8f3358bfdc3073c47fb61fa69'/>
<id>e031994f2f7adfe8f3358bfdc3073c47fb61fa69</id>
<content type='text'>
OEM-defined libs in /system/etc/public.libraries-&lt;companyname&gt;.txt files
are not available to apks in the vendor partition, otherwise we are
allowing vendor -&gt; system dependency, which is a Treble violation.

Bug: 71561542
Test: mm -j under system/core/libnativeloader/test and runtest.sh
the four libs (lib[foo|bar].[oem1|oem2].so are all loaded in
android.app.test.system app but not in android.app.test.vendor app

Change-Id: Ie5d9160ae4dc2a64beb6507602ee5a1db6518875
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
OEM-defined libs in /system/etc/public.libraries-&lt;companyname&gt;.txt files
are not available to apks in the vendor partition, otherwise we are
allowing vendor -&gt; system dependency, which is a Treble violation.

Bug: 71561542
Test: mm -j under system/core/libnativeloader/test and runtest.sh
the four libs (lib[foo|bar].[oem1|oem2].so are all loaded in
android.app.test.system app but not in android.app.test.vendor app

Change-Id: Ie5d9160ae4dc2a64beb6507602ee5a1db6518875
</pre>
</div>
</content>
</entry>
<entry>
<title>Nativeloader: Add minimal effort for host library path</title>
<updated>2018-01-02T17:05:55+00:00</updated>
<author>
<name>Andreas Gampe</name>
<email>agampe@google.com</email>
</author>
<published>2017-12-29T03:08:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=5c7d582be4054eaf846a5b1cf49a41ff83f52232'/>
<id>5c7d582be4054eaf846a5b1cf49a41ff83f52232</id>
<content type='text'>
Attempt to (somewhat) support the given library path on a non-Android
device. Iterate through the given list and construct a complete path.
This will of course not handle dependencies correctly and is best
effort.

Required (and enough) for agent-related testing in ART.

Bug: 70901841
Test: m
Change-Id: I9ecb27d662c8a2c79a70b6c5464483c449c5d034
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Attempt to (somewhat) support the given library path on a non-Android
device. Iterate through the given list and construct a complete path.
This will of course not handle dependencies correctly and is best
effort.

Required (and enough) for agent-related testing in ART.

Bug: 70901841
Test: m
Change-Id: I9ecb27d662c8a2c79a70b6c5464483c449c5d034
</pre>
</div>
</content>
</entry>
<entry>
<title>Add std::string StartsWith*/EndsWith* overloads.</title>
<updated>2017-12-20T17:42:22+00:00</updated>
<author>
<name>Elliott Hughes</name>
<email>enh@google.com</email>
</author>
<published>2017-12-20T17:41:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=579e682628805dd9c3f8c96765c0beb3f56f1494'/>
<id>579e682628805dd9c3f8c96765c0beb3f56f1494</id>
<content type='text'>
We should have done this from the beginning. Thanks to Windows, we're not
going to be able to switch libbase over to std::string_view any time soon.

Bug: N/A
Test: ran tests
Change-Id: Iff2f56986e39de53f3ac484415378af17dacf26b
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We should have done this from the beginning. Thanks to Windows, we're not
going to be able to switch libbase over to std::string_view any time soon.

Bug: N/A
Test: ran tests
Change-Id: Iff2f56986e39de53f3ac484415378af17dacf26b
</pre>
</div>
</content>
</entry>
<entry>
<title>Support partners to expose their own system libs to Android apps</title>
<updated>2017-12-19T14:35:09+00:00</updated>
<author>
<name>Jiyong Park</name>
<email>jiyong@google.com</email>
</author>
<published>2017-11-08T09:44:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=d1006fe659c2ba8d30494e28f7080beeb1e04eb4'/>
<id>d1006fe659c2ba8d30494e28f7080beeb1e04eb4</id>
<content type='text'>
Partners (entities other than AOSP) can expose their own system
libraries which are in /system/lib[64] to Android apps. This can be done
by adding the name of the libs into the files
/system/etc/public.libraries-&lt;companyname&gt;.txt.

There can be multiple of the txt files on a device, which is for the
case that multiple partners contributing to the same system image
have their own set of public libraries.

The public libraries MUST be named as lib&lt;name&gt;.&lt;companyname&gt;.so. This
is to prevent accidental exposure of AOSP-defined system private libs.

Note 1:
&lt;companyname&gt; doesn't need to be the same as the value of the sysprop
ro.product.manufacturer or anything that can be part of a file path.

Note 2:
This feature is not for exposing SoC-specific libs to Android apps. That
is already done by /vendor/etc/public.libraries.txt and is only for
libs in /vendor/lib[64].

Bug: 68280171
Test: mm -j under /system/core/libnativeloader/test
cts-tradefed run commandAndExit cts-dev -m CtsJniTestCases -t
android.jni.cts.JniStaticTest#test_linker_namespaces

Change-Id: I7d32ec27c7858e35b96c7c98223cc110acb35b81
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Partners (entities other than AOSP) can expose their own system
libraries which are in /system/lib[64] to Android apps. This can be done
by adding the name of the libs into the files
/system/etc/public.libraries-&lt;companyname&gt;.txt.

There can be multiple of the txt files on a device, which is for the
case that multiple partners contributing to the same system image
have their own set of public libraries.

The public libraries MUST be named as lib&lt;name&gt;.&lt;companyname&gt;.so. This
is to prevent accidental exposure of AOSP-defined system private libs.

Note 1:
&lt;companyname&gt; doesn't need to be the same as the value of the sysprop
ro.product.manufacturer or anything that can be part of a file path.

Note 2:
This feature is not for exposing SoC-specific libs to Android apps. That
is already done by /vendor/etc/public.libraries.txt and is only for
libs in /vendor/lib[64].

Bug: 68280171
Test: mm -j under /system/core/libnativeloader/test
cts-tradefed run commandAndExit cts-dev -m CtsJniTestCases -t
android.jni.cts.JniStaticTest#test_linker_namespaces

Change-Id: I7d32ec27c7858e35b96c7c98223cc110acb35b81
</pre>
</div>
</content>
</entry>
<entry>
<title>Load versioned llndk.libraries.txt and vndksp.libraries.txt</title>
<updated>2017-12-13T01:27:28+00:00</updated>
<author>
<name>Justin Yun</name>
<email>justinyun@google.com</email>
</author>
<published>2017-11-27T08:04:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=4a1d11038fb0ad0cdacb6a3276aa49ba1dd6ede0'/>
<id>4a1d11038fb0ad0cdacb6a3276aa49ba1dd6ede0</id>
<content type='text'>
When ro.vndk.version has a specific VNDK version in it, use the
llndk.libraries.txt and vndksp.libraries.txt files with the version
suffix in the file names.
If ro.vndk.version is "current" or not set, the version suffix will
not be added.
This is to use a proper VNDK snapshot version configuration for a
vendor patition.

Bug: 69531793
Test: In system/etc directory of a Pixel2 device,
  Change llndk.libraries.txt to llndk.libraries.27.txt
  Change vndksp.libraries.txt to vndksp.libraries.27.txt
  Set ro.vndk.version to 27 in vendor/default.prop
  reboot and check if vendor apks work.

Change-Id: I82d83b6805799ea71cc88d1e0297d265a40c0061
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When ro.vndk.version has a specific VNDK version in it, use the
llndk.libraries.txt and vndksp.libraries.txt files with the version
suffix in the file names.
If ro.vndk.version is "current" or not set, the version suffix will
not be added.
This is to use a proper VNDK snapshot version configuration for a
vendor patition.

Bug: 69531793
Test: In system/etc directory of a Pixel2 device,
  Change llndk.libraries.txt to llndk.libraries.27.txt
  Change vndksp.libraries.txt to vndksp.libraries.27.txt
  Set ro.vndk.version to 27 in vendor/default.prop
  reboot and check if vendor apks work.

Change-Id: I82d83b6805799ea71cc88d1e0297d265a40c0061
</pre>
</div>
</content>
</entry>
<entry>
<title>vendor apk is unbundled</title>
<updated>2017-09-07T11:26:10+00:00</updated>
<author>
<name>Jiyong Park</name>
<email>jiyong@google.com</email>
</author>
<published>2017-08-22T01:26:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=a07f3057d00a1da240099aa77d55aaf83362c489'/>
<id>a07f3057d00a1da240099aa77d55aaf83362c489</id>
<content type='text'>
For devices where VNDK restrictions are all enforced, vendor apks are
recognized as unbundled; since system partition and vendor partition can
be updated independently from each other.

However, since vendor apks are still bundled in the vendor partition,
they are allowed to do more than ordinaly unbundled apks that are
downloaded and installed to the data partition.

1) /vendor/lib is allowed. So the path is added to the search_paths and
permitted paths of the classloader namespace.
2) LLNDK libs are allowed in addition to the NDK libs. So, LLNDK lib list
from llndk.libraries.txt is added to the list from public.libraries.txt.
3) VNDK-SP libs are allowed. To do so, the classloader namespace is
linked to the 'vndk' namespace where VNDK-SP libs are searched and
loaded from. The list of available VNDK-SP libs is read from
vndksp.libraries.txt file.
4) Name of the namespace is changed to 'vendor-classloader-namespace'
since the namespace is configured differently from the ordinary
'classloader-namespace'.

Bug: 63553457
Test: 2017 pixel devices build and boots to the UI
Test: a vendor apk (e.g. TimeService.apk) works. Turn the airplain mode on.
Set time. Reboot the device. The time is not reset.
Test: 1) set target as 2017 pixel
2) m -j CtsVendorJniTestCases
3) copy the built apk into /vendor/app/CtsVendorJniTestCases
4) reboot / factory reset
5) adb shell am instrument -w android.jni.vendor.cts

Change-Id: I447452eb025c0a0fd076b5c9ac081d453dc6074e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For devices where VNDK restrictions are all enforced, vendor apks are
recognized as unbundled; since system partition and vendor partition can
be updated independently from each other.

However, since vendor apks are still bundled in the vendor partition,
they are allowed to do more than ordinaly unbundled apks that are
downloaded and installed to the data partition.

1) /vendor/lib is allowed. So the path is added to the search_paths and
permitted paths of the classloader namespace.
2) LLNDK libs are allowed in addition to the NDK libs. So, LLNDK lib list
from llndk.libraries.txt is added to the list from public.libraries.txt.
3) VNDK-SP libs are allowed. To do so, the classloader namespace is
linked to the 'vndk' namespace where VNDK-SP libs are searched and
loaded from. The list of available VNDK-SP libs is read from
vndksp.libraries.txt file.
4) Name of the namespace is changed to 'vendor-classloader-namespace'
since the namespace is configured differently from the ordinary
'classloader-namespace'.

Bug: 63553457
Test: 2017 pixel devices build and boots to the UI
Test: a vendor apk (e.g. TimeService.apk) works. Turn the airplain mode on.
Set time. Reboot the device. The time is not reset.
Test: 1) set target as 2017 pixel
2) m -j CtsVendorJniTestCases
3) copy the built apk into /vendor/app/CtsVendorJniTestCases
4) reboot / factory reset
5) adb shell am instrument -w android.jni.vendor.cts

Change-Id: I447452eb025c0a0fd076b5c9ac081d453dc6074e
</pre>
</div>
</content>
</entry>
<entry>
<title>system/core: use proper nativehelper headers</title>
<updated>2017-07-19T00:03:20+00:00</updated>
<author>
<name>Steven Moreland</name>
<email>smoreland@google.com</email>
</author>
<published>2017-07-18T23:53:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=00fe3ad7287fa62c09d9ab707c71ca9f3f7a8404'/>
<id>00fe3ad7287fa62c09d9ab707c71ca9f3f7a8404</id>
<content type='text'>
libnativeheader exports headers under nativeheader. These were
available before incorrectly as global headers in order to give
access to jni.h.

Test: modules using system/core find headers
Bug: 63762847
Change-Id: I86240f7857dd815100cab32ad261aa9a0a54329c
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
libnativeheader exports headers under nativeheader. These were
available before incorrectly as global headers in order to give
access to jni.h.

Test: modules using system/core find headers
Bug: 63762847
Change-Id: I86240f7857dd815100cab32ad261aa9a0a54329c
</pre>
</div>
</content>
</entry>
<entry>
<title>Load vendor public libraries to sphal namespace</title>
<updated>2017-05-25T17:30:55+00:00</updated>
<author>
<name>Dimitry Ivanov</name>
<email>dimitry@google.com</email>
</author>
<published>2017-05-01T22:12:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=882cad2d87fc003ced61ddf9d68f8810ec8c4b3f'/>
<id>882cad2d87fc003ced61ddf9d68f8810ec8c4b3f</id>
<content type='text'>
Load vendor public libraries to sphal namespace
if it exists - preserve old behavior of loading
these libraries to default namespace if sphal
namespace is not present on the device.

Bug: http://b/37410104
Test: cts-tradefed run singleCommand cts --skip-preconditions -m CtsJniTestCases
      on marlin (with enabled sphal configuration) and on angler where ld.config.txt
      is not present.

Change-Id: Iaa3fa437ba2900acc2e5b9c78039fe1553e4c9dd
(cherry picked from commit af0264bbe9f5e1228eb8fb486fa3d0d8e6e8605e)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Load vendor public libraries to sphal namespace
if it exists - preserve old behavior of loading
these libraries to default namespace if sphal
namespace is not present on the device.

Bug: http://b/37410104
Test: cts-tradefed run singleCommand cts --skip-preconditions -m CtsJniTestCases
      on marlin (with enabled sphal configuration) and on angler where ld.config.txt
      is not present.

Change-Id: Iaa3fa437ba2900acc2e5b9c78039fe1553e4c9dd
(cherry picked from commit af0264bbe9f5e1228eb8fb486fa3d0d8e6e8605e)
</pre>
</div>
</content>
</entry>
<entry>
<title>Explicitly enable greylist for classloader-namespaces</title>
<updated>2017-05-10T01:00:38+00:00</updated>
<author>
<name>Dimitry Ivanov</name>
<email>dimitry@google.com</email>
</author>
<published>2017-05-09T05:24:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=9e253ce6b7aea5a1a6f761d94a7471bb88574e53'/>
<id>9e253ce6b7aea5a1a6f761d94a7471bb88574e53</id>
<content type='text'>
The linker no longer enables greylist by default, it
needs to be explicitly enabled by specifying corresponding
flag.

Bug: https://issuetracker.google.com/38146125
Test: builds
Change-Id: Ib593f2d9a35dbadffb436f5fbc9a2a7a8f64ada0
(cherry picked from commit 058b2ea8c52ed8ce33442eda3a39e49ecd11e6dd)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The linker no longer enables greylist by default, it
needs to be explicitly enabled by specifying corresponding
flag.

Bug: https://issuetracker.google.com/38146125
Test: builds
Change-Id: Ib593f2d9a35dbadffb436f5fbc9a2a7a8f64ada0
(cherry picked from commit 058b2ea8c52ed8ce33442eda3a39e49ecd11e6dd)
</pre>
</div>
</content>
</entry>
</feed>
