yashsingh1/xdaforums huggingface dataset:
[Sony Xperia 1 III] htcmage:
Developer. I have a question. Google Play system update is stuck in June, can I upgrade this?
[Sony Xperia 1 III] htcmage:
Small, but a little donated. As a Sony fan, thank you so much for presenting such good material. happy New Year
[Sony Xperia 1 III] htcmage:
iam a 5 III user. The kernel makes it possible enough.

However, there are special caveats. Only version 23 of magisk, should be used on 5III. If enabled in the canary version, it will be infinite boot.
[Sony Xperia 1 III] largo2:
https://xdaforums.com/t/google-play-system-update-stuck.4355731/
[Sony Xperia 1 III] htcmage:
thank you so much happy new year
[Sony Xperia 1 III] treff89:
Wow -- so you simply flash this kernel onto the 5 iii and it works?? Amazing if true!
[Sony Xperia 1 III] htcmage:
Yes! The two models share boot.img and have the same firmware version. Works very well, but same as 1 III, NFC doesn't work
[Sony Xperia 1 III] Freak07:
did you try the kernel.zip attached to this post?

https://xdaforums.com/t/kernel-23-1...xperia-1-iii-aka-sagami.4377449/post-86146007

I believe that should have nfc working on the 5 III as well if it boots.

edit: @htcmage, thanks for testing it on the xperia 5 III and reporting back that it works.

Thank you very much for the generous donation. It´s greatly appreciated. :)
[Sony Xperia 1 III] htcmage:
No, I'm not sure if it's good to load everything, so I'm using the old 1.0.1 :)
[Sony Xperia 1 III] Freak07:
It´s better until I´m able to obtain the missing driver for smart charging.

It´ll fix nfc very likely for you.
[Sony Xperia 1 III] htcmage:
thank you! I have confirmed that NFC works normally :) I look forward to a good kernel from the developer in Android 12. thank you

View attachment 5504887
[Sony Xperia 1 III] treff89:
That's excellent, and good news for 5 iii / 1 iii development that the kernel be shared. Will try it out this weekend.
[Sony Xperia 1 III] treff89:
Works brilliantly, seems like the power saving feature is also working nicely after setting it up through FKM.
[Sony Xperia 1 III] Yndi:
Thanks for your work @Freak07

Will this work for Android 12 as well or do you have to bring up some updates?

I'm/was a bit sceptical to unlock during waranty but with the cr** Sony threw at us with their update I'm all for changing my ROM and when I reinstall the phone I would likely unlock aswell.
[Sony Xperia 1 III] Freak07:
Sony needs to upload the source code for the Android 12 kernel, so I can start working on the update for Android 12. So for now I can do nothing besides wait for them to upload the source.
[Sony Xperia 1 III] ryshd296:
I compared [Kirisakura_Sagami_1.0.1.zip] and [Kirisakura_Sagami_1.0.1force.zip] with xperia5Ⅲ.

[Kirisakura_Sagami_1.0.1.zip] seems to have a better battery life.

It's a pity that nfc cannot be used with [Kirisakura_Sagami_1.0.1.zip].

But thank you for the wonderful kernel!
[Sony Xperia 1 III] Freak07:
if somebody is still on Android 11, I´d appreciate if they could check if smart charging and nfc works with this build on Android 11.
[Sony Xperia 1 III] htcmage:
yes ^_^ :)
[Sony Xperia 1 III] htcmage:
It's all running perfectly (confirmed) Thank you! Oh. Are you using Android 12 right now?There's still a lot of bug, right?
[Sony Xperia 1 III] Coleh:
Hello OP! I hope you're well. I'm really stupid so I just want to ask some basic questions since it's been a long time since rooting and using custom kernels. First, have you or anyone else done any tests with this Kernel on CPU Throttle to see if it dramatically improves the stock throttling behaviour? I absolutely adore this phone but I cannot stand using it for gaming and emulation because it throttles so aggressively it performs worse than Snapdragon 865 chips. I'm unfamiliar with Magisk and Safety net since the last phone I rooted was an S4 over 6 years ago, once you install the Magisk modules are you still able to use banking apps and NFC payments/anything else that a phone usually loses once those Magisk modules are installed? I see you released a patch yesterday so I'm thinking of rolling back my Xperia 1 III XQ-BC72 from this abysmal Android 12 ROM and trying Android 11 with your Kernel to see if I can at least maintain 80-85% performance in CPU throttle(and by extension in Dolphin Emulator). Apologies for the stupid questions, thank you.
[Sony Xperia 1 III] treff89:
Freak07, that latest update you just uploaded works well, but doesn't play nicely with GravityBox's status bar brightness adjustment -- flickers between brightness settings at about 100 Hz.
[Sony Xperia 1 III] Freak07:
No I don´t have done any tests on that, but I think the kernel here won´t have that big of an impact on thermal throttling.

