11 Dec 2025
This will be a quick one, as there really isn’t much to say about what I’ve been doing differently compared to my previous blog post. I’ve got to say though, it’s been very fun staying up late to try to get more features working on my old Android phone!
The Patch
Here’s the preliminary patch!
To be quite honest, I’m not too happy about the generation of this patch and the patch itself. It works, but for some reason the vibrator either works at 0% or a 100%, never in between. I actually got the vibrator working 1-2 days after the touchkeys, but have been dreading the cleanup. I tried to spend time figuring out why the vibrator was never going to 50% or 75%, but couldn’t figure it out so I decided to send it upstream. Hopefully the folks upstream have a better idea and can point me towards the right direction.
Interestingly, Claude halucinated extra stuff that I took out. There was an arbitrary enable pin in the DTS that I took out. It also modified the clk-rcg.c file in drivers/clk/qcom. Don’t know why it did that.
At least it got me to a working solution quickly, and then I could spend some time understanding the changes and removing redundant code.
Oh yeah, since flashing the phone takes quite a while compared to the changes being made, I decided to try and develop multiple features at the same time. I was trying to get WiFi, frequency tables, and vibrator working at the same time. Currently stuck on WiFi and frequency tables (something about SCM I think). Maybe this is why Claude halucinated extra code for vibrators?
Next Steps
Now we’ll be moving onto the harder stuff (assuming that the above are merged in as is). I’ve been saving them for last because they’ll require changes that I need to be cognizant of. Trying to find good resources that can hopefully help me land these changes upstream. If you know of any, please let me know.
What’s Working
- UART
- USB
- eMMC/SD card
- vol up, vol down, home, and power button
- touchscreen
- weird initrd error has been conquered!
- lk2nd
- tsens
- nfc
- accelerometer
- light sensor
- touchkeys
- vibrator
What’s Left
This list will potentially grow later as I find more things
- magnetometer (added but potentially wrong mount matrix)
- proximity (added but for some reason it is a floating value)
- vibrator (added but I need to figure out if I can vary the frequency. Currently works at either 0% or 100%)
- display/gpu
- speakers/microphone/headphone jack
- cameras/flash
- wifi/bluetooth/gps (from modem?)
- battery/charging