Power-on on Plugged-in MTK device - General Questions and Answers

We are trying to set up an Android 4.4.2 device to boot once it is plugged in to a power source. The device is a POSH Titan HD E500. (MTK6592)
We've come across different ways that each manufacturer handles the booting (see links at the end of this question). The one consistent trend is that people try to seat their code alongside the indicator that comes up to show you battery percentage during charging. It seems like a good way to proceed is to replace the contents of that battery indicator program with something like /system/bin/reboot.
My question is: does anyone know a good way to find which program is getting called when that battery indicator comes up on a new phone? The phone will be off at the time, but the device will also be rooted in case that helps.
Any advice would be tremendously appreciated!

Related

problem with battery indicator and charging

I welcome. I have the very untypical problem.
It all started with it around the phone started showing that the battery is unloaded, in spite of it around was loaded up. I thought cool it apparently a battery fell down. I bought new and unfortunately the same. Since the battery almost on max is loaded up the rally is loading it for moments and then loading is turning off. However an indicator of loading up on the nought and an announcement of the weak battery are demonstrating the system and it is disconnecting. I thought ok I will make hard reset and most probably he will help, however it turned out around not. Yeah rally loaded WM6 together with new ROM and unfortunately the same old story. I will still add around after this moment when is loading and an orange diode is shining and the indicator is showing the battery around loading is when he is finishing an indicator is appearing around empty battery and with stamp 'x'.
I hope around somebody here will help me. And perhaps somebody knows where in the register it is possible to change placing so that the system doesn't download details about loading the battery up and he wasn't mutually exclusive
Say what?
Can you please ask someone to translate so we can at least understand what your problem is?
ok I write it with my words.
When I switch on my phone battery indicator in main screen shows zero and sign '!' and the telephone switch off itself.
When I put usb cable or telephone battery charger and switch on my phone the phone charging about 10-20 seconds and after that battery indicator shows empty battery and sign 'x'. The phone still work but the indicator in Settings/Power Managment/Main Battery is completely empty.
I have new battery so battery is ok. I made hard reset and changed software from wm5 to wm 6.1 and the battery still isn't charging.
I hope that it is undertanding now.
Has the battery indicator ever worked while you've owned the phone, or is this something that has happened since upgrading your ROM? Having said that, this sounds more like a hardware issue to me. Try taking the battery out and cleaning the pins on the phone. If you've tried different ROM's, I don't believe it's a software issue and after a quick search of the forum, I haven't found anybody with a similar issue, which I would expect to if it were software related
The battery indicator worked normally and one day it stopped working. I upgraded ROM becouse i thought that it help.
I have second question. Whether it is possible to change the register this way so that the starting system doesn't read the level of battery charge out.
I have the same problem. Did you solve it?

[Completed] [Q] Battery temperature too low

Hello
Many of us have the same problem without a clear solution, I know that here are hundreds of post with the same issue but no solution found. I want to solve this problem and help other users.
Symptoms:
- Unable to charge (popup: Charging paused battery temperature too low)
- Unable to use camera flash (Battery temperature too low)
- Unable to charge in off mode (Yellow triangle with a thermometer)
- Thermistor reading up to -25C
Causes and possible solutions:
1. Charging port/flex/board (Dirty, short, broken wire or sensor) (Most of the people said that the problem is solved after clean the charging port with isopropyl alcohol or replace it)
2. Motherboard (Sometimes replace the charging port assembly do not solve the problem. A chemical bath could solve the problem, if not there are some components on the mother board that can be tested and replaced "Really advance technicians") image attached
3. Software (Rarely this problem begins after an upgrade or a change of rom. flash stock rom with odin)
4. Battery (I have read hundreds of post from several forums and nobody solve the problem replacing the battery. Test with another battery before buy a new one. People said that performing a battery status wipe in (home+vol down+power) could solve the problem but I couldn't find anybody that claimed that it works.
Temporal Solutions:
1. Retire the back cover and put your phone one something warm, for example you router. Dial *#0*# scroll down and press thermistor button. connect your phone to computer or wall charger and it should start charging when the CHG/BATT temperature reach -2C or -1C.
My phone normally show CHG temperatures around -7 to -5, but warming it on my router it have reached +6C.
2. Turn off your phone and press home+voldown+power at the same time and hold them until a greens letters show up. Then press vol up and you will see an android icon with the word Downloading..... plug your phone to the wall charger for a while, it will charge.
3. Buy an external charger and another battery and jut keep one of them charged.
4. To solve the flash problem you have to be root user and download Wanam Xposed that app have an option to disable the camara temperature check.
What I am looking for:
I know that should be a way to disable the low temperature warning or set the limits.
Maybe we can create a patch....
I'm not a developer but this problem could be my begining as developer hehehe
I know that the kernel or the drivers in the kernel export the battery temperature readings and status in intents in sys/class/power_supply/ and the JNI (JAVA) batteryservice read that data and make the action (shut down, pause, etc etc....)
Anybody know how to edit batterymanager or batteryervice? It should be via framework....
people said that there is a hidden menu that allow to set the temperature limits but I couldn't find it... its a myth hehehehe.
PLEASE HELP US..... SOME ONE WHO KNOWS ABOUT EDIT KERNEL OR FRAMEWORK ETC ETC.........
Tests:
I opened the phone and disconnect the flex... the battery temperature is fixed in -25C and don't change.... I connect the flex and the temperature is -10C. but constantly.... I believe that when the termistor circuit is open the limit is -25C. Then if the phone is reading less temperature than it should maybe that i due to a high resistance in the flex or board.
My phone is a Samung Galaxy S4 TMO SGH-M919 4.4.4 Stock
htp: s23.postimg.org/60pj79p3v/battery.png (I'm noob can't post images)
Hi,
You need to consider that if hundreds of threads have no solution, then there may not be one. I'd send it in under warranty myself.
But you can ask the experts who own your device for help, here...
> T-Mobile Samsung Galaxy S 4 > T-Mobile Samsung Galaxy S 4 Q&A, Help & Troubleshooting > [HELP THREAD] Samsung Galaxy S4 T Mobile Version | Ask ANY Question | Noob Friendly
Good luck!
HOPE
Darth said:
Hi,
You need to consider that if hundreds of threads have no solution, then there may not be one. I'd send it in under warranty myself.
But you can ask the experts who own your device for help, here...
Good luck!
Click to expand...
Click to collapse
hello
I don't have warranty T_T.
And I sure that it is possible to disable that warning... the thing i how???? hehehehe
I'm sure that for a developer it should be easy.
I read a topic here in XDA where someone had desactivate overheating warning, pacthing the SystemUI file fixing battery health status....
THANKS Darth
If it is possible, the thread I linked to above is where to ask. ?

[Q] Excessive battery drain 5.0.1

I recently noticed after the latest update excessive battery drain as seen in screenshots posted below. I have tried a factory reset and then unlocked bootloader to root and added greenify to try help save my battery. Does anyone have any tips on what else to try?
Have you tried to figure out what the Miscellaneous drain is? At least on my tablet I don't have that category in battery usage.
MidgetMob said:
Have you tried to figure out what the Miscellaneous drain is? At least on my tablet I don't have that category in battery usage.
Click to expand...
Click to collapse
Miscellaneous is android figuring out the rest of the battery stats, it's normal for new devices.
Themaniacboy said:
Miscellaneous is android figuring out the rest of the battery stats, it's normal for new devices.
Click to expand...
Click to collapse
If by "new" you mean recently flashed/factory restored, then I'm not sure what to say. Even after flashing a recovery image I've never noticed that category. The only reason why I asked was because I assumed that was what you were referencing as being excessive.
If you were referencing the 24+ hour battery life graph shown in your screenshots, then that seems about right. Unfortunately the tablet has never been known to have stellar battery life unless it's on battery saver 24/7.
MidgetMob said:
If by "new" you mean recently flashed/factory restored, then I'm not sure what to say. Even after flashing a recovery image I've never noticed that category. The only reason why I asked was because I assumed that was what you were referencing as being excessive.
If you were referencing the 24+ hour battery life graph shown in your screenshots, then that seems about right. Unfortunately the tablet has never been known to have stellar battery life unless it's on battery saver 24/7.
Click to expand...
Click to collapse
Seems about right?! He had 7min 2sec screen on time. If thats "about right" to you... you need to RMA your tablet.
Clearly whatever "Miscellaneous" is, is his issue.
mackay508 said:
I recently noticed after the latest update excessive battery drain as seen in screenshots posted below. I have tried a factory reset and then unlocked bootloader to root and added greenify to try help save my battery. Does anyone have any tips on what else to try?
Click to expand...
Click to collapse
Ok, so I noticed the very same thing when I got my Shield, I haven't rooted (I had on KitKat to restore some backups, then didn't do it again in Lollipop yet). I contacted Nvidia's service via livechat and got this answer. It did some considerable difference, although I still think it's draining a little too fast, but my old tablet had a pretty strong battery so I was just spoiled by it it seems >.<
So here it goes:
Nvidia Shield Callibration: (this takes a while)
You will have to calibrate the battery for just one time and observe the device battery backup for 2-3days to see the changes.
1: Drain your Shield tablet battery by using it normally until it turns off by itself.
2: Power-on your Shield tablet, if it wakes up and if you see some power left, follow step 1.
3: If Shield tablet is now drained to the point it can't wake up, set the device to charge for 7-8 hours.
The device should remain off when you set it for charging here.
4: Unplug the charger after 7-8hours, power on and wait for the battery charge to drop down to 90-95%.
5: Once the device battery drops down to 90-95%, plug in the charger and charge for one complete hour.
6: Unplug the charger once the device is fully charged.
7: Go to Shield settings > Shield power control > Apps> select optimize all option.
8: Go to Shield settings > Shield power control > system>
• Set the brightness to auto.
• Change the sleep option to 2 minutes of inactivity instead of default 10 minutes inactivity.
• Change the processor mode to either optimized or Battery savings.
• Check the WiFi optimization on.
Observe the device performance and report to us if you are still facing issue with the battery backup..
And then they gave me some tips for better battery life in general, I follow them (mostly) and my battery seems to hold on decently:
1: Always use the Shield tablet charger and not the computer USB ports or any other charger as the power specifications vary from the device to device.
2: In case if the charger is missing, use the back port of the desktop computer to charge the device instead of front port.
3: Always remember to exit the application instead of tapping the home button which will continue to run the application in the background.
4: Restart your Shield tablet at least once in a week. This will refresh the device making it work faster and efficient.
5: Connect the charger only when the battery comes down to 15% and unplug the charger only when it reaches 90% or above. This will reduce the number of charge cycles which will make battery last longer.
6: Use a third party app manager like Clean Master and free the memory at-least once a day to keep the device running faster.
To notice if the battery is fully/optimally charged when the device is off, look for the led indicator next to the charging port. It should be green, indicating it is fully/optimally charged