You can try to restrict the CPU freq max to lower levels with the feature documented in post #2. That might prolong the time it takes for the device to get into the throttling range.

If performance is enough level 2 might be a good compromise for you.

I´m sorry, but I don´t understand what you´re trying to describe. Brightness isn´t measured in hz, neither does this panel have a 100hz refresh rate.

I suppose the display flickers at a certain brightness when you´re adjusting the brigthness with that statusbar mod?

If so it can be that the gravity box mod, overwrites some restrictions as to not offer fallback to 60hz when you have high refresh rate enabled on lower brightness. That´s the flicker you perceive (there´s a difference between 60 and 120fps in visual quality/appearance), but that shouldn´t have anything to do with the kernel.
[Sony Xperia 1 III] Coleh:
Thank you very much for thr response. Yeah, I imagined so, disappointing to get confirmation. I think i'll just have to let this phone go, could've been amazing but let down by an absolutely appalling SoC.
[Sony Xperia 1 III] yunyou:
Hi there, I'm the user who is still using Xperia5iii at Android11, the file [Kirisakura_Sagami_1.0.1_nfc_charging.zip] can run normally.
[Sony Xperia 1 III] Freak07:
Android 12 Kernel

Hey everyone :)

So I have to be honest with this post. It´s extremely frustrating for me that there´s no source code pushed yet for the Android 12 firmware. The first Android 12 Firmware (.149) was released at the beginning of January, with another update to .211 a while ago.

No source whatsoever for A12 at this point. It´s frustrating after 2 months.

I understand not every OEM has the ecosystem and means of google to push the source hours after the OTA is live, but 2 months is a really long time. It´s still a long time considering the kernel is based on a completely new qcom base and probably needs to be "re-edited" (deleting comments, wip progress marks, etc) before uploading the source archive in contrast to the more "simple" A11 updates, which is probably just a drag and drop operation and happened way more quickly.

Given Sony more or less advertises their open source ambitions in various places it´s disappointing from my perspective.

The A11 kernel source isn´t compatible with A12 and doesn´t boot.

However the more I got frustrated over time I more or less hacked together a kernel for A12, which is working as best as its going to get without a matching source.

That kernel is based on latest linux-stable and latest caf-upstream, with loads of other optimizations that were not in the A11 kernel, but were contained in my other kernels for 5.4 devices.

The only real issue on that kernel is that usb port detection is wonky. It takes a while to detect a pc and for the usb file transfer dialog to pop up.

My old Pixel charging brick works fine ( it takes a little while to get detected sometimes), while the stock charger only works if I connect the phone to my PC usb and directly afterwards to the stock sony charging brick.

Otherwise there are no real issues for me.

Feel free to test, but I probably won´t be able to fix any problems until we have a source code for the A12 kernel.
[Sony Xperia 1 III] bountyman334:
AWW man. Appreciate this bro. i didnt want to move to a12 just yet. until you made a kernel because your work on a11 is unmatched. but I guess il test this as well and report my findings see you in a hr or so
[Sony Xperia 1 III] bountyman334:
One issue to report. Sdcards reading issues. I thought it was a module in magisk but I disabled all modules and it's persists. Other than that everythingruns good
[Sony Xperia 1 III] Freak07:
Thanks for the report. I know what's up. Forgot to put the exfat drivers in place. ( I assume your sdcard is formatted as exfat)

I'll put out a fixed version when I find time to compile another kernel. (y)
[Sony Xperia 1 III] bountyman334:
yep. thats correct. it was working for a sec then it stopped. But I definitely look forward to the latest fix👍
[Sony Xperia 1 III] Freak07:
Android 12 Kernel

Hey everyone :)

as spotted by @bountyman334 exfat-formatted sdcards weren´t working on the previously shared A12 kernel.

Attached is a kernel that has this issue fixed.

I wish everyone a nice weekend. Have a great day! :)
[Sony Xperia 1 III] bountyman334:
👀👀. Testing now. Appreciate the quick response. Definitely will report back

Update: sdcard is working. Tested everything else seems to be working. Will get this a run and report anything else.
[Sony Xperia 1 III] boybkol:
SD card working but battery not charging, flashed kirisakura then back to stock kernel then flashed kirisakura again still battery not charging.
[Sony Xperia 1 III] bountyman334:
That's true. Only wireless. And it's says slow
[Sony Xperia 1 III] Freak07:
check the original post about the A12 kernel.

Unfortunately I can´t do anything about it, as there´s no source for A12 and it´s impossible to know what to change for the charge service.

Plug it to a pc (you´ll see charging), disconnect it and plug into your charger. That works for me with the sony charger that was in the box. After a while it will detect a PD type charger and switch to fast charging.
[Sony Xperia 1 III] bountyman334:
It's still charging. After a few plug ins it back to charging
[Sony Xperia 1 III] xFirefly93:
@Freak07

Nice to see some solid development for a Xperia device, it was a long time ago that actually happened.

Not for making myself sound like a spoiled brat or "demanding" too much right now, while the lack of sources for A12 is still a problem if I am getting it all right but..

Is there any chance that you might / maybe can add this to your Xperia III kernel somehow?:

1) The Boefflas Wakelock Blocker for us that love to experiment with blocking of kernel wakelocks?

And

2) The high brightness driver for fixing the issues with the low screen brightness in / under direct sunlight?

:)
[Sony Xperia 1 III] Freak07:
Hey :)

1) is already included in the A12 kernel. the OP doesn´t reflect the actual feature set of the A12 kernel, as the A12 kernel is not a "proper" release.

2) hbm mode is automatically triggered when the phone is in direct sunlight. I checked with a very bright torch.

hbm on the xperia 1 III can manually be toggled via

sys/devices/dsi_panel_driver/hbm_mode
[Sony Xperia 1 III] treff89:
Is the Boeffla wakelock blocker in A11 kernel, too? How to use it if so?
[Sony Xperia 1 III] Freak07:
It´s not in the A11 kernel. There´s also no reason to use it, if your phone sleeps just fine.

It´s more of a last resort for example, if your companies wifi causes your device to not sleep, due to a wakelock which originates due to your phones wifi driver not playing nicely with the companys wifi network, and your company´s IT-guys refuse to update/solve the issue on their end.

Blocking kernel wakelocks to get "better battery life" is more myth/placebo than anything else and will cause random issues like missed notifications etc.
[Sony Xperia 1 III] treff89:
Freak07, is there *any* chance of you managing to introduce undervolting / voltage control? In either A11 or A12?

Similar to the SD810, I feel like this SD888 chip has conservative voltage settings (too high) resulting in the higher temperatures, and could really be optimised with even some modest undervolting.
[Sony Xperia 1 III] Freak07:
No. CPU voltage can't be touched via kernel any longer, these times are over.

You can adjust GPU voltage, but it won't make a difference for non gaming usage, and probably not much for gaming usage either. (Just google around, I'm pretty sure you'll find what you need for that, although I wouldn't recommend playing with this as you can damage your chip if something goes wrong)

Use the battery saver feature to restrict max cpu freqs. That helps the most i guess.

Arguably sd888 chips aren't designed to run at peak perf for extended periods of time, without any form of active cooling.
[Sony Xperia 1 III] Evil_Sephiroth:
that's too bad, usually with undervolting i gained 2 more hours screen on time with lucky silicon.

That's the same trash Intel pull on lot of their CPU when OEM voltage are simply to high and if you are not extremely unlucky with silicon you usually can lower a whole 0.1-0.2 V from oem voltages lowering temp around 5-10 C

Battery saver is trash, i use it when i need my phone to survive loger for work, but in normal usage performance decrease is pretty high.

That was one of the better possibility on android phones
[Sony Xperia 1 III] Freak07:
Voltage selection has come a long way since years ago on the modern QCOM chips. Unfortunately peak perf and heat too.

Not talking about the inbuilt battery saver into android system, but the kernel feature that's detailed in post #3.
[Sony Xperia 1 III] JDC2389:
There is generally a higher voltage ceiling so even the worst binned chips can run without an issue, while most could have stable varying levels of undervolts, like the gpu I can undervolt with konabess easily a voltage notch down on all levels without a hitch and if I experiment could probably go lower. It's just more locked down nonsense. As for the cooling solution, it's cheap!
[Sony Xperia 1 III] treff89:
Totally agree. Would love to have the ability to try some undervolting.
[Sony Xperia 1 III] Freak07:
I don´t think it should be assumed that CPU/GPU work the same way in that regard.

