- This can be done either via button combination which differs from device to device or the easy method over adb command. Adb reboot fastboot Step 2. Set new IMEI. Fastboot oem writeimei 12347 Step 3. Verify that the IMEI has changed successfully run: fastboot getvar imei. Which should show the actual IMEI of the device.
- The device serial number (as reported by 'adb devices') appears to be set in the kernel, under arch/arm/plat-s5p/devs.c (look for 'deviceserial'). This may be different for your device, I'd suggest a grep through the kernel sources for the device ID that is reported by adb devices.
All tablets expose the same serial number. I can't deploy my application simultaneously on several devices (with a USB hub) using ADB.EXE because it can't distinguish them. I'm thinking about a pre-deploy process that change the internal serial number, is it possible? Where is the serial number stored? Note: tablets are rooted.
Android Debug Bridge or better known as ADB is a command line tool to access your Android Phone. It is a powerful and pretty versatile tool. You can do a range of things like pulling out logs, installing/uninstalling apps, transferring files, rooting and flashing custom ROMs, creating device backups, etc. Moreover, adb is a life-saver when your Android device gets bricked because the phone is unusable at that time.
Though the adb command shell looks intimidating and complex, it is fairly simple. So, here is a list of adb commands to get you started and do some useful things in the process.
Related: 4 Ways to Open Command Prompt Effectively
Install ADB on Windows
Unlike in previous versions, you don’t have to install complete Android SDK to install ADB. Simply download the standalone ADB zip file, extract it to a folder of your choice and you are done.
Adb Change Device Serial Number List
To access adb, open command prompt by searching it on the start menu. To run ADB commands, you need to navigate to the adb folder using the below command.
Where in C:/ADB is the folder location of the extracted ADB file.
Tip: You can also open the Command Prompt from the same directory. Hold down your Shift key and right-click within the folder then click the “open command prompt here” option
Now, connect your Android device via USB and you can proceed to test the below commands. For further reference, you can check this guide on how to properly install and test adb on Windows.
Related: 4 Ways to Turn Your Windows Computer into a WiFi Hotspot
Top 15 ADB Commands Every Android User Should Know
1. Start or Stop ADB Server
Obviously, the first command you should know is how to start and stop the adb server. This enables you to interact with your connected Android device. To start the adb server, use the below command.
Once you are done with your work, you can use the command below to stop the adb server.
2. Restart ADB in USB Mode
If the ADB server is already started and for some reason, the commands are still not working. You can try an ADB restart on the USB. There is no standalone ADB restart command. But the following command will reestablish the ADB connection via USB. This, in turn, will cause the ADB server to restart.
3. ADB Version
This is a very handy command because few commands work with the latest ADB versions. Like for example, the older versions of ADB don’t let you run flashall command. So, when you have a command in error, the first step is to check the adb version. You can then verify whether the command is supported in that version. Following is the command to check the adb version.
4. List Connected Android Devices
This is one of the most famous commands. When you connect your device to the computer via USB, use this command to verify if adb can find the connected device.
If your device is properly connected to your system, the above command will start the daemon service, scans the system and lists all the connected Android drives. The good thing about this command is that it lists both the state of the device and its serial number.
5. Status of Your Device
As you can tell from the name itself, this command can be used to know the device state. When the command is executed, it shows whether your device state is in offline, bootloader or in device mode. For a normal Android device, you will see your Android state as “device”, just like in the below image.
The connection state of the device can be one of the following:
- offline: The device is not connected to adb or is not responding.
- device: The device is now connected to the adb server.
- no device: There is no device connected.
6. Get Device Serial Number
This command lets you know the device serial number of the connected device. On your phone or tablet, you can see the device serial number by navigating to “Settings > About Phone > Status”.
7. List Files
In order to copy or send files, you need to know the exact location of the directory. Normally, the phone internal memory is named as sdcard. So, all the phone internal folders are under the /sdcard directory. Still, if you want to know the exact location or locate a particular file, you can use the “ls” command. ls command lists out the files under the directory.
Eg: adb shell ls /sdcard/Downloads
8. Copy Files from Computer to Phone
If you want to copy files from your computer to phone using adb then you can use this command. Do forget to replace [source] and [destination] with actual file paths.
Once you replace the above command with actual file paths, this is how it looks like.
![Connect Connect](https://i0.wp.com/www.androidsage.com/wp-content/uploads/2017/02/List-of-useful-ADB-and-Fastboot-commmands-for-Android-and-how-to-setup.jpg?resize=632%2C488&quality=100&ssl=1)
9. Copy Files from Phone to Computer
Just like you can copy files from your computer to Android device, you can copy files from your phone to computer. To do that simply use the below command. Replace [source] and [destination] with actual file paths.
Once you replace the above command with actual file paths, this is how it looks like. Avast secureline vpn activation code.
10. Install/Uninstall Apps
Besides from moving files back and forth, you can actually install apk files with just a single command. To install an app you have to specify the full path of the apk file. So, replace “path/to/file.apk” with the actual apk file path.
If you have multiple devices attached to your computer and only want to install the apk file on just one device then use the below command. Replace [serial-number] with the actual device serial number. You can get the device serial number using the fourth command above.
To uninstall an app, simply execute the below command. Replace <package-name> with the actual fully qualified package name of the app.
adb uninstall <package-name>
11. List all Installed Packages
Now, uninstalling packages would require you to get the exact package name. The package name is actually different from the installed app name. So, to find that below is the adb command.
Now the resulting output is pretty vast. So if you want to list a particular apk, you can try filtering by the app name. For example, I want to search the package name for FDroid, so I will use the following command.
Adb Change Device Serial Numbers
12. Backup Android Device
To backup all the device and app data you can use the below command. When executed, it will trigger the backup, asks you to accept the action on your Android device and then creates “backup.adb” file in the current directory.
13. Restore Android Device
To restore a backup, use the below command. Don’t forget to replace “path/to/backup.adb” with the actual file path.
14. Reboot Android Device into Recovery Mode
The recovery mode helps you repair or recovery the Android device using the tools built into it. Generally, you can boot into recovery mode using the volume and power button combination. Alternatively, you can also connect your device to the system and use the below command to boot into recovery mode.
15. Reboot Android Device into Bootloader Mode
The below command lets you boot into bootloader mode. Generally, the bootloader mode is very similar to the fastboot mode.
16. Reboot Android Device into Fastboot Mode
The fastboot mode is generally used to flash custom ROMs, bootloader, and even kernels. Use the below command to boot into fastboot mode.
adb reboot fastboot
17. List Connected Fastboot Devices
This is one of the lesser known commands. When you boot the device in fastboot mode, in order to check if the device is connected you can use the following command.
18. Start Remote Shell
This command starts the remote shell and lets you control and configure your device using the shell commands.
19. Take Screenshots
It is nothing hard to take a screenshot on and Android. All you have to do is press the Power button and Volume Down button at the same time. Alternatively, you can also use this command to take a quick screenshot. Replace “/path/to/screenshot.png” with the actual destination path. If you want to, you can customize the file name by changing “screenshot” with whatever name you want.
Once you replace the destination path, this is how the command looks like.
20. Record Android Screen
Apart from screenshots, you can record the Android device screen using the below command. Again, replace “/path/to/record.mp4” with the actual destination path. Of course, you can customize the file name by changing “record” with whatever name you want.
That’s all for now. Comment below sharing your thoughts and experiences about using the above adb commands on your Android device.
Click here to download this article as Android Terminal Commands PDF
ADB, the Android Debug Bridge, is one of the most powerful features built into Android. That combined with the Fastboot tool, if used right, can be incredibly useful in managing your Android device. That is the reason why we are bringing you the full list of all the ADB and Fastboot commands so that the user can make use of them when needed.
If you are into rooting your Android device or customizing it as per your taste, then you would have come across ADB and Fastboot tools. These are the two core functionalities built into the Android Operating system. The ADB and Fastboot commands are universal across all the Android devices and will produce the same result in them. Both ADB and Fastboot commands can be used to perform various tasks on your Android device. ADB can be used while the device is turned on and the Fastboot commands can be used while the device is turned off.
Before proceeding to use ADB and Fastboot on your Android device and/or your PC, there are a few things you need to take care of.
ADB Commands List
Below is the complete list of all the ADB commands in existence and what they do:
ADB Command | What it does |
adb help | Shows ADB Help documentation. |
adb devices | Lists all the Android devices connected via ADB. |
adb reboot | Reboots your Android device. |
adb reboot bootloader | Reboots your Android device into fastboot / bootloader mode. |
adb recovery | Reboots your Android device into recovery mode. |
adb install | Helps you install an APK file on your Android device. |
⇒ adb install filename.apk | Install the APK file |
⇒ adb install -r filename.apk | Re-installs or updates an app. |
⇒ adb install -s filename.apk | Installs the APK file in SD card (if the app supports). |
adb uninstall | Helps you install an app file on your Android device. |
⇒ adb uninstall com.facebook.katana | Simply uninstalls the app. |
⇒ adb uninstall -k com.facebook.katana | Keeps the data and cache folder after the app is uninstalled. |
adb logcat | Displays the log data onto the screen. |
adb bugreport | Displays the dumpsys, dumpstate and logcat data on the screen. |
adb jdwp | Lists the JDWP (Java Debug Wire Protocol) processes on the device. |
adb get-serialno | Shows the adb instance serial number string with the device. |
adb get-state | Displays the device status. |
adb wait-for-device | Used to set a delay before the next command is issued. It executes when the device is online but it can be programmed to wait till another process is done. |
adb start-server | Starts the adb server process. |
adb kill-server | Stops the adb server process. |
adb sideload | Used to flash a zip file in recovery mode when the zip file is available in the computer and not phone. Read more. |
adb pull | Pulls any file from your device and saves it on your computer. Read more. |
adb push | Used to push a file into your Android device. Read more. |
ADB Shell Commands List
Here’s a complete list of all the ADB Shell Commands and what they do:
ADB Shell Command | What it does |
adb shell | Starts the remote shell command console in the device |
adb shell pm uninstall -k –user 0 package.name.com | Helps you uninstall a system app from your Android device. Replace package.name.com with the actual package name of the app you want to uninstall. |
adb shell dumpsys | Dumps all system data about your Android device’s hardware and software configuration |
adb shell dumpsys display | Displays all the hardware and software configuration about your display. |
adb shell dumpsys battery | Displays all the hardware and software configuration about your battery. |
adb shell dumpsys batterystats | Displays all the info about your battery statistics. |
adb shell wm density | Helps you change the pixel density on your Android device. |
adb shell pm list packages | Lists all the apps installed on your device as package names. |
adb shell pm list packages -s | Lists all the system apps installed on your device as package names. |
adb shell pm list packages -3 | Lists all the 3rd party apps installed on your device as package names. |
adb shell pm list packages -d | Lists all the disabled apps on your device as package names. |
adb shell pm list packages -e | Lists all the enabled apps on your device as package names. |
adb shell pm list packages -u | Lists all the uninstalled apps with installed pages on your device as package names. |
adb shell screencap /sdcard/screenshot.png | Takes a screenshot of your device screen and saves it in sdcard with the name ‘screenshot.png‘ |
adb shell screenrecord /sdcard/screenrecord.mp4 | Starts recording your device screen and saves the video in ‘sdcard‘ with the name ‘screenrecord.mp4‘. The default record time is 180 Seconds (which is maximum). You can press CTRL + C to stop the recording any time. |
adb shell screenrecord –size 1920×1080 /sdcard/screenrecord.mp4 | Screen recording with custom width and height for the video. |
adb shell screenrecord –time-limit 120 /sdcard/screenrecord.mp4 | Screen recording with custom time limit for the video. Max value is 180. You can enter any value in the place of 120 in this command. |
adb shell screenrecord –bit-rate 4000000 /sdcard/screenrecord.mp4 | Screen recording with custom bit rate for the video. The value ‘4000000’ sets the bitrate to 4MBPS. Change accordingly. |
adb shell <Hit Enter and then execute the following command> cd /system | Changes the directory to ‘/system’. Changes accordingly. |
adb shell <Hit Enter and then execute the following command> rm -f /sdcard/facebook.apk | Deletes a file from your Android device. Give the file name with the proper path. |
adb shell <Hit Enter and then execute the following command> crm -d /sdcard/Facebook | Deletes a folder from your Android device. Give the folder name with the proper path. |
mkdir /sdcard/AndroidMore | Creates a new folder named ‘AndroidMore’ under ‘/sdcard’ |
cp /sdcard/filename.apk /sdcard/FolderName/ | To copy a file. |
mv /sdcard/filename.apk /sdcard/FolderName/ | To move a file. |
mv /sdcard/filename.apk /sdcard/anotherfilename.apk | To rename a file. |
adb shell <Hit Enter and then execute the following command> netstat | To check the network statistics of your Android device. |
adb shell <Hit Enter and then execute the following command> ip -f inet addr show wlan0 | Displays your phone’s Wi-Fi IP address. |
adb shell <Hit Enter and then execute the following command> top | Displays top CPU processes running on your Android device. |
adb shell <Hit Enter and then execute the following command> getprop ro.build.version.sdk | Used to get the properties of your Android’s build.prop configuration. |
adb shell <Hit Enter and then execute the following command> setprop net.dns1 1.2.3.4 | Used to set values to the properties present in your Android’s build.prop configuration files. |
![Adb Change Device Serial Number Adb Change Device Serial Number](https://beebom.com/wp-content/uploads/2020/08/13-Change-Preferred-Network-Type-With-Tasker-No-Root.jpg)
Fastboot Commands List
Windows 98 plus all screensavers download free. Here’s the list of all the Fastboot commands and what they do:
Fastboot Command | What it does |
fastboot devices | List all the Android devices that are connected in fastboot mode to your computer. |
fastboot oem unlock | Unlocks the bootloader on your Android device (if the OEM allows). |
fastboot oem lock | Relocks the bootloader on your Android device. |
fastboot reboot bootloader | Reboots your device into fastboot / bootloader mode (while you are still in fastboot mode itself). It is necessary sometimes. |
fastboot flash | Used to flash files on your Android device. |
fastboot flash boot boot.img | Flashes boot image on your Android device’s boot partition. |
fastboot flash recovery recovery.img | Flashes recovery image on your Android device’s recovery partition. |
fastboot boot filename.img | Instead of flashing the file, this command simply boots it (if the file is bootable). |
That was all from our side for the ADB Commands and Fastboot commands list. If we had missed anything, do let us know in the comments below!