Does wifi debugging actually work well for anyone?...
# android-studio
c
Does wifi debugging actually work well for anyone? They've made some updates lately... but I can never actually reconnect my phone once i lose connection. it makes me sad because my iphone + xcode seem to work just fine over wireless. Could use a +1/ https://issuetracker.google.com/issues/374488870
e
I was excited about it when it was announced Then it didn't work Then it worked better But it turns out that I almost never use it ¯\_(ツ)_/¯
c
same. now that theres been a few updates regarding mdns i tried to give it a shot because i thought maybe that was the root cause.
but like. i guess no devs at google use this or else someone would have already noticed and fixed it (one would think. i understand priorities and deadlines are a thing)
c
I don’t have numbers but I can imagine Googler usage is low because it requires being on the same network, and most mobile devices are on the guest network, while workstations are on another. 😖
c
i guess in a corp setting it could be a pain. yeah. this podcast episode on adb 4 years ago was so promising. 😭 https://adbackstage.libsyn.com/2020/09
j
It doesn't work most of the times. It'll be hard to connect, even if gets connected once second time is impossible. I do wanna use this but couldn't help so USB is my friend for now. also
adb connect
command in CMD atleast says connected but its not in reality
c
please upvote the issue 😄
m
I discovered that using the
adb pair <ip>
command on my terminal works seamlessly all the time. I usually do that before calling
adb connect <ip>
I’ve completely abandoned the AS UI for pairing over WiFi.
😭 1
o
Hi ! I used to have the same problems and found a plugin that works very well "ADB Wi-Fi" (be careful when searching I think it's case sensitive). You just need to connect your device via USB and then you can connect to it via wifi. Also I have this function as alias in my bash profile which allow me to connect via command line:
Copy code
adb-connect() {
    devices=$(adb devices | awk 'NR>1 && $2=="device" {print $1}')
    if [ -z "$devices" ]; then
        echo "No USB devices found."
        return
    fi

    for device in $devices; do
        echo "Connecting $device via Wi-Fi..."
        ip=$(adb -s $device shell ip -f inet addr show wlan0 | grep inet | awk '{print $2}' | cut -d/ -f1)
        if [ -z "$ip" ]; then
            echo "Failed to get IP address for $device. Ensure it is connected to Wi-Fi."
            continue
        fi
        adb -s $device tcpip 5555
        adb connect $ip
    done
};
It sometimes fails for no reason even if the wireless debugging is enabled on the device (sometimes it autoshutdown) and I'm connected to wifi. I then just run "adb kill-server" and rerun the commands and it works. Hope that help !