Hi there,
first I like to thank you for this really great app! Second I'm not really sure where to post my question, so please move the thread to the right section if this is not the right place.
Here my question:
I'm fighting against a not automagic related wakelock that appears from time to time. I'm looking for a way to check, after a minute or so, if my phone is going to deep sleep after the display is off.
That would be an indicator, if there is a wakelock in general and I could restart my phone.
I've checked with "better battery stats" how long it takes for my phone that deep sleep occurs.
I hope I made my self clear and there is a possibility to track deep sleep or use better battery stats in a way.
Thanks again and regards,
Bongster
Flow to detect a wakelock
Moderator: Martin
Re: Flow to detect a wakelock
Hi,
It's difficult to do this with Automagic. I would try to track this problem down by connecting your phone to a computer and use adb shell dumpsys batterystats. The log contains a plethora of information about wake locks including the history.
You could also acquire the log on a rooted device with Execute Root Command: dumpsys batterystats followed by Write to File: {stdout}. You might have to switch the SE context in the root action to u:r:shell_s0.
You could also use a flow/script with functions getUptimeMillis() and getElapsedRealtimeMillis() to find the time the device spent in sleep.
Regards,
Martin
It's difficult to do this with Automagic. I would try to track this problem down by connecting your phone to a computer and use adb shell dumpsys batterystats. The log contains a plethora of information about wake locks including the history.
You could also acquire the log on a rooted device with Execute Root Command: dumpsys batterystats followed by Write to File: {stdout}. You might have to switch the SE context in the root action to u:r:shell_s0.
You could also use a flow/script with functions getUptimeMillis() and getElapsedRealtimeMillis() to find the time the device spent in sleep.
Regards,
Martin
Re: Flow to detect a wakelock
Hi Martin,
I guess this is exactly what I was looking for!
Just for info. My phone sometimes gets a wakelock from my camera app and goes only in deep sleep after a reboot. With this I can check after a minute screen off if it happens and send a notification.
I guess this is exactly what I was looking for!
Thanks!Martin wrote:
You could also use a flow/script with functions getUptimeMillis() and getElapsedRealtimeMillis() to find the time the device spent in sleep.
Just for info. My phone sometimes gets a wakelock from my camera app and goes only in deep sleep after a reboot. With this I can check after a minute screen off if it happens and send a notification.