mirror of
https://github.com/tytydraco/LADB.git
synced 2026-04-27 00:15:59 +03:00
[GH-ISSUE #61] App started connecting to wrong device instead of same device #46
Labels
No labels
bug
documentation
enhancement
enhancement
good first issue
help wanted
pull-request
question
question
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/LADB#46
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ShadowFlare on GitHub (Jan 25, 2022).
Original GitHub issue: https://github.com/tytydraco/LADB/issues/61
This app was working fine for me initially, but another time just recently that I tried using it, it wouldn't seem to connect. However, today I realized it was in fact trying to connect to another device on the network entirely! I had another device on the same network with wireless debugging enabled, on the default port 5555, and it was showing the prompt for accepting an adb connection. I searched logcat output of that device and saw a connection attempt showing the same user name as shown in the paired wireless debugging devices on my phone. Tried LADB on my phone again while watching that other device, and the prompt to accept the connection on that device appeared. I accepted it, and verified in LADB that it was indeed connected to that other device (by checking for files I have on that other device)
@teou1 commented on GitHub (Oct 14, 2022):
I don't say it is not a weird bug, but i have a suggestion for workaround: although ladb drops to shell, you can still use adb connect ip:port to choose manually to which device to connect.
@ShadowFlare commented on GitHub (Oct 14, 2022):
The workaround I've been using is to just connect to a different network I have here before using LADB, which is on a different subnet.
@tytydraco commented on GitHub (Oct 15, 2022):
This is a very very weird bug, I agree. I'm not sure how to get around it. But let me try.
@boognish-rising commented on GitHub (Oct 16, 2022):
This is a good idea but unfortunately, this bug or whatever doesn't seem to even recognize the actual device that the process was initiated on/that LADB was launched with. If it did, your suggestion would be my first attempt at a workaround for such wonkiness...
It could also be the fact that for me anyway, no matter how many times I try to accept the supposed incoming wireless debugging request (on the device receiving it in error), there doesn't seem to actually be any way to accept it. When I click "accept", the dialogue disappears and almost just as quickly reappears as though I didn't literally JUST give it authorization. So, it's possible that your recommendation would work until the issue gets sorted out if it ever reached the point that multiple devices were connected, thereby requiring the end user to specify which device they want to issue XYZ ADB command(s) to...
In fact, on my Pixelbook, the only way to get rid of the constant barrage of wireless debugging auth requests is to either fully quit/kill LADB and then dismiss the associated prompts and/or reset the device it's attempting to connect with... Otherwise, LADB just continues to attempt to connect ad infinitum (which is a good thing under normal conditions)
@tytydraco commented on GitHub (Oct 16, 2022):
Is your device plugged into USB to a laptop or PC? When I debug LADB, the USB debug overrides the wireless debug.
@ShadowFlare commented on GitHub (Oct 16, 2022):
In my case it's not plugged into anything. There was simply a Chromecast With Google TV on the same network with wireless debugging enabled, and it connected to it (successfully). (Oddly, on that device you have to enable USB debugging to enable wireless debugging, and there's no separate option) I have not tested it lately to see if LADB still does it, but I'm guessing it hasn't changed, considering it was posted about by another just recently.
Is LADB doing a broadcast when it tries to connect?
@tytydraco commented on GitHub (Oct 16, 2022):
It does not do a broadcast. It is doing "adb start-server", then "adb wait-for-devices", then "adb connect localhost". So it's super weird indeed. Other devices on the network are trying to connect to the server.
@boognish-rising commented on GitHub (Oct 17, 2022):
So strange... Why would this issue be specific to LADB, then? You'd think that any app that initiated wireless debugging or relied on it in one way or another would prompt this to happen too. I don't claim to represent the average user, at least the type that would actually use something like wireless ADB but I do have a few other apps like Shizuku, Brevent, etc that either require wireless ADB or at least provide an option for it and I've never seen this from any of them... Though, out of all of the apps I have like this, I probably use LADB the most so maybe it's just a numbers game and if I used them as frequently, the issue would crop up.
I think I might pop over to a few other project pages to peruse the issues section to see if there's anything remotely similar being reported... I'll report back if I find anything
No USB connection in my case, either. Wireless only and even then, it's only turned on on the Chromebook. It doesn't actually have a connection to anything.. I wonder if maybe that is playing a role? Like if it were connected, it wouldn't be searching the network for possible connections? I'll play around with it
@tytydraco commented on GitHub (Oct 17, 2022):
I wonder if maybe Shizuku doesn't use an ADB server but sends packets manually? That would make sense as it doesn't rely on the adb server, and other devices except the target device wouldn't see it.