Hacker News new | past | comments | ask | show | jobs | submit login

I'm trying to figure out what the actual latest update is doing regarding the battery. I found an update to the kernel binary but it doesn't seem the source has been updated.

Can I submit a GPL request to Google to get the kernel source?

https://github.com/bmaupin/pixel4a-battery-research





Wow, that is exactly what I was hoping to do, but I wasn't able to figure out more than 1 or 2 of those steps. Thanks!


If you own a device, you're entitled to a copy of all GPL software that came with it, including some build tools. However, if the diminished battery performance comes from some kind of firmware update for an embedded microcontroller, you're probably out of luck there, unless that controller also runs GPL software.

It's possible the changes you're looking for are already listed on one of these repos: https://android.googlesource.com/device/google/sunfish-sepol... https://android.googlesource.com/device/google/sunfish-kerne... https://android.googlesource.com/device/google/sunfish/

(sunfish is the codename for the Pixel 4a)


I looked through all the sunfish repos first, which is how I found this: https://android.googlesource.com/device/google/sunfish-kerne...

But apparently sunfish-kernel only contains binaries.

Given there's an update to Image.lz4, that seems there's an update to the kernel. I also compared the binary to the previous version and found some new strings possibly related to battery charging profile.

Next I checked out the source using Google's documentation but the latest commit is here: https://android.googlesource.com/kernel/msm/+/refs/heads/and...

But maybe I'm looking in the wrong place.


If those pre-compiled binaries aren't based on GPL software, I don't think you'll have much luck getting their sources.

Android's source code is a maze of branches and tags, unfortunately. The change can have been made in the generic cross-device kernel tree, or it could've been a separate module, or it could've been a binary.

One thing you could consider is checking out the kernel for a project like LineageOS: https://github.com/LineageOS/android_device_xiaomi_sm6150-co... They usually pull+filter changes from upstream. For instance, these changes may be of interest: https://review.lineageos.org/c/LineageOS/android_device_xiao... https://review.lineageos.org/c/LineageOS/android_device_xiao... These kernels are used for a variety of devices with similar hardware, so not all changes have anything to do with the Pixel 4a, but it could prove useful in your search.


Image.lz4 is definitely a Linux kernel, and it's definitely changed: https://android.googlesource.com/device/google/sunfish-kerne...

Would changes to external closed-source binary files change the kernel image itself? There are kernel modules in that commit but it looks to me like they all come directly from here: https://developers.google.com/android/drivers

Google does provide detailed instructions for downloading all sources for the kernel, and I didn't see any changes since 2023 to any source files: https://source.android.com/docs/setup/

Thanks for the extra places to look. I'll check them out.


I also looked around AOSP and found the commit for the battery alert icon [1], but no kernel source.

[1] https://android.googlesource.com/platform/frameworks/base/+/...


If you're reversing this: I was curious if Google determines if your device is "affected" using the phone's serial, or the battery's serial. I've seen reports that people who replace the battery manually outside of the program still experience diminished performance. But of course that could just be because they replaced their defective battery with another defective battery.


I'm going through the kernel with Ghidra but not very good at it and not having much luck.

I do have an idea about what it's checking to determine if a battery is affected, but I don't have enough data yet to know if it's just a coincidence.


I don't imagine something like this would be implemented in the kernel? Might help to search system apps/binaries for the string displayed in the notification alert: https://raw.githubusercontent.com/nathan-contino/images/main...


Why not? The kernel seems to handle low level charging and battery logic, for example: https://android.googlesource.com/kernel/msm/+/refs/heads/and...

I'm not hoping to argue, only to learn. This isn't my area of expertise.


I should clarify that it isn't my area of expertise either; if you already found something in the kernel, by all means, keep looking there! I was more trying to suggest a starting place but it seems you're past that point already, good work :)




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: