Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
*DS_Store
ios/go-ios
ios/nohup.out
ios/selfidentity.plist
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 "👋 Sending power button key event..."
# Send POWER screen key event (key 26)
adb -s "$SELECTED_DEVICE" shell input keyevent POWER &>/dev/null
2 changes: 1 addition & 1 deletion android/arecord
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ OUTPUT_PATH=~/Desktop/"$FILENAME".mp4
if $USE_LEGACY_RECORDING; then
adb -s "$SELECTED_DEVICE" shell screenrecord "$DEVICE_FILE_PATH"/output.mp4
else
scrcpy -s "$SELECTED_DEVICE" --verbosity=error --no-playback --audio-codec=aac --record=file.mp4 --record="$OUTPUT_PATH" &>/dev/null
scrcpy -s "$SELECTED_DEVICE" --verbosity=error --no-window --audio-codec=aac --record=file.mp4 --record="$OUTPUT_PATH" &>/dev/null
fi

# Unset the trap
Expand Down
20 changes: 15 additions & 5 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
🎉 This is a new version 1.4.0!
🎉 This is a new (experimental) version 1.4.1!

📹 arecord was updated to use scrcpy, this enables recording audio in your videos
You can still use the legacy variant by adding -l flag to arecord command
📹 arecord was fixed to work with latest scrcpy version
If you are experiencing issues, try running "brew upgrade scrcpy"

⭐️ Special thanks to Luís Pinho for proposing and drafting this change
https://github.com/luispinho
📷 iscreenshot was fixed to work with iOS 17 or newer
This change is still experimental - please, report back any issues

👋 apowerbutton was added based on a pull request by luispinho
Thanks for your contribution, mate!

⭐️ Special thanks to Lenka and František for proposing compatibility fixes
https://github.com/vrbajiva
https://github.com/franceskoooo

💌 Rate Mobile Toolkit and provide optional feedback using this link
https://forms.gle/nfBHeMSjxEQMs1kv5
11 changes: 11 additions & 0 deletions common_tools
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ check_go_ios_version(){
if ! [ -x "$(command -v "go-ios")" ]; then
install_go_ios
else
#Here it complains about the missing agent/tunnel
GO_IOS_VERSION=$(go-ios --version)
#echo "Version of go-ios is: $GO_IOS_VERSION"
fi
Expand Down Expand Up @@ -237,6 +238,16 @@ prompt_xcode_launch(){
ios_get_devices(){
check_go_ios_version
check_dependency "jq"

if [[ $(ps S | grep -c "go-ios tunnel") -ne 2 ]]; then
echo "♻️ Launching go-ios tunnel for maximum iOS compatibility (17+)"
nohup go-ios tunnel start --userspace --nojson >/dev/null 2>&1 &
GO_IOS_TUNNEL_PID=$!
#TODO save tunnel port and use it to avoid delays when trying various ports
disown $GO_IOS_TUNNEL_PID
sleep 1
fi

IOS_USB_DEVICES=( $(go-ios list --nojson | sort -u) )
}

Expand Down
Loading