aboutsummaryrefslogtreecommitdiff
path: root/android-changes-for-ndk-developers.md
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2017-03-23 17:42:49 -0700
committerElliott Hughes <enh@google.com>2017-04-06 10:59:24 -0700
commit9e27e58faa6ff08efbe85fc62943d483ecfed61a (patch)
tree0042c5148071c78240b2915f3f053ac82406402c /android-changes-for-ndk-developers.md
parente06c69d07324f3da67aa063202e698dedd831365 (diff)
downloadbionic-9e27e58faa6ff08efbe85fc62943d483ecfed61a.tar.gz
Add support for disabling the greylist.
Useful for testing whether apps have actually stopped using greylisted libraries even if they still have references to them in their apk to support old Android releases but also haven't bumped their targetSdkVersion yet. Since we already have two expensive __system_property_get calls and this would add a third, optimize two (but leave the third since it's not obviously amenable to optimization). None of this matters for user builds, but I don't want userdebug/eng to have distractingly different performance. (cherrypick of 7933bec2872aa1c3430149c7649726333c0ac9d8.) Bug: http://b/36106661 Test: ran "can you escape 5" with and without this property Change-Id: Id9a804695c1dca9b4be2ebd0e72f01817bb13cba
Diffstat (limited to 'android-changes-for-ndk-developers.md')
-rw-r--r--android-changes-for-ndk-developers.md6
1 files changed, 6 insertions, 0 deletions
diff --git a/android-changes-for-ndk-developers.md b/android-changes-for-ndk-developers.md
index ebdae838a..527911834 100644
--- a/android-changes-for-ndk-developers.md
+++ b/android-changes-for-ndk-developers.md
@@ -145,6 +145,12 @@ and libssl.so). In order to give you more time to transition, we will
temporarily support these libraries; so if you see a warning that means
your code will not work in a future release -- please fix it now!
+In O and later, the system property `debug.ld.greylist_disabled` can be
+used to deny access to the greylist even to an app that would normally
+be allowed it. This allows you to test compatibility without bumping the
+app's `targetSdkVersion`. Use `setprop debug.ld.greylist_disabled true`
+to turn this on (any other value leaves the greylist enabled).
+
```
$ readelf --dynamic libBroken.so | grep NEEDED
0x00000001 (NEEDED) Shared library: [libnativehelper.so]