Skip to content

Instantly share code, notes, and snippets.

@sgeto
Forked from y-polek/doze_mode_adb_commands.sh
Created April 15, 2019 22:29
Show Gist options
  • Select an option

  • Save sgeto/7396dbc5b93939669781d8c38a7868bb to your computer and use it in GitHub Desktop.

Select an option

Save sgeto/7396dbc5b93939669781d8c38a7868bb to your computer and use it in GitHub Desktop.

Revisions

  1. @y-polek y-polek revised this gist Sep 3, 2018. 1 changed file with 4 additions and 1 deletion.
    5 changes: 4 additions & 1 deletion doze_mode_adb_commands.sh
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,9 @@
    #! /bin/zsh

    # Unplug device
    # Buttery powered state
    adb shell dumpsys battery | grep powered

    # Unplug battery
    adb shell dumpsys battery unplug

    # Reset battery
  2. @y-polek y-polek renamed this gist Aug 3, 2018. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  3. @y-polek y-polek revised this gist Aug 3, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion commands.sh
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@
    # Unplug device
    adb shell dumpsys battery unplug

    # Reset
    # Reset battery
    adb shell dumpsys battery reset

    # Dump Doze mode info
  4. @y-polek y-polek revised this gist Aug 3, 2018. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions commands.sh
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,9 @@
    #! /bin/zsh

    # Unplug charging
    # Unplug device
    adb shell dumpsys battery unplug

    # Reset charging
    # Reset
    adb shell dumpsys battery reset

    # Dump Doze mode info
  5. @y-polek y-polek revised this gist Aug 3, 2018. 1 changed file with 25 additions and 1 deletion.
    26 changes: 25 additions & 1 deletion commands.sh
    Original file line number Diff line number Diff line change
    @@ -1 +1,25 @@
    adb shell dumpsys battery reset //
    #! /bin/zsh

    # Unplug charging
    adb shell dumpsys battery unplug

    # Reset charging
    adb shell dumpsys battery reset

    # Dump Doze mode info
    adb shell dumpsys deviceidle

    # Enable Doze mode (may be required on Android Emulator)
    adb shell dumpsys deviceidle enable

    # Get status of Light Doze mode
    adb shell dumpsys deviceidle get light

    # Get status of Deep Doze mode
    adb shell dumpsys deviceidle get deep

    # Enter Light Doze mode (should be called several times to pass all phases)
    adb shell dumpsys deviceidle step light

    # Enter Light Doze mode (should be called several times to pass all phases)
    adb shell dumpsys deviceidle step deep
  6. @y-polek y-polek created this gist Aug 3, 2018.
    1 change: 1 addition & 0 deletions commands.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    adb shell dumpsys battery reset //