How to install ADB and Fastboot on your PC

How to install ADB and Fastboot on your PC

If you want to root your Android device, install a custom ROM or many other advanced-level techniques then you need to learn how to install ADB and Fa

Demolition Derby Games for Android
How to Root Asus Zenfone 3s Max ZC521TL and install TWRP custom recovery
How to Root Asus Zenfone Live ZB501KL and install TWRP custom recovery

If you want to root your Android device, install a custom ROM or many other advanced-level techniques then you need to learn how to install ADB and Fastboot on Windows. Here is a guide for getting going on getting the most out of your Android experience as well as a list of the most common mistakes.

What are ADB and Fastboot?

These two tools allow you to send terminal commands to your phone from your computer via USB. They both serve different functions, but they can be installed with relative ease at the same time, so it’s helpful to have both. Here’s a (very) brief breakdown on what these tools do:

  • Android Debug Bridge (ADB): This tool allows you to send a wide array of terminal commands—including but not limited to basic Linux shell commands, plus some specialty developer commands—to your phone at just about any time (as long as you have debugging enabled on your phone). You can send commands while the phone is turned on and booted, or even when it’s in recovery mode. While ADB is often used in conjunction with rooting or modifying your phone, you can use ADB to send terminal commands to unrooted devices as well.
  • Fastboot: When you need to modify your phone’s firmware, fastboot is the tool you need. This allows you to send commands to the bootloader, which means you can flash/modify things like custom recoveries. You can’t flash whole ROMs with it, but it’s helpful for many things that ADB can’t do. Fastboot isn’t enabled for all phones, so you may have to check your specific device.

Download ADB and Fastboot for Windows, Mac, Linux

The latest releases of Android SDK Platform Tools are available below and you can download ADB and Fastboot for various platforms: Windows, Mac and Linux. This page will always have the latest ADB / Fastboot binaries that are also included with the latest release of Android Studio / SDK Manager.

Windows: Download platform-tools-latest-windows.zip

MacOS: Download platform-tools-latest-darwin.zip

Linux: Download platform-tools-latest-linux.zip

Windows

Depending on which version of Windows you’re using, these steps may be slightly different. To add ADB to your PATH variable, follow these steps:

  1. Open the Start menu and search for “advanced system settings.”
  2. Click “View advanced system settings.”
  3. Click the box that says “Environment Variables.”
  4. Under “System variables” click on the variable named “Path”.
  5. Click “Edit…”
  6. (Windows 7,8): Add ;[FOLDERNAME] to the end of the “Variable value” box, replacing [FOLDERNAME] with the folder path where you extracted Platform Tools. Be sure to include the semicolon at the beginning so Windows knows you’re adding a new folder.
  7. (Windows 10): Click “New” and paste the folder path where you extracted the Platform Tools. Hit Enter and click OK.
 Now when you want to use ADB or fastboot, simply open a command prompt from the Start Menu and enter your commands.

MacOS/Linux

Editing the macOS and Linux PATH files are a little more complicated than on Windows. However, if you’re comfortable with a command line, it’s still pretty simple. This method will automatically add the location of ADB and fastboot to your PATH every time you log into your system:

  1. Open up a Terminal window by navigating to Applications/Utilities or searching for it in Spotlight.
  2. Enter the following command to open up your Bash profile: touch ~/.bash_profile; open ~/.bash_profile
  3. The .bash_profile file should open in your default text program.
  4. Add this line to the end of the file: export PATH=”$HOME/[FOLDERNAME]/bin:$PATH” replacing [FOLDERNAME] with the location where you extracted ADB and fastboot.
  5. Save the file and press Cmd+Q to quit your text editor.
  6. In your terminal enter source ~/.bash_profile to run your Bash profile for the first time.

From now on, any time you open a Terminal window, you can run ADB and fastboot commands from wherever you are.

ADB commands

adb backup -f FullBackup.ab -apk -all: The idea here is that you make a full backup of your app data. In practice, the results are unreliable. Not all apps allow for an ADB backup, meaning you might need to find an alternative method.

adb devices: With this command you will receive an overview of all devices connected to the computer device with ADB support. Here you can see the device identifier and the status. If the word Unauthorized appears, it means you need to allow the computer permission to communicate with your smartphone.

adb reboot: reboots your smartphone

adb reboot recovery: reboots your device into recovery mode

adb reboot bootloader: reboots into the bootloader. Once it is in this mode, you can communicate with the device via the fastboot command.

adb push [directory on the computer / dateiname.endung] [Directory in the smartphone]: this command moves a file from the stated folder on your computer to the stated folder on your smartphone.

adb pull [Directory in the smartphone / dateiname.endung] [directory on the computer]: if you run this command, it will save a file from your smartphone or tablet to your PC. Without specifying the computer directory, the file will land in the path of the ADB executable or /home directory.

adb shell screencap -p /sdcard/screenshot.png
adb pull /sdcard/screenshot.png
adb shell rm /sdcard/screenshot.png:

To take a screenshot, saved to your computer.

adb help: overview of all ADB commands, syntax and help.

COMMENTS

WORDPRESS: 0
DISQUS: