SHARE
TWEET

Untitled

a guest Jun 16th, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top