I want to create a batch file to automate adb wireless connect. How can I automatically connect ADB through WiFi?
I have string IP
adb shell "ip addr show wlan0 | grep 'inet ' | cut -d ' ' -f 6 | cut -d / -f 1"
that returns my device IP
but if I try to connect it returns this:
D:\tools>adb connect "adb shell "ip addr show wlan0 | grep 'inet ' | cut -d ' ' -f 6 | cut -d / -f 1""
"grep" is not internal or external
command executed by a program or batch file.
How can I write this in one line and make a .bat script?