Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to debug Android application in phone sleep mode without USB connection

That's tricky one, I guess. Phone behaves differently when connected with USB (for debugging) and when unplugged. Difference is in the sleep mode - with USB connection phone seems to be more active and responsive, without - less. For example, I have an alarm to wake up the phone and adjust volume. While connected - works perfectly fine in sleep (adjusts volume on every alarm trigger, every 10 seconds). While not connected - works rarely (adjusts volume only on random alarm trigger, let's say between 20 and 50 seconds).

How could I debug the phone while unplugged? How could I force the phone to behave exactly the same with USB connection and without? Partial wake lock (the one without screen on) doesn't help. This is strange and it makes the developing really painful.

like image 795
jacek Avatar asked Jul 15 '11 20:07

jacek


1 Answers

This was quite easy, but the easy answers always come last: I installed aLogcat from the market and it seems to work just fine! Great app to see the logs without the computer, straight on the phone.

like image 142
jacek Avatar answered Nov 09 '22 06:11

jacek