Android Enthusiasts
Q&A for enthusiasts and power users of the Android operating system
Latest Questions
0
votes
0
answers
74
views
how to query termux wakelock
I'm currently developing a small application for temporarily monitoring sensors in c, that should initiate a wakelock and release it after it ran but not release it, if a wakelock was aquired before execution. essentially this is my goal: was wake lock present before the application was executed? -...
I'm currently developing a small application for temporarily monitoring sensors in c, that should initiate a wakelock and release it after it ran but not release it, if a wakelock was aquired before execution.
essentially this is my goal:
was wake lock present before the application was executed?
- ignore it
wasn't it present before the application was executed?
- obtain and clear it throughout the lifetime of this application
---
when running
termux-notification-list
, I can check if a wakelock is currently present by searching through it's output until I find this:
{
"id": 1337,
"tag": "",
"key": "0|com.termux|1337|null|10179",
"group": "",
"packageName": "com.termux",
"title": "Termux",
"content": "1 session (wake lock held)",
"when": "2024-11-04 15:14:24"
}
### is there a better way to figure out if a wakelock is currently in place?
I consider querying notifications a bad idea, as notifications can be discarded even if they are permanent.
GottZ
(101 rep)
Nov 4, 2024, 02:27 PM
1
votes
0
answers
410
views
How to build a DiY Google Home from an old Android Phone?
When the phone is locked & screen off, it will never hear my voice. How do I get OK google to work when the phone is off? The option seems removed for non Google Pixel/Nexus phones. I want to convert my old android phone into a Google Home (so I can say "Ok Google, turn off the lights" in my bedroom...
When the phone is locked & screen off, it will never hear my voice. How do I get OK google to work when the phone is off? The option seems removed for non Google Pixel/Nexus phones.
I want to convert my old android phone into a Google Home (so I can say "Ok Google, turn off the lights" in my bedroom).
I have an old Samsung Note 2. I used Odin to put TWRP on it so I can run LineageOS w/ Gapps, and now I have Google Assistant running on it.
However, when the phone is off, it will never hear my voice.
I can turn on and off the smart lightbulb in my room with my voice now. But there is no "always listening" "wake word" for "Ok Google Everywhere" anymore. Pretty sure Google removed this feature so you have to buy a Google Home device. I want to be able to use Ok Google anywhere, even when charging my phone.
Jonathan
(580 rep)
Nov 10, 2018, 08:03 AM
• Last activity: Jan 25, 2024, 06:56 AM
2
votes
1
answers
1203
views
How to acquire wakelock with Termux on Android 13?
In previous versions of Android, one "Aquire Wakelock" by going to notifications-list, and tapping on the Termux in the list, then Aquire Wakelock is an option. But on Android 13, there are no Termux notification to tap on at all, so how do you do it on Android 13? (observed on Samsung Galaxy S22 Ul...
In previous versions of Android, one "Aquire Wakelock" by going to notifications-list, and tapping on the Termux in the list, then Aquire Wakelock is an option.
But on Android 13, there are no Termux notification to tap on at all, so how do you do it on Android 13? (observed on Samsung Galaxy S22 Ultra updated to Android 13~)
(I can theorize that Termux not showing up in the notifications list is a bug, and that the procedure is supposed to be the same, but that is just a guess)
hanshenrik
(263 rep)
Oct 22, 2023, 11:24 PM
• Last activity: Oct 23, 2023, 07:38 AM
1
votes
0
answers
26
views
Kaspersky Who Calls app keeps the phone screen on
There's an app called [Anti-spam: Kaspersky Who Calls][1]. The problem with this app is that when someone calls you the app shows the caller information in a popup and if you don't dismiss the said popup, the phone screen will never turn off. Imagine you got a call and you couldn't answer it, you fo...
There's an app called Anti-spam: Kaspersky Who Calls .
The problem with this app is that when someone calls you the app shows the caller information in a popup and if you don't dismiss the said popup, the phone screen will never turn off. Imagine you got a call and you couldn't answer it, you forget about it and later you realize the whole time the screen has been on and your battery is almost dead.
I know there's a thing called "Wake Lock " but it's all alien to me and I've no idea what to look for. I've used decompiler.com and got this but while grepping through the sources I wasn't able to find
FLAG_KEEP_SCREEN_ON
, so it could have been done differently or this service doesn't decode this flag correctly.
I've found this:
public static final long WAKE_LOCK_MAX_ACQUIRE_TIMEOUT_MS = 600000;
@SuppressLint({"Wakelock"})
public void run() {
PowerManager.WakeLock wakeLock;
if (h(this.f12161a)) {
this.f12162a.acquire(Constants.WAKE_LOCK_ACQUIRE_TIMEOUT_MILLIS);
}
It probably results in the screen being on for 10 minutes, not indefinitely but it's also excessive.
I wonder if it could be the culprit.
Artem S. Tashkinov
(215 rep)
Aug 29, 2023, 02:07 PM
3
votes
0
answers
981
views
Is it possible for a Bluetooth device/button to wake up an Android phone and take a picture (hands free)?
Long story short, I am taking daily progress pictures and I am trying to take a picture with the phone without touching it or using a timer etc. Totally hands free. The phone is a spare Samsung note 10+ mounted to the bathroom mirror and permanently connected with the back camera facing forward. Tou...
Long story short, I am taking daily progress pictures and I am trying to take a picture with the phone without touching it or using a timer etc. Totally hands free.
The phone is a spare Samsung note 10+ mounted to the bathroom mirror and permanently connected with the back camera facing forward. Touching the phone isn't suitable because it's facing the wall and movement has the chance of bumping the position slightly (not ideal).
After experimenting with Bixby many thanks to the comment by @Morrison Chang , I found it does work hands-free suitably for my partner and myself, however listening to my partner trying to tell the wall to take a photo in a slow robotic voice is not optimal. So, the question remains,
Can a Bluetooth attached button wake a phone and trigger a picture to be taken?
***Note**: I am a career programmer so writing a simple app isn't out of the equation if need be.*
TheGeneral
(131 rep)
Feb 23, 2023, 10:48 PM
• Last activity: Feb 25, 2023, 05:06 PM
5
votes
1
answers
19260
views
How do I keep my camera active on Android even when the phone is locked and screen sleeps?
When I play Ingress, Ingress remains active. Even when my screen goes black, if I push the power button, Ingress is still active. I do not need to unlock my phone nor wait for it to "wake up". (The phone is locked though - to use any other app I need to unlock the phone.) How do I get the same funct...
When I play Ingress, Ingress remains active. Even when my screen goes black, if I push the power button, Ingress is still active. I do not need to unlock my phone nor wait for it to "wake up". (The phone is locked though - to use any other app I need to unlock the phone.)
How do I get the same functionality for my camera app?
If I'm using the phone as a camera, with the camera app active, if the screen goes black, when I hit the power button, I want the camera to be open and active.
Things I've tried:
- Keeping my phone unlocked when in paired to a trusted Bluetooth advice. Then when I push the power button, I get a screen where I have to swipe to wake it up. With Ingress, I don't have to swipe the screen nor wait for anything.
- Snapshot. I've tried using the Snapshot app, but I have to wait for the phone to launch the camera app.
- The camera on swipe from the lock screen ... and again I have to wait for the camera app to launch.
I'm willing to figure out how to build my own app if needed. (But would rather find something.)
I'm willing to take a battery hit.
mtnhacker
(51 rep)
Jan 7, 2015, 01:06 AM
• Last activity: Jan 12, 2023, 09:06 AM
1
votes
1
answers
949
views
Device won't wakeup from power button
I used a Navigator app that prevents my device (Galaxy S2 with Cyanogenmod) from turning the screen off while plugged in. But at some point I could no longer wakeup the device screen with the power button anymore. The only thing that wakes up the device screen is to plug it into a USB charger. This...
I used a Navigator app that prevents my device (Galaxy S2 with Cyanogenmod) from turning the screen off while plugged in. But at some point I could no longer wakeup the device screen with the power button anymore. The only thing that wakes up the device screen is to plug it into a USB charger. This behavior continues even after uninstalling the app. The device is not turned off, it's just the screen wakeup from the power button that stopped working.
I assume that the app overwrote some settings.
I couldn't get any help from developers of app.
Thanks for any help!
mace
(111 rep)
May 14, 2015, 10:08 PM
• Last activity: Apr 1, 2022, 09:02 PM
0
votes
1
answers
2211
views
How to debug "wlan_wake kernel wakelock" on an unrooted device?
The question is as short as the title. I've a Samsung Galaxy Note 3 & it has started showing issues where the CPU remains in lowest possible frequency (250Mhz) and it doesn't go to deep sleep. I tried uninstalling all the apps that I installed in last 2 days but I can still see the issues. Searching...
The question is as short as the title. I've a Samsung Galaxy Note 3 & it has started showing issues where the CPU remains in lowest possible frequency (250Mhz) and it doesn't go to deep sleep.
I tried uninstalling all the apps that I installed in last 2 days but I can still see the issues.
Searching on google isn't helping either. Most of the posts that get in search results are the posts where people paste the betterbatterstats output. On the official wiki, https://github.com/asksven/BetterBatteryStats-Knowledge-Base/wiki/wlan_wake , it's mentioned that a sniffer should be used to debug.
I saw that most of the sniffers actually require root. So, how do I debug this wakelock without rooting my phone?
Abhijeet Rastogi
(161 rep)
Nov 17, 2013, 08:57 AM
• Last activity: Apr 1, 2022, 10:05 AM
0
votes
0
answers
53
views
What is Android wakelock UPDATE_BITMAP?
On my phone, the biggest wakelock offender is "Android System" wakelock UPDATE_BITMAP. It is held for about 30 minutes per day. Any idea what that may be? I do not use any background.
On my phone, the biggest wakelock offender is "Android System" wakelock UPDATE_BITMAP. It is held for about 30 minutes per day.
Any idea what that may be? I do not use any background.
Jan
(121 rep)
Mar 25, 2022, 11:40 PM
• Last activity: Mar 26, 2022, 01:06 AM
0
votes
1
answers
1359
views
What is exynos5-fb.1 wakelock?
Samsung Galaxy S4 running stock Android 4.3. This wakelock is mysterious. What is it? It's taking up a big chunk of my Awake time. How do I stop it? Thanks
Samsung Galaxy S4 running stock Android 4.3. This wakelock is mysterious. What is it? It's taking up a big chunk of my Awake time. How do I stop it? Thanks
rabbid
(501 rep)
Nov 29, 2013, 09:10 AM
• Last activity: Mar 3, 2022, 07:01 AM
0
votes
1
answers
1602
views
YouTube app holds a long wakelock. What app settings can I change to keep it from doing this?
I am using an HTC Evo 4g with Android 2.3.5 Gingerbread. I'm trying to deal with apps which keep my phone from entering sleep mode, and the YouTube app is a major offender. With downloaded apps, usually the fix is to remove the app and find an alternative app that doesn't suck the battery dry. But I...
I am using an HTC Evo 4g with Android 2.3.5 Gingerbread. I'm trying to deal with apps which keep my phone from entering sleep mode, and the YouTube app is a major offender. With downloaded apps, usually the fix is to remove the app and find an alternative app that doesn't suck the battery dry. But I want to keep YouTube enabled so I can watch YouTube videos.
What settings for the YouTube app can I change to get it to not hold a wake lock for hours on end? Are there any device settings that I can change to help?
So far I have disabled "Preload subscriptions", "Preload watch later", "Improve YouTube", and "Notifications" in the YouTube app's settings, but the wake lock still occurs.
Marsh
(101 rep)
Dec 8, 2014, 07:40 PM
• Last activity: Feb 28, 2022, 09:07 AM
1
votes
0
answers
1982
views
When does an app go into deep sleep?
I have a Samsung S20FE (Android 11 + OneUI 3.1). I was learning about the different battery optimization settings. I think I have a good understanding of Android's Doze mode. Now, I've seen there is (under Battery → Background usage limits) something called "Deep Sleep". According [to this question]...
I have a Samsung S20FE (Android 11 + OneUI 3.1).
I was learning about the different battery optimization settings. I think I have a good understanding of Android's Doze mode.
Now, I've seen there is (under Battery → Background usage limits) something called "Deep Sleep".
According to this question , it seems "Deep Sleep" is OEM specific, and is not found in every manufacturer's device.
I noticed that an application that is already excluded from "Doze mode" (in other words, an application that is NOT optimized) can not be excluded from "deep sleep mode" (in other words, can not be added to the never-sleeping-apps list).
Thus, I suppose an application goes first into "doze mode", and then into "deep sleep". Am I correct ?
If yes, under what circumstances does an app go into Deep Sleep ? Could an app like Skype (that is natively allowed to wake up the phone even in Doze Mode, I believe) go into Deep Sleep if it isn't used for a while ? Does it make sense to add Skype to Deep Sleep's never-sleeping-apps list if I want it to be always responsive (i.e., I want to receive Skype calls even if I haven't used Skype for some time) ? Or is it unnecessary ?
ChennyStar
(111 rep)
Dec 13, 2021, 04:31 AM
• Last activity: Dec 13, 2021, 12:10 PM
3
votes
2
answers
1223
views
How do I keep CPU off when charging?
When I connect the USB power source, it makes CPU to stay on (even though "Development->Stay awake" is off). When charging from a weak power source if makes battery to drain even faster than is case of USB power is not connected at all (because of CPU stays on instead of sleeping). How do I stop ext...
When I connect the USB power source, it makes CPU to stay on (even though "Development->Stay awake" is off).
When charging from a weak power source if makes battery to drain even faster than is case of USB power is not connected at all (because of CPU stays on instead of sleeping).
How do I stop external power connectedness affecting CPU sleeping policy?
I'm not talking about screen being on, it's about CPU being awake (unfortunately it is not easy to see if CPU is on or off).
Vi0
(1705 rep)
Feb 9, 2013, 03:38 PM
• Last activity: Dec 3, 2021, 06:00 AM
1
votes
0
answers
258
views
Battery drain while doze, CPU abort wakeups
I'm running Android 11, in a Moto G30. I've noticed battery drains from 100% to 80% from 1am to 9am when I wake up. I decided to get a bugreport.zip using ADB and load it in Battery Historian. Seems like at some point in the night, `JobScheduler` runs and finishes in a minute, but CPU stays on forev...
I'm running Android 11, in a Moto G30.
I've noticed battery drains from 100% to 80% from 1am to 9am when I wake up. I decided to get a bugreport.zip using ADB and load it in Battery Historian.
Seems like at some point in the night,
Here's the CPU wakeup sources list,
And here's a previous time when
JobScheduler
runs and finishes in a minute, but CPU stays on forever (even on full doze state). Reasons seem to be several Abort:Pending Wakeup Sources
related to networking. At these point, battery discharge rate is ~2.5% per hour, whereas "normal" screen-off / doze rate is ~1.5%.
These are some screenshots, and here's the bugreport.zip


JobScheduler
runs and CPU behaved well,

whitenoisedb
(171 rep)
Apr 30, 2021, 06:34 PM
1
votes
0
answers
215
views
OnePlus 5T - Inconsistent wake lock screen notifications on certain apps (delayed or never shown)
I should preface this by saying this is a long post that has a lot of screenshots. For months possibly a year, I’ve been having an issue with certain apps where notifications either do not appear at all or are very delayed on the lock screen. Sometimes they do appear without delay, but it's very inc...
I should preface this by saying this is a long post that has a lot of screenshots.
For months possibly a year, I’ve been having an issue with certain apps where notifications either do not appear at all or are very delayed on the lock screen. Sometimes they do appear without delay, but it's very inconsistent. The delay can be anywhere from 20 min to 2 hours.
Often times when notifications don’t appear on the lock screen they appear as soon as I unlock the phone or open the app.
The apps in question are Twitch TV and Discord. However WhatsApp and my Text message notifications never have any problems, I always see them on time and they wake up the lock screen.
My phone is a One Plus 5T that runs the stock One Plus android OS. I should also note that I only use Wi-Fi and not mobile data such as 4G.
----------
Things I’ve tried:
------------------
There are a number of things I’ve tried which I will list here.
**Twitch in app mobile notifications:**
- Ensured that when a streamer goes live I get notifications
- Ensured push notifications are enabled
----------
**Twitch app phone settings:**
- Battery usage → Background restriction = disabled
- Battery usage → Battery optimisation = not optimised
- App data usage → Background data = enabled
- App data usage → Unrestricted data usage = enabled
- Notifications → Show notifications = everything enabled
----------
**Battery Phone Settings:**
- Battery optimisation → Advanced → Deep optimisation = disabled
- Battery optimisation → Advanced → Sleep standby optimisation = disabled
- Battery → Adaptive battery = off
----------
**Other phone settings:**
- Ambient display → New notifications = Wake screen
- Notifications → On lock screen = Show all content
- System → Recent app management = normal clear
- Developer options → Standby apps = Twitch ACTIVE
----------
**Google Services Framework phone settings:**
- Battery usage → Background restriction = disabled
- Battery usage → Battery optimisation = no way to not optimise
- Notifications → Show notifications = everything enabled
- App Permissions → Read instant messages = enabled
- App Permissions → Write instant messages = enabled
----------
**Misc:**
- Locked twitch app to always run in the background [(courtesy of this post)
- Installed push notifications fixer app
- Tried to find a setting for each app that’s not on my phone (I think you need a later one plus model for these settings), courtesy of this post .
----------
Conclusion:
===========
None of the things I’ve tried have made any difference so far. I have no idea if it’s the apps, android or a one plus specific issue. If it’s a one plus specific issue I might be able to root the phone and install a custom ROM but that is an absolute last resort.
A lot of people say OnePlus phones have overly aggressive memory mananagement, so that could be a factor.
Any help would be appreciated.
Thanks.














SneakyShrike
(111 rep)
Aug 14, 2020, 04:16 PM
• Last activity: Aug 28, 2020, 10:35 PM
2
votes
1
answers
364
views
Help diagnosing constant CPU usage of phone during sleep (Battery Historian Chart)
I saw a great Battery Historian guide and decided to try it out. I noticed that last night while my phone was unplugged, the "CPU Running" bar was active the whole time when I was asleep. This should only be intermittent, not a constant black bar. Here's the whole battery historian chart, CPU runnin...
I saw a great Battery Historian guide and decided to try it out. I noticed that last night while my phone was unplugged, the "CPU Running" bar was active the whole time when I was asleep. This should only be intermittent, not a constant black bar.
Here's the whole battery historian chart, CPU running stats at the top.
Hovering over the CPU Running bar, I can see what's causing the CPU to run:
A lot of "abort" wakelocks whatever they are.
1. **Abort: Pending Wakup Sources: dwc3-otg**
2. **Abort: Pending Wakup Sources: usb_notify**
3. There's also something called "Unknown".
I have a Galaxy S20 (exynos). I have not used any package disabler app or rooting etc.
Googling the above wakelocks brings back nothing. Just some random github code.
Compared to this other S20 user's battery historian chart, my CPU running bar should be intermittent only.
Any android expert have an idea how to diagnose this?
edit: there's also constant "BLE Scanning" on the screenshot which is "bluetooth low energy". I have bluetooth off, nearby devices off, improve accuracy via bluetooth off.



SCool
(121 rep)
Jul 31, 2020, 01:14 PM
• Last activity: Aug 7, 2020, 12:04 PM
4
votes
2
answers
12998
views
How to tame "Phone Idle" battery drain on unrooted device?
I use `AccuBattery` and `Kaspersky Battery Life` to measure energy consumption. `Kaspersky Battery Life` shows, that all the tasks use minimal energy. `AccuBattery Pro` shows, that phone uses 5-10 mAh. This is a fairly new, 3000 mAh battery. Phone is a `THL T9 Pro`, `Android 6.0` is installed on it....
I use
There is data from the built-in usage chart too. I checked applications under Battery optimization, I found there only one,
AccuBattery
and Kaspersky Battery Life
to measure energy consumption. Kaspersky Battery Life
shows, that all the tasks use minimal energy. AccuBattery Pro
shows, that phone uses 5-10 mAh.
This is a fairly new, 3000 mAh battery. Phone is a THL T9 Pro
, Android 6.0
is installed on it.
UPDATE: I deleted all the mentioned applications and installed new one, GSam Battery Monitor
to get detailed data:

Google Play Services
.

plaidshirt
(145 rep)
Mar 2, 2018, 09:21 AM
• Last activity: May 17, 2020, 08:50 AM
8
votes
3
answers
10116
views
msm_otg kernel wakelock preventing deep sleep
Ever since upgrading my stock Sprint Galaxy S3 to the official Jelly Bean release, my phone won't go in deep sleep at all, it's constantly at 384MHz. It's because of msm_otg kernel wakelock. Anyone have any idea how to disable that? =================== General Information =================== BetterB...
Ever since upgrading my stock Sprint Galaxy S3 to the official Jelly Bean release, my phone won't go in deep sleep at all, it's constantly at 384MHz. It's because of msm_otg kernel wakelock. Anyone have any idea how to disable that?
===================
General Information
===================
BetterBatteryStats version: 1.11.0.0
Creation Date: 2012-10-29 14:02:58
Statistic Type: (3) Since Unplugged
Since 2 h 10 m 50 s
VERSION.RELEASE: 4.1.1
BRAND: samsung
DEVICE: d2spr
MANUFACTURER: samsung
MODEL: SPH-L710
OS.VERSION: 3.0.31-329968
BOOTLOADER: L710VPBLJ7
HARDWARE: qcom
FINGERPRINT: samsung/d2spr/d2spr:4.1.1/JRO03L/L710VPBLJ7:user/release-keys
ID: JRO03L
TAGS: release-keys
USER: se.infra
PRODUCT: d2spr
RADIO: L710VPBLJ7
Rooted: false
============
Battery Info
============
Level lost [%]: 19 Bat.: 19% (74% to 55%) [8.7%/h]
Voltage lost [mV]: 259 (4036-3777)
===========
Other Usage
===========
Awake (): 2 h 10 m 49 s (7849 s) Ratio: 100.0%
Wifi On (): 2 h 10 m 50 s (7850 s) Ratio: 100.0%
Wifi Running (): 2 h 10 m 50 s (7850 s) Ratio: 100.0%
Bluetooth On (): 2 h 10 m 50 s (7850 s) Ratio: 100.0%
No Data Connection (): 1 h 28 m 40 s (5320 s) Ratio: 67.8%
No or Unknown Signal (): 1 h 28 m 40 s (5320 s) Ratio: 67.8%
Screen On (): 16 m 13 s (973 s) Ratio: 12.4%
Deep Sleep (): (0 s) Ratio: 0.0%
=========
Wakelocks
=========
NetworkLocationLocator (com.google.android.apps.maps.Maps): 6 m 15 s (375 s) Count:339 4.8%
SignalCollector.ScannerThread (com.google.android.apps.maps.Maps): 3 m 19 s (199 s) Count:63 2.5%
AlarmReceiver (com.sec.android.app.clockpackage.Clock): 39 s (39 s) Count:14 0.5%
AlarmManager (in.vineetsirohi.customwidget.Ultimate custom widget (UCCW)): 34 s (34 s) Count:28 0.4%
AlarmManager (Android System): 29 s (29 s) Count:278 0.4%
LocationReceiverService (com.google.android.apps.maps.Maps): 17 s (17 s) Count:857 0.2%
EntriesRefresh_wakelock (com.google.android.googlequicksearchbox.Google Search): 17 s (17 s) Count:16 0.2%
*sync*_gmail-ls (com.google.android.gm.Gmail): 16 s (16 s) Count:12 0.2%
CheckinsNotificationService (com.google.android.apps.maps.Maps): 12 s (12 s) Count:685 0.2%
ActivityManager-Launch (Android System): 12 s (12 s) Count:51 0.2%
AlarmManager (com.espn.score_center.ScoreCenter): 9 s (9 s) Count:135 0.1%
AlarmManager (com.google.android.apps.maps.Maps): 8 s (8 s) Count:1701 0.1%
*sync*_com.google.android.apps.plus.content.EsProvider (com.google.android.apps.plus.Google+): 7 s (7 s) Count:1 0.1%
GmailProviderProviderChangedBroadcastWakeLock (com.google.android.gm.Gmail): 7 s (7 s) Count:4 0.1%
*sync*_com.android.calendar (Calendar): 7 s (7 s) Count:11 0.1%
FaceDetectionService (Android System): 6 s (6 s) Count:144 0.1%
GTALK_ASYNC_CONN_com.google.android.gsf.gtalkservice.AndroidEndpoint (Google Services): 6 s (6 s) Count:43 0.0%
AsyncCollectorListener (com.google.android.apps.maps.Maps): 6 s (6 s) Count:1089 0.1%
sleep_broadcast (Android System): 5 s (5 s) Count:85 0.1%
*sync*_com.google.android.apps.docs (com.google.android.apps.docs.Drive): 5 s (5 s) Count:6 0.0%
ConnectivityService (Android System): 5 s (5 s) Count:146 0.0%
DocsSyncAdapter (com.google.android.apps.docs.Drive): 5 s (5 s) Count:2 0.0%
PhoneWindowManager.mBroadcastWakeLock (Android System): 4 s (4 s) Count:60 0.1%
NetworkLocationCallbackRunner (com.google.android.apps.maps.Maps): 4 s (4 s) Count:546 0.1%
NetworkLocationPassiveCollector (com.google.android.apps.maps.Maps): 4 s (4 s) Count:551 0.1%
LocationReportingService (com.google.android.apps.maps.Maps): 4 s (4 s) Count:1704 0.1%
NLP PendingIntent client in com.google.android.apps.maps (com.google.android.apps.maps.Maps): 4 s (4 s) Count:1224 0.1%
AlarmManager (com.levelup.beautifulwidgets.Beautiful Widgets): 4 s (4 s) Count:131 0.1%
*sync*_com.android.contacts (Google Services): 3 s (3 s) Count:4 0.0%
BackgroundRequestService (com.facebook.katana.Facebook): 3 s (3 s) Count:29 0.0%
NLP PendingIntent client in com.google.android.googlequicksearchbox (com.google.android.apps.maps.Maps): 3 s (3 s) Count:166 0.0%
*sync*_com.sec.android.gallery3d.picasa.contentprovider (com.sec.android.gallery3d.Gallery): 2 s (2 s) Count:2 0.0%
net.comcast.ottclient.common.sync.WakefulIntentService (net.comcast.ottclient.XFINITY Connect): 2 s (2 s) Count:6 0.0%
RILJ (Phone): 2 s (2 s) Count:70 0.0%
AlarmManager (com.android.providers.calendar.Calendar storage): 2 s (2 s) Count:26 0.0%
AlarmManager (flipboard.app.Flipboard): 2 s (2 s) Count:3 0.0%
*sync*_com.google.android.music.MusicContent (com.google.android.music.Google Play Music): 2 s (2 s) Count:6 0.0%
NetworkStats (Android System): 2 s (2 s) Count:43 0.0%
ScheduleNextAlarmWakeLock (com.android.providers.calendar.Calendar storage): 2 s (2 s) Count:30 0.0%
*sync*_com.android.browser (Google Services): 1 s (1 s) Count:80 0.0%
SyncLoopWakeLock (Android System): 1 s (1 s) Count:377 0.0%
show keyguard (Android System): 1 s (1 s) Count:9 0.0%
AudioOut_15 (1013): 1 s (1 s) Count:5 0.0%
MQTT (com.facebook.katana.Facebook): 1 s (1 s) Count:25 0.0%
GTALK_CONN (Google Services): 1 s (1 s) Count:181 0.0%
*sync*_subscribedfeeds (Google Services): 1 s (1 s) Count:109 0.0%
NfcAdapterManagerImpl (com.google.android.apps.walletnfcrel.Wallet): 1 s (1 s) Count:10 0.0%
AlarmManager (com.birdstep.android.cm.Sprint Connections Optimizer): 1 s (1 s) Count:3 0.0%
Event Log Service (Google Services): 1 s (1 s) Count:107 0.0%
AlarmManager (Google Services): 1 s (1 s) Count:216 0.0%
NLP ActivityPendingIntent client in com.google.android.apps.maps (com.google.android.apps.maps.Maps): 1 s (1 s) Count:205 0.0%
AudioOut_3 (1013): 1 s (1 s) Count:6 0.0%
AudioOut_2 (1013): 1 s (1 s) Count:7 0.0%
reset keyguard (Android System): 1 s (1 s) Count:131 0.0%
AlarmManager (org.fueledinc.jackthreads.android.JackThreads): 1 s (1 s) Count:24 0.0%
AlarmManager (com.facebook.katana.Facebook): 1 s (1 s) Count:47 0.0%
================
Kernel Wakelocks
================
"msm_otg" (): 1 h 54 m 31 s (6871 s) Cnt:(c/wc/ec)1/0/0 87.1%
"wlan_rx_wake" (): 25 m 11 s (1511 s) Cnt:(c/wc/ec)1393/0/1393 19.2%
"PowerManagerService" (): 13 m 25 s (805 s) Cnt:(c/wc/ec)1128/0/0 10.2%
"wlan_ctrl_wake" (): 8 m 17 s (497 s) Cnt:(c/wc/ec)236/0/236 6.3%
"bam_dmux_wakelock" (): 4 m 4 s (244 s) Cnt:(c/wc/ec)336/0/168 1.8%
"sec-battery-monitor" (): 1 m 45 s (105 s) Cnt:(c/wc/ec)233/0/0 1.3%
"smdcntl0" (): 1 m 32 s (92 s) Cnt:(c/wc/ec)1795/0/85 1.2%
"wlan_wake" (): 1 m 18 s (78 s) Cnt:(c/wc/ec)35988/1/0 1.0%
"BTLowPower" (): 39 s (39 s) Cnt:(c/wc/ec)16/0/16 0.5%
"msm_serial_hs_dma" (): 30 s (30 s) Cnt:(c/wc/ec)16/0/0 0.4%
"radio-interface" (): 19 s (19 s) Cnt:(c/wc/ec)40/0/0 0.2%
"alarm" (): 12 s (12 s) Cnt:(c/wc/ec)1076/0/0 0.2%
"smdcntl1" (): 11 s (11 s) Cnt:(c/wc/ec)12/0/6 0.2%
"msm_serial_hs_rx" (): 10 s (10 s) Cnt:(c/wc/ec)37/0/37 0.1%
"vib_present" (): 7 s (7 s) Cnt:(c/wc/ec)16/0/0 0.1%
"rmt_storage_1093353344" (): 3 s (3 s) Cnt:(c/wc/ec)10/0/0 0.0%
"rmt_storage_1093353168" (): 3 s (3 s) Cnt:(c/wc/ec)10/0/0 0.0%
"power-supply" (): 1 s (1 s) Cnt:(c/wc/ec)233/0/0 0.0%
"sec-battery-measure" (): 1 s (1 s) Cnt:(c/wc/ec)262/0/0 0.0%
"alarm_rtc" (): (0 s) Cnt:(c/wc/ec)15/0/1 0.0%
"pm8xxx_adc_wakelock" (): (0 s) Cnt:(c/wc/ec)262/0/0 0.0%
"mmc1_detect" (): (0 s) Cnt:(c/wc/ec)2/0/2 0.0%
"mmc0_detect" (): (0 s) Cnt:(c/wc/ec)2/0/2 0.0%
"qcril" (): (0 s) Cnt:(c/wc/ec)865/0/0 0.0%
"KeyEvents" (): (0 s) Cnt:(c/wc/ec)4189/0/0 0.0%
"ApmCommand" (): (0 s) Cnt:(c/wc/ec)58/0/0 0.0%
"qmuxd_port_wl_0" (): (0 s) Cnt:(c/wc/ec)1742/0/0 0.0%
"event7-734" (system, com.sec.android.app.gamehub, com.android.providers.security, com.google.android.backup, com.android.providers.settings): (0 s) Cnt:(c/wc/ec)35/0/0 0.0%
"event0-734" (system, com.android.server.vpn.enterprise): (0 s) Cnt:(c/wc/ec)1/0/0 0.0%
"event4-734" (system, com.android.server.vpn.enterprise): (0 s) Cnt:(c/wc/ec)1/0/0 0.0%
"event1-734" (system, com.android.server.vpn.enterprise): (0 s) Cnt:(c/wc/ec)1/0/0 0.0%
"event13-734" (system, com.microsoft.onx.app): (0 s) Cnt:(c/wc/ec)57/0/0 0.0%
"event5-734" (system, com.asksven.betterbatterystats): (0 s) Cnt:(c/wc/ec)11/0/0 0.0%
"event11-734" (system, com.android.server.vpn.enterprise): (0 s) Cnt:(c/wc/ec)1/0/0 0.0%
"event10-734" (system, com.android.server.vpn.enterprise): (0 s) Cnt:(c/wc/ec)1/0/0 0.0%
"event9-734" (system, com.android.server.vpn.enterprise): (0 s) Cnt:(c/wc/ec)1/0/0 0.0%
"qmuxd_port_wl_1" (): (0 s) Cnt:(c/wc/ec)6/0/0 0.0%
"msm_ipc_read" (): (0 s) Cnt:(c/wc/ec)20/0/0 0.0%
"msm_ipc_router_smd_xprt" (): (0 s) Cnt:(c/wc/ec)41/0/0 0.0%
======================
Alarms (requires root)
======================
======================
Network (requires root)
======================
==========
CPU States
==========
384 MHz (): 1 h 43 m 3 s 78.4%
486 MHz (): 3 m 46 s 2.9%
594 MHz (): 1 m 53 s 1.4%
702 MHz (): 2 m 8 s 1.6%
810 MHz (): 2 m 40 s 2.0%
918 MHz (): 3 m 59 s 3.0%
1.03 GHz (): 2 m 3 s 1.6%
1.13 GHz (): 1 m 39 s 1.3%
1.24 GHz (): 1 m 20 s 1.0%
1.35 GHz (): 31 s 0.4%
1.46 GHz (): 24 s 0.3%
1.51 GHz (): 7 m 53 s 6.0%
Deep Sleep (): 0.0%
==================
Reference overview
==================
Custom: Reference custom_ref created 0 s (Wl: null; KWl: null; NetS: null; Alrm: null; Proc: null; Oth: null; CPU: null)
Since charged: Reference since_charged_ref created 0 s (Wl: null; KWl: null; NetS: null; Alrm: null; Proc: null; Oth: null; CPU: null)
Since screen off: Reference since_screen_off created 0 s (Wl: null; KWl: null; NetS: null; Alrm: null; Proc: null; Oth: null; CPU: null)
Since unplugged: Reference since_unplugged_ref created 1 h 35 m 58 s (Wl: 43 elements; KWl: 27elements; NetS: null; Alrm: null; Proc: 12 elements; Oth: 7 elements; CPU: 13 elements)
Since boot: Reference since_boot created 59 s (Wl: 11 elements; KWl: 0elements; NetS: null; Alrm: null; Proc: 1 elements; Oth: 6 elements; CPU: 13 elements)
LOLapalooza
(181 rep)
Oct 30, 2012, 01:44 PM
• Last activity: Dec 22, 2019, 06:03 PM
0
votes
1
answers
639
views
How to give a wakelock to an app?
How can I give a CPU wakelock to an app so that It can **work even when the screen is off?** (Usually android halts CPU too, when screen is off)
How can I give a CPU wakelock to an app so that It can **work even when the screen is off?**
(Usually android halts CPU too, when screen is off)
Hyeonseo Yang
(115 rep)
Mar 19, 2019, 12:11 AM
• Last activity: Mar 19, 2019, 08:06 AM
8
votes
4
answers
3886
views
Why does my screen turn itself ON?
I am having a problem with my phone's screen arbitrarily turning itself on. It has been going on for a while, but I finally got a logcat of it, so here it is. If anyone can find anything in here that looks like it is causing the problem, and how to resolve it, please let me know. I'm particularly su...
I am having a problem with my phone's screen arbitrarily turning itself on. It has been going on for a while, but I finally got a logcat of it, so here it is. If anyone can find anything in here that looks like it is causing the problem, and how to resolve it, please let me know.
I'm particularly suspicious of the first entry at
10-01 18:25:44.411
and the other entries that say E/power
, but I don't know what to make of the rest.
10-01 18:25:32.079 D/PowerManagerService( 279): Screen__Off : releaseWakeLockLocked flags=0x0 tag=AdControllerWakeLock myUID=1000 myPID=279 myTID=505
10-01 18:25:32.079 I/PowerManagerService( 279): Ulight 7->0|0
10-01 18:25:32.079 D/PowerManagerService( 279): setLightBrightness : mButtonLight : 0
10-01 18:25:32.129 V/MmsProvider( 425): Query uri=content://mms/inbox, match=2
10-01 18:25:32.300 D/dalvikvm( 279): GC_CONCURRENT freed 2041K, 47% free 10031K/18759K, external 11107K/12124K, paused 9ms+8ms
10-01 18:25:32.300 D/StagefrightPlayer( 181): reset
10-01 18:25:32.300 D/StagefrightPlayer( 181): reset over
10-01 18:25:32.300 D/StagefrightPlayer( 181): reset
10-01 18:25:32.300 D/StagefrightPlayer( 181): reset over
10-01 18:25:32.330 D/dalvikvm( 1425): GC_CONCURRENT freed 503K, 47% free 3365K/6279K, external 0K/0K, paused 1ms+3ms
10-01 18:25:32.360 I/APACHE HTTP (thCr=11) - NafHttpAuthStrategyDefault( 2143): (thUse=11) NafHttpAuthStrategyDefault()
10-01 18:25:32.360 I/APACHE HTTP (thCr=11) - GbaSupportIndicatorRequestUpdaterDefault( 2143): (thUse=11) GbaSupportIndicatorRequestUpdaterAbstract() userHeaderPredefined=null
10-01 18:25:32.430 D/dalvikvm( 2143): GC_CONCURRENT freed 378K, 49% free 3115K/6023K, external 0K/0K, paused 3ms+2ms
10-01 18:25:32.440 I/APACHE HTTP (thCr=11) - NafHttpAuthStrategyDefault( 2143): (thUse=11) cached value : gbaSupportIsPossible=null
10-01 18:25:32.440 I/APACHE HTTP (thCr=11) - NafHttpAuthStrategyDefault( 2143): (thUse=11) The current context is NOT a context of GBA service.
10-01 18:25:32.440 I/APACHE HTTP (thCr=11) - GbaSupportPermissionRequestCheckerImpl( 2143): (thUse=11) isCurrentProcessRequestedGba()#finished result=false
10-01 18:25:32.440 I/APACHE HTTP (thCr=11) - GbaSupportPermissionRequestCheckerImpl( 2143): (thUse=11) isCurrentProcessAllowedToUseGba()#started result=false
10-01 18:25:32.440 I/APACHE HTTP (thCr=11) - NafHttpAuthStrategyDefault( 2143): (thUse=11) The GBA permission wasn't requested for this process.
10-01 18:25:32.440 I/APACHE HTTP (thCr=11) - NafHttpAuthStrategyDefault( 2143): (thUse=11) It is impossible to support GBA now (many possible reasons: no Android Context, current client is GBA service, etc.), then it will be just usual HTTP.
10-01 18:25:32.440 I/APACHE HTTP (thCr=11) - NafRequestExecutorWrapperRedirectionHandler( 2143): (thUse=11) It isn't GBA flow, redirection responses are not handled.
10-01 18:25:32.570 V/DATA ( 425): [DCT(0) ] intent received :android.intent.action.SCREEN_ON
10-01 18:25:32.570 D/WallpaperService( 279): ACTION_SCREEN_ON
10-01 18:25:32.580 D/PhoneUtils( 425): updateRAFT() : FactoryMode : false
10-01 18:25:32.740 D/dalvikvm( 2143): GC_FOR_MALLOC freed 300K, 52% free 2928K/6023K, external 0K/0K, paused 34ms
10-01 18:25:32.750 D/DATA ( 425): [DSST(0)] pollstate() : reason = data network state changed
10-01 18:25:32.840 E/power ( 279): *** set_screen_state 0
10-01 18:25:32.840 I/PowerManagerService( 279): Light Animator Finished curIntValue=0
10-01 18:25:32.840 D/PowerManagerService( 279): enableLightSensor false
10-01 18:25:32.850 D/SensorManager( 279): unregisterListener:: disable all sensors for this listener, name = GP2A Light Sensor listener = com.android.server.PowerManagerService$13@4052ad40
10-01 18:25:32.850 D/KeyguardViewMediator( 279): onScreenTurnedOff(3)
10-01 18:25:32.850 D/KeyguardViewMediator( 279): notifyScreenOffLocked
10-01 18:25:32.850 D/KeyguardViewMediator( 279): resetStateLocked
10-01 18:25:32.850 D/KeyguardViewMediator( 279): handleNotifyScreenOff
10-01 18:25:32.850 I/OrientationDebug( 279): [pwm] in updateOrientationListenerLp()
10-01 18:25:32.850 D/LockPatternKeyguardView( 279): onScreenTurnedOff()
10-01 18:25:32.850 D/KeyguardViewMediator( 279): handleReset
10-01 18:25:32.850 V/OrientationDebug( 279): in updateOrientationListenerLp(), Screen status=false, current orientation=5, SensorEnabled=false
10-01 18:25:32.850 W/PowerManagerService( 279): CurLockF mPS:0 mUS=0
10-01 18:25:32.850 W/PowerManagerService( 279): type=PARTIAL_WAKE_LOCK 'RILJ' active (mS=0) activeT=20
10-01 18:25:32.850 W/PowerManagerService( 279): type=PARTIAL_WAKE_LOCK 'sleep_broadcast' active (mS=0) activeT=3
10-01 18:25:32.850 W/PowerManagerService( 279): mPokeLocks.size=0:
10-01 18:25:32.850 D/PowerManagerService( 279): sendNotificationLocked on=false
10-01 18:25:32.850 D/PowerManagerService( 279): mNotificationTask : off
10-01 18:25:32.850 V/WindowManager( 279): Setting event dispatching to false
10-01 18:25:32.870 D/VoldCmdListener( 173): volume shared /mnt/sdcard ums
10-01 18:25:32.870 D/MountService( 279): doGetVolumeShared :: path = /mnt/sdcard, method = ums, result = false
10-01 18:25:32.870 D/VoldCmdListener( 173): volume shared /mnt/sdcard/external_sd ums
10-01 18:25:32.880 D/dalvikvm( 425): GC_EXPLICIT freed 351K, 41% free 4104K/6919K, external 0K/1280K, paused 48ms
10-01 18:25:32.880 D/MountService( 279): doGetVolumeShared :: path = /mnt/sdcard/external_sd, method = ums, result = false
10-01 18:25:32.880 D/MountService( 279): :::: isUsbMassStorageEnabled :: ret = false
10-01 18:25:32.890 D/StatusBarService( 407): animateCollapse() - updateViewLayout
10-01 18:25:32.910 D/DATA ( 425): [DSST(0)] Poll ServiceState done: oldSS=[0 home null null null HSPA CSS not supported -1 -1RoamInd: -1DefRoamInd: -1EmergOnly: false] newSS=[0 home null null null HSPA CSS not supported -1 -1RoamInd: -1DefRoamInd: -1EmergOnly: false]
10-01 18:25:32.910 V/DATA ( 425): [DCT(0) ] intent received :android.intent.action.SCREEN_OFF
10-01 18:25:32.920 D/WallpaperService( 279): ACTION_SCREEN_OFF
10-01 18:25:32.930 D/PhoneUtils( 425): updateRAFT() : FactoryMode : false
10-01 18:25:32.990 D/SurfaceFlinger( 279): About to give-up screen, flinger = 0x88720
10-01 18:25:33.601 D/BatteryService( 279): update start
10-01 18:25:33.601 D/BatteryService( 279): US/CANADA GSM Models
10-01 18:25:33.601 D/BatteryService( 279): updateBattery level:37 scale:100 status:2 health:2 present:true voltage: 3811 temperature: 283 technology: Li-ion AC powered:false USB powered:true icon:17302234
10-01 18:25:33.631 D/PhoneUtils( 425): updateRAFT() : FactoryMode : false
10-01 18:25:34.412 E/AlarmManagerService( 279): android_server_AlarmManagerService_set to type=0, 1349130344.397000000
10-01 18:25:34.412 V/AlarmManager( 279): Adding alarm Alarm{40d4f110 type 0 com.gau.go.launcherex.theme.GalaxySTheme} at 0
10-01 18:25:35.202 E/AlarmManagerService( 279): android_server_AlarmManagerService_set to type=1, 1349130355.212000000
10-01 18:25:35.202 V/AlarmManager( 279): Adding alarm Alarm{411a20e8 type 1 com.tecace.tetheringmanager} at 0
10-01 18:25:35.202 V/AlarmManager( 279): sending alarm Alarm{411a20e8 type 1 com.tecace.tetheringmanager}
10-01 18:25:35.233 I/TetheringManagerService( 1885): Running time = 40 seconds
10-01 18:25:40.297 D/dalvikvm( 2109): GC_EXPLICIT freed 17K, 48% free 3321K/6343K, external 0K/0K, paused 63ms
10-01 18:25:44.391 E/AlarmManagerService( 279): android_server_AlarmManagerService_set to type=0, 1349130387.981000000
10-01 18:25:44.391 V/AlarmManager( 279): sending alarm Alarm{40d4f110 type 0 com.gau.go.launcherex.theme.GalaxySTheme}
10-01 18:25:44.391 V/AlarmManager( 279): pending wakeup alarm com.gau.go.launcherex.theme.GalaxySTheme
10-01 18:25:44.411 E/power ( 279): *** set_screen_state 1
10-01 18:25:44.411 D/PowerManagerService( 279): reactivateScreenLocksLocked mProxIgnoredBecauseScreenTurnedOff=false
10-01 18:25:44.411 D/PowerManagerService( 279): Screen__On : acquireWakeLock flags=0x3000001a tag=AdControllerWakeLock uid=10147 pid=2143 myUID=1000 myPID=279 myTID=279
10-01 18:25:44.411 I/PowerManagerService( 279): Ulight 0->7|0
10-01 18:25:44.411 D/PowerManagerService( 279): setLightBrightness : mButtonLight : 237
10-01 18:25:44.421 D/SensorManager( 279): registerListener :: handle = 3 name= GP2A Light Sensor delay= 200000 Listener= com.android.server.PowerManagerService$13@4052ad40
10-01 18:25:44.421 D/PowerManagerService( 279): enableLightSensor true
10-01 18:25:44.502 D/KeyguardViewMediator( 279): onScreenTurnedOn, seq = 18
10-01 18:25:44.502 D/KeyguardViewMediator( 279): notifyScreenOnLocked
10-01 18:25:44.502 I/OrientationDebug( 279): [pwm] in updateOrientationListenerLp()
10-01 18:25:44.502 V/OrientationDebug( 279): in updateOrientationListenerLp(), Screen status=true, current orientation=5, SensorEnabled=false
10-01 18:25:44.502 I/OrientationDebug( 279): [pwm] needSensorRunningLp(), return false #3
10-01 18:25:44.502 D/KeyguardViewMediator( 279): handleNotifyScreenOn
10-01 18:25:44.502 D/LockPatternKeyguardView( 279): onScreenTurnedOn()
10-01 18:25:44.502 D/UnlockScreen( 279): max failed attempt for device disable :0
10-01 18:25:44.502 D/UnlockScreen( 279): isDeviceDisabledForMaxFailedAttempt return :false
10-01 18:25:44.502 D/PowerManagerService( 279): sendNotificationLocked on=true
10-01 18:25:44.502 D/PowerManagerService( 279): mNotificationTask : on
10-01 18:25:44.502 V/WindowManager( 279): Setting event dispatching to true
10-01 18:25:44.512 D/PowerManagerService( 279): acquireDVFSlock : level : 1, timeMS : 3000
10-01 18:25:44.602 I/Notification( 784): package = com.gau.golauncherex.notification class = com.gau.golauncherex.notification.service.NotificationService
10-01 18:25:44.802 E/MP-Decision( 744): Error(-22) changing core status to online
10-01 18:25:44.812 I/PowerManagerService( 279): Light Animator Finished curIntValue=237
10-01 18:25:45.002 D/SurfaceFlinger( 279): Screen about to return, flinger = 0x88720
10-01 18:25:47.515 D/PowerManagerService( 279): acquireDVFSlock : level : -1, timeMS : 100
10-01 18:25:47.595 E/power ( 279): release_cpu_max_lock() return -1
**UPDATE**
It looks like the Galaxy S Theme is what was causing the problems. Luckily, it was not a stock app, but one I downloaded, so I uninstalled it. For now, I am reserving my accept for a few days to be sure that it has stopped happening.
ewok
(309 rep)
Oct 1, 2012, 10:34 PM
• Last activity: Feb 28, 2019, 04:35 AM
Showing page 1 of 20 total questions