Skip to content

Instantly share code, notes, and snippets.

@szhu
Created November 25, 2016 06:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save szhu/7a75417942221fa35ac9c557ab5d06d9 to your computer and use it in GitHub Desktop.
Save szhu/7a75417942221fa35ac9c557ab5d06d9 to your computer and use it in GitHub Desktop.
#!/bin/bash
verbose() {
echo "$@"
"$@"
}
power-softrestart() {
verbose adb shell "su -c 'killall zygote'"
}
# source: http://android.stackexchange.com/a/67689/15790
radio-bluetooth-on() {
verbose adb shell "su -c 'service call bluetooth_manager 6'"
}
radio-bluetooth-off() {
verbose adb shell "su -c 'service call bluetooth_manager 8'"
}
# source: http://android.stackexchange.com/a/67689/15790
radio-wifi-on() {
verbose adb shell "su -c 'svc wifi enable'"
}
radio-wifi-off() {
verbose adb shell "su -c 'svc wifi disable'"
}
ui-navbar-reset() {
verbose adb shell settings put secure sysui_nav_bar 'space,space,back\;home\;recent,space,menu_ime'
}
screen-density-reset() {
verbose adb shell wm density reset
}
"$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment