How To Guide How to limit charging on Pixel 6

Search This thread

lackalil

Member
Mar 10, 2011
33
8
Dumb question but what did you use to write values into those files? Did you use a text editor (with root access) or just termux or something? I tried with the built in MiX text editor but it seems to choke once I open up the file.
MiX was really slow to open the files. Like almost a minute per file (which are only a few bytes). Using the MiX code editor was very slighly quicker than the text editor.

But when I copied my /sys/ folder to my computer in an attempt to figure this out, it also took a ridiculous amount of time. I suspect that access to those files is just slow.
 

Gibsonflyingv

Senior Member
Jul 28, 2011
374
60
MiX was really slow to open the files. Like almost a minute per file (which are only a few bytes). Using the MiX code editor was very slighly quicker than the text editor.

But when I copied my /sys/ folder to my computer in an attempt to figure this out, it also took a ridiculous amount of time. I suspect that access to those files is just slow.
I tried out FX file explorer like Galaxea suggested and it was pretty fast. Weird that MiX is so slow. I honestly thought nothing was happening.
 

sic0048

Senior Member
Jun 25, 2010
970
513
Google Pixel 6
4. Still shows as charging rapidly when it hits the level. Is it rapidly cycling charging on and off? Or in a kind of micro-current state? Or this may be a true battery idle situation where all power is drawn from the adapter. Ampere and AccA just show "not charging".

Most modern phones offer a true battery idle mode (where power to run the phone is drawn from the adapter and cuts the battery out of the equation completely so when the phone reaches it's battery charging limit, the battery isn't being charged or discharged at all as long as it is plugged in). I think the Pixels have been doing this since the P3. I know the 3a had battery idle because that is the phone I had previous to the P6.
 
  • Like
Reactions: vandyman

lackalil

Member
Mar 10, 2011
33
8
It works

Thanks, just saw this yesterday. It does work and there is a true idle. Steps for me were:

  1. Install ACC in Magisk: https://github.com/VR-25/acc/releases/
  2. Install AccA (the front end app): https://github.com/mattecarra/acca/releases
  3. Create a new charging switch in the app using /sys/devices/platform/google,charger/charge_stop_level as the switch location
  4. Enter 100 as the "On value" and 1 as the "Off value". (The developer mentions 100 & 5, but I'm thinking that would mean it wouldn't charge if you plugged in under 5%. Could be wrong).
  5. Enable idle mode
There are some other settings but I left them as-is. Mine is set for 76-77%. Works great and sits on 77% for a LONG time until it drops a percent, then quickly tops up to 77 again. Better than BCL which would cycle pretty often.
 
  • Like
Reactions: dft601 and Be6i4

lavoie005

Member
Oct 29, 2014
9
0
hi guys anyone know how to limit charging voltage.
where the charging limit voltage file is located on pixel 6
 

rhplusa10

Senior Member
Feb 18, 2011
228
64
Los Angeles
I've used this method on my pixel 3, and now on pixel 5. (I don't have Pixel 6.)

This is my observation from using this for 3 years,

/sys/devices/platform/google,charger/charge_start_level:75
/sys/devices/platform/google,charger/charge_stop_level:80

I only applied stop level on pixel 3. start level remained as 0 as default.
just sometimes, it did not allow charge even it is under 80%. I had to reboot the phone to charge in this case.


on pixel 5, this happens more often. it does not charge even level is under 80%.

What I found is, wired charging does not matter with start level. only stop level setting works.

with "some" wireless charger, when it reaches stop level (80%), it just stop charging, not idle.
Battery level goes down slowly as phone is not charging.
in this case, start level should be set up. it "activates" charging function when it reaches or below start level.

with some other wireless charger, it works without start level, same as wired charger.
in this case, when it reaches stop level, it keeps the level. I see the charging current is about 3mA to keep the max level. (I assume this is idle mode).

I just applied the start level today because my phone stop charging even it is about 60%, and observed for a day with this. after applying start level as 75, it start working.

I will update if this is wrong or something new comes up.
 
  • Like
Reactions: Hung0702

WibblyW

Senior Member
May 24, 2011
715
123
Google Nexus 4
Moto X Play
I'm sorry, but at the snails pace this phone charges I'd be very surprised if charging it to 100% every night will make any noticeable difference in the long run. I had a Xiaomi Mi10 Ultra with 120W fast charger. That phone used to charge from 0% to full in like 20 minutes. Now that's one way to quickly kill your battery.

The Pixel uses your alarm to adaptively charge the battery so it should never overcharge it anyway. I'd much rather us all of my battery than use it only between 20 and 80% just for it to last a little longer.
Fast charging doesn't help, mainly because of extra heat it generates. But it's also simply that it's at 100%, not how it got there. Later Pixel phones actually maintain their charge at 80% if they're left on charge continuously for long enough, but unfortunately it takes at least 4 days! This approach reinforces the point that keeping your phone at high states of charge is bad for the battery

 

twentysix_tj

New member
Mar 26, 2019
2
2
I went a different direction to limit my Pixel 6 charging. I set up Tasker to turn off the smart plug for my charger when the phone reaches a level of charge, and turn it back on if it drops below a level of charge.

Simple but effective.
 

WibblyW

Senior Member
May 24, 2011
715
123
Google Nexus 4
Moto X Play
I went a different direction to limit my Pixel 6 charging. I set up Tasker to turn off the smart plug for my charger when the phone reaches a level of charge, and turn it back on if it drops below a level of charge.

Simple but effective.
I did something similar, but it's more difficult in a car where you can't use a smart plug (well in most cars anyway).
 

DaCHeF36

Senior Member
Jan 3, 2017
82
21
I found ACC to be buggy sometimes on previous devices. What I have found that works perfectly is a Magisk module call Input Power Control (IPC). Easy command line configuration and it just works. You can easily set a range for charging. I prefer 30 to 80%.


Is this true?

 

WibblyW

Senior Member
May 24, 2011
715
123
Google Nexus 4
Moto X Play

WibblyW

Senior Member
May 24, 2011
715
123
Google Nexus 4
Moto X Play
What I have found that works perfectly is a Magisk module call Input Power Control (IPC). Easy command line configuration and it just works. You can easily set a range for charging. I prefer 30 to 80%.

So Pixel 6 not officially listed as supported (although sure, it may well work just fine)? And a miss in my mind is not having a command line option to (as far as I can see) to stop charging based on temperature, which is a major battery killer.
 

DaCHeF36

Senior Member
Jan 3, 2017
82
21
So Pixel 6 not officially listed as supported (although sure, it may well work just fine)? And a miss in my mind is not having a command line option to (as far as I can see) to stop charging based on temperature, which is a major battery killer.
This works perfectly on a Sammy Note 4 and LG V20. I am sure it'd work just fine for pretty much any device, but it's yet to be seen by me on a Pixel 6. Wife will have one next week, so I'd be happy to report (if I can remember)! Yes, there's no temperature option. ACC simply hasn't worked reliably on some of my other devices, so it was a no go. My use is stopping the charge at 80% and allowing it to charge once it hits 30%. Simple. I don't have my phones in any sort of environment where heat is a real concern. I do not fast charge to preserve the battery.

For those with more intricate needs, this might not be the appropriate choice for you. For those with relatively simple %-based needs, go for it.
 

Galaxea

Senior Member
Jun 17, 2010
414
96
Newbie here. Can you show me how to do this? I don't know where to begin.
In a new Tasker profile or task:

on Event: device boot

Task :
Wait 30 seconds
Run shell: command : echo "75" > /sys/devices/platform/google,charger/charge_state_level
Run shell: command : echo "80" > /sys/devices/platform/google,charger/charge_stop_level
Notify: Task completed

----------
After rebooting you should see a notification telling you that the task has run (after 30 seconds from booting)

I hope that helps
You need to be ROOTED!
 

halcykon

Member
Feb 7, 2022
7
2
In a new Tasker profile or task:

on Event: device boot

Task :
Wait 30 seconds
Run shell: command : echo "75" > /sys/devices/platform/google,charger/charge_state_level
Run shell: command : echo "80" > /sys/devices/platform/google,charger/charge_stop_level
Notify: Task completed

----------
After rebooting you should see a notification telling you that the task has run (after 30 seconds from booting)

I hope that helps
You need to be ROOTED!

thank you! and yes I am freshly rooted.
 

halcykon

Member
Feb 7, 2022
7
2
In a new Tasker profile or task:

on Event: device boot

