Can't run adb commands in bash script
adb shell
opens a shell on your Android device. The subsequent commands are entered in the context of that shell. Add quotes around the remote commands:
adb shell "am start -n com.android.settings/.TetherSettingssleep 7input tap 162 159input tap 385 607"
Thanks everybody! I finally solved the problem. Here is the updated script:
#!/bin/sh cd /home/evinish/Documents/Android/adt-bundle-linux-x86_64-20130219/sdk/platform-tools ./adb start-server ./adb devices ./adb shell " am start -n com.android.settings/.TetherSettings sleep 15 input tap 162 159 input tap 385 607 " sleep 10
The only problem was missing "./" before adb.
EDIT: also why not check to see if the server is running first?