Jump to content
Sign in to follow this  
Rollo62

Android ADB devices offline, best practices

Recommended Posts

Posted (edited)

Dear all,

I recently upgraded my hardware to never devices, for Mac as well as for the phones.
Then I faced the problem that the nevery devices seems not to be connected to ADB as stable as before.
It is possible to check by "adb devices" command from the commandline.

It should show something like:

Quote

List of devices attached
2a29009422017ece        device

but with the new devices this status is kept only for some minutes, then they might go offline

Quote

List of devices attached
2a29009422017ece        offline

Which prevents and further debugging.
I had searched the web, and tried out many "solutions", but none of them seems to work reliably to me.


Here is my list of actions I had taken:

  • Use latest versions of all OS and Win-VM
  • Limit the USB speed to USB2.0 in the VM settings
    The host and phones have latest USB3.1 with USB-C connector
  • Updated the USB debug drivers (e.g. for Samsung S9+ via their SmartSwitch program, which installs also the latest ADB)
  • Phone side: Disable/Enable USB debugging works to get backl online, but not 100% reliable
  • Phone side: Remove all USB debugging restrictions helps to get back online, but not 100% reliable
  • Phone side: Reboot device, this usually always helps, but of coarse breas your workflow massively
  • Windows side: command adb kill-server  and adb-start-server, will restart the server, possible to get online,
    but also seems to  make and keep a separate connection sometimes, where the ADB cannot bind to any more.
  • One important hint was that better use USB2.0 as connection, since many Phones still have problems with USB3.x
    But how, when you only use latest USB3.1 hardware now ?
  • I used a USB3.1 to USB-A socket short (15cm) extension cable, w/ an older USB2.0-Hub: To force hardware speed to USB2.0.
    Only since then I could get ADB more stable, not all the time falling back to offline.
    This is my workaround for the monent.
  • I wouldn't say the latter would 100% solve my case, but its maybe 99%, I'm still testing.
  • Use and check with different USB cords, to be sure its not that one.
  • One big problem I faced, is that sooner or later you won't find older USB2.0 hubs or cables in the shops,
    in one I was, they solely had USB3.1 right now (surely ready for the future).
    Good if you keep your old boxes and cables, as usual ☺️

 

Would be great if you could share your experience with the "ADB devices oflfine" case, which is a very unexpected one when it hits you-
Looking forward to hear from your "best practices" in this case.

 

 

 

Edited by Rollo62

Share this post


Link to post

Thanks for your proposal, I considered that option before.
The USB worked always well, and I doubt the Wifi connection would be not as fast as USB.

Maybe this is vice-versa meanwhile.
Anyway, I will try be able to try Wifi ADB later, since my current setup is for USB.

 

By the way: The external USB2.0 hub seems really to solve the issue, today I have never seen this issue again.

So with ADB debugging we have to consider the hardware (cable, ports, hubs, etc.) as well as the ADB drivers.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×