Related
Hey, I am taking a Android Tablet and installing it in the car.
Anyone know of a battery app or something else that I can set the device to auto power down (All Radios, Screen) when power is shut off to the charger.
Obviously when I turn the key and power is supplied to the tablet through the charger it will turn on, and with the screen set to never sleep I am set when I get in.
Just looking for a something that will auto shut down when I get out.
Thoughts?
I don't think there is a way for a normal app to do this.
If you are rooted there is a shell commands that can achieve this.
Have you looked in the market or on the net?
If you are rooted and you cant find any solution let me know, i might give writing such an app a try .
Thanks for the Reply Dark3n!
I spent hours yesterday research and downloading Battery and Power Control apps from the Market (free versions). I was able to find MANY apps that will somewhat do what I am looking for but only based on the Battery percentage, see "JuiceDefender".
Researching the paid versions of the app's got me nowhere, not enough documentation for me to risk the money and just download to see if the feature was there. If someones paid version of an App will let me do this please let me know and I will try it.
If you could write an app like this I would certainly donate to you or any group that you wish!!!!
Funny after I hit reply I looked at your signature, I downloaded your app yesterday too! Your type of app was what I was looking for, just need to add the feature.
Tharamis said:
Funny after I hit reply I looked at your signature, I downloaded your app yesterday too! Your type of app was what I was looking for, just need to add the feature.
Click to expand...
Click to collapse
, you probably mean the power manager.
Nah that app is fine as it is, but i could write a small app to do this, maybe polish it a little later and put it on the market for others.
In my head its already done
I don't have too much spare time at the moment, but i will keep you updated on any progress.
Could you open a console on your device and type as superuser:
"shutdown" or "shutdown now" or
"halt" or "halt now" or
"poweroff" or "poweroff now".
To see if any those commands are supported on your device?
Device HTC Flyer: Running LeeDroid 2.2.0 Kernel 2.3 - 2.6.35.14
"Shutdown now" = Shut the device off (had to boot it)
"Shutdown" = Shut the device off (had to boot it)
"halt" = Nothing
"halt now" = Nothing
"poweroff" = Nothing
"poweroff now" = Nothing
None put the device to sleep.
Do you want the device turned off?
Or in just any state using the least power possible?
In a state that uses the least amount of power possible.
We could put the phone into airplane mode and turn the screen off, and on charger connect we turn airplane mode off, and put the screen on always on?
That sounds great.
Got a prototype almost rdy.
And here it is
http://goo.gl/wWuC3
Let me know what you think.
Did you try it?
Hey Man sorry was out with girl yesterday. No cell phones allowed .
Just installed it and it works except for the screen. On power off wifi and Bluetooth shut down and airplane mode is enabled (gps stays on) but the screen never sleeps. Now I don't know if this is due to my low battery and the message popping up "please connect a charger". I am charging now and will report back.
On power up airplane mode shuts off and what ever I had enabled before comes back on.
Thanks man... I will let you know once I get her charged up.
Cool .
I don't think GPS stays on, i think its just showing that it is enabled.
Try using a GPS app with airplane mode on.
Regarding the screen staying, is it possible that another app is running in background or a system setting keeps the screen on?
I don't think i can force other apps to release their lock on the screen.
Well, the lack of communication here is a bit discouraging...
I put the app on the market for anyone else looking for the same solution.
https://market.android.com/details?id=eu.thedarken.cp
Sorry Dark. Thanksgiving week, ton of family in town. I will have a few a hours today.
Even at full charge screen still stays on. I need to go through all the running apps and the one that is keeping it on.
setcpu or voltage control
Tharamis said:
Sorry Dark. Thanksgiving week, ton of family in town. I will have a few a hours today.
Even at full charge screen still stays on. I need to go through all the running apps and the one that is keeping it on.
Click to expand...
Click to collapse
Write "dumpsys power" in console/shell. It will tell you who or what is keeping a wakelock.
Hi
I've got a brand new PH-1 and haven't yet had time to set it up properly, only started it up, let it update software and used for an hour or so before testing the idle battery drain.
I haven't installed any apps or changed any settings other than to disable the google app (to prevent it listening for or responding to "ok google"). I tried out the 360 camera, signed in to gmail and browsed a few websites, before charging back to full and restarting the phone before this test anyway.
But leaving it idle with the screen off and with phone network disabled (there's not even a SIM inserted), only wifi on with good signal, it lost 65% battery in under 22 hours. Screen on time was less than five minutes.
Is this a hardware issue I should RMA, or is it considered normal? If this is normal and there's no easy fix, I'll probably end up having to return the phone anyway for a refund, because if it can't even last a day and half in idle there's no way it would last a reasonable amount of time with normal usage.
Any ideas?
Thanks
Since there isn't a sim card installed, try going to airplane mode and then turning WIFI on.
I am getting about 1.2% drain with cell network and wifi enabled along with all my standard apps installed.
On a typical day with 1-2h SOT, I usually have 60-70% battery left at midnight. I'd try to reset the phone, and then testing again - occasionally a system update will end up doing something funny
I left it overnight with airplane mode on, so even wifi was off, and it's a little better but not by much. Screen on time was one minute.
With airplane mode on, screen off, no dodgy apps, the phone really shouldn't be doing anything to drain battery.
I'll try a full factory reset and see what happens.
Just to follow up, a full factory reset seems to have fixed the issue. Even after doing the same things I had done before (connected to wifi, updated, logged in to gmail, etc) the battery now drains at a much more sensible rate.
Very strange that a factory reset made a difference since it was new from the factory when I had the issue, but I guess something strange happened in the update like dsip suggested.
Thanks for the help!
nickwp said:
Just to follow up, a full factory reset seems to have fixed the issue. Even after doing the same things I had done before (connected to wifi, updated, logged in to gmail, etc) the battery now drains at a much more sensible rate.
Very strange that a factory reset made a difference since it was new from the factory when I had the issue, but I guess something strange happened in the update like dsip suggested.
Thanks for the help!
Click to expand...
Click to collapse
That's ? percent normal behavior. Anytime you flash a ROM (new phone =new ROM) you need to wait a bare minimum of a charge cycle (more like three in my experience) before you get the slightest idea what your actual battery drain is going to look like. think of it like breaking in the engine on a new car.
Sent from my mata using XDA Labs
G'day,
I've had some odd issues with two consecutive Xiaomi phones, and I'm hoping someone here can shed some light on it for me.
With both my Mi Note 2, and now my current Mi Mix 3, after less than a year of owning each one (respectively), out of nowhere, the battery life drops through the floor, the phone gets really hot, and most oddly, I got wicked battery drop while the phone is off (e.g. I turned the phone completely off at 77%, and about an hour later, I turn the phone back on and it's at 43%).
On both phones, I've tried a factory reset, but it didn't work. It was, for all intents and purposes, fecked. At the moment, I'm waiting for the 15 day countdown for my Mi Mix 3 bootloader to be unlocked so I can try flashing the EU MiUI ROM and see if that helps, but that's still a hell of a long time to wait with a phone that idles at 50+° C and has a battery life of about 3 hours with minimal SoT.
I've installed BetterBatteryStats (using ADB to provide permissions), CPU-Z, CPU Monitor and Ampere to see if I could get some more information. I found a few things:
1. Somehow, with mobile data and WiFi enabled, the system was drawing SO MUCH power (reported by Ampere) that it literally wouldn't charge while plugged into a 2A wall port. It was drawing like 1300mA when it wasn't plugged in, and when it was, it was STILL drawing about 130mA, meaning no matter what, while the phone was on, I was losing battery.
2. BBS reported the biggest battery killer was under the 'Alarms' tab, caused by Android, which were "Intent: *job.delay*" and "Intent: *job.deadline*". I have literally no idea what these are, what's causing them, or how to stop it triggering.
3. I've done a full factory reset. The first hint that something was wrong was when I noticed that the phone wasn't charging when it was plugged in and turned on. I did the full factory reset, didn't help.
I'm currently running Global MiUI 11.0.4.0, Android 9.
Does anyone have any ideas? I haven't manually updated anything, I'm not particularly rough with the phone, but for two phones in a row, this has come straight out of nowhere. It's a shame, because the Mi Mix 3 has spoiled me with it's 100% screen real estate (no hole-punch, no teardrop for front camera), but I think my next phone is gonna go with something else.
Cheers.
Update: I've taken a squizz at the Google Battery Historian and basically, I have no feckin' idea.
The best I can get out of it is "Yep, something in the labyrinthine generic 'Android' system is causing it, but good luck narrowing it down or stopping it."
That being said, I've found that this Partial Wakelock is triggered fairly often (1-6 times per minute, give or take): IntentOp:.common.broadcast.BackgroundBroadcastReceiverSupport$GmsReceiverIntentOperation
I have no idea what the hell it is or does, and the only information I can find about it is from developers asking questions where it just happens to be part of their codebase, or a breakdown of how the WakeBlock app works.
It's getting woken up about every minute or so (usually more than once a minute). However, the wakelocks appear to be part of the core Google/Android systems that can't be individually disabled.
I'm still feckin' confused.
Overloke said:
Update: I've taken a squizz at the Google Battery Historian and basically, I have no feckin' idea.
The best I can get out of it is "Yep, something in the labyrinthine generic 'Android' system is causing it, but good luck narrowing it down or stopping it."
That being said, I've found that this Partial Wakelock is triggered fairly often (1-6 times per minute, give or take): IntentOp:.common.broadcast.BackgroundBroadcastReceiverSupport$GmsReceiverIntentOperation
I have no idea what the hell it is or does, and the only information I can find about it is from developers asking questions where it just happens to be part of their codebase, or a breakdown of how the WakeBlock app works.
It's getting woken up about every minute or so (usually more than once a minute). However, the wakelocks appear to be part of the core Google/Android systems that can't be individually disabled.
I'm still feckin' confused.
Click to expand...
Click to collapse
I think it's an issue with your network operator
XDRdaniel said:
I think it's an issue with your network operator
Click to expand...
Click to collapse
Any ideas as to how I'd further troubleshoot? I've gone into *#*#4636#*#* and changed the sort of signal it looks for, but it doesn't appear to have fixed anything.
In case anyone is interested, I've attached on of my Bugreports (from running adb bugreport), which can be viewed through Google Battery Historian.
I'm not saying there's a cash prize for anyone who can tell me what is happening and why, but I'm also not saying that there isn't.
So, I think we have our culprit (maybe).
I have attached several screenshots from a Battery Historian I took after having my phone on all day. The total phone on time was about 4-5 hours with, no joke, maybe 10 seconds of screen on time. Let's go through this absolute bullshittery together, shall we?
Battery - Full Time: The full length of time captured by the Battery Historian/bugreport command. It's in Zulu Time (GMT+0) and I'm in Australia (GMT+10), so the line starts going up at 5PM last night, which is more or less when I plugged it in to charge. You can see, while 'off', it took 16 hours to charge to 100%, and this was from a 'cold boot' (phone is completely dead), so it didn't have any information about what had been running, etc.
Battery - Discharge: The five or so hours time in which the entire battery discharged, starting from when I woke up in the morning and got ready for work. In the Screen row, you can see the small, three-to-four second windows throughout the day that I turned the phone on to check the battery. For almost the entirety of the time, the screen was off. You can see where the line next to Phone State goes from black to navy blue. This indicates that the phone has been put into Airplane Mode - you can see this is also where everything relating to network connectivity or mobile strength completely disappears. You can also see that App Processor Wakeup completely dies here - that means that actual installed apps (including GOOGLE_SERVICES and Xiaomi's preinstalled Facebook app stop sending commands to wake the CPU.
Battery - Cause: At least once a minute, usually more, two things fire that keep the CPU running - Abort:Wakeup IRQ detected during suspend: 999 msoc-delta and Abort:Wakeup IRQ detected during suspend: 663 qpnp_rtc_alarm. I have no feckin' idea what either of those are, and Googling results in either developer guides or threads that lead nowhere. If anyone knows what they are, for the love of God let me know.
Battery - Foreground Processes: While the phone was off, with every app closed, in Airplane Mode, we can see that there are still four apps that are somehow in the foreground: com.miui.mishare.connectivity (odd, since there's no connection), com.miui.securitycenter (which I tried disabling through ADB last night, and it stopped my phone from booting. Oops), com.miui.notification, and com.android.providers.contacts (which disappeared shortly after entering Airplane Mode).
Battery - Video: You can see here, for the ENTIRETY of the time that the phone was turned on, this odd Video row was enabled. There is no other information about it - what causes it, where it's coming from, what 'Video' means, anything.
Battery - 7 Second Slice: This is just a close-up of a seven-second period of time, wherein the above 999 msoc-delta and 663 qpnp_rtc_alarm kept the CPU running six times within 7 seconds. Not a lot on its own, perhaps, but over the course of hours, it clearly causes issues.
I've also attached the latest bugreport where I took these screenshots from if anyone wants to try and make sense of it.
--
This looks to me like an hardware issue more than anything, what is the idle state of the cpu?
Overloke said:
So, I think we have our culprit (maybe).
I have attached several screenshots from a Battery Historian I took after having my phone on all day. The total phone on time was about 4-5 hours with, no joke, maybe 10 seconds of screen on time. Let's go through this absolute bullshittery together, shall we?
Battery - Full Time: The full length of time captured by the Battery Historian/bugreport command. It's in Zulu Time (GMT+0) and I'm in Australia (GMT+10), so the line starts going up at 5PM last night, which is more or less when I plugged it in to charge. You can see, while 'off', it took 16 hours to charge to 100%, and this was from a 'cold boot' (phone is completely dead), so it didn't have any information about what had been running, etc.
Battery - Discharge: The five or so hours time in which the entire battery discharged, starting from when I woke up in the morning and got ready for work. In the Screen row, you can see the small, three-to-four second windows throughout the day that I turned the phone on to check the battery. For almost the entirety of the time, the screen was off. You can see where the line next to Phone State goes from black to navy blue. This indicates that the phone has been put into Airplane Mode - you can see this is also where everything relating to network connectivity or mobile strength completely disappears. You can also see that App Processor Wakeup completely dies here - that means that actual installed apps (including GOOGLE_SERVICES and Xiaomi's preinstalled Facebook app stop sending commands to wake the CPU.
Battery - Cause: At least once a minute, usually more, two things fire that keep the CPU running - Abort:Wakeup IRQ detected during suspend: 999 msoc-delta and Abort:Wakeup IRQ detected during suspend: 663 qpnp_rtc_alarm. I have no feckin' idea what either of those are, and Googling results in either developer guides or threads that lead nowhere. If anyone knows what they are, for the love of God let me know.
Battery - Foreground Processes: While the phone was off, with every app closed, in Airplane Mode, we can see that there are still four apps that are somehow in the foreground: com.miui.mishare.connectivity (odd, since there's no connection), com.miui.securitycenter (which I tried disabling through ADB last night, and it stopped my phone from booting. Oops), com.miui.notification, and com.android.providers.contacts (which disappeared shortly after entering Airplane Mode).
Battery - Video: You can see here, for the ENTIRETY of the time that the phone was turned on, this odd Video row was enabled. There is no other information about it - what causes it, where it's coming from, what 'Video' means, anything.
Battery - 7 Second Slice: This is just a close-up of a seven-second period of time, wherein the above 999 msoc-delta and 663 qpnp_rtc_alarm kept the CPU running six times within 7 seconds. Not a lot on its own, perhaps, but over the course of hours, it clearly causes issues.
I've also attached the latest bugreport where I took these screenshots from if anyone wants to try and make sense of it.
Click to expand...
Click to collapse
Same problem. Any solution?
Hello Forum,
why does my alarm clock work while the phone is turned out? What is the name of this function and how can I turn it off?
I think it uses battery, because I charged my old phone (switched off, emergency phone) a week ago and now its empty.
Thanks
Peter
peterfarge said:
Hello Forum,
why does my alarm clock work while the phone is turned out? What is the name of this function and how can I turn it off?
I think it uses battery, because I charged my old phone (switched off, emergency phone) a week ago and now its empty.
Thanks
Peter
Click to expand...
Click to collapse
Hi, what phone do you have ?
I remember this was an issue for certain phones (but that was 6 years ago lol). Your phone must be really old !
And about the battery life when shut down, how long does it last usually?
Now for the upfront solutions:
Delete the alarm you sat up.
And if you have a removable battery on this phone, removing it would have a very good effect on battery life.
Have a good one
Its an Elephone P7000. I want to charge it and use it as a secondary phone. I turn it only on when my main phone has no battery. Last month I bought a new battery for this phone, on the battery is written "production date 2015". The battery last a whole day when the phone is turned on.
I'm really interested what is running the whole time in the background when Android is turned off. Is it some kind of BIOS? Is it the bootloader? Can you give me the name of this "program"?
PS: When my Xiaomi phone if turned of, the alarm does not work.
peterfarge said:
Its an Elephone P7000. I want to charge it and use it as a secondary phone. I turn it only on when my main phone has no battery. Last month I bought a new battery for this phone, on the battery is written "production date 2015". The battery last a whole day when the phone is turned on.
I'm really interested what is running the whole time in the background when Android is turned off. Is it some kind of BIOS? Is it the bootloader? Can you give me the name of this "program"?
PS: When my Xiaomi phone if turned of, the alarm does not work.
Click to expand...
Click to collapse
A battery life thread which may help is:
https://forum.xda-developers.com/showthread.php?t=1179809
PS: I have never heard of an android phone that respects alarms when the phone is off, as android is not running But I always wondered why not, since my previous non-smart phones all did.
This App analyses the energy consumption of Android and the Apps, but that is not my problem. My problem is that the charged phone loses energy while it is turned off.
And secondly I'm really interested what is running in the background while the phone is turned off. Is is a firmeware from Elephone? I removed the original Elephone rom and switched to Cyagenomod and then to Rublix. But original Bootloader and other Elephone stuff my still be there.
I asked in a german Android forum and they said it is the fastboot function. But I think this is only a possibility of Android to boot fast when is is wakened from the watchdog I'm searching. (That the alarm clock starts immediately and not minutes after the targeted wakeup time.)
peterfarge said:
This App analyses the energy consumption of Android and the Apps, but that is not my problem. My problem is that the charged phone loses energy while it is turned off.
And secondly I'm really interested what is running in the background while the phone is turned off. Is is a firmeware from Elephone? I removed the original Elephone rom and switched to Cyagenomod and then to Rublix. But original Bootloader and other Elephone stuff my still be there.
I asked in a german Android forum and they said it is the fastboot function. But I think this is only a possibility of Android to boot fast when is is wakened from the watchdog I'm searching. (That the alarm clock starts immediately and not minutes after the targeted wakeup time.)
Click to expand...
Click to collapse
Yes, when you flash a custom ROM, all you are really changing is the system partition itself and maybe the kernel, everything else from your original firmware is still there: e.g. bootloader, modem, etc, etc..
Fastboot has nothing to do with how quickly the device boots, fastboot is a bootable function/mode used to flash/manage the device using the adb/fastboot software while booted into fastboot mode. Some devices have a feature that allows for fast booting, but that is a different animal than fastboot.
Your device has an internal clock the same as a PC does, that is how a PC keeps correct time even when the system is powered off and still shows the correct time when you boot the system. As for what is causing the battery to die even turned off, that may be a different issue than the power used by the internal clock.
All of my old devices lose charge after sitting in a draw for some time without being used, it isn't really an "issue" or problem, it is just the nature of the beast. Batteries do not store power indefinitely.
You can find out more about lithium-ion instability and the particulars of their construction and how they actually work if you do some google searches on the subject.
Sent from my SM-S767VL using Tapatalk
peterfarge said:
And secondly I'm really interested what is running in the background while the phone is turned off.
Click to expand...
Click to collapse
Are you rooted? running Magisk?
The smartphone is rooted with SuperSU.
This watchdog is more than a Bios clock. It wakes the smartphone at a given time. So the android system configures this background watchdog somehow. Maybe there are more things that it can do?
My Motorola Moto E (LineageOS) starts always with a wrong time. (WhatsApp is complaining about it at the start) So there seems to be no watchdog.
peterfarge said:
I'm really interested what is running the whole time in the background when Android is turned off. Is it some kind of BIOS? Is it the bootloader? Can you give me the name of this "program"?
Click to expand...
Click to collapse
peterfarge said:
The smartphone is rooted with SuperSU.
Click to expand...
Click to collapse
OK, if you are rooted, I would try running a boot-script that logs what is running on your phone every X minutes. If your lucky, the boot-script will log while the phone is "OFF".
something like the following maybe:
Code:
#!/system/bin/sh
top >> /sdcard/runnig_processes.log;
You may need to find a path that is actually mounted in your "OFF" state.
Also, I wouldn't keep this as a permanent thing, simply a test.
I dont think that this works. The uptime shows that the smartphone is running since 6 hours. I think if I put the script somewhere in the android system it wont be executed while android is turned off.
I have done some search. It seems that the P7000 has a Real Time Clock (RTC) in the MT6752 SOC. This chip can be configured to wakeup Android. I can see it at "cat /sys/class/rtc/rtc0/name".
There is also the charging screen despite the phone is turned off. The SOC can do a lot of things when android is not running.
peterfarge said:
I dont think that this works. The uptime shows that the smartphone is running since 6 hours. I think if I put the script somewhere in the android system it wont be executed while android is turned off.
I have done some search. It seems that the P7000 has a Real Time Clock (RTC) in the MT6752 SOC. This chip can be configured to wakeup Android. I can see it at "cat /sys/class/rtc/rtc0/name".
There is also the charging screen despite the phone is turned off. The SOC can do a lot of things when android is not running.
Click to expand...
Click to collapse
It does sound like android is not running on your phone for the phone-off-alarms, since it has a real time clock (I didnt read it, sorry).
As for the charging animation, all my phones have that too, but I think that is only the bootloader and ONLY while charging. ie connected to power, so discharging isn't an issue.
I suggested the above, as waaaay back when I modified my first phone, when I added a bunch of boot scripts that logged heavily, I *think* i was surprised when I noticed once (its back in gingerbread days) that I had logs from the start up of when I turned it off. But that was now many moons ago. It was just an idea, that shouldn't be too hard to test, even though all you have said points to it failing. And now that I think of it, the charging animation on that first phone I had, was actually PNG images (as animation frames) sitting on the android file system path; but again, that was during charging, not completely off.
Android 9 on a Samsung SM-T290 tablet.
Had used my tablet, turned off screen (click Power once), and put it down. Some unknown time later, picked up tablet, clicked Power once, screen did not come on. After clicking Power a few times, held Power down thinking somehow tablet had shut itself off completely. Instead of booting, I got the choices "Power off / Shutdown" and "Reboot". Shutting down and rebooting worked. No sign of problems.
Some time ago I noticed my Uptime seemed large -- I think 400 to 600 hours.
What would cause Android to get itself into a state in which it is still running enough to offer a Power Off menu, but in which it refuses to light up the screen?
In particular, is there any problem with running too long without shutting down and rebooting?
J.Michael said:
...
What would cause Android to get itself into a state in which it is still running enough to offer a Power Off menu, but in which it refuses to light up the screen?
Click to expand...
Click to collapse
My guess is that in your Android the Doze mode is enabled.
FYI:
Starting with Android 6 Marshmallow, the Doze mode feature was introduced. This feature is designed to give a new breath of fresh air to battery consumption and in general battery life.
xXx yYy said:
My guess is that in your Android the Doze mode is enabled.
FYI:
Starting with Android 6 Marshmallow, the Doze mode feature was introduced. This feature is designed to give a new breath of fresh air to battery consumption and in general battery life.
Click to expand...
Click to collapse
No match when I Search Settings for "doze".
Under Battery -> Settings there is an
Optimize settingsSave battery by optimizing your settings when you are not using your tablet.It's a toggle, it is toggled OFF.
I think at the moment I turned off the sceeen, I was im a browser on an obnoxious web page. Maybe their clever Javascript tied something into a knot.
I'll try to notice when I pass 600 hours of Uptime.
J.Michael said:
No match when I Search Settings for "doze".
Under Battery -> Settings there is an
Optimize settingsSave battery by optimizing your settings when you are not using your tablet.It's a toggle, it is toggled OFF.
I think at the moment I turned off the sceeen, I was im a browser on an obnoxious web page. Maybe their clever Javascript tied something into a knot.
I'll try to notice when I pass 600 hours of Uptime.
Click to expand...
Click to collapse
If it has the doze feature, it would be a background process that you would see no controls or settings for. It is a feature in the kernel that runs at and below system level and you can't "see" it if you look for it.
Doze puts the device to sleep, it effectively freezes everything from the kernel level all the way up through system/user level and turns everything off without actually powering down and stays in that state until you "wake" it.
An example would be a Kindle Fire HD tablet that I had with doze, I forgot it was on and running a PSP emulator and I put it in a draw for many weeks, when I pulled it out of the draw and hit the power button, it woke right back up straight to the enulator and the game I had running and still had 60% battery.