Created
May 28, 2021 08:28
-
-
Save JakubMosakowski/082a1dddc2140333eea91f0c4b6ccfff to your computer and use it in GitHub Desktop.
Revisions
-
JakubMosakowski created this gist
May 28, 2021 .There are no files selected for viewing
This file contains 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,15 @@ #!/bin/bash # 1. Connect the phone using a USB cable. # 2. Restart adb listening on TCP on 5555 port. adb tcpip 5555 # 3. Sleep for 1 second (not too clean but that's the simplest way to make sure that the previous command finished). sleep 1 # 4. Find ip address. IP_ADDRESS=`adb shell "ip addr show wlan0 | grep -e wlan0$ | cut -d\" \" -f 6 | cut -d/ -f 1"` # 5. Connect to the device. adb connect $IP_ADDRESS:5555