While I agree that having the option for the CPU would be nice for some users, it´s just not possible any longer.

GPU can be played with as mentioned by @JDC2389, but keep the warning from one of the prior posts in your head.
[Sony Xperia 1 III] lemon90:
can i use this kernel for sony 1iii SO51B version? Thanks for answer.
[Sony Xperia 1 III] Pandemic:
Still no news to build a kernel for A12 ?
[Sony Xperia 1 III] Freak07:
still no kernel source for a12.

look a few posts back there´s a build for A12, which is as good as it´s going to get without the source.
[Sony Xperia 1 III] Pandemic:
Aaah oke and can you link me to the right post and also for XQ BC52 ?
[Sony Xperia 1 III] Pandemic:
@Freak07 this one you mean ?
[Sony Xperia 1 III] Freak07:
yes, that´s the one. should work fine. I´m running thison XQ BC52 firmware 61.1.A.4.78 myself.

as always make sure to backup boot.img before flashing in some form and save it on your PC so you can flash it back via fastboot in case something goes wrong.
[Sony Xperia 1 III] Pandemic:
Oke thanks bro and yes i will 😊

And howto flash it @Freak07 not through fastboot and works also on latest fw .78 ?
[Sony Xperia 1 III] Cramfs28_Cheng:
Hello, I'm building Lineage OS 19.1 based on stockROM 11, but I have a problem: the screen will darken when the brightness exceeds 2047.(Overlay works in 11, but not in 12):cry:

Could you teach me how to change the maximum brightness in the kernel from 4095 to 2047?
[Sony Xperia 1 III] BlazingKahn35:
Do you recommend also undervolting while using your kernel? I have both your kernel and undervolt from konabess. I got 1 hour 40 minutes SOT 😭View attachment 5605829View attachment 5605831
[Sony Xperia 1 III] Mangtas_666:
Hi can i use this kernel on android 12?
[Sony Xperia 1 III] Freak07:
Read back one page.

https://xdaforums.com/t/kernel-23-1...xperia-1-iii-aka-sagami.4377449/post-86563015
[Sony Xperia 1 III] bountyman334:
This is the best one so far for gsi running A12 with a11 based. Everything works
[Sony Xperia 1 III] Sakuu:
**** man this drove me insane tbh i thought my phone was broken. well hope you get it working soon...
[Sony Xperia 1 III] Ainz_Ooal_Gown:
Will there be an update for Android 12??
[Sony Xperia 1 III] Freak07:
read back two pages in this thread. I shared builds for A12.

As there´s no source code published for A12 yet from Sony I suggested you read my posts thoroughly so you´re not getting any surprises. (usb/charger detection can be wonky)
[Sony Xperia 1 III] Ainz_Ooal_Gown:
I see, well I'll get to reading then
[Sony Xperia 1 III] Sakuu:
I think binaries have been released
[Sony Xperia 1 III] Freak07:
That doesn't help me. Still no kernel source released.
[Sony Xperia 1 III] Sakuu:
ah that sux RIP
[Sony Xperia 1 III] nos1609:
Sony has released some sources on their website rather than in github, by the way this is the first A12 build ever released for Sagami platform back in January

@Freak07 Hope this might shed some light on the A12 development

Open source archive for 61.1.A.1.149 | Developer World

developer.sony.com
[Sony Xperia 1 III] Freak07:
they always release there. github is just importing the changes from there.

you spoiled the surprise. :p kernel is already rebased and I was testing for a week, making sure everything works. ;)

usb connection to PC works properly with the updated source, as well as charging.

So after half a year of waiting we finally have a proper kernel source and fully working kernel here for A12.
[Sony Xperia 1 III] Freak07:
Update to 2.0.0

Hey guys and girls,

Alright. The source code for Xperia 1 III for Android 12 firmware was finally released after 6 months of waiting time. 🥳

USB connection issues are fixed now. Charger detection is fixed. Smart charging features work fine as well.

The kernel is fully compiled from source with a lot of optimizations as well as latest CAF-Upstream and linux-stable.

I´ll update the OP to reflect all the changes.

More changes in the Changelog below:

Changelog:

- Import kernel source from 61.1.A.1.149 (works fine on latest a12 firmware)

- Linux-Stable upstream bumped to 5.4.201

- use prebuilt clang 14.0.7 for compilation

- latest caf-upstream

- for more details please check the first post

- other improvements and tweaks please check github if you´re interested in details

Download:

https://www.androidfilehost.com/?w=files&flid=331114

