Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

I have several devices (mix of tablets and phones) connected to my mac mini. Some of them are connected directly while some are connected by a good quality hub.

$  system_profiler SPUSBDataType | grep -i serial
   Serial Number: 015d2109ed4c0c18
     Serial Number: 4dfcbd091f3a5023
     Serial Number: 000ee30e7de4cf
     Serial Number: 4100018996d37000
     Serial Number: 0123456789ABCDEF
   Serial Number: FA35FW901634
   Serial Number: 2021bbaa

For sometime, adb detects all these devices fine.

$ adb devices
List of devices attached
4100018996d37000        device
0123456789ABCDEF        device
000ee30e7de4cf  device
4dfcbd091f3a5023        device
2021bbaa        device
FA35FW901634    device
015d2109ed4c0c18        device

But with time, these devices goes in offline state irrespective of the way they are connected (direct or via hub). Even when these are in offline state, as reported by adb, system_profiler still detects them fine. This means that Mac mini is still seeing these devices but adb is not.

I am using original cables that came with the phone. Why do they go in offline state? Only thing that get the devices back is physically re-connecting the devices. Can anyone help me with this?

share|improve this question
    
That might be due to power-saving settings (may sound wierd as USB is a power supply, but the algorithm used might not take that into consideration). I know there's a setting in the developers section to keep the display on when power connected, so you could use that. Alternatively, you could set your WiFi policy to keep WiFi "always active" on power-connected. Or build something yourself with Tasker and the Secure Settings Plugin. –  Izzy Oct 1 '13 at 11:18
    
@Izzy I'll take a look at it for sure. Wifi is always on. I must add though that all the devices are fully charged (via usb). –  Aditya Patawari Oct 1 '13 at 11:21
    
I was aware of the latter, that's why I wrote the algorithm used might not take that into consideration (could be a generic powersave util). But I'd thought WiFi active should keep it in a "wake state". That leaves the display and Tasker tricks. Easiest approach might be a Tasker profile with the condition "Power (USB)", and a Task that loops over "ping -c 1 <whatever>" followed by a "Wait <30s>". Just thinking aloud :) –  Izzy Oct 1 '13 at 11:31
add comment

2 Answers

We've been looking for an answer to this for some several months. Unfortunately, the most hopeful response I've seen is this one, which suggests moving the Mac Mini to Linux, whose USB stack is described as 'more forgiving':

http://stackoverflow.com/questions/15727314/resetting-android-device-when-it-goes-to-offline-mode-during-automation

We're going to try shifting to a spare (PC-based) Linux box for the time being; I'll try to remember to report back whether it's more reliable.

share|improve this answer
add comment

Try enabling the "Stay awake" setting under Developer options to keep it "active" while connected to the USB.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.