How to install ADB and Fastboot

Jump to a section:

What is ADB?

ADB (Android Debug Bridge) consists of a client and server part each communicating with the other. In laymen's terms, it's a communication tool between your smartphone and PC. It is accessed via the command prompt on Windows and is used to send commands to  Android from a PC. In other words, ADB is very helpful to the Android community for rooting, flashing new ROMs or simply troubleshooting smartphones.

What is fastboot?

Fastboot is basically a diagnostic tool used to modify the Android file system from a computer when the smartphone is in bootloader mode. The commands are basic, and include, for example, to 'flash' (install) a boot image or a bootloader.

nexus 5 fastboot locked
You can start in recovery mode from the ADB commands / © AndroidPIT

What are drivers?

A driver is a small program that allows an operating system – Windows in this case – to recognize a device and interact with or use it. Each deveice has its own driver, hard drive, mouse, etc. For our smartphones, the system itself uses a driver, the ADB mode and fastboot mode also because the interface is not the same. To summarize, Windows needs a driver for the smartphone, for fastboot and ADB. They are common for all smartphones.

In our test with a Windows 10 system, we didn’t have to install any additional drivers and could, with any Android smartphone, immediately access the ADB interface. On Windows 7 and earlier OS versions, connecting your smartphone and PC via ADB was somewhat more complex.

On Windows 7, the ADB interface will rarely be recognized. If the appropriate ADB driver is missing, your smartphone and PC will not be able to communicate. Thankfully, the ADB Driver Installer offers a universal solution to the problem. Make your way to this site and click on ADB Driver Installer (9:22 MB). Open the zip file and start the .EXE file contained therein. Confirm the warning regarding user access controls when it appears.

windows adb tools overview
ADB on Windows 7 is not a lot of fun / © AndroidPIT

Make your way to Settings, then tap on About phone and press seven times in quick succession on Build number. Go back to the main Settings menu, and you will now see an option for Developer options above About phone. Here, activate USB debugging.

nexus 6 activate android debugging
Tap on Build number seven times, enter Developer options, and enabled USB debugging / © AndroidPIT

Now click again on Refresh in the ADB Driver Installer, and your device should appear. If it still doesn’t work, you need to change the USB connection mode. Many smartphones are set to use the USB cable only for charging by default. This is intentional, so your files are invisible to the user of the connected computer.

Pull down the notification from the top of the screen of the smartphone while it is connected to your computer. From here, press on the USB connection type. Then select either MTP or PTP. (We found success with both options).

lg g4 usb mode
Tap on USB options and select one of the transfer protocols / © AndroidPIT

Now, when you click on Refresh, you should see your device in the list of ADB Driver Installers. Click on the line displaying your device, and then click Install. This should install the appropriate ADB drivers for your smartphone.

If you have problems, you need to open the Device Manager, delete existing entries with your smartphone and repeat the installation.

Now we want to make use of the ADB drivers. To ensure everything is as recent as possible, first, head to this website and download the android sdk_ [release number] -windows.zip file from down the page.

install sdk tools
How to install and update ADB Tools correctly / © AndroidPIT

Unpack the archive and open the SDK Manager.exe file. Wait ten seconds, until the right window (see above) opens. Since we’re not looking to program an app, we can remove a lot of the checkmarks. In fact, only Android SDK Platform Tools needs to be left checked. Note: repeat this procedure if ADB Tools begins to misbehave at any point.

Next, open up the new platform-tools folder in the previously extracted folder. Hold shift and right click anywhere in the white space of this folder and click Open a command window here. With your smartphone connected via USB to your computer, type in the command window adb devices. On your smartphone, you will see a warning message (bottom-right image).

usb debugging allow device
You must authorize USB debugging every time you connect to a new computer / © AndroidPIT

Once you have enabled USB debugging on your device and allowed it from the computer (pictured above), you device should appear in the device list within the command window.

The Unix-based systems of Mac OS and Linux make things much easier. Firstly, they eliminate the hassle of drivers. Secondly, the ADB tools keep themselves up to date thanks to simple package management systems. Mac users install the package manager Homebrew and then run brew install android platform-tools. Linux users need to look in the package system for android-platform-tools and install it. Subsequently, the ADB tools should be defined globally, so you are able to use the following ADB commands in the command line.

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.

ADB to flash apps and updates

adb sideload update.zip: this command is used to install files, such as official device updates, on your smartphone. More complex installations, such as those of Custom ROMs, however, are done through the fastboot interface.

adb install [android app].apk: this can be used to install an Android app (APK) on your smartphone/tablet.

Command Not Found: you have made a mistake, or the command is not yet available in your ADB version. Check the command via adb help or update to a newer version ADB.

No Device: Your USB cable is not connected properly, the ADB interface on your phone is not running or your computer does not recognize your smartphone. Try using a different USB port, another cable, enable USB debugging, check the drivers, the computer, and restart your device.

Server is out of date: The version of ADB Tools on your computer and the version of Android on your smartphone must be compatible. If they are not, this error occurs. Update your version of ADB Tools.

Waiting for device: This error is largely the same as the No Device error. Your computer does not recognize your smartphone. See above for the solutions.

What now?

Now you are aware of all the ways you can go about modifying your smartphone. Be it sideloading an update, rooting, or whether it is the installation of different firmware, you now have full control over your smartphone.

Need any further help? Put your questions in the comments section below.

Let's block ads! (Why?)



Read More Open link https://ift.tt/2aOimiL

Related Posts :

0 Response to "How to install ADB and Fastboot"

Posting Komentar