Skip to content

Instantly share code, notes, and snippets.

@stfbee
Last active March 1, 2021 09:35
Show Gist options
  • Save stfbee/0b3cbae0b0bfdd2c518a6d6dd1d6008e to your computer and use it in GitHub Desktop.
Save stfbee/0b3cbae0b0bfdd2c518a6d6dd1d6008e to your computer and use it in GitHub Desktop.

ADBW

(win version)

How to use:

  • Save adbw.bat somewhere
  • Add path to adbw.bat to PATH environment variable
  • Use it: adbw

Note: only one android device needs to be connected to your PC. It must have adb debugging enabled and the device must be connected to the same wifi network as your PC

@echo off
for /f "delims=" %%A in ('adb -d shell ip address ^| grep wlan0 ^| grep -oP "[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}" ^| head -n 1') do set ip=%%A
START /B /wait adb -d tcpip 5555
adb connect %ip%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment