System Grab Bag

View all TLDR pages from Android (or from all pages)

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


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




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

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 (%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}}
  • 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}}


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.