Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds the script to enable/disable ADB wifi #173

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
Adds the script to enable/disable ADB wifi
This script together with the corresponding commit  in termux-api adds the ability to manage the adb wifi state.
hjotha committed Feb 21, 2023
commit 4398145b96ef58e98aa92aedacc2e85b6186b826
21 changes: 21 additions & 0 deletions scripts/termux-adb-wifi-enable
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/data/data/com.termux/files/usr/bin/sh
set -e -u

SCRIPTNAME=termux-adb-wifi-enable

show_usage () {
echo "Usage: $SCRIPTNAME [true | false]"
echo "Toggles ADB Wi-Fi Enabled/Disabled"
exit 1
}

if [ "$#" -ne 1 ]; then
show_usage
fi

case $1 in
true|false);;
*) show_usage;;
esac

/data/data/com.termux/files/usr/libexec/termux-api AdbWifiEnable --ez enabled "$1"