Skip to content

Instantly share code, notes, and snippets.

@steadfasterX
Last active October 25, 2024 13:35
Show Gist options
  • Save steadfasterX/28bfaee4992e8291a97d4f8084e1770d to your computer and use it in GitHub Desktop.
Save steadfasterX/28bfaee4992e8291a97d4f8084e1770d to your computer and use it in GitHub Desktop.
Android debugging

Android debugging

boot process

see the adb boot debug guide

Selinux

See the selinux guide

processes/services/programs

See the ultimate strace guide

Camera

ref: https://source.android.com/docs/core/camera/debugging

Android 13 or higher

adb shell cmd media.camera watch dump
adb shell cmd media.camera watch live [-n refresh_interval_ms]
adb shell cmd media.camera watch stop

Any Android

adb shell dumpsys media.camera

starting the camera intent when there is no icon:

adb shell am start -a android.media.action.STILL_IMAGE_CAMERA

Enable internal logging

refs:

only first letter is required but you can write it also in full:

  • V / VERBOSE
  • D / DEBUG

System property filtering liblog queries a set of system properties to determine the minimum severity level to be sent to logd. If your logs have the tag MyApp, the following properties are checked and are expected to contain the first letter of the minimum severity (V, D, I, W, E, or S to disable all logs):

  • log.tag.MyApp
  • persist.log.tag.MyApp
  • log.tag
  • persist.log.tag
adb shell setprop log.tag V
adb shell setprop persist.log.tag V
adb shell setprop persist.log.tag.<TAGNAME> DEBUG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment