Scott Petrack
Scott Petrack

Reputation: 231

Setting ro.debuggable=1 to enable "adb root"

In Android 14 and 15 (at least), one way to enable adbd to run with root privileges is to set ro.debuggable to 1 in both the "post-fs-data" and "late-start service" boot stages, as defined by the MagiskHide Props Config module.

But there is a very clear explanation of what setting ro.debuggable to 1 does here. The summary there is

the ro.debuggable property has nothing to do with root access but is a property that affects the debug server of every app process in Android 13

Could someone please explain

  1. how setting that property translates into adbd being able to run as root?
  2. Why the prop needs to be set in two "boot stages" to accomplish this?
  3. Is this a safe way to enable "adb root" to succeed in production builds?

I note that with my Android 15 phone, doing this causes my phone to boot to the lock screen, and then a moment after I give the lock sequence, the phone reboots, and this second time it finishes booting after I enter the lock sequence a second time.

Hence I am slightly worried as well as very curious. Thanks.

Upvotes: 0

Views: 45

Answers (0)

Related Questions