adb root in emulator

adb root in emulator

Tags
Android
Published
August 2, 2020
Author
Mateusz Teteruk
Do you use physical device or emulator during development? Personally, most of the times I will go with emulator. It’s really fast right now and I don’t have to mess with cables and picking up device. This post is about adb root in emulator, how to access it.
Firstly, in Android we have adb which stands for Android Debug Bridge. You can do a lot of nice things with it. Secondly, you can also access adb root pretty easy. If you want to access files in emulator as root, you have to remember one thing. Not all image systems let you access adb as root. This command will work only when you use AOSP image system (without Google APIs/ Play). Unfortunately, you can’t use it on system with some Google integration.
In conclusion, remember which image system you use ie. when running some Python scripts and you want to check some files on your own. More info about emulators is here: https://developer.android.com/studio/run/emulator. Happy coding!