Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. function adb_connect {
  2. # PORT used to connect. Default: 5555
  3. PORT=${1:-5555}
  4.  
  5. # IP address from current device connected
  6. IP_ADDRESS=`adb shell ip route | awk '{print $9}'`
  7.  
  8. echo "ADB connect to $IP_ADDRESS on port $PORT"
  9.  
  10. # Change connection from usb to tcpip using $PORT
  11. adb tcpip $PORT
  12.  
  13. # Connect to device
  14. adb connect "$IP_ADDRESS:$PORT"
  15.  
  16. echo "Done!"
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement