The following script discovers available ADB over Wi-Fi devices in the current network and attempts to connect to them.
Add it as a fish function: store the following function to ~/.config/fish/functions/adb-autoconnect.fish
, it will be loaded automatically:
function adb-autoconnect
for i in (adb mdns services | tail -n +2 | head -n -1 | cut -f 3 | sort | uniq)
echo "Connecting $i"
adb connect $i
end
end
- Install fish
- Download the following script and add it to your
$PATH