Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 00f5533c authored by Colin Cross's avatar Colin Cross Committed by Cherrypicker Worker
Browse files

Enable ptrace on userdebug when JDWP is disabled

r.android.com/2217921 disabled JDWP on userdebug builds by default in
order to avoid the JDWP overhead causing differences between user and
userdebug builds.  This had the side effect of disabling ptrace, which
means libmemunreachable can no longer ptrace app processes, and app
processes are no longer debuggable by gdbserver unless it is run as
root.

Add a new DEBUG_ENABLE_PTRACE zygote runtimeFlag for enabling ptrace,
and set it anywhere DEBUG_ENABLE_JDWP was set before
r.android.com/2217921.  Use the flag to call EnableDebugging.

Bug: 285967712
Test: adb shell dumpsys meminfo --unreachable com.android.gallery3d
(cherry picked from https://android-review.googlesource.com/q/commit:990b5ec72182b117e34dce85a95868850daa7549)
Merged-In: I2fb1aa0aea81400f573b8c2e2fa309b7942d9446
Change-Id: I2fb1aa0aea81400f573b8c2e2fa309b7942d9446
parent eaf79c20
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment