Created
April 12, 2020 03:19
-
-
Save GEMISIS/741a784928eefe4c9da17c7242c0ed39 to your computer and use it in GitHub Desktop.
Setup an Android devices to be usable over a wireless connection instead.
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 | |
for /F "tokens=* USEBACKQ" %%F in (`adb shell getprop ro.product.model`) do ( | |
set device_name=%%F | |
) | |
for /F "tokens=9 USEBACKQ" %%F in (`adb shell ip route`) do ( | |
set ip_addr=%%F | |
) | |
echo Setting up wireless debugging for %device_name% at %ip_addr%... | |
adb tcpip 5555 | |
adb connect %ip_addr%:5555 | |
sleep 1 | |
for /F "tokens=* USEBACKQ" %%F in (`adb devices`) do ( | |
set device_list=%%F | |
) | |
echo Success! Here is the list of connected devices: | |
echo. | |
echo %device_list% | |
echo. | |
echo You may now disconnect your device! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment