使用adb root报错“adbd cannot run as root in production builds”
步骤:
1.安装MagiskHide Props Config模块到面具
adb push MagiskHidePropsConf-v6.1.2 /data/local/tmp
在面具里安装这个模块
2.运行这个模块
adb shell
su
props
发现这里没有ro.debuggable这个属性,需要添加一个
New custom prop
Enter the prop to set. Example:
ro.sf.lcd_density
b - Go back
e - Exit
Enter your desired option: ro.debuggable
MagiskHide Props Config v6.1.2
by Didgeridoohan @ XDA Developers
=====================================
ro.debuggable
ro.debuggable is
one of the sensitive props that can be
set by the MagiskHide props option.
Are you sure you want to proceed?
y - Yes
n - No
e - Exit
Enter your desired option: y
MagiskHide Props Config v6.1.2
by Didgeridoohan @ XDA Developers
=====================================
ro.debuggable
Enter the value you want to set
ro.debuggable to,
or select from the options below.
The currently set value is:
0
Please enter the new value.
b - Go back
e - Exit
Enter your desired option: 1
MagiskHide Props Config v6.1.2
by Didgeridoohan @ XDA Developers
=====================================
ro.debuggable
This will set ro.debuggable to:
1
Pick an option below to change
what boot stage the prop will
be set in, or set/reset a delay:
1 - Default (current)
2 - post-fs-data
3 - late_start service
4 - Both boot stages
d - Delay
Do you want to continue?
Enter y(es), n(o), e(xit)
or an option from above: 4
MagiskHide Props Config v6.1.2
by Didgeridoohan @ XDA Developers
=====================================
ro.debuggable
This will set ro.debuggable to:
1
Pick an option below to change
what boot stage the prop will
be set in, or set/reset a delay:
1 - Default
2 - post-fs-data
3 - late_start service
4 - Both boot stages (current)
d - Delay
Do you want to continue?
Enter y(es), n(o), e(xit)
or an option from above: y
Working. Please wait...
Working. Please wait...
Working. Please wait...
Working. Please wait...
MagiskHide Props Config v6.1.2
by Didgeridoohan @ XDA Developers
=====================================
Reboot - ro.debuggable
Reboot for changes to take effect.
Do you want to reboot now (y/n)?
Enter y(es), n(o) or e(xit): y
Rebooting...
root@DebbieDavidson5646:# adb root
root@DebbieDavidson5646:# adb root
adbd is already running as root
root@DebbieDavidson5646:# adb root
adbd is already running as root
root@DebbieDavidson5646:#
'''
just set ro.debuggable to 1 then it's working
这时候 ro.debuggable就是1了,可以执行adb root