bugreportz
Generate a zipped Android bug report.
This command can only be used through adb shell.
More information: https://cs.android.com/android/platform/superproject/+/master:frameworks/native/cmds/bugreportz.
-
Generate a complete zipped bug report of an Android device:
bugreportz -
Show the progress of a running
bugreportzoperation:
bugreportz -p -
Show the version of
bugreportz:
bugreportz -v -
Display help:
bugreportz -h
logcat
Dump a log of system messages, including stack traces when an error occurred, and information messages logged by applications. More information: https://developer.android.com/studio/command-line/logcat.
-
Display system logs:
logcat -
Write system logs to a file:
logcat -f {{path/to/file}} -
Display lines that match a regular expression:
logcat --regex {{regular_expression}} -
Display logs for a specific PID:
logcat --pid={{pid}} -
Display logs for the process of a specific package:
logcat --pid=$(pidof -s {{package}})
pm
Display information about apps on an Android device. More information: https://developer.android.com/studio/command-line/adb#pm.
-
List all installed apps:
pm list packages -
List all installed system apps:
pm list packages -s -
List all installed 3rd-Party apps:
pm list packages -3 -
List apps matching specific keywords:
pm list packages {{keyword1 keyword2 ...}} -
Display a path of the APK of a specific app:
pm path {{app}}
screencap
Take a screenshot of a mobile display.
This command can only be used through adb shell.
More information: https://developer.android.com/studio/command-line/adb#screencap.
- Take a screenshot:
screencap {{path/to/file}}
dumpsys
Provide information about Android system services.
This command can only be used through adb shell.
More information: https://developer.android.com/studio/command-line/dumpsys.
-
Get diagnostic output for all system services:
dumpsys -
Get diagnostic output for a specific system service:
dumpsys {{service}} -
List all services
dumpsyscan give information about:
dumpsys -l -
List service-specific arguments for a service:
dumpsys {{service}} -h -
Exclude a specific service from the diagnostic output:
dumpsys --skip {{service}} -
Specify a timeout period in seconds (defaults to 10s):
dumpsys -t {{8}}
dalvikvm
Android Java virtual machine. More information: https://source.android.com/devices/tech/dalvik.
- Start a specific Java program:
dalvikvm -classpath {{path/to/file.jar}} {{classname}}
cmd
Android service manager. More information: https://cs.android.com/android/platform/superproject/+/master:frameworks/native/cmds/cmd/.
-
[l]ist all running services:
cmd -l -
Call a specific service:
cmd {{service}} -
Call a service with specific arguments:
cmd {{service}} {{argument1 argument2 ...}}
bugreport
Show an Android bug report.
This command can only be used through adb shell.
More information: https://cs.android.com/android/platform/superproject/+/master:frameworks/native/cmds/bugreport.
- Display a complete bug report of an Android device:
bugreport
settings
Get information about the Android OS. More information: https://adbinstaller.com/commands/adb-shell-settings-5b670d5ee7958178a2955536.
-
Display a list of settings in the
globalnamespace:
settings list {{global}} -
Get a value of a specific setting:
settings get {{global}} {{airplane_mode_on}} -
Set a specific value of a setting:
settings put {{system}} {{screen_brightness}} {{42}} -
Delete a specific setting:
settings delete {{secure}} {{screensaver_enabled}}
pkg
Package management utility for Termux. More information: https://wiki.termux.com/wiki/Package_Management.
-
Upgrade all installed packages:
pkg upgrade -
Install a package:
pkg install {{package}} -
Uninstall a package:
pkg uninstall {{package}} -
Reinstall a package:
pkg reinstall {{package}} -
Search for a package:
pkg search {{package}}
input
Send event codes or touchscreen gestures to an Android device.
This command can only be used through adb shell.
More information: https://developer.android.com/reference/android/view/KeyEvent.html#constants_1.
-
Send an event code for a single character to an Android device:
input keyevent {{event_code}} -
Send a text to an Android device (
%srepresents spaces):
input text "{{text}}" -
Send a single tap to an Android device:
input tap {{x_position}} {{y_position}} -
Send a swipe gesture to an Android device:
input swipe {{x_start}} {{y_start}} {{x_end}} {{y_end}} {{duration_in_ms}} -
Send a long press to an Android device using a swipe gesture:
input swipe {{x_position}} {{y_position}} {{x_position}} {{y_position}} {{duration_in_ms}}
getprop
Show information about Android system properties. More information: https://manned.org/getprop.
-
Display information about Android system properties:
getprop -
Display information about a specific property:
getprop {{property}} -
Display the SDK API level:
getprop {{ro.build.version.sdk}} -
Display the Android version:
getprop {{ro.build.version.release}} -
Display the Android device model:
getprop {{ro.vendor.product.model}} -
Display the OEM unlock status:
getprop {{ro.oem_unlock_supported}} -
Display the MAC address of the Android's Wi-Fi card:
getprop {{ro.boot.wifimacaddr}}
wm
Show information about the screen of an Android device.
This command can only be used through adb shell.
More information: https://adbinstaller.com/commands/adb-shell-wm-5b672b17e7958178a2955538.
-
Display the physical size of an Android device's screen:
wm {{size}} -
Display the physical density of an Android device's screen:
wm {{density}}
am
Android activity manager. More information: https://developer.android.com/studio/command-line/adb#am.
-
Start a specific activity:
am start -n {{com.android.settings/.Settings}} -
Start an activity and pass [d]ata to it:
am start -a {{android.intent.action.VIEW}} -d {{tel:123}} -
Start an activity matching a specific action and [c]ategory:
am start -a {{android.intent.action.MAIN}} -c {{android.intent.category.HOME}} -
Convert an intent to a URI:
am to-uri -a {{android.intent.action.VIEW}} -d {{tel:123}}
License and Disclaimer
The content on this page is copyright © 2014—present the tldr-pages team and contributors.This page is used with permission under Creative Commons Attribution 4.0 International License.
While we do attempt to make sure content is accurate, there isn't a warranty of any kind.