Well, if you have been using Android for a while, you might be familiar with the Android Debug Bridge (ADB). ADB is an excellent tool for an Android developer, which helps users perform various actions via commands. ADB is a way to command your phone to some tasks.
Usually, Android users believe that developers only use ADB commands; however, it’s a myth, and even a non-developer can use a few Android Debug Bridge commands at ease.
Therefore, in this article, we have decided to list down a few best ADB fastboot commands that will help you be more productive. However, before knowing the commands, let’s know how to install ADB on Windows.
How to Install ADB on Windows?
Well, to execute the commands, you first need to install ADB on Windows. Installing ADB on Windows is pretty easy; you need to implement some of the simple steps.
- Download & Install Android SDK Package on your PC.
- Now the installer would ask you to download & install the JDK if you don’t have it installed on your PC.
- Once done, double click on the executable file and follow the on-screen instructions.
- Once installed, browse to the folder where you have installed SDK.
- Next, double-click on the SDK Manager.exe/SDK Setup.exe. This would launch the SDK installation Window.
- Select the ‘Android SDK Tools’ and click on the ‘Install‘ button.
Best ADB Command Every Android Users Should Know
Below, we have listed few best ADB Commands that would help developers and users. Let’s check out the best ADB Commands for Android.
Start ADB Server
Well, before executing some cool commands, you need to start the ADB Server. Once you start the ADB Server, you can interact with your Android device.
However, make sure to connect your Android device to the computer before starting the ADB Server. You can enter the following command to Start ADB Server.
List all Connected Devices
Well, after connecting Android devices, users should know whether the ADB bridge is working or not. To confirm that, users need to check whether the connected devices are showing on the ADB or not.
So, users need to enter the following command to list connected Android devices.
Know the Current State of the device
Well, this command is useful when the touch response of your Android device is not working. You will know whether your device is offline, bootloader, or in device mode through this command.
For a normal state, you will see the Android state as ‘Device.’ Here’s the ADB command that you can use.
Get Android’s Serial Number
Well, Android has few apps which tell the serial number. However, most of the apps need root access to work. Since not everyone has a rooted device, using an ADB command to know the serial number sounds nice. This command will let you know the device serial number of the connected device.
Creeate Full Backup
Well, Android provides users with lots of options to create a full backup of a smartphone. However, these backups are usually stored on phone storage. So, if you choose to reset your device for any reason, all your backups will be removed.
However, with the below android shell commands, you can create a backup of your smartphone directly on your computer.
adb backup -all -f /backup/location/file.ab
After creating a backup, it’s time to know how to restore. Well, restoring the backup to the phone via ADB commands is super easy, and you need to enter the command given below.
Make sure to change the ‘backup-file-location’ with the location where your backup has been saved.
adb restore <backup-file-location>
Installing Multiple Apps
If you are trying to install one or two apps, manual installation is the best way. However, if you have more than 20 apps to install, you need to take the help of ADB. With the help of ADB, you can easily install multiple Apk files on your Android smartphone.
You can use the ADB devices command given below to install multiple apk files at once on Android.
for %f in (<folder-path>\*.apk) do adb install "%f"
Make sure to change the ‘Folder-path’ with your file destination.
Well, some bloatware doesn’t uninstall unless you root your device. However, you can uninstall those system apps through ADB commands.
So, to uninstall an app, you need to execute the following command. However, make sure to replace the “package-name” with the actual package.
adb uninstall <package-name>
Well, you will find tons of screen recorder apps on the Google Play Store. These screen recording tools often come with few bugs, and it annoys a lot by showing ads. Moreover, third-party screen recorders put watermarks on your recorded videos.
However, all hassles end with ADB. You can use ADB to record your Android screen. You need to enter the following command given below to record the screen without using an app.
adb shell screenrecord <folder-path/filename.mp4>
Make sure to change the ‘Folder-path’ and ‘filename’ before executing the command.
Get System Information
Well, developers use a shell command known as dumpsys to grab system information. You can also use the same command to get detailed information about your smartphone’s system.
The command also throws lights on the hardware information as well. You need to enter the following command to get system stats and info.
adb shell dumpsys | grep "DUMP OF SERVICE"
The above command will list out all commands that you can use with dumpsys to grab information. You can later use those commands to get the most accurate hardware or software information.
Well, just like Android screen recording, you can also use ADB commands to take a quick screenshot. If your smartphone doesn’t come with a built-in screenshot taker, you don’t need to install any third-party app. You need to use the following command to take a screenshot on your Android.
adb shell screencap -p "/path/to/screenshot.png"
Make sure to replace the “/path/to/screenshot” with your destination path before executing the command.
Reboot Android Into Recovery Mode
If your Android fails to boot, you need to enter the Recovery mode. Usually, Android users need to use some key combination to reach the Recovery mode.
However, there’s an ADB command available that can force your Android to reboot into Recovery mode. You can use the code given below to Reboot Android into Recovery Mode.
Copy Files from Phone to Computer
Copying files from phone to computer is a relatively straightforward process. However, if you still choose to use ADB Command for that, you need to use the following command to copy files from smartphone to computer.
adb pull [source] [destination]
Make sure to replace the ‘Source’ and ‘Destination’ with actual file paths.
Reboot Android Into Bootloader
There’s an ADB Command which forces the connected device to boot into the bootloader. Bootloader mode is pretty much similar to the fast boot mode. Here’s the command to boot your Android into Bootloader.
Display the log data on the screen
If you are searching for an ADB command to display the log data onto the screen, you need to try the ADB Command given below. This command will display all log data right on the screen.
Wait before executing a command
If you are searching for an ADB command that can be used to program delay before the next command, then you need to use the given command. This command will automatically execute the next command when the device is ready.
Flash zip packages
If you have a rooted smartphone and deal with zip packages, you can use this command to flash zip packages directly from the custom recovery. Almost all popular custom recovery, including TWRP support it. Here’s the command.
adb sideload (path to update.zip)
Pull Files from Android to Computer
This is much like a copy-paste command for ADB. The command pulls any files that are saved on your device and stores them on your computer. Here’s the ADB command to pull any files from Android to PC.
adb pull [mention the file path on device] [mention the destination file path on your Windows]
Copy Files from Computer To Android
Like the pull command, the push command can transfer files from your computer to your smartphone. So, here is the command to push a file from your computer to your device.
adb push [mention the file path on computer] [mention the destination file path on your Android]
Stop ADB Server
Well, this is the final command which you need to enter after doing all your works. You need to enter the following command to stop the ADB Server that you have started in the very first step. You can enter the following command to Stop ADB Server.
That’s it! These are some of the best ADB Command that a non-developer can execute. These commands will help you to control your Android device better.