Skip to content

Commit

Permalink
Merge branch 'feature/compatiblity-fixes' of github.com:IGPenguin/mob…
Browse files Browse the repository at this point in the history
…ile-toolkit into feature/compatiblity-fixes
  • Loading branch information
IGPenguin committed Oct 17, 2024
2 parents 56db872 + cd15648 commit 9ac12bb
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
- [🎹 acontrol](#section-id-100)
- [📷 acamera](#section-id-104)
- [⚡️ awireless](#section-id-107)
- [👋 apowerbutton](#section-id-108)
- [Manage packages](#section-id-111)
- [🚀 alaunch](#section-id-113)
- [🕵️ aappinfo](#section-id-118)
Expand Down Expand Up @@ -206,6 +207,12 @@ _Note: This tool targets macOS for compatibility, but most interactions should w
* Enable or disable wireless ADB connection
* Use ADB and toolkit without having USB cable attached

<div id='section-id-108'/>

### 👋 apowerbutton
* Lock/Unlock the device (send Power button key event)
* Useful to unlock the device after the screen is locked automatically

<div id='section-id-111'/>

## Manage packages
Expand Down
9 changes: 9 additions & 0 deletions android/apowerbutton
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
source "$(dirname "$0")"/../common_tools
android_choose_device

# Reference for key events - https://gist.github.com/arjunv/2bbcca9a1a1c127749f8dcb6d36fb0bc

echo "👋 Clicking power button…"
# Send POWER screen key event (key 26)
adb -s "$SELECTED_DEVICE" shell input keyevent POWER

0 comments on commit 9ac12bb

Please sign in to comment.