How to use ADB and Fastboot on Android
1. What are ADB and Fastboot?
ADB is often used when trying to run phone apps on computers, so you can debug errors on your apps, the apps you're creating. ADB is used for rooting Android devices.
The reason is because ADB allows you to communicate with an Android phone to some extent, so it is very handy in some cases such as when we want to give commands that allow us to transfer files to the device and then execute all the files in the rooted phone.
Similar to ADB, Fastboot is used to list attached device commands. But in Fastboot mode there are many ways to flash different parts of the Android device (such as updating the system to a new version, deleting all user data, etc.).
This mode is used more by manufacturers to diagnose and repair devices that are having software error problems, but however like ADB, Fastboot can also be used to assist users. during the process of rooting the device.
You can use Fastboot to flash a new recovery image which then allows you to gain root access that way.
In short, when trying to root Android devices, both ADB and Fastboot are the tools you will need to have to set up the device.
2. How to set up ADB and Fastboot
To get started with ADB and Fastboot, you first need to set up your phone to use the tools. Turn on Developer Options by going to Settings > About phone and tapping Build number 7 times.
Then, in Settings > Developer options , check the box next to USB debugging and go through the following dialog.
Now, download ADB and Fastboot from the Android Developer website. They are part of the Platform-Tools SDK package.
When you unzip the download, the contents will be gathered into a folder called platform-tools . There are some other entries in the folder, but you can ignore them.
Note :
If you are using Windows, you also need to download drivers for your device. There is a list of links for many famous manufacturers on the Android developer site. Drivers are not required on Mac or Linux.
Use Command Prompt or Terminal
Open the Command Prompt or Terminal application. To use ADB and Fastboot, you need to change the path in the application to point to the platform-tools folder you downloaded. There are several ways to do this:
- The standard way is to use . Type cd [path to platform-tools] into the Command Prompt or Terminal window and press Enter.
- An easier way is to type cd[space] and then drag the platform-tools folder into the Command Prompt window - it will automatically fill in the path for you.
- Even easier, on Windows, you can hold down the Shift key while right-clicking the platform-tools folder , then select Open Command Prompt Here .
Important! Differences between Windows and Mac/Linux
Before continuing, there is a small but fundamental difference between using Windows and Mac or Linux that you need to know.
On Mac and Linux, all ADB and Fastboot commands must be preceded by a slash. So where you type adb on Windows, you have to type ./adb on Mac and Linux. And fastboot on Windows needs to be ./fastboot on Mac and Linux.
For simplicity, the article will continue to use Windows commands.
3. How to use ADB
Start your phone, then connect it to your computer using a USB cable. On your computer, launch Command Prompt (or Terminal, if you're using Mac or Linux) and change directories to point to the platform-tools folder .
Type adb devices and press Enter. You will now see a list of attached devices, with serial numbers. This shows it's working and your phone is connected.
Type adb followed by the command you want to execute. A simple example is entering adb reboot to reboot your phone.
4. How to use Fastboot
Fastboot works just like ADB, except that you need to boot your phone into Fastboot mode instead of Android. You usually do this by holding the power and volume keys together when the phone is powered off.
Alternatively, use ADB and enter adb reboot bootloader .
Type fastboot devices to check if your phone is recognized. Type fastboot reboot to relaunch Android.
Good luck!
You should read it
- 5 basic ways to update, update drivers for computers
- How to Find and Update Drivers
- How to Install Audio Drivers on Windows XP
- How to use 3DP Chip to update or install missing drivers for the computer
- What is driver in computer? Drivers are required for the operating system
- How to update genuine automatic drivers for Dell laptops
- Steps to fix corrupted drivers on Windows 10
- Automatically update drivers for Windows with Snappy Driver Installer
- Instructions for finding and downloading drivers for the computer in 3 steps
- The software automatically updates the best Driver for computers
- How to identify and install the correct driver missing for Windows?
- AMD stopped producing 32-bit drivers