1234567891011121314#!/bin/bashsudo adb kill-server#sudo adb -a start-serversudo adb -a nodaemon server &while :do if netstat -ntulp | grep 8022 then sleep 6 else adb wait-for-device adb -H localhost forward tcp:8888 tcp:8022 fidone