Android修改ro.debuggable

本文详细描述了如何在Android设备上通过MagiskHidePropsConfig模块设置ro.debuggable属性以获取root权限,包括安装模块、配置过程和确认重启后adbroot的成功执行。
摘要由CSDN通过智能技术生成

使用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

  • 20
    点赞
  • 25
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值