我对解锁的 Galaxy S3 (SGH-T999) 进行了 root 操作
现在,我正在努力奔跑adb root
从 Windows命令提示符,但是,我得到了adbd cannot run as root in production builds
错误。所以,我首先检查的是我的手机是否真的root了?
所以我尝试了以下方法:
打开命令提示符
$adb devices # lists my device
$adb shell # goes to shell
$su # opens a 'SuperSu' prompt on my phone and I 'Grant' permission
# // Before following the rooting instructions, I was getting 'no su command found' in the previous step. So, I believe my phone is ROOTED. **Correct me if I'm wrong.**
然而,当我这样做时adb root
, I get adbd cannot run as root in production builds
错误。
所以,我想,除了上面所做的事情之外,我可能还需要做一些额外的事情。我尝试了以下SO问题中的所有解决方案:
- 通过 ADB 以 root 身份启动脚本 https://stackoverflow.com/questions/8761992/launch-a-script-as-root-through-adb
- adb remount 权限被拒绝,但能够在 shell 中访问超级用户 -- android https://stackoverflow.com/questions/13089694/adb-remount-permission-denied-but-able-to-access-super-user-in-shell-android
- 无法在已 root 的 Android 手机上运行“adb root” https://stackoverflow.com/questions/18369144/unable-to-run-adb-root-on-a-rooted-android-phone
以上都不适合我。他们所做的就是授予 SHELL 内部的 ROOT 访问权限。我想adb root
以便我可以执行各种 adb 命令而无需进入 shell。
按设计adb root
命令仅适用于开发版本(即eng
and userdebug
其中有ro.debuggable=1
默认情况下)。因此要启用adb root
对你的其他命令rooted设备只需添加ro.debuggable=1
行到以下文件之一:
/system/build.prop
/system/default.prop
/data/local.prop
如果你想adb shell
开始为root
默认 - 然后添加ro.secure=0
以及。
或者你可以使用修改后的adbd
二进制文件(不检查ro.debuggable
)
From https://android.googlesource.com/platform/system/core/+/master/adb/daemon/main.cpp https://android.googlesource.com/platform/system/core/+/master/adb/daemon/main.cpp
#if defined(ALLOW_ADBD_ROOT)
// The properties that affect `adb root` and `adb unroot` are ro.secure and
// ro.debuggable. In this context the names don't make the expected behavior
// particularly obvious.
//
// ro.debuggable:
// Allowed to become root, but not necessarily the default. Set to 1 on
// eng and userdebug builds.
//
// ro.secure:
// Drop privileges by default. Set to 1 on userdebug and user builds.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)