Created
October 23, 2021 15:23
-
-
Save kanonji/e811d6a1630955909335ae3b893b09f2 to your computer and use it in GitHub Desktop.
実行するだけで adb tcpip 5555 && adb connect ${ipAddr}:5555 をやってくれるWindowsバッチファイルusing PowerShell
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 | |
powershell.exe -NoProfile -ExecutionPolicy RemoteSigned -File .\adb_connect.ps1 |
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
$ipAddr = adb shell ip addr show wlan0 | Select-String '\d+\.\d+\.\d+\.\d+' | % { $_.Matches.Value } | |
adb tcpip 5555 | |
adb connect ${ipAddr}:5555 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment