Skip to content

Instantly share code, notes, and snippets.

@gppam
Created April 4, 2019 19:52
Show Gist options
  • Save gppam/c653c84f21afe738e32b368fcea1e294 to your computer and use it in GitHub Desktop.
Save gppam/c653c84f21afe738e32b368fcea1e294 to your computer and use it in GitHub Desktop.

Revisions

  1. gppam created this gist Apr 4, 2019.
    11 changes: 11 additions & 0 deletions adbwifi.bat
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    @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