The top 15 ADB commands Android users should know
Android Debug Bridge, also known as ADB, is a powerful and flexible tool, allowing users to do many things like finding logs, installing and uninstalling applications, transferring files, root and flash custom ROMs, Create device backups, etc. In fact, most of the advanced instructions and instructions on how to perform certain operations on Android tend to use adb commands to get things done. Moreover, adb is also useful when Android devices do not work as usual or when things become very messy and cannot be used. Although it looks a bit 'scary' and complicated, the following is a list of adb commands to get started and make some useful things in the process.
15 useful ADB commands on Android
- Install ADB on Windows
- ADB commands are often used
- 1. Start or stop the ADB server
- 2. List the connected Android devices
- 3. Know the status of the device
- 4. Display device serial number
- 5. Copy files from computer to phone
- 6. Copy files from phone to computer
- 7. Install / Uninstall the application
- 8. Backup Android device
- 9. Restore Android device
- 10. Restart the Android device into Recovery mode
- 11. Restart your Android device into Bootloader mode
- 12. Restart your Android device into Fastboot mode
- 13. Start Shell remotely
- 14. Take a screenshot
- 15. Record the Android screen
Install ADB on Windows
Unlike in previous versions, users do not have to install the complete Android SDK to install ADB. Just download the standalone ADB zip file, extract it to the root of drive C and everything is complete. To access adb, open Command Prompt by searching for it in the Start menu and navigating to the adb folder with the command below. If you have installed adb in another folder, change the command accordingly.
cd c:adb
Tip: After that, open a Command Prompt from the same folder, press and hold the Shift key , then right-click the folder, and then click the option ' Open command prompt here '.
Now, connect your Android device via USB and test the commands below.
ADB commands are often used
1. Start or stop the ADB server
Obviously, the first command should know how to start and stop the adb server. This allows users to interact with the connected Android device. To start the adb server, use the command below.
adb start-server
Once your work is done, users can use the command below to stop the adb server.
adb kill-server
2. List the connected Android devices
This is one of the most popular commands. When connecting the device to a computer via USB, use this command to verify whether adb can find the connected device.
adb devices
If the device is properly connected to the system, the above command will start the service daemon, scan the system and list all connected Android drives. The best part of this command is that it lists both the state of the device and its serial number.
3. Know the status of the device
As its name suggests, this command can be used to know device status. When the command is executed, it will show whether the device status is in offline mode, bootloader or device. For a normal Android device, users will see their Android status as 'device', just like in the image below.
adb get-state
4. Display device serial number
This command tells the user the serial number of the connected device. On the phone or tablet, users can see the device's serial number by navigating to ' Settings> About Phone> Status '.
adb get-serialno
5. Copy files from computer to phone
If you want to copy files from your computer to your phone using adb, you can use this command. Don't forget to replace [source] and [destination] with the actual file path.
adb push [source] [destination]
When replacing the above command with the actual file path, it will look like the following.
adb push "E:Video SongsAankhon Mein Teri - Om Shanti Om.mp4" "/sdcard/Downloads/video.mp4"
6. Copy files from phone to computer
Just like when copying files from a computer to an Android device, users can also copy files from the phone to the computer. To do that, just use the command below. Replace [source] and [destination] with the actual file path.
adb pull [source] [destination]
When replacing the above command with the actual file path, the command will look like the following.
adb pull "/sdcard/Downloads/video.mp4" D:Downloads
7. Install / Uninstall the application
In addition to moving files back and forth between your computer and phone, users can actually install apk files with a single command. To install an application, the user must specify the full path of the apk file. So replace 'path / to / file.apk' with the actual apk file path.
adb install "path/to/file.apk"
If there are many devices attached to the computer and just want to install the apk file on a single device, use the command below. Replace [serial-number] with the actual device serial number. The user can get the device serial number with the fourth command above.
adb -s [serial-number] install "path/to/file.apk"
To uninstall an application, just execute the command below. Replace with the application's actual qualified package name.
adb uninstall
8. Backup Android device
To backup all device and application data, users can use the command below. When executed, it activates the backup feature, asking the user to accept the action on the Android device and then create the file 'backup.adb' in the current directory.
adb backup -all
9. Restore Android device
To restore a backup, use the command below. Don't forget to replace 'path / to / backup.adb' with the actual file path.
adb restore "path/to/backup.adb"
10. Restart the Android device into Recovery mode
Recovery mode helps users repair or restore Android devices with the built-in tools. In general, users can boot into Recovery mode by using a combination of 2 volume and power buttons. In addition, users can also connect the device to the system and use the command below to boot into Recovery mode.
adb reboot-recovery
11. Restart your Android device into Bootloader mode
The following command allows users to boot into bootloader mode. In general, bootloader mode is very similar to fastboot mode.
adb reboot-bootloader
12. Restart your Android device into Fastboot mode
Fastboot mode is often used to flash custom ROMs, bootloaders and even kernels. Use the command below to boot into fastboot mode.
adb fastboot
13. Start Shell remotely
This command starts the remote shell, as well as allows the user to control and configure the device with shell commands.
adb shell
14. Take a screenshot
It is not difficult to take screenshots on Android. All you have to do is press the power button and volume down button at the same time. In addition, users can also use this command to take quick screen shots. Replace '/path/to/screenshot.png' with the actual destination path. If desired, the user can customize the file name by changing the 'tweak' with any desired name.
adb shell screencap -p "/path/to/screenshot.png"
When replacing the destination path, the command will look like the following.
adb shell screencap -p "/sdcard/screenshot.png"
15. Turn on the Android screen
In addition to screen shots, users can also record Android device screens with the command below. Again, replace '/path/to/record.mp4' with an actual destination path. Of course, users can customize the file name by changing 'record' with any desired name.
adb shell screenrecord "/path/to/record.mp4"
That's all the basic TipsMake.com commands you want to share with readers. If you want to share your thoughts and experiences on using adb commands on an Android device, leave comments in the comment section below!
Good luck!
You should read it
- How to start with Android Debug Bridge
- How to take Android screenshots from Windows and Mac
- How to Lock Bootloader on Android
- How to use the Linux command line on Android with Termux
- 12 reasons to install custom Android ROMs
- Sub-commands in nslookup Windows command (Part 2)
- Nokia N9 already has an Android 4.0 installation
- How to set up ADB / USB Drivers and Fastboot for Android devices
- Android SDK - Download Latest Android SDK
- How to install and use ADB & Fastboot on Windows, Mac, Linux simply
- How to install Android on a Windows computer without software emulation
- Instructions to install Vietnamese on Android phones
Maybe you are interested
BadBox Malware Is Picking Up Speed, Targeting Certain Android Devices
How to Uninstall Any Android App Using ADB (Including System Apps and Bloatware)
How to fix Android not connecting to Windows via ADB
How to use ADB and Fastboot on Android
Top 21 ADB commands Android users should know
How to Hack Broadband and Increase Network Speed