Created
April 4, 2019 19:52
-
-
Save gppam/c653c84f21afe738e32b368fcea1e294 to your computer and use it in GitHub Desktop.
adb wifi batch script
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 characters
@echo off | |
echo Set up wifi connect thru ADB | |
pause | |
adb tcpip 5555 | |
echo Waiting for device to initialize | |
timeout 3 | |
FOR /F "tokens=2" %%G IN ('adb shell ip addr show wlan0 ^|find "inet "') DO set ipfull=%%G | |
FOR /F "tokens=1 delims=/" %%G in ("%ipfull%") DO set ip=%%G | |
echo Connecting to device with IP %ip%... | |
adb connect %ip%:5555 | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment