21

How do I root the Android emulator? I need root to install an .apk file on the emulator.

eldarerathis
  • 36,787
  • 16
  • 144
  • 175
mahdi
  • 641
  • 3
  • 6
  • 8
  • If you're not fond of command lines, you can also explore the emulator with the Eclipse ADT plugin. The plugin integrates a couple of development tools like ADB, DDMS, logcat, etc. I find it very interesting to connect my phone with USB (enable USB Debugging) and watch how everything works, and the same can be done for the emulator. – Sander Versluys Dec 28 '10 at 18:39

1 Answers1

23

The Android emulator gives you root access, you don't need to root it. Check out the emulator section on android.com for details on how to do things as root, for example:

-shell

Create a root shell console on the current terminal. It differs from the adb shell command in the following ways:

  • It creates a root shell that allows you to modify many parts of the system.
  • It works even if the adb daemon in the emulated system is broken.
  • Pressing Ctrl+C (⌘C) stops the emulator, instead of the shell.

For example:

$ emulator @Nexus_5X_API_23 -shell
Matthew Read
  • 50,567
  • 30
  • 145
  • 273
  • Although you get 'root' access, some folders are owned by system, and root can't see into it. You your device was truly rooted, I hope you can see into these folders. – Ben Butterworth Oct 23 '20 at 16:30