After rooting my device, I need to run adb root
and then adb shell
so I could then access my applications database. When trying to run adb root
I keep getting "adbd cannot run as root in production builds". Why is this? The only other option is to use the Android emulator for testing, but we all know how terrible the emulator is (not really a viable development solution).
Unable to run 'adb root' on a rooted Android phone [duplicate]
Asked Answered
I finally found out how to do this! Basically you need to run adb shell
first and then while you're in the shell run su
, which will switch the shell to run as root!
$: adb shell
$: su
The one problem I still have is that sqlite3 is not installed so the command is not recognized.
@clu after running
adb shell
I get following 127:shell@android:/$
However su
is not recognized...please help –
Midland @Midland make sure your device is rooted of course (when I run
su
on my device, I get a SuperSU prompt on the device where I have to press "grant"); Additionally, this may be unrelated, but I also have busy box 1.20.2 installed on my device (for the TotalCommander add-in to function properly), so if your device is rooted and you still can't su
, try installing Busy Box maybe? (Otherwise, my device is fresh.) –
Sweitzer Above two steps worked. Not it is saying me
root@c5302:/ #
Then I entered adb root
but it said device not found. –
Spearing @Midland You need a rooted device and need to install superSU as well. –
Ordinance
After typing in su, it's retuning the following: [-] Connection to ui timed out –
Grenade
© 2022 - 2024 — McMap. All rights reserved.
run-as <package>
command in the adb shell provided your app has debuggable="true" in its manifest. – Candlestick