问题
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).
回答1:
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.
来源:https://stackoverflow.com/questions/18369144/unable-to-run-adb-root-on-a-rooted-android-phone