by chasil · 1y ago · 0 comments
Unlock the bootloader, then install LineageOS, MindTheGapps, and Magisk.
Once you have Magisk stabilized, install the Advanced Charging Controller, and configure it to halt charging at 80%.
That should solve your problems, and turn the updates back on. I don't think there is a way to make Google Pay work in this configuration, which is a drawback.
I can put all the URLs here if you ask.
Edit:
[I did not remember that Lineage hosts gapps images]
https://wiki.lineageos.org/gapps/
[IIRC, the APK is renamed to a ZIP and flashed with recovery, then name it back and install the app]
qcom,max-voltage-uv = <0x43e6d0>;
This is completely insane, and it's a small miracle that this phone didn't follow Note7's fate.As for charge limiting... limit at 80% is an okay workaround (certainly better than no limit at all!), but it's far from perfect. Namely, with this approach, charge controller chip doesn't know cut-off is coming, and will shove several amperes into the battery until last second, thus overshooting safe voltage level. This wears the battery (less so than with no limit, but still more than necessary).
Battery charging limiting should be done by voltage: this way, controller chip knows where to stop, so it makes soft taper-off at the end of charge cycle, by gradually nudging current down to stay within voltage envelope.
Charging profile could be observed from a rooted adb console:
grep NOW <$(find /sys/devices/platform \
| grep battery/uevent$ | head -1)
(depending on phone model and firmware, some tweaking might be required to find/grep to get the right battery status file)It seems to be unbelievable that none of this has become part of AOSP.
I should have a battery setting that optimizes either for battery longevity, or for maximum power delivery. These settings should incorporate best practice, such as you have outlined.
The last stable ACC release was in late 2023, and it appears to remain the best battery management tool for longevity.
Why is this so?
I rewrote your script slightly, and ran it on my Pixel 3.
find /sys/devices/platform |
grep battery/uevent$ |
head -1 |
xargs grep NOW
POWER_SUPPLY_VOLTAGE_NOW=3955800
POWER_SUPPLY_CURRENT_NOW=-222656
Also: find /sys/devices/platform -name uevent |
grep battery |
head -1 |
xargs grep NOW
find /sys/devices/platform \
-path '*/battery/*' \
-name uevent |
head -1 |
xargs grep NOWNewer Pixels have a concept of "bed time" and charge slower overnight, for battery health.
That will reduce future wear, but won't suddenly make the battery better. If anything it'll make the battery even worse, at least in the short term.
With a Pixel, there is less bloat, so it is less of a factor with this particular device. However, you don't get the full suite of Chrome/Maps/Gmail/Drive/Photos/etc. installed by default, and what you have not installed will not drain your battery.
In any case, one would hope that Google's safeguards are equaled by ACC.
Data is cheap where I live, but also I dont use my phone to stream music/video.
> https://magiskmanager.com/
WARNING: this is not the official site for Magisk [0], keep to the actual GitHub hosted repo and builds [1].[0]: https://www.xda-developers.com/psa-magiskmanager-com-not-off...
I'm not who you replied to but can you please do? I've been wanting to make a LineageOS device for a while but was being cheap (and it wasn't high enough priority). But maybe now there will be a lot of cheap Pixel 4a on eBay in the near future and I'll go for it.
I also remember some rumor that all Pixels must access WiFi before they will allow bootloader unlocking in the developer options.
Unless you have researched this and are comfortable doing these things, this is not something that's easy to do. I bricked my OnePlus Nord100 not once, but TWICE trying to install Ubuntu Touch.
It happened because the Nord100 shipped with a more current Android version (11.xx) and Ubuntu can only be installed over two very specific versions (10.xx) on the Nord. I bricked it once thinking it could be installed over the 11 version. Then I had to figure out how to reflash the phone back to the 10 version, then run the UBports installer.
I was lucky because I bought the Nord100 for like $50 on ebay so it wasn't a big deal if I wasn't able to unbrick the phone, but if you do this to a more expensive phone, the consequences are a lot more expensive.
I love Lineage OS and have it running on a Pixel 4XL, but my experience flashing and re-flashing the phone several times, and all the work I went into just to get UT running on that phone, really dampened my enthusiasm to ever do this again.
I've loaded Lineage on the Nexus 6, Oneplus 3a & 5 & Nord N200, the original Pixel, and the Pixel 3a XL.
Pixels are the most forgiving, and the hardest to brick. They are also the best for VoLTE.
I also have an N100, which is not supported by Lineage.
They do this so that they don't have to reverse engineer and write the hardware drivers from scratch and simply use Android's user space drivers for them.
I haven't been involved in that domain for a while, but it basically meant reusing the contents of your device's /system and /vendor partitions and simply installing the Linux OS into /data.
They’re not offering the free battery replacement in Aus otherwise I’d do that - hard to be sure that getting a new battery in a local repair shop wouldn’t be similarly affected by the new limits (presumably some sort of blacklist on serial numbers?).
1. https://social.treehouse.systems/@marcan/113914172433692339
Random Google engineer on personal machine trashes Pixel 4a batteries in GPL violation
How did this random engineer command that all previous firmware images be taken offline?
Alternate ROMs look much safer right now.
Should this be submitted to HN separately?
The whole of userspace will be replaced when LineageOS reformats all of the partitions.
It is possible that the new battery behavior has been injected into some deeper part of the hardware, but LineageOS is unlikely to make that worse.
If we install LineageOS, should we worry about Google's firmware update? Then why bother with all these steps?
"My most charitable view is that Google have found a major fault with the Pixel 4a battery and want to mitigate a repeat of the Galaxy Note 7 without saying it outright and causing a panic."
These lithium batteries usually last longer when you don't fully discharge them and fully charge them regularly. 20-80%. No idea why manufacturers don't just call that range as 0-100%.
With the sunset of 3g, many devices that were not capable of 4g were retired.
That being said, Lineage still does support several Pixels that Graphene has desupported. In fact, I am typing this on a Pixel 3a XL which is in this category.
The original Pixel, Pixel 2 and 2XL are still supported by LineageOS:
https://wiki.lineageos.org/devices/#google
Graphene has explicitly removed everything prior to the Pixel 4, including:
Pixel 3a XL (bonito), Pixel 3a (sargo), Pixel 3 XL (crosshatch), Pixel 3 (blueline), Pixel 2 XL (taimen), Pixel 2 (walleye), Pixel XL (marlin), Pixel (sailfish).
Edit: This extended support does come at some risk. The chipsets used in Android can sometimes have showstopper bugs. Sometimes, these cannot be patched, although maintainers will go to great lengths to find solutions. The "firmware age" is reflected in the "vendor security patch" date in Lineage - the older, the more dangerous.
Graphene largely does not allow this.
Cisco Duo also runs on this device.
This will be a decision for the app vendor, but I'd rather get monthly updates than maintain a locked bootloader.
Uber has done some strange things.