Created
June 5, 2019 17:57
-
-
Save lucianomlima/d2bffb57bf028f9ef5bb7ef109878200 to your computer and use it in GitHub Desktop.
Revisions
-
Luciano Lima created this gist
Jun 5, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ 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!" }