Android - How to start root shell with Android Studio?

WINDOWS: In the current version of Android Studio, ADB.exe is located in %USERPROFILE%\AppData\Local\Android\sdk\platform-tools\. Earlier versions of Android Studio have it in %LOCALDATA%\Android\sdk\platform-tools instead.

MAC: Find the ADB executable in ~/Library/Android/sdk/platform-tools.

Android Studio does not contain ADB, you need Android SDK for it (it is installed on first run of Android Studio 0.9.x and newer). ADB is located in sdk\platform-tools.

It's possible to add to PATH in Windows and use Terminal inside Android Studio only by command: adb shell and after use su get root shell.

  1. Locate the SDK platform tools folder (e.g. C:\android\sdk\platform-tools)
  2. Open Enviroment Variables in Windows (See
  3. Append the platform tools path (e.g. C:\android\sdk\platform-tools) to the PATH variable
  4. Reopen Android Studio
  5. Use Terminal with adb shell

Older Windows will maybe need to reboot after changing the PATH variables.

On newer Android Studio versions, the Android SDK is copied on a folder outside the Android Studio folder; it is downloaded after the first time you run Android Studio. For more information, see Android Studio 0.8.14 in Beta Channel.

On a Mac Android Studio installs adb there:

/Users/<your username>/Library/Android/sdk/platform-tools

To use it in your shell, you can add it to your .profile file:

export PATH=/Users/<your username>/Library/Android/sdk/platform-tools:$PATH

Please open a fresh terminal window after you did that, or load the changes by typing this in your terminal:

source ~/.profile