What is ADB? ADB is short for Android Debug Bridge, a versatile command-line tool that lets you communicate with a device. It was mainly for developers to debug apps, but now basic users can also use it to perform many useful activities between computer and their Android smartphones. In this article, we are going to show you how to install ADB in Windows computer and how to use ADB to do something interesting to Android mobile phone.
Part 1. Install ADB on Windows
It is quite easy to install and set up ADB in Windows computer. Actually, the size of the tool is merely 4.51MB, so it won’t take up much space on your computer. Here we Windows 10 as example.
- Step 1. Download Platform Tools for Windows. Confirm to download on the new window and save the zip file to a folder on your PC.
- Step 2. Extract the zip file after download.
- Step 3. Press Shift key and right click within the extracted folder, then choose Open PowerShell window here (or Open command window here on some computers)
- Step 4. A command prompt should appear.
This means that ADB is set up on your Windows computer. In order to communicate with your Android phone, however, you also need to enable USB debugging on your handset.
Part 2. Enable USB Debugging on Your Mobile Phone
USB debugging must be turned on in order to use ADB. The steps to turn on USB debugging are varied on different versions of Android OS, but the instruction below should work for most Android smartphones used nowadays.
- Step 1. Go to Settings > About phone.
- Step 2. Scroll down to find and tap Build number for 7 times.
- Step 3. Back to Settings, then find and tap Developer options.
- Step 4. Within Developer options, enable USB debugging. Confirm your choice.
- Step 5. Connect your phone to PC.
- Step 6. Choose Allow when “Allow USB debugging?” window pops up on your phone screen.
Note: It is suggested that tick Always allow this computer if you are using a trusted computer in order to get smooth experience with ADB and in case of accidents when you need to rescue data but unable to operate on the phone, like Android broken screen data recovery.
Part 3. Test ADB
Once you have finished the above preparing work, you can test if ADB works.
- Step 1. Run ADB command window as described on Part 1.
- Step 2. Connect your phone to PC, and type adb devices in command window and hit Enter.
If everything goes right, a result will return as above (with different series code). If nothing appears, then you should check if the driver for your phone is properly installed. A straight indication of functional driver is that your phone should be recognized by the computer.
Part 4. Useful Things You Can Do with ADB
Once ADB is correctly installed on your Windows computer, you can do many useful things with ADB. The following is just a small portion of all the things it can do. You will find that lots of tools can do the same thing in normal environment, but ADB can do it easily and may play important role on some occasions.
USB debugging must be turned on!
Option 1. Backup and Restore Android with ADB
Backup is not necessarily the most frequently used function for Android users, but it should be the very first thing whenever we try anything new or danger. In case of accidents, a backup of mobile phone will work like a saver to our life. ADB can help you make backups for your Android smartphone with no need of root or custom recovery.
adb backup -all -f <path/filename.ab>
adb restore <path/filename.ab>
The path should be a location on your computer system drive. For example,
adb backup -all -f /Backup/backup1.ab
- The backups are saved to computer instead of phone memory or SD card.
- You’ll need to unlock your phone to allow the backup to start.
- The backup mainly contains documents and media files on your phone. For a literarily full backup of phone data and whole system, refer how to make a Nandroid backup in custom recovery.
Option 2. Install APK for Android from Computer
There are already lots of methods to install apps to Android phone, including installing apk files on mobile phone, but occasionally you may need to install APK to Android phone from computer. This is especially useful if you know that the installation is completely silent with no need of operation on phone screen.
adb install <path to the apk on your computer>
The path should be a location on your computer system drive. Please move the apk file to the system drive if it is not. For example,
adb install /MyDownloads/TitaniumBackup.apk
- No need to operate on phone screen.
- No prompt of permissions from the app.
- No need to enable Unknown source on mobile phone.
- Be care of apk files containing malware.
This function may work magically when you want to install an app to your phone but unable to control the device, like due to broken or black screen.
Option 3. Reboot Phone to Recovery Mode and Bootloader
In recovery mode, people can clear cache and data, factory reset or backup mobile phone. In bootloader (or Download mode for Samsung), people can flash ROMs to handset. If you don’t know anything about recovery mode and bootloader, please make sure you know it clearly and need it first.
adb reboot recovery
adb reboot bootloader
- No need to press key/button groups on phone body.
- Occasionally, you may need to reboot manually or even remove battery when the command fails.
- After every reboot, you’ll need to reconnect the phone in order to let ADB work
Option 4. Convert SD Card as Internal Storage with ADB
Since Android Marshmallow, users can format SD card as internal storage, which effectively reduces insufficient storage problem. The conversion is easy to do on Settings > Storage if your phone is supported for the feature. However, some manufacturers intentionally hide this function from users even if their smartphones have upgraded to Android 6.0 or newer. With ADB, we can convert SD card as internal storage when the option is invisible.
Warning: Please move or back up SD files card first. After the conversion, the SD card won’t be recognized by other mobile phones or computers. Once your phone is reset or dead, you may find the SD card inaccessible by any device.
- Step 1. Launch ADB command window.
- Step 2. Connect the phone inserted with SD card to computer.
- Step 3. Type the following commands and hit enter after each:
sm partition disk:179,64 private
- Step 4. Go to Settings > Storage to check your storage status.
Note: If there is no change in phone storage, then you may reboot it and check the storage again.
The above are 4 useful things that Android users may like or need to do with ADB. If you have more ideas or questions about what we can do with ADB, please kindly share with us.