Skip to content

Instantly share code, notes, and snippets.

@kanonji
Created October 23, 2021 15:23
Show Gist options
  • Save kanonji/e811d6a1630955909335ae3b893b09f2 to your computer and use it in GitHub Desktop.
Save kanonji/e811d6a1630955909335ae3b893b09f2 to your computer and use it in GitHub Desktop.
実行するだけで adb tcpip 5555 && adb connect ${ipAddr}:5555 をやってくれるWindowsバッチファイルusing PowerShell
@echo off
powershell.exe -NoProfile -ExecutionPolicy RemoteSigned -File .\adb_connect.ps1
$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