ADB shell commands list, ADB or the Android Debug Bridge is a command-line tool that’s used to facilitate communication between a computer and an Android device using specific commands.
This tool can be used to execute several different types of automated processes on your device such as installing apps or even making backups of important data files which are stored on it.
ADB shell commands list
To use ADB, you must have the Android SDK Platform Tools package installed on your Windows, ADB shell commands list Linux or macOS computer.
- How to Boot Samsung Devices into Download Mode
- Remove FRP Lock on Samsung with Combination File (Odin)
- 300 Mac Keyboard Shortcuts & Symbols PDF (2021)
In this article, we’ll explore a list of common ADB shell commands along with a cheat sheet so that you can see them all at once and understand how they are used without having to go through each one individually.
What is ADB Shell?
ADB commands are useful for a lot of things such as debugging Android devices, installing and uninstalling apps, and retrieving information about connected devices.
ADB can be used for these tasks because it makes use of three components which work together to make all these things possible: ADB shell commands list Client Server and Daemon.
- Client: It’s is very computer on which you use a command-line terminal to issue an ADB command. which sends commands.
- Daemon: Or, ADBD is a background process that runs on both the connected devices. It’s responsible for running commands on a connected emulator or Android device.
- Server: It runs in the background and works as a bridge between the Client and the Daemon and manages the communication. which manages communication between the client and the daemon.
ADB Shell commands provide access to a Unix Shell that runs a command directly on your Android device.
The “Client” sends a signal to the “Server” who executes the requested command and sends back both standard output and standard error, which are received by the “Client”.
Thus ADB shell commands provide access to your device’s capabilities via the command line;ADB shell commands list they let you control your Android device.
Using ADB commands, you can reboot your device, push and pull files, create a backup and restore it, sideload an update zip package, or an APK.
ADB shell commands list, ADB Shell commands are a bit more advanced than those of regular ADB.
You can use them to change the resolution of your screen faster than would be possible using the normal manual method or using a 3rd party app that needs root access.
They can also uninstall pre-installed apps or system apps that were installed on your phone by the Android manufacturer—without requiring root access.
You can even use them as a shortcut to enable and disable certain features like wi-fi tethering which might not be available from within the settings menu itself—all from your computer you will never have to touch.
This article is about 3 ADB commands that are going to be very helpful for users who want to mount their SD cards so they can work with them like normal hard drives.
SD cards are incredibly useful, ADB shell commands list but there may be times when you will have problems using them and therefore having a way to mount and unmount an SD card is highly beneficial in such situations.
Now you can use a web browser window to access your device or computer and run ADB commands through a command line interface (CMD / PowerShell) over the network.
Now that we’ve reached the end of this article, let us proceed with our list of ADB shell commands.
Warning: These commands are meant for those comfortable with using them and have some prior experience using a Linux-based operating system.
ADB Shell Commands List & Cheat Sheet
In this ADB shell commands cheat sheet, ADB shell commands list I’ll try to explain the function of all commands in simple language. Note that these commands might differ on different devices.
ADB shell
This command will open a remote shell console to the Android device connected using ADB.
ADB shell pm uninstall
Uninstalling an app on Android can only be done manually by a user, unless the system decides that it should be removed.
However, a development ADB (Android Debug Bridge) command exists that uses the Package Manager from the device to uninstall any system element or third-party apps without requiring user intervention.
pm uninstall -k –user 0 com.facebook.appmanager
-kP: Keep the app data and cache after package removal. If you want both the app data and cache to be cleared, use the following
pm uninstall –user 0 com.android.chrome
If you don’t know the exact name of the app package you want to remove, use the ADB shell pm list packages to find it.
The best way to remove all bloatware from an Android phone is by using an ADB command. The devices themselves don’t have the ability to uninstall system apps, ADB shell commands list but this special command can help you regardless:
ADB shell CMD package install-existing
To re-install an uninstalled system app, type the above command.
cmd package install-existing com.facebook.appmanager
ADB shell pm disable-user —user 0
Android does not make the task of disabling system apps too complicated for the user. As a matter of fact, we can easily do it by executing the above command followed by the package name that matches to the app we want to disable
pm disable-user –user 0 com.google.ar.core
ADB shell pm clear –user 0
Using this command, you can delete an app and all of the data associated with it.
adb shell pm clear –user 0 com.facebook.appmanager
ADB shell pm hide –user 0
In case you want to hide an app that was already installed into your Android device, launch this following command line followed by the app package name.
adb shell pm hide –user 0 com.whatsapp
ADB shell pm list packages
The list of installed application packages of your Android device can be called using the above ADB Shell command.
The command-line interface is powerful and you can use it to acquire a specific list of your wants – like a more specified listing of application packages.
For example, if you want to list only system related apps use
adb shell pm list packages -s
In order to list all third-party apps installed on your Android device, you issue the following command.
adb shell pm list packages -3
Do you want to see the list of enabled and disabled apps on your device?
As a user of Android Debug Bridge (ADB), a tool that helps developers debug their Android applications, and one that is unfortunately only available for Windows or Mac computers, one has to use parameters like “-d” (for disabled apps), “-e” (for enabled apps), and “-u” (for uninstalled apps).
adb shell pm list packages -d
adb shell pm list packages -e
adb shell pm list packages -u
To list app packages with specific keywords filter.
adb shell pm list packages <keywords>
In order to find the list of associated packages and their corresponding applications, you must enter
adb shell pm list packages -f
You can create a list that is similar to lists you can make in native command line, such as creating a command for each app made by Google.
If you wish to create a section for all apps made by the company Google, you can add this specific command line.
adb shell pm list packages | grep ‘google’
You can use packages in place of “google” like: “Samsung”, “Huawei”, “Xiaomi”, “Miui”, “Evenwell”, “android”, or even better if you search for their specific repo name from their site.
ADB shell pm path <package-name>
This command displays the path to the application’s APK file stored on the device.
ADB shell pm create-user
The following command can create a new user on your android device.
adb shell pm create-user username
ADB shell pm remove-user
In case you’d like to remove a user from your device, the following command should do the trick: adb shell pm list users -f
adb shell pm remove-user user 1
ADB shell pm get-max-users
This command enables you to print the maximum number of characters supported on an Android device.
ADB shell pm list features
Use the above command to print all supported features of the system.
ADB shell pm list permissions
The “ask permission to be human” command prints the list of all known “Human” permissions, optionally only those in group. You can use it with the following parameters:
- -g: Organize permissions by group
- -f: Print all information
- -s: Short summary of permissions
- -d: List dangerous permissions only
- -u: List the permissions seen by users only
adb shell pm list permissions -d group
ADB shell settings
You can use this command to get information about certain settings on your Android device.
By using different parameters, you can learn more about what kind of settings your Android device has enabled such as discovering the Android settings provider.
Current system volume level, notification sound, device ID, Bluetooth MAC address, current mobile data status and Wi-Fi state.
- adb shell settings list system
- adb shell settings get system volume_system
- adb shell settings get system notification_sound
- adb shell settings list secure
- adb shell settings get secure android_id
- adb shell settings get secure bluetooth_address
- adb shell settings list global
- adb shell settings get global mobile_data
- adb shell settings get global wifi_on
ADB shell dumpsys
The “ADB” command itself is a very flexible tool used for debugging and taking down notes about your Android device.
It most often comes in handy when you need to find out what’s going on with the software or hardware that isn’t working how it should.
If you were to use this tool during the development stages of an app, for instance, you could potentially find any bugs before publishing it to the App Store & Play Store.
In short, it’s used to take down information so that you keep track of everything.
Note: If you forget to manually include the permission, then please add android.permission.DUMP into your Android Manifest automatically.
adb shell dumpsys
Other variations of the command are as follows:
- adb shell dumpsys input
- adb shell dumpsys display
- adb shell dumpsys battery
- adb shell dumpsys batterystats
- adb shell dumpsys activity
- adb shell dumpsys cpuinfo
- adb shell dumpsys battery
Execute the ‘ADB shell dumpsys cpuinfo’ in your Android SDK to see the CPU information on a list that tells you what applications are processing most of the CPU’s power and which ones are free.
PS C:\Users\Technastic\Desktop> adb devices List of devices attached RZ8M810BARJ device PS C:\Users\Technastic\Desktop> adb shell dumpsys cpuinfo Load: 12.48 / 12.76 / 12.82 CPU usage from 138400ms to 89027ms ago: 8.1% 5954/system_server: 5.5% user + 2.5% kernel / faults: 9802 minor 5 major 3.1% 6485/com.android.phone: 2.2% user + 0.9% kernel / faults: 6575 minor 1 major 2.7% 6596/com.android.systemui: 2.1% user + 0.6% kernel / faults: 3178 minor 1 major 2.6% 26484/com.netflix.mediaclient: 1.3% user + 1.3% kernel / faults: 109 minor 2% 2231/sugov:0: 0% user + 2% kernel 1% 24100/kworker/u18:2: 0% user + 1% kernel 1% 5706/statsd: 0.9% user + 0.1% kernel 0.5% 3752/ueventd: 0.4% user + 0.1% kernel / faults: 25 minor 0.5% 5721/rild: 0.3% user + 0.2% kernel / faults: 20 minor 0.5% 5169/logd: 0.3% user + 0.2% kernel / faults: 43 minor 0.5% 5558/surfaceflinger: 0.3% user + 0.2% kernel / faults: 1 minor 0.4% 5170/servicemanager: 0.2% user + 0.2% kernel 0.4% 1/init: 0.3% user + 0% kernel 0.4% 19725/kworker/u17:3: 0% user + 0.4% kernel 0.3% 5546/lmkd: 0% user + 0.3% kernel 0.3% 5456/kworker/u17:1: 0% user + 0.3% kernel 0.3% 5715/argosd: 0.1% user + 0.1% kernel 0.3% 2233/sugov:4: 0% user + 0.3% kernel 0.2% 23487/kworker/u18:0: 0% user + 0.2% kernel 0.1% 23896/kworker/u16:3: 0% user + 0.1% kernel / faults: 6 minor 0.1% 8/rcu_preempt: 0% user + 0.1% kernel 0.1% 5718/lhd: 0% user + 0.1% kernel 0.1% 23489/kworker/0:2: 0% user + 0.1% kernel
ADB shell Wm density
The “density” (pixel-based measurement) designed for Android phone displays can be discovered by running the command:
ADB shell dumpsys window displays
You’ll get a very detailed output on the command window detailing your device’s screen size, resolution rate, and DPI.
Display: mDisplayId=0 init=1440x3040 560dpi base=1080x2280 420dpi cur=1080x2280 app=1080x2069 rng=1080x1017-2069x2069 deferred=false mLayoutNeeded=false mTouchExcludeRegion=SkRegion((0,0,1080,2280)) mDisplayInfo=DisplayInfo{"Built-in Screen, displayId 0", uniqueId "local:0", app 1080 x 2069, real 1080 x 2280, largest app 2069 x 2069, smallest app 1080 x 1017, mode 1, defaultMode 1, modes [{id=1, width=1440, height=3040, fps=60.000004}
ADB shell Wm size
You can find out the display resolution of your phone with this command.
PS C:\Users\Technastic\Desktop> adb shell wm size
Physical size: 1440×3040
Override size: 1080×2280
If you want to modify your Android’s screen resolution. The screen density can be modified from QHD+ , Full HD+ or HD+.
You can easily find which one is yours as long as you know your device’s display resolution, for example, Full HD+ (18:9) and 1080×2160 might be the 2160p.
But if your phone has an aspect ratio of 18:9, then your device might have a display resolution of FHD+. For more information on how to extract this information go back to my previous article “How To Measure Pixels On Android!”
FHD
adb shell wm size 1080×2220
adb shell wm density 420
HD
adb shell wm size 720×1560
adb shell wm density 360
ADB Shell command to Send SMS screen
If you want to send a text message using Python, check out the following code:
adb shell am start -a android.intent.action.SENDTO -d sms:+918052000222 –es sms_body “Test –ez exit_on_sent false
ADB shell screencap
If you’re using ADB and wish to take a screenshot of your phone, we can do that for you! Simply use this command:
adb shell screencap /sdcard/screenshot-01.png
ADB shell screen record
Android has a variety of features that you can use to customize your device. The OS comes with ways to make it more functional and efficient for both personal and professional life.
For instance, Android devices running on KitKat or above are able to record themselves as if they were cameras.
You can download the videos onto your computer and share them with friends or upload the video online wherever you wish.
adb shell screenrecord /sdcard/screenrecord-01.mp4
adb pull screenrecord /sdcard/screenrecord.mp4
In order to stop screen recording, use Ctrl+C. If you wish to record the screen in a specific resolution, the following command lets you set custom width and height in pixels:
adb shell screenrecord –size 1920×1080 /sdcard/screenrecord-01.mp4
By default, Android’s screen recorder’s duration is set to 1 minute and 30 seconds (1:30). ADB shell commands list You can decrease this duration by tapping on the 1:30 in the bottom right corner of the app until it switches to a lower number.
adb shell screenrecord –time-limit 120 /sdcard/screenrecord-01.mp4
Similarly, you can select the video bitrate by using any value between 3M to 10M in kbps. To set the video bitrate value to 4MBPS, for example, the following value can be added:
adb shell screenrecord –bit-rate 6000000 /sdcard/screenrecord-01.mp4
ADB shell get prop & ADB shell set prop
The getprop and setprop command line utilities can be used to view or change system properties on Android devices. For example, the following command can display Android system property information:
adb shell getprop
Below are some more examples:
getprop ro.build.version.sdk
getprop ro.chipname
To change the value of an entry in your build.prop, you can use the ‘adb shell setprop’ command . See the examples below:
getprop net.dns1 1.2.3.4
setprop net.dns1 1.3.4.5
getprop net.dns2 1.1.2.3
setprop net.dns2 1.2.3.4
In the same way, if you want to change the configuration of VMHeap size on your Android device, you can use the following command to configure it.
setprop dalvik.vm.heapsize 60m
There are some more variations of the ‘ADB shell getprop’ command.
It can display information about the Android system properties, SDK API level, ADB shell commands list Android security patch version, Sock, Android version, device hardware model, device manufacturer or OEM code name or trademark, etc.
All this information can be used in ADB shell commands to do different things like unrooting your Android phone and gaining root access to a specific app that requires root permission to function correctly.
- adb shell getprop
- adb shell getprop ro.build.version.sdk
- adb shell getprop ro.build.version.security_patch
- adb shell getprop ro.board.platform
- adb shell getprop ro.build.version.release
- adb shell getprop ro.vendor.product.model
- adb shell getprop ro.product.manufacturer
- adb shell getprop ro.serialno
- adb shell getprop ro.oem_unlock_supported
- adb shell getprop ro.bootimage.build.fingerprint
- adb shell getprop ro.boot.wifimacaddr
ADB -s shell getprop
If you want to get the full configuration details on your Android device such as running services, processes and information about it, you can run an ADB Devices command.
First of all, ADB shell commands list run the ADB Devices command so that you’re able to copy and paste the alphanumeric value which is simply a long number found in your output screen.
PS C:\Users\Technastic\Desktop> adb devices
List of devices attached
RZ8M810BARJ device
You can check where your device is currently signed into by typing the following command into a terminal window on your Mac.
adb -s RZ8M810BARJ shell getprop
ADB shell cat /proc/cpuinfo
To get this info continuously, paste the following command into your phone or tablet’s terminal: on demand diagnostic CPU-stats
Get an Android device properties
When you run the following command, it will return a list of system properties:
adb shell getprop | grep -e ‘model’ -e ‘version.sdk’ -e ‘manufacturer’ -e ‘hardware’ -e ‘platform’ -e ‘revision’ -e ‘serialno’ -e ‘product.name’ -e ‘brand’
ADB shell cd
Change ADB shell directory using ‘cd <directory>‘
adb shell
Then execute the following command:
cd /system
ADB shell rm
This command let’s you easily delete a file or folder on your Android device’s storage.
To launch the command window, ADB shell commands list enter ‘ADB shell’ into this window and try the following commands with parameter ‘-f‘ (to delete a file) and ‘-d‘ (to remove a directory) respectively.
rm -f /sdcard/com.whatsapp.apk
rm -d /sdcard/WhatsApp
Note: Instead of ‘rm-d‘, you can also use ‘rmdir‘.
ADB shell mkdir
Besides deleting an existing directory or folder, ADB Shell also allows you to create a new directory or sub-directory.
Active Directory (AD) shell tasks range from creating a new user account to setting read-only permissions on the root directory of a domain controller.
mkdir /sdcard/NewFolder
mkdir -p /sdcard/NewFolder/NewFolder1
mkdir -m 644 /sdcard/NewFolder
ADB shell cp
‘cp‘ stands for ‘copy’. This command is used for more than just files, it can also be used to copy entire directories located on the Android device using ADB.
The copy command allows a user to make identical copies of files and transfer them from one location to another. To do this, the format is as follows:
cp /sdcard/OPWallpaperResources.apk /sdcard/DCIM/Camera
ADB shell mv
‘mv’ stands for ‘move’. ADB shell commands list This command can be used to move a file stored on your device from a source location to a destination location.
mv /sdcard/livewallpapers.apk /system/app
The following command will allow you to move a file with a new name.
mv /sdcard/livewallpapers.apk /sdcard/Wallpapers
ADB shell top
To view a list of the most CPU-consuming processes running on your Android device open up a terminal window, type ‘top’ and then press enter.
The output will show the top five CPU-consuming processes and can be stopped by pressing Ctrl+C anywhere within the Terminal (or using Command+C in Mac OS X).
ADB shell ip
Find out the Wi-Fi IP address of an Android phone or tablet.
ip -f inet addr show wlan0
ADB shell netstat
Displays the network statistics of Android phones.
adb shell netstat
ADB Shell Key Event commands
Android devices come with Key Event commands that allow you to carry out certain actions when a specific hardware button is pressed.
These commands will let you control your Android device even if the hardware buttons do not work properly by sending signals to the app or UI option.
These commands will come in handy when you are having difficulties with hardware buttons that might be broken or malfunctioning.
- Turn Android device ON or OFF: adb shell input keyevent 2
- Press Home button: adb shell input keyevent 3
- Press Back button: adb shell input keyevent 4
- Press Call button: adb shell input keyevent 5
- End a call: adb shell input keyevent 6
- Turn ON the camera: adb shell input keyevent 27
- Open wen browser: adb shell input keyevent 64
- Press the Enter key: adb shell input keyevent 66
- Press Backspace button: adb shell input keyevent 67
- Open Contacts app: adb shell input keyevent 207
- Decrease display brightness: adb shell input keyevent 220
- Increase Display brightness: adb shell input keyevent 221
- Cut text: adb shell input keyevent 277
- Copy text: adb shell input keyevent 278
- Paste text: adb shell input keyevent 279
- Make the device sleep: adb shell input keyevent KEYCODE_SLEEP
- Make device wakeup: adb shell input keyevent KEYCODE_WAKEUP
- Toggle Power menu: (adb shell) input keyevent KEYCODE_POWER
Finally, it’s time to bring closure to the ADB shell commands cheat sheet.
Hello, My name is Shari & I am a writer for the ‘Outlook AppIns’ blog. I’m a CSIT graduate & I’ve been working in the IT industry for 3 years.