Interesting find? Native battery charge limit settings.

TL,DR:
/sys/class/power_supply/usb/device/razer_charge_limit_enable – 1 or 0. Enables or Disables the charge limit feature, respectively. 0 is default.
/sys/class/power_supply/usb/device/razer_charge_limit_max – The percentage at which charging stops and discharging begins. 70 is default.
/sys/class/power_supply/usb/device/razer_charge_limit_dropdown – The percentage at which charging begins again when the battery has discharged down to this level. 65 is default.
The values reset back to default after reboot.
(I'm pretty sure root is needed to access/modify these files.)
Background:
I recently procured a Razer Phone 1. Also, over the last year or so, I also heard about the “craze” of limiting your battery charge to prolong its life. I figure, new phone – why not start off on the right foot and set up a charge limit. I don’t know whether or not I’ll actually ever notice the difference, but I figure it can’t hurt to try.
I’m rooted on 8.1.0, July 5, 2018 patch. Using Magisk.
I tried three different apps:
Battery Life Extender – I couldn’t even get past the 'blex --configure' step. It would fail/error.
Magic Charging Switch – It looked like I was able to set the charge limits, but the Razer Phone simply ignored them. I wasn’t sure why so I just moved on.
Battery Charge Limit – It looked like I was able to set the charge limits, but the Razer Phone simply ignored them. At first, I thought this was working, because I saw the battery icon revert to a “discharge” icon when it hit the limit I set (80%), but to my surprise, when I woke up in the morning, I saw that the battery was up to 100%. I figured I didn’t set the app properly (though it’s a fairly simple app), but when I saw it go from 80% to 81% with the “discharge” icon, I realized the phone was somehow circumventing this app’s function. This is probably the same reason why Magic Charging Switch wasn’t working. This probably also has something to do with why Battery Life Extender couldn’t configure. This app was using /sys/class/power_supply/battery/input_suspend to automatically set the charging state. However, the change was purely cosmetic since the phone kept on charging. It was truly a strange thing to see.
True, I could’ve asked for support in these individual threads, but I didn’t see much/any chatter about the Razer Phone in any of those threads. Perhaps I would not get an answer any time soon. I know most development is only possible when the developers actually have the device in question.
I continued to search for other files that could be controlling the charging behavior, because input_suspend obviously was not it. I came upon another thread which lead me to “/sys/class/power_supply/usb/device/”, which contained these three files that were obviously Razer custom files and not Android stock files ( razer_charge_limit_enable, razer_charge_limit_max, razer_charge_limit_dropdown). I tried playing around with the values within these files and they do, indeed, control the charge limit.
I played around with these files for a couple weeks (before making this post) just to see if there were any issues; the only issue I found was that the values reset back to default after a reboot. I’m sure there’s a better way to go about it, but I used Tasker to enforce my desired values.
What’s curious is I could not find any mention of these specific files online anywhere, so I could not know if there was a better way to enforce my values. From the time I originally found these files a couple weeks ago to the time of this post, I could not find anything about these files. I could not find any mention of this feature in the Android/Razer settings or the Developer Options. Perhaps it’s a feature Razer hasn’t made official yet, but clearly, someone over at Razer has thought about it enough to build the backend for this feature. What’s interesting is that in Razer’s opinion, perhaps the best charge limit for their phone/battery is 70%.
Perhaps this isn’t/shouldn’t be that big of a deal, considering “/sys/class/power_supply/usb/device/” is a known path. That said, Googling this path only yields 16 results (for me), and three different apps, on the Razer Phone, failed to do what they were intended for, and did not aid in finding the correct file.
For those interested, I set my max to 80%, dropdown to 78%, and I’m using Tasker to automatically turn my phone off when it discharges down to 50%. With my normal daily charging habits, that’s more than enough. Also, it’s forced me to change my normal usage habits a little, so I’m using my phone more conservatively when it’s not charging. It’s also nice knowing that when my phone has “died,” I still technically have 50% battery for “emergencies” (my Tasker task allows me to cancel the shutdown, if necessary).
Anyway, since this forum has helped me so much, I figured I'd share. I hope this helps anyone else who’s looking to do the same. Maybe start additional related conversation, or find some other hidden features. Perhaps the Razer Phone 2 has the same feature.
Nice find. I suggest sending a message to the devs of those battery limit apps and telling them how to support the Razer Phone.

Alarmclock works while Android is shutdown?

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.

Categories

Resources