Bash command to Connect and Disconnect Wireless ADB Linux
March 27, 2023•100 words
These one command will give you the ability to connect android device in a same network.
assume you are using zsh and .zshrc. if it's not the case change >> ~/.zshrc to >> ~/.bashrc
echo -e "\nexport phoneip=\$(adb shell \"ip addr show wlan0 | grep -e wlan0\$ | cut -d' ' -f 6 | cut -d/ -f 1\")
function adbwifi() {
local port=\${1:-5555};
adb tcpip \$port && adb connect \$phoneip:\$port;
}
function adbwifidc() {
local port=\${1:-5555};
adb discon...
Read post