Reputation: 175
I have connected 4 devices to my laptop with adb. Recently I started seeing one of my android device goes "offline", while others run file.
My question is, what exactly offline means and what cause it?
Upvotes: 5
Views: 12677
Reputation: 89
>set env ANDROID_SERIAL='10.10.1.2:44444'
adb connect 10.10.1.2:44444
adb tcpip 44444
adb connect 10.10.1.2:44444
adb shell pwd # this might got "device offline" error, if run continuously
# add code like this to wait
>do (result=adb shell echo 0)
>while (result!=0)
Upvotes: 0
Reputation: 109
A little addition to the other answer: altough bad cables are a frequent issue, I would not exclude a software bug.
I've recently had problems with a TWRP 3.3.something recovery showing my OnePlus Two as offline. After hours of troubleshooting cables, installing Android sdk on other computers etc, I found that fastboot was actually working, excluding a cable problem. I then used fastboot to downgrade the recovery to a previous version (3.2.1) and it actually worked.
So, in case of doubt, you may want to reboot your device to fastboot and try a fastboot devices
just to be sure.
Upvotes: 0
Reputation: 31686
Every time the adb
server sends a command to the adbd
daemon on a device it expects a response. If it does not get the response within allotted time limit it marks the device offline.
The timeouts can be caused by many different software and or hardware problems on the device and the host system itself.
From my experience the most popular reasons are broken USB cables and worn out USB connectors on the devices. So try swapping cables between two devices (one working and another having problems). If the problem moves with the cable - it's the cable. If it stays with the device - you might want to take a closer look at it.
Upvotes: 7