Task :
Wait 30 seconds
Run shell: command : echo "75" > /sys/devices/platform/google,charger/charge_state_level
Run shell: command : echo "80" > /sys/devices/platform/google,charger/charge_stop_level
Notify: Task completed

----------
After rebooting you should see a notification telling you that the task has run (after 30 seconds from booting)

I hope that helps
You need to be ROOTED!
How do I know it's working? I did everything here and rebooted but my phone is still charging at 96%
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    ACC just works fine.
    On the P6 of my mother I get the following to work on Apr2022 build:

    • Charging switch: gcpm/constant_charge_current_max X000000 0 (X ... Current limit in Amps, replace with 3 or 4 for example)
    • Idle mode works if limited by capacity (percentage)
    • combined it with voltage and current limits
    • temperature control should work, doesn't get hot for me if charged by wire.
    • wireless charging control not tested as the efficiency is much more worse.
    Hope this helps someone!
    1
    What's your exact config?
    I mostly just used the default settings. Control is auto setting, which chose gcpm/constant_charge_current_max 3160000 0. I could probably change it to 4000000 for faster charging but don't need to.

    Automatically cycle switches is off, no power control, prioritize idle on, temp control on (40-50-90, cooldown on (60-50-10), apply on boot is gcpm/constant_charge_current_max 316000::0 (doesn't work but don't care), no apply on plug, no misc.

    Really happy with it overall. I used Battery Charge Limit for years because my phones didn't support idle mode.
    Finally gave ACC a try when I got the 6 and am glad I've ironed out the problems.
  • 11
    If you would have read the correct information on this subject. You would know that this not true for today's battery technology.
    This is nothing but a myth.
    You will have a better chance looking for Bigfoot.

    Why waste 40% of your battery use....
    On the contrary. The most recent phones attempt to limit the time that they spend at 100% exactly because it's so bad for battery longevity. Having options like the OP's approach just gives users more flexibility, should they want more control than, in this case, Google's adaptive/AI approach.

    And it's not 'wasting' 40% of the battery. Keeping between 80% and 20% just optimizes battery service life during those days you only actually only need 60% of it's possible capacity. When working from home that's often the case for me. I actually tend to use ~30% of the battery in a day. Better to charge it up daily to about 70% than all the way to 100% and let it go down to 10% over 3 days. If it's easy to do, why not?

    Not quite the same, but EV design also has their batteries normally operating in the middle range so as not to compromise their service life...

    Definitely not myth. The only myth is that lithium cells exhibit a memory effect and need to be deep discharged and fully recharged periodically to maintain their capacity. It's actually bad for them to do this! The only reason to do this would be in an attempt to recalibrate the software for the battery level gauge (at the cost of a little damage to the battery each time you do that).
    4
    What would be the purpose for this.
    I always charged to a 100% and never had issues on my devices.
    If you do some reading you will see that charging over 80% and draining under 20% will significantly shorten the lifespan of your battery. This is important for those of us that have devices not sold in our country so getting replacement batteries would be very difficult and expensive. I have phones that are more than 9 years old and still going fine if charged like this.
    4
    If you do some reading you will see that charging over 80% and draining under 20% will significantly shorten the lifespan of your battery. This is important for those of us that have devices not sold in our country so getting replacement batteries would be very difficult and expensive. I have phones that are more than 9 years old and still going fine if charged like this.
    If you would have read the correct information on this subject. You would know that this not true for today's battery technology.
    This is nothing but a myth.
    You will have a better chance looking for Bigfoot.

    Why waste 40% of your battery use....
    3
    With credit to VR-25 from Github:

    If you edit these files and put you own values in then your phone will start charging when it drops below 75% and stop when it gets to 80%. (put your own values in, etc.)

    I have only tested it briefly but it seems to work for AC and USB charging for me so far. No other apps or tweaks needed.

    /sys/devices/platform/google,charger/charge_start_level:75
    /sys/devices/platform/google,charger/charge_stop_level:80
    3
    ... and if you really want to knacker the battery, heat it up too!

    Worst case scenario - using a sat nav app on your phone in the car on a hot day with the phone plugged into a car adaptor. It's going to be sitting there at elevated temperatures, possibly with the sun shining on it, whilst being kept at 100% battery....

    I'm only a customer (and have no other affiliation) and like to tinker, so I got one of these for use in the car to limit temperature when charging and limit max charge. Not cheap, but ok compared with the cost of the phone https://chargie.org/