OSDN Git Service

Enable logwrapper functionality on user builds
authorTamas Berghammer <tberghammer@google.com>
Fri, 11 Nov 2016 16:08:26 +0000 (16:08 +0000)
committerAndreas Gampe <agampe@google.com>
Fri, 16 Dec 2016 17:03:06 +0000 (09:03 -0800)
commit0ca16fa58454b1685afcf8cf49c4b67b59221349
treeda9db38dcbc4d88668adc416b587566d2f1058c9
parentb8f7c351b97da590a4bd8da3dddbab166f9f789d
Enable logwrapper functionality on user builds

When an app is debuggable, check whether a script called "wrap.sh" exists
in the app's native library directory. If so, start the app using the
invoke-with functionality over the script. Weaken the invoke-with check
on the zygote side to allow the functionality for debuggable apps.

The goal of the functionality is to make malloc debug, strace and other
similar tools available for NDK based application developers.

Bug: 33668201
Test: manual - debug malloc can be enabled using the new feature
Change-Id: Ia4bec0854cf4dc08446f1671494200f54ef366ee
core/java/android/os/Process.java
core/java/android/os/ZygoteProcess.java
core/java/com/android/internal/os/ZygoteConnection.java
services/core/java/com/android/server/am/ActivityManagerService.java