Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function adb_connect {
- # PORT used to connect. Default: 5555
- PORT=${1:-5555}
- # IP address from current device connected
- IP_ADDRESS=`adb shell ip route | awk '{print $9}'`
- echo "ADB connect to $IP_ADDRESS on port $PORT"
- # Change connection from usb to tcpip using $PORT
- adb tcpip $PORT
- # Connect to device
- adb connect "$IP_ADDRESS:$PORT"
- echo "Done!"
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement