This download includes tools that interface with the Android platform, such as ADB, fastboot, and systrace. This is found in the official download page for SDK Platform Tools. These days, Android has finally given us a way to get ADB – the tool we most likely will need – in a smaller download so we can just use that, instead of downloading the whole Android Studio. That presented a problem where if you had a slow internet connection, you would have to wait a while. In the past, there was no getting around this, so you had to download the whole caboodle. These days, that would mean a 600+ MB download of Android Studio which includes SDK Tools, which in turn includes ADB.
Installing ADB the proper, old fashioned way usually requires downloading the whole Android SDK.
With ADB, users can control their connected Android device over USB from a computer, copy files back and forth, install and uninstall apps, flash system elements, run shell commands, and more.ĪDB is used for a number of geeky tricks for your Android which include flashing a stock ROM or update, flashing a custom recovery, gaining root access to your device, and other such things. The Android Debug Bridge is a command-line utility included with Google’s Android SDK. We need to tell you what ADB is and what it is used for.
Windows is slightly different, and I’ll work entirely in Power Shell.Yeah, back up a bit. If you’ve done everything right, you’ll get a help page listing adb's usage. With that, open a new terminal window and type adb. Which, on my machine becomes: export ANDROID_SDK_ROOT="/Users/martinpatrick/Library/Android/sdk" export PATH="$ANDROID_SDK_ROOT/platform-tools:$PATH"Īdding the extra define for ANDROID_SDK_ROOT is unnecessary, but it may help with some more complicated power user tools as well, such as the Cocos 2D command line utility. Open this file in your favorite text editor: nano ~/.profileĪnd add this to the bottom: export ANDROID_SDK_ROOT="" export PATH="$ANDROID_SDK_ROOT/platform-tools:$PATH" This file will be hidden by default, so you may not see it Finder. profile file in your home directory (if this doesn’t exist.
And since it’s a command line utility, you’ll only need to update it for your terminal (as opposed to Mac GUI applications). Since Android Studio tends to install the Android SDK in your user directory, you’ll want to edit the PATH for your user. Now, whenever you type adb in this terminal window you can execute adb commands. So in my example above, this becomes: PATH="/Users/martinpatrick/Library/Android/sdk/platform-tools:$PATH"
To temporarily add the platform-tools directory to your PATH, type: PATH="/platform-tools:$PATH" MacOS (and Linux) users will typically use zsh or bash for their shell. On Linux the steps can vary, but the MacOS instructions will work in some cases. This will be different on each operating system, and I’ll list out MacOS and Windows below. before adb.” To get the experience many Android devs enjoy, you must update your PATH environment variable. You can run adb now, but I’ve never found a tutorial that starts with “copy your SDK path, cd into platform-tools, and type. You should see adb or adb.exe depending on your operating system. Typically it’s installed via Android Studio when you install the Android SDK under platform-tools, but it takes some amount of setup for your operating system to know to look there.įirst open up Android Studio and navigate to “Tools > SDK Manager” from the menu.
But this isn’t necessary! adb ships with the Android SDK installed by Android Studio, and with a couple of manual steps you can ensure that you’re always using the same up to date tools that your IDE is! What’s the deal with adb?Īdb stands for the “Android Debug Bridge,” which is a command line utility that is the debug multitool for Android.
If your first instinct is to search for “how to install adb,” you’ll likely end up with some instructions about installing it in via your operating system’s package manager or downloading random zip files from phone customization websites. Or: adb : The term 'adb' is not recognized as the name of a cmdlet, function, script file, or operable program. That’s when it happens: command not found: adb Eventually you may come across a tutorial telling you to type adb, maybe to enable debug mode in Firebase. So you’ve downloaded Android Studio and installed the SDK.