Instructions can be found in the OP!

But look at this post too :)

Have fun, enjoy the kernel and your phone.

Donations are not mandatory but very welcome.

If you like my work and want to buy me a coffee/green tea to keep development going: http://paypal.me/freak07
[Sony Xperia 1 III] bountyman334:
Thanks, bro. I must've read your mind :)

I just switched back to stock CN .140, which is smooth as butter. GSI Evo was good but I needed the camera from the str8 lock screen and gsi wasn't able to do that also a somewhat better camera & reverse wireless charging

I will test and share any findings
[Sony Xperia 1 III] Mangtas_666:
Finally i been waiting patiently for this..thank you for not abandoning our beloved xperia 1 iii.
[Sony Xperia 1 III] Pandemic:
Great job 🫶
[Sony Xperia 1 III] Freak07:
if you knew how much time it took to get the a11 based kernel updated so it can boot and work except the usb port issues on a12, you probably wouldn´t have worried about that. ;)
[Sony Xperia 1 III] Mangtas_666:
Yeah i hanged on the a11 version for a week its smooth only it wont charge i only charge it via wireless.
[Sony Xperia 1 III] Sakuu:
Alright! This kernel is great. Thank you!
[Sony Xperia 1 III] Steefzar:
Maybe a noob question, but does this fix the random overheating and slowdown issues on XQ-BC52 A12?
[Sony Xperia 1 III] Sakuu:
Well all i can tell you is to install FKM and turn off 1 little and 1 big core and setting GPU max frequency to 379mhz
[Sony Xperia 1 III] Steefzar:
Maybe i will try it out, i am using your A11 kernel on A11 at the moment, since i had so many problems on A12.
[Sony Xperia 1 III] Mangtas_666:
This is my settings no lags no overheating and have a good battery...
[Sony Xperia 1 III] Freak07:
It depends on why your phone overheats. If ambient temperature is high, phone will run hotter.

But if an app that´s stuck in background is the cause you can find out via top command.

Use any terminal app.

type "su" without the "", grant su permission via magisk.

type "top", rotate phone to landscape.

Watch the list. If you don´t touch the phone and an app, for examole facebook, instagram etc is constantly on top eating a big portion of CPU share you know what´s happening. That will lead to heat very very quickly on a powerful SOC as sd888.

I personally don´t have any real problem with heat during light/medium usage.

There´s also a pretty simple kernel function provided by this kernel to cut back the max cpu freqs for gaming sessions.

take a look here:

https://xdaforums.com/t/kernel-02-0...xperia-1-iii-aka-sagami.4377449/post-86125995

you don´t get lags, because the powerhal can still boost beyond that levels and overwrite them.

take a look here for a kernel switch that hard limits the CPU freqs to the limits described:

https://xdaforums.com/t/kernel-02-0...xperia-1-iii-aka-sagami.4377449/post-86125995
[Sony Xperia 1 III] Mangtas_666:
Hi Freak i tried the battery touch limiting try to set it to 1 but instead of typing 1 the one that appears is letter Y and the default is N
[Sony Xperia 1 III] Freak07:
that´s the same. Y=1 and N=0

by default the feature is disabled, as I think everyone that gets a phone with a SD888 wants the full performance :)

so everyone can choose one of the limits as per preference.
[Sony Xperia 1 III] Mangtas_666:
Okay thanks...so if i set the values on the sys/module/parameters to the one i want..should i still set the cpu frequency to the desired frequency that i want..or should i just leave it by default?
[Sony Xperia 1 III] Freak07:
sys/module/cpufreq/parameters/batterysaver

if this is set to 0 or N, the feature is completely disabled.

sys/module/cpufreq/parameters/batterysaver_touch limiting

set this to 0 will allow the powerhal to boost above the limits you can define below during interaction (you interaction with the screen, or other hints that trigger the powerhal)

set this to 1 will make the limits below hard limits, the powerhal can´t change at all during interaction

sys/module/cpufreq/parameters/batterysaver_level

set this to 1 2 or 3, to get the respective limits described in the post I quoted.

leave the cpufreqs you changed just by default.
[Sony Xperia 1 III] Mangtas_666:
Ohhj okay now i got it..than you so much for guiding me.
[Sony Xperia 1 III] Sakuu:
A week or two ago i didn't have too many issues with heat but the last few days have been really hot and even a custom kernel didn't help much with it even though I limited my GPU to 379 and cpu to use 6 cores (1 little,1big disabled)