[GUIDE] for a better battery life on Nougat - Honor 9 Guides, News, & Discussion

Hi to all. I would insert also here the fantastic guide of Rommco05 for extend the battery life.
It refers to the Honor 8 but it's also valid for the 9.
Here is the GUIDE.
Credits and thanks to Rommco05.

Anyone know how to disable the changing background images on lockscreen? My guess is that the downloading of these uses a significant amount of battery and data.

Related

[Q] Defy 1% universal battery increment?

Hello all,
Following a question in another thread (forum.xda-developers.com/showthread.php?p=10860486) and the many requests sent to battery widget developers, I decided to create this thread.
Many someone can help to make it so?
The battery data is provided by the driver through the 'fake' files located in /sys/class/power_supply/battery
The % data can be found in 2 files:
- charge_counter at 1% increment
- capacity at 10% increment
Would there be a way to revert those files in the battery driver and then bundle it in a ROM or an update for all?
Or another way to have the 1% data in the capacity file, which seems to be used by Android to report battery % as suggested in the original thread mentioned above? This thread also suggest another solution, but I'm worried that it might consume battery in doing so.
This would be great to see that happen, then it might even be possible to reuse that on other phones?
ccounotte said:
Hello all,
Following a question in another thread (forum.xda-developers.com/showthread.php?p=10860486) and the many requests sent to battery widget developers, I decided to create this thread.
Many someone can help to make it so?
The battery data is provided by the driver through the 'fake' files located in /sys/class/power_supply/battery
The % data can be found in 2 files:
- charge_counter at 1% increment
- capacity at 10% increment
Would there be a way to revert those files in the battery driver and then bundle it in a ROM or an update for all?
Or another way to have the 1% data in the capacity file, which seems to be used by Android to report battery % as suggested in the original thread mentioned above? This thread also suggest another solution, but I'm worried that it might consume battery in doing so.
This would be great to see that happen, then it might even be possible to reuse that on other phones?
Click to expand...
Click to collapse
This app has already been done and is there in the Apps Section. I am using this from almost a month now. It is a great app.
This app has already been done and is there in the Apps Section
Click to expand...
Click to collapse
can u give link plz
http://forum.xda-developers.com/showthread.php?t=930457
Thx I dont seen it before.
chaihg said:
This app has already been done and is there in the Apps Section. I am using this from almost a month now. It is a great app.
Click to expand...
Click to collapse
The thing is to have the Defy support all apps and widgets, not have only one choice...
So it's not developing a widget, but either an updated battery driver or a system service changing how things work there (merely exchanging 2 system files).
I think it´s only about reworking framework-res.apk, to have it in the status bar instead of the original one. I would try it myself, if we would have custom recovery, with possible start from cold boot.
This software display accurate power than?
Hello
I would like to have incon battery like that :
http://forum.xda-developers.com/showthread.php?t=724778
I see that it's impossible directly .
If i edit BatteryService.smali in the services.jar i can add 1% charging detection and so add icon ?
Thanks
I put the files in zip^, you can open with Notepad2 or ++
It's a driver issue, in the kernel. So it's not modifiable.
I have been doing experiments with it. The easiest thing may be copy the charge_counter info over capacity each N minutes with some kind of bash script, but the driver is programmed so that if it detects a write in any of those files, it stops updating.
I guess the solution would be some kind of kernel module which modifies that behavior, but I have not those skills.
You can see the source of the driver in /kernel/drivers/power/cpcap-battery.c, in the source that you can download from the Motorola site.
martinml said:
It's a driver issue, in the kernel. So it's not modifiable.
I have been doing experiments with it. The easiest thing may be copy the charge_counter info over capacity each N minutes with some kind of bash script, but the driver is programmed so that if it detects a write in any of those files, it stops updating.
I guess the solution would be some kind of kernel module which modifies that behavior, but I have not those skills.
You can see the source of the driver in /kernel/drivers/power/cpcap-battery.c, in the source that you can download from the Motorola site.
Click to expand...
Click to collapse
That was also one of my first ideas concerning systemwide 1% battery.
From kernelspace you have much more possibilities than from userspace if you want to modify systemstuff.
I`ve also tried to decompile cpcap-battery module. Do you have a link to the source ?
Have written some kernel modules for normal unix systems, will have a try on the android one.
rznag said:
I`ve also tried to decompile cpcap-battery module. Do you have a link to the source ?
Click to expand...
Click to collapse
Sure! I uploaded here: http://pastebin.com/TnZ3P8CN
But anyway you should download the full source from opensource.motorola.com.
I think that the problem lies here: the function cpcap_batt_ioctl() has this code:
Code:
if (sply->no_update)
return 0;
The 'no_update' variable is always set to false, except when you try to write over some of the mentioned files. The thing to do would be modifying this function to remove that return or to change the condition of the if.
With the help of this article I think I managed to dump and disassembly the code of this function, but I know nothing of ARM assembly language. This is what I think it's the equivalent assembly source of that function: http://pastebin.com/w658cwSj
Just a sidenote: since the latest update Circle Battery widget shows battery in 1% increments. Apparently they figured it out.
AgentSmith said:
Just a sidenote: since the latest update Circle Battery widget shows battery in 1% increments. Apparently they figured it out.
Click to expand...
Click to collapse
Could you post a link to it?
Is there any solution to "fix" moto original battery? I had something like this on my old galaxy i5700 - circle battery in notification bar, combined with the right driver - 1% battery...
I think it's this : https://market.android.com/details?id=fr.depoortere.android.CircleBatteryWidget
For droid x but it's not on the taskbar
I open xml files : stat-sys-battery.xml and see that :
<?xml version="1.0" encoding="utf-8" ?>
- <level-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@android:010802C4" android:maxLevel="1" />
<item android:drawable="@android:010802C5" android:maxLevel="10" />
<item android:drawable="@android:010802C7" android:maxLevel="30" />
<item android:drawable="@android:010802C8" android:maxLevel="50" />
<item android:drawable="@android:010802C9" android:maxLevel="70" />
<item android:drawable="@android:010802CA" android:maxLevel="90" />
<item android:drawable="@android:010802C6" android:maxLevel="100" />
</level-list>
It is possible to add 20 40 60 80 ? i don't know why 1-10-30 ?
Thanks
AgentSmith said:
Just a sidenote: since the latest update Circle Battery widget shows battery in 1% increments. Apparently they figured it out.
Click to expand...
Click to collapse
They didn`t figured it out. They just read the motorola specific variable. So with circle battery you also have no systemwide 1% increment. They read the same variable as the other apps posted in the apps section with which you can have 1% display: DefyBatt 1%, MotoCharge.
But all these apps just show the accurate batterylevel only on one place, not systemwide.
@mick771
What you found in the xml is just for displaying the batterystats but not to get it into 1% format. It just defines which icon should be shown at which batterylevel.
If you would add 20-40-..... then the phone would just change the icon in the taskbar more often, but it wouldn`t get more accurate. Only just 10% Steps.
I have a solution based on a kernelmodule, but haven`t successfully compiled it.
I just have changed some lines in the original motorola driver. Will have a try do compile it next days. At the moment i`m too busy with university stuff.
But I thought the kernel signature was checked at boot so you can't make any changes to it? How are you getting around that?
Yes, the kernel signature is checked at boot. But perhaps it`s possible to change this module at runtime. Single modules are not checked as far as i know. That`s why it`s possible to load the overclock module.
I don`t wanna build a new kernel, just change the battery driver module.
But as i said, i haven`t successfully compiled the module. So i don`t post a solution, it`s just that i know a possible way to solve the problem on codebase.
We`ll see if it works. Perhaps it does, perhaps not.
rznag said:
They didn`t figured it out. They just read the motorola specific variable. So with circle battery you also have no systemwide 1% increment. They read the same variable as the other apps posted in the apps section with which you can have 1% display: DefyBatt 1%, MotoCharge.
But all these apps just show the accurate batterylevel only on one place, not systemwide.
Click to expand...
Click to collapse
Ok my bad. I misinterpreted the whole topic here. Another more strange thing I noticed which might be worthwhile to know is that the lockscreen often already displays a full (100%) battery charge - also mentioning to unplug the charger - while Circle Battery still displays a value between 95% and 100%. Actually the battery keeps charging until it says 100%. A system wide 1% increment might solve this little hickup. Also as soon as I unplug the charger the percentage drops to 99. Probably an Android thing...
Defy shows with motorola increments for a value like (x+1)0 from x6 - (x+1)5.
Means if it shows 90% it can be from 86-95.
40% means it can be from 36-45.
So if the battery is at 96% it will show Full but you can charge further cause you haven`t reached the real 100%.
That`s also why your battery directly drops after unplugging.

disable apperance to increase performance

Hello!
Many time when i am using my phone i think of theming the UI and also the battery life of the android .
I install several apps like cleaners,modules,editors, to improve UI as well as battery life. But after many year i frustrated of getting the values balancing . If i increase the UI or some tweaks the battery will compromised and when the battery is tweaked the performance is compromised .
so i think of disabling the theming option . I have tried many things to disable the themes like disabling the animations and windows scale in developer options and tinting but didnt work
so please guys tell me any option to disable appearance . What ever option that is disable the theme please tell me . Even that it looks odd no problem. even it looks like old ui no prob.
"And please dont tell to degrade the os"
i am using android 5.1.1

[APP] Battery Zen - Customizable notifications on full battery charge

Hey guys,
I published an app that provides customizable notifications on full battery charge. It also provides a gamut of information about the battery such as the battery temperature, battery health, charging status and battery usage statistics. It gives a minimalistic user experience( hence the name Zen).
It would be awesome if you guys could take your time out to review my app.
Any suggestions and feedback are greatly appreciated.
Since this is one of my first posts. I am not able to post a link here. I can only do that after the first ten posts or so. To find the app on Play Store, just search for "Battery Zen Dwarka".
Please do check it out and let me know what you think.
Cheers,
Dwarka

Add battery support in Android 9 TV os

Hello,
I have been using khadas VIM3 dev board and I want to add battery support in the OS(Android 9 TV os). I have added my battery charging/discharging and fuel gauge drivers in the kernel and I'm also able to see the battery percentage on adb shell. But my system UI is not reflecting current percentage on status bar and I have to do screen on/off to see the updated percentage.
I have been looking for the solution but did not find any. So, anyone who has idea regarding this then please guide me through this issue.
Thank You.
My guess is you have to install EdXposed framework and then therein run a module like this one.

ROM ❯ PIXEL 4 XL ❯ OFFICIAL ❯ ProtonAOSP 11

ProtonAOSP
Android 11 ROM​
ProtonAOSP is a minimal Android fork (custom ROM) focused on UI/UX and performance, with a touch of privacy.
Screenshots
Screenshots of the latest version
Installation
This ROM is currently distributed as factory images, similar to stock. Flash it the same way you would flash stock factory images. Don't forget to wipe all data using "fastboot -w" before booting the ROM.
Firmware is included, so there is no specific requirement for which version of the stock ROM you are coming from.
You can also use the quick & easy web installer, which allows you to install and update the ROM from any computer or phone without using the command line. The installer works entirely within your web browser and completes in as little as 4 minutes, depending on the speed of your internet connection. Consider using the web installer instead of installing manually.
More detailed installation instructions and guides
Features
List of current features, with accompanying screenshots and explanations
Downloads
Downloads and changelogs for all versions
Builds with and without minimal Google services (gapps) included are provided for convenience.
Using the quick and easy web installer is recommended unless you have a specific reason to download and install the ROM manually.
Support
If you have questions or concerns, please read the Frequently Asked Questions before asking. It saves time for everyone involved, especially you, and allows us to provide higher-quality answers for all users.
Website with comprehensive documentation
Join the Telegram group for support and extras
Please consider donating to support development if you found this helpful: recurring donation to keep the project alive in the long term or buy me a coffee
Kernel source code
ROM source code
ProtonAOSP 11.5.0 has been released.
Changes:
• New website with comprehensive documentation and screenshots
• May security patch
• Added adaptive brightness toggle in QS (with UI tweaks)
• Added support for Pixel 4 and 4 XL
• Improved blur quality with state-of-the-art triangular RGB blue noise dithering and gamma correction
• Changed UI theme to Primer, modified with state-of-the-art color science (by patron vote)
• Better default ringtone, alarm, and notification sounds
• New photo wallpapers from Unsplash
• New space wallpapers from Infinitum
• Improved default Strange Landscape wallpaper (Infinitum)
• Low-level blur optimizations for GPU efficiency
• New, uniform blur strength across all devices
• Updated WebView to Chromium 90 (LineageOS)
• Updated Now Playing song database
• Enabled recents text selection for Pixel Launcher users
• Fixed network permission for multiple users (GrapheneOS)
• Pixel 2: Fixed SafetyNet attestation failures
• Pixel 4: Customizable Active Edge support
• Pixel 4: Unlocked always-on display setting (LineageOS)
• Pixel 4: Better connection to weak 5 GHz Wi-Fi networks
• Pixel 4: Night Light color temperature calibration from stock
• Pixel 4: Device and USB port overheating warnings from stock
• Pixel 4: Reduced background memory usage
• Pixel 4: Optimized native code for Snapdragon 855 CPU
• Pixel 4: Background app freezing for performance & battery
• Pixel 4: Smoother lock screen
• Pixel 4: More detailed face unlock errors
• Pixel 4: Disabled UI compositor debugging
Click to expand...
Click to collapse
Website
Install from browser (recommended)
Download
As the ProtonAOSP project expands to support more devices, bandwidth and maintenance costs are increasing. You can help support the project and keep it alive with a recurring donation, or alternatively buy me a coffee. Everything helps, but a recurring donation is the best way to keep the project alive in the long term.
The vast majority of questions in this thread have been repetitive, so there is now a list of frequently asked questions to answer them.
If you have questions or concerns, please read the FAQ before asking. It saves time for everyone involved, especially you, and allows us to provide higher-quality answers for all users.
Feel free to ask your question(s) again if the FAQ doesn't currently answer them, and we will add an answer for you.
Cool I'll check it out
Do you really get 8 1/2 hours screen on time with 50% battery left? I only get 6 hours 25 minutes with 15% left with my current rom.
Does this ROM support WiFi tethering? I feel like I need to ask this because some roms don't.
Uhhh that's the best thing which could had happened to our Pixel 4 XL !!
kdrag0n said:
Usage with my Proton Kernel is recommended to get the most out of your phone. The ROM does not include Proton Kernel, so you will need to flash it yourself. The ROM will still work with other kernels, but you will not get the benefits of Proton Kernel.​
Click to expand...
Click to collapse
Which one is included instead? As the standalone Proton kernel is only available for the Pixel 5, right?
Johnrob011045 said:
Do you really get 8 1/2 hours screen on time with 50% battery left? I only get 6 hours 25 minutes with 15% left with my current rom.
Click to expand...
Click to collapse
Which is still far far better than on stock
Is your Kernel only for Pixel 5 I have looked all around?
Johnrob011045 said:
Do you really get 8 1/2 hours screen on time with 50% battery left? I only get 6 hours 25 minutes with 15% left with my current rom.
Click to expand...
Click to collapse
Where did you see that? https://protonaosp.kdrag0n.dev/faq#battery-life
Johnrob011045 said:
Does this ROM support WiFi tethering? I feel like I need to ask this because some roms don't.
Click to expand...
Click to collapse
Added to the FAQ: https://protonaosp.kdrag0n.dev/faq#hotspot-support
RogerF81 said:
Which one is included instead? As the standalone Proton kernel is only available for the Pixel 5, right?
Click to expand...
Click to collapse
ahoslc said:
Is your Kernel only for Pixel 5 I have looked all around?
Click to expand...
Click to collapse
That wasn't meant to be part of this post. Removed, sorry for the confusion.
kdrag0n said:
Where did you see that? https://protonaosp.kdrag0n.dev/faq#battery-life
Click to expand...
Click to collapse
My guess is the picture in the "screenshots" otherwise I have no idea. I do not see battery anywhere else but I was also very curious when I read this myself.
GROOVYJOSHCLARK said:
My guess is the picture in the "screenshots" otherwise I have no idea. I do not see battery anywhere else but I was also very curious when I read this myself.
Click to expand...
Click to collapse
Based on the screenshot, no mobile data and last charge was 3 days ago, it's probably a screenshot from a device that's not the daily driver and has been sitting on the desk for a bit, lol.
Android 12 is nice, but I want the full use showed in screenshots, so I'll flash back to 11 and run this tomorrow.
Curiousn00b said:
Based on the screenshot, no mobile data and last charge was 3 days ago, it's probably a screenshot from a device that's not the daily driver and has been sitting on the desk for a bit, lol.
Android 12 is nice, but I want the full use showed in screenshots, so I'll flash back to 11 and run this tomorrow.
Click to expand...
Click to collapse
I am hoping someone using Proton now will see this and post a real life battery screenshot showing the actual battery estimates. Of course there's a billion factors that can cause battery life to suck and 1 user to get better than the next user, but a general pic would be nice.
I'm finishing up testing on the Bliss ROM 11 then I do plan to test the one next but it won't be right away.
GROOVYJOSHCLARK said:
I am hoping someone using Proton now will see this and post a real life battery screenshot showing the actual battery estimates. Of course there's a billion factors that can cause battery life to suck and 1 user to get better than the next user, but a general pic would be nice.
I'm finishing up testing on the Bliss ROM 11 then I do plan to test the one next but it won't be right away.
Click to expand...
Click to collapse
I stopped worrying about battery life unless my phone is hot in my pocket for no reason, lol. Some people expect to get 8 hours SoT since one user achieved it, but 75% of that could be from watching media.
I don't average any crazy numbers for SoT unless I'm watching videos for hours.
Curiousn00b said:
I stopped worrying about battery life unless my phone is hot in my pocket for no reason, lol. Some people expect to get 8 hours SoT since one user achieved it, but 75% of that could be from watching media.
I don't average any crazy numbers for SoT unless I'm watching videos for hours.
Click to expand...
Click to collapse
I actually find that my pixel 4XL has much better life than any other device I've owned. My HTC10 was that only 1 that almost compared. My pixel 3XL and 2 XL did not get anywhere near what my 4 XL gets but I'm also not a battery watcher myself. I just disable apps I don't want running, or remove the "boot" service for apps I don't want running, and limit what apps can do what actions (network/keep alive / wakelocks / etc) and my battery life is stellar in my opinion.
My original reply comment was more for a general idea than anything sound with facts.
Curiousn00b said:
Based on the screenshot, no mobile data and last charge was 3 days ago, it's probably a screenshot from a device that's not the daily driver and has been sitting on the desk for a bit, lol.
Android 12 is nice, but I want the full use showed in screenshots, so I'll flash back to 11 and run this tomorrow.
Click to expand...
Click to collapse
It's from my daily driver, but I don't charge to 100% all the time or bother to clear battery stats. I don't share examples of battery life because it's highly personal and I don't want anyone to complain about it being worse than expected. My personal usage is very light compared to many others, so it's not a very good example to use here.
Hello. Does this ROM support pixel shifting future like in stock ROM to prevend oled burn-in
kdrag0n said:
It's from my daily driver, but I don't charge to 100% all the time or bother to clear battery stats. I don't share examples of battery life because it's highly personal and I don't want anyone to complain about it being worse than expected. My personal usage is very light compared to many others, so it's not a very good example to use here.
Click to expand...
Click to collapse
Mine too for right now and it's really really good, battery is awesome so far! Check this out, last charge 12 hours ago and 86% left! I do prevent all apps I don't want running in the background from starting (SDMaid) and I do prevent many apps from using the internet (iptables). These help but even without them, the battery was really good!
Been running the ROM for a couple days now and I really like it. The new sounds are also very pleasant to the ear. I even set my transition animations to 1.5x speed and the animations make everything look better with my eyes.
Starting with barely any apps installed, instantly started off way faster than stock. Besides features missing due to be special to stock and tedious to port over, the only issue(graphical) I found is with the text clock on always on display, the icons overlap with the bottom text depending on what time it is.
Other than that, amazing work.

Categories

Resources