I currently use an old Galaxy 5 as a wifi adapter for my computer. I wrote a small adb script which turns on tethering on boot.
I use the timeout command because the phone is really slow and sometimes it does not properly load the settings before pressing the next buttons.
I wanted to ask if there was a better way of doing it, using better commands or something. Also is there a way to turn off tethering when computer is shut down?
Code:
adb shell input keyevent KEYCODE_POWER
adb shell am start -n com.android.settings/.TetherSettings
TIMEOUT 2
adb shell input keyevent 66 # enter
adb shell input keyevent 66 # enter
adb shell input keyevent KEYCODE_POWER I wanted to ask if there was a better way of doing it, using better commands or something. Also is there a way to turn off tethering when computer is shut down?
from xda-developers http://ift.tt/1Sl6h7n
via IFTTT

Aucun commentaire:
Enregistrer un commentaire