Skip to content

Instantly share code, notes, and snippets.

@barbietunnie
Last active May 2, 2024 10:02
Show Gist options
  • Save barbietunnie/c79a49a596ca38304e59a400f74cde68 to your computer and use it in GitHub Desktop.
Save barbietunnie/c79a49a596ca38304e59a400f74cde68 to your computer and use it in GitHub Desktop.
Helpful adb Commands

Helpful adb Commands

To simulate the phone being unplugged from usb charging you can use:

$ adb shell dumpsys battery set usb 0

or if you're on a device Android 6.0 or higher you can use:

$ adb shell dumpsys battery unplug

To "plug" the phone back in, just reset it's charging status using:

$ adb shell dumpsys battery reset
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment