Closed peyer closed 6 years ago
It is an issue of the adbd insecure app, not mine. ADB reboot should work without root, not even requiring an unlocked bootloader.
@peyer It's probably caused by MagiskHide changing ro.debuggable to 0. It needs to be set to 1 for adb root
to work.
You can either disable MagiskHide (and reboot), or change just that prop back to 1 with a boot script or MagiskHide Props Config (it's in the Magisk repo).
@topjohnwu @Didgeridoohan Sorry about reply you so late. I have used MagiskHide Props Config to change ro.debuggable and ro.secure, it still could not work. So I push executable file to /sdcard/ , then copy them to /data/local/tmp.
@topjohnwu @Didgeridoohan Sorry about reply you so late. I have used MagiskHide Props Config to change ro.debuggable and ro.secure, it still could not work. So I push executable file to /sdcard/ , then copy them to /data/local/tmp.
I don't know how to configure system properties in the config.prop file. I have to change the ro.debuggable value to 1 in the hide_utils.c file. Recompile and flash zip, you can use the adb root command on your computer.
Goto folder path : /Users/RKumar/Library/Android/sdk/tools Run : adb root I do get - adbd is already running as root Note : But still not able to open PROD build, says device comprised. There is a checking in the source code from dev team, requested the new .apk file with disabled rooted device. And able to launch the app on Androd emulator successfully. API 26 version : Oreo_Android 8.0
@ashu123mae same on my side. I've rooted a Pixel 4 (Android 11) using Magisk and hit into the same error: "adbd cannot run as root in production builds". I've tried to use adbd insecure app on Google Play but no luck either.
adbd cannot run as root in production builds
@ashu123mae same on my side. I've rooted a Pixel 4 (Android 11) using Magisk and hit into the same error: "adbd cannot run as root in production builds". I've tried to use adbd insecure app on Google Play but no luck either.
me too
anybody find a useful method?
@ashu123mae same on my side. I've rooted a Pixel 4 (Android 11) using Magisk and hit into the same error: "adbd cannot run as root in production builds". I've tried to use adbd insecure app on Google Play but no luck either.
me too
me too
@ashu123mae same on my side. I've rooted a Pixel 4 (Android 11) using Magisk and hit into the same error: "adbd cannot run as root in production builds". I've tried to use adbd insecure app on Google Play but no luck either.
me too
me too
me too
anybody find a useful method?
flash a dev system. example my Pixel 4 flash lineage OS.
@ashu123mae same on my side. I've rooted a Pixel 4 (Android 11) using Magisk and hit into the same error: "adbd cannot run as root in production builds". I've tried to use adbd insecure app on Google Play but no luck either.
me too
me too
me too
me too
Me too in my FP4 (Android 11)
Me too in my pixel 3 (Android 12)
Any new solution for this?
@ashu123mae same on my side. I've rooted a Pixel 4 (Android 11) using Magisk and hit into the same error: "adbd cannot run as root in production builds". I've tried to use adbd insecure app on Google Play but no luck either.
me too
me too
me too
me too
me too
@ashu123mae same on my side. I've rooted a Pixel 4 (Android 11) using Magisk and hit into the same error: "adbd cannot run as root in production builds". I've tried to use adbd insecure app on Google Play but no luck either.
me too
me too
me too
me too
me too
me too
Me too in my pixel 3 (Android 12). After I set the ro.debuggable to 1 by MagiskHidePropsConf, adb root
finally get stuck and expired.
$ adb root
restarting adbd as root
timeout expired while waiting for device
Me too in my pixel 3 (Android 12). After I set the ro.debuggable to 1 by MagiskHidePropsConf,
adb root
finally get stuck and expired.$ adb root restarting adbd as root timeout expired while waiting for device
Hi folks, I guess I just solved this problem.
$ lunch aosp_blueline-userdebug
$ fastboot flashall -w
$ adb root
adbd is already running as root
I hope it works for you. ;)
Does anyone have a better plan ? My phonexiao mi mix2 can not do "adb root" ,
su -c "resetprop ro.debuggable 1"
su -c "resetprop service.adb.root 1"
su -c "magiskpolicy --live 'allow adbd adbd process setcurrent'"
su -c "magiskpolicy --live 'allow adbd su process dyntransition'"
su -c "magiskpolicy --live 'permissive { su }'"
su -c "kill -9 ps -A | grep adbd | awk '{print $2}'
"
https://liwugang.github.io/2021/07/11/magisk_enable_adbr_root.html
''' root@DebbieDavidson5646:~# adb root adbd cannot run as root in production builds root@DebbieDavidson5646:~# adb shell props
Loading... Please wait.
MagiskHide Props Config v6.1.2 by Didgeridoohan @ XDA Developers
Checking list version. Fingerprints list up-to-date.
Checking for module update. No update available.
MagiskHide Props Config v6.1.2 by Didgeridoohan @ XDA Developers
1 - Edit device fingerprint (active) 2 - Force BASIC key attestation 3 - Device simulation (active) 4 - Edit MagiskHide props (active) 5 - Add/edit custom props (active) 6 - Delete prop values 7 - Script settings 8 - Collect logs u - Perform module update check r - Reset all options/settings b - Reboot device e - Exit
See the module readme or the support thread @ XDA for details.
Enter your desired option: 5
MagiskHide Props Config v6.1.2 by Didgeridoohan @ XDA Developers
Set or edit custom prop values for your device.
Currently set props (pick to edit):
post-fs-data boot stage 1 - ro.boot.serialno 2 - ro.kernel.androidboot.serialno 3 - ro.product.board 4 - ro.product.device 5 - ro.serialno
late_start service boot stage 6 - ro.boot.serialno 7 - ro.kernel.androidboot.serialno 8 - ro.product.board 9 - ro.product.device 10 - ro.serialno
n - New custom prop r - Reset all custom props b - Go back to main menu e - Exit
See the module readme or the support thread @ XDA for details.
Enter your desired option: n
MagiskHide Props Config v6.1.2 by Didgeridoohan @ XDA Developers
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 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
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
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
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 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
''' root@DebbieDavidson5646:~# adb root adbd cannot run as root in production builds root@DebbieDavidson5646:~# adb shell props Loading... Please wait. MagiskHide Props Config v6.1.2 by Didgeridoohan @ XDA Developers
=====================================
Updating fingerprints list Checking list version. Fingerprints list up-to-date. Checking for module update. No update available. MagiskHide Props Config v6.1.2 by Didgeridoohan @ XDA Developers
=====================================
Select an option below. 1 - Edit device fingerprint (active) 2 - Force BASIC key attestation 3 - Device simulation (active) 4 - Edit MagiskHide props (active) 5 - Add/edit custom props (active) 6 - Delete prop values 7 - Script settings 8 - Collect logs u - Perform module update check r - Reset all options/settings b - Reboot device e - Exit See the module readme or the support thread @ XDA for details. Enter your desired option: 5 MagiskHide Props Config v6.1.2 by Didgeridoohan @ XDA Developers
=====================================
Custom props (active) Select an option below: Set or edit custom prop values for your device. Currently set props (pick to edit): post-fs-data boot stage 1 - ro.boot.serialno 2 - ro.kernel.androidboot.serialno 3 - ro.product.board 4 - ro.product.device 5 - ro.serialno late_start service boot stage 6 - ro.boot.serialno 7 - ro.kernel.androidboot.serialno 8 - ro.product.board 9 - ro.product.device 10 - ro.serialno n - New custom prop r - Reset all custom props b - Go back to main menu e - Exit See the module readme or the support thread @ XDA for details. Enter your desired option: n MagiskHide Props Config v6.1.2 by Didgeridoohan @ XDA Developers
=====================================
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
Thank you so much! Worked like a charm!
i'm glad to see it working
''' root@DebbieDavidson5646:~# adb root adbd cannot run as root in production builds root@DebbieDavidson5646:~# adb shell props Loading... Please wait. MagiskHide Props Config v6.1.2 by Didgeridoohan @ XDA Developers
=====================================
Updating fingerprints list Checking list version. Fingerprints list up-to-date. Checking for module update. No update available. MagiskHide Props Config v6.1.2 by Didgeridoohan @ XDA Developers
=====================================
Select an option below. 1 - Edit device fingerprint (active) 2 - Force BASIC key attestation 3 - Device simulation (active) 4 - Edit MagiskHide props (active) 5 - Add/edit custom props (active) 6 - Delete prop values 7 - Script settings 8 - Collect logs u - Perform module update check r - Reset all options/settings b - Reboot device e - Exit See the module readme or the support thread @ XDA for details. Enter your desired option: 5 MagiskHide Props Config v6.1.2 by Didgeridoohan @ XDA Developers
=====================================
Custom props (active) Select an option below: Set or edit custom prop values for your device. Currently set props (pick to edit): post-fs-data boot stage 1 - ro.boot.serialno 2 - ro.kernel.androidboot.serialno 3 - ro.product.board 4 - ro.product.device 5 - ro.serialno late_start service boot stage 6 - ro.boot.serialno 7 - ro.kernel.androidboot.serialno 8 - ro.product.board 9 - ro.product.device 10 - ro.serialno n - New custom prop r - Reset all custom props b - Go back to main menu e - Exit See the module readme or the support thread @ XDA for details. Enter your desired option: n MagiskHide Props Config v6.1.2 by Didgeridoohan @ XDA Developers
=====================================
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
Thank you so much! Worked like a charm!
i'm glad to see it working
Apologies for reaching out again, but it seems that the previous solution did not resolve the issue. I encountered a new error while attempting to run adb root. The error message states: "restarting adbd as root" followed by "timeout expired while waiting for device."
Furthermore, upon manual inspection of the build.prop file, I noticed that the ro.debuggable value remains unchanged. I am curious to understand the root cause of this issue. Could it be due to the project's (https://github.com/Magisk-Modules-Repo/MagiskHidePropsConf) inactivity or discontinuation?
!/system/bin/sh su -c "resetprop ro.debuggable 1" su -c "resetprop service.adb.root 1" su -c "magiskpolicy --live 'allow adbd adbd process setcurrent'" su -c "magiskpolicy --live 'allow adbd su process dyntransition'" su -c "magiskpolicy --live 'permissive { su }'" su -c "kill -9
ps -A | grep adbd | awk '{print $2}'
"https://liwugang.github.io/2021/07/11/magisk_enable_adbr_root.html
su -c "resetprop ro.debuggable 1"
su -c "resetprop service.adb.root 1"
su -c "magiskpolicy --live 'allow adbd adbd process setcurrent'"
su -c "magiskpolicy --live 'allow adbd su process dyntransition'"
su -c "magiskpolicy --live 'permissive { su }'"
su -c "kill -9 `ps -A | grep adbd | awk '{print $2}'` "
For those of you who are here to edit the Android hosts file, you can use Magisk systemless host.
Because I'm lazy. Here is the command in one line.
su -c "resetprop ro.debuggable 1";su -c "resetprop service.adb.root 1";su -c "magiskpolicy --live 'allow adbd adbd process setcurrent'";su -c "magiskpolicy --live 'allow adbd su process dyntransition'";su -c "magiskpolicy --live 'permissive { su }'";su -c "kill -9 `ps -A | grep adbd | awk '{print $2}'` "
Because I'm lazy. Here is the command in one line.
su -c "resetprop ro.debuggable 1";su -c "resetprop service.adb.root 1";su -c "magiskpolicy --live 'allow adbd adbd process setcurrent'";su -c "magiskpolicy --live 'allow adbd su process dyntransition'";su -c "magiskpolicy --live 'permissive { su }'";su -c "kill -9 `ps -A | grep adbd | awk '{print $2}'` "
hi, i run these commands, it works, but after then, i can't install apk by adb
adb: failed to install ff.apk: cmd: Failure calling service package: Failed transaction (2147483646)
@javaeryang What are you attempting to do? Are you sure you need to run adbd as root for installing an apk? I had to this to get access to protected system files over the adb.
@topjohnwu So much thanks for your Magisk firstly. I have rooted my PIXEL already following your provided method successfully. It looked below when I used command of adb shell sailfish:/ $ su sailfish:/ # However, I still received hint like adbd cannot run as root in production builds after I tried command of adb reboot, even I have downloaded app of adb insecure, and enabled insecure adbd and restarted adb server, it also infoed me adbd cannot run as root in production builds. How can I do next to fix it?