Android

am

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}}

bugreport

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

bugreportz

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 bugreportz operation: bugreportz -p Show the version of bugreportz: bugreportz -v Display help: bugreportz -h

cmd

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 ...}}

dalvikvm

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}}

dumpsys

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 dumpsys can 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}}

getprop

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}}

input

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 (%s represents 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}}

logcat

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}})

pkg

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}}

pm

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

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}}

settings

settings Get information about the Android OS. More information: https://adbinstaller.com/commands/adb-shell-settings-5b670d5ee7958178a2955536. Display a list of settings in the global namespace: 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}}

wm

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}}