[Q]What is Different between fotakernel.sin and kernel.sin - Sony Xperia P, U, Sola, Go

fotakernel_S1-SW-LIVE-DE72-PID1-0002-S1-PARTITION.sin
kernel_S1-SW-LIVE-DE72-PID1-0002-S1-PARTITION.sin
What file can be use for cook a custom rom?

Speculative:
fotakernel - Firmware-Over-the-Air Kernel:
So it is a Kernel (central core of a computer's operating system) which is responsible for over-the-air processes, so a Kernel that is in control of mobile communication, NFC, Wi-Fi and other stuff, because it is a major part of modern mobile devices.
kernel - Normal Kernel:
Responsible for connection between hardware and software.
In Xperias firmware both kernels are required, so there is no choice which one to choose.
Am I right ?

Related

[ROM] Huawei S7-10X Codeaurora 4.1.1

With the exception of a modified hardware/qcom/display for legacy support this is a straight compile of Codeaurora's 4.1.1 (M76XXUSNEKNLYA2515)
http://threader.zapto.org/experimental/s7/codeaurora-4.1/102113/boot.img
http://threader.zapto.org/experimental/s7/codeaurora-4.1/102113/system.img.bz2
Unpack system.img.bz2
Flash with fastboot.
fastboot erase cache
fastboot erase userdata
fastboot flash boot boot.img
fastboot flash system.img
Not working:
Phone.
Bluetooth.
Sensors.
Wifi.
Working:
display
Kernel source:
https://github.com/threader/Huawei_S7_kernel_2.6.35
Hardware/qcom/display & devices/huawei/s7
http://threader.zapto.org/experimental/s7/codeaurora-4.1/sources-buildprefs/
Android sources:
https://github.com/threader/
Credits
Asturel, dzo. Thanks!
Boot image will boot asturels CM10 http://goo.im/devs/asturel
A boot image to boot asturels cm10.1 on 10x http://threader.zapto.org/experimental/s7/cm10.1/boot.img
Hi,
Went trough my old disks and uploaded everything i could find to https://mega.co.nz/#F!3wAQxDDL!2MgX7NmPBUIOVYP3zLYElw
Upper Folders:
* Original Firmware (Norway - Sweden - Brazil)
Norway = 103 Sweden = ? Brazil = 101-2 || Brazil boot image can be used with Norway rom, a 101 will loose its camera when presented with the wrong version kernel
Seemingly ancient Huawei update app, for updating 2.1 to 2.2. ( In Firmware Folder )
* Original Froyo and Emotion Kernel sources
Seemingly lost from Huawei's site. Could not find the 2.6.32 kernel last i checked let alone 2.6.28
* Broadcom bcm4329 sources
Original upload by Huawei, suggest downloading all and comparing. Remember there being a problem with either of the files
Dev folder:
* Device-huawei-s7 / Hardware-qcom-display-s7 ( Codeurora 4.1.x / CM 10 (?) / JB)
To be compiled against a "M76XXUSNEKNLYA2515" Codeurora 4.1.x / CM 10 (?) / JB)
* Kernels
Latest 2.6.32.61 from me, suggest using the original config instead of the mine.
Earlier release of 2.6.35.14 - Should be stable but suggest github - https://github.com/threader/Huawei_S7_kernel_2.6.35 - again use your config!
What i think is the original Huawei S7 kernel just fixed to compile.
Codeaurora msm-2.6.32 - which i suggest grabbing this amongst others, if you want to start from scratch with kernel-2.6.32-FROYO.tar.bz2
* Broadcom - bcm4329
Unknown status, suggest a thorough look and compare against original Huawei - bcm4329 release.
* Codeaurora 4.1.x ( 4.1.1 ) M76XXUSNEKNLYA2515
Latest two experimental builds i could find
Codeurora-4.1.x-s7-nov-6-2013 was actually the last 4.1.1 date i found in my build directory, this may be wrong, but i uploaded what sees to be the last build i did really, but it might require 21-10-2013 boot.img to work.

[Kernel][Sony5.x]Zombie[10.04.16]

Zombie is a Kernel which extends the Xperia Z Ultra's capabilities.
It is aimed at including only useful and strictly tested features, enhancements and optimisations,
it will only receive useful CAF enhancements.
Important: I do not accept Bug reports when you are running a modified Rom or using Xposed!
Sidenote:
No Recovery will be added due to Sony's new bootloader which allows direct Recovery booting without hacking Ramdisk!
Features:
* Compiled with Google's AOSP GCC 4.8 and Size Optimisations (-Os) (for maximum stability)
* Sony RIC is disabled (hijacking is not possible anymore on newer fw's)
* Optional dt2w with adjustable haptical feedback
* Sweep2Sleep (works in Navigation and Status Bar)
* Automated current scaling for wled backlight (to fix ****ty standard brightness mapping)
* Optional Conservative devfreq GPU-Governor
* Togari is usable as Mouse/Keyboard for PC
* Faux' Sound Control 3.x (controllable via e.g. Fauxsound)
* KCAL Color Driver (Full RGB /Sat/Cont/Inv/Val/Greyscale Control)
* Tuned thermal configuration (less throtteling)
Additional changes of b9 upwards:
* Tightened security (e.g. patched rowhammer bug)
* Latest CAF fixes from the current branch and the most important ones from the latest CAF branch
* Speedbin/PVS exported to sys/kernel/debug/msm8974_cpuinfo
* Ext4 fs patched to latest 3.4.x (performance increase)
Downloads:
Legacy Build: Zombie-b8
Latest Build: Zombie-b9
Installation:
* Flash Kernel Package via Recovery (Not only the Boot Image via Fastboot: there are important scripts which need to be applied to ensure the Kernel works as intended).
Source:
Zombie Lollipop Kernel-Source @ Github
XDA:DevDB Information
Advanced Stock Kernel, Kernel for the Sony Xperia Z Ultra
Contributors
Tommy-Geenexus
Kernel Special Features:
Version Information
Status: Stable
Created 2015-05-28
Last Updated 2016-04-10
Reserved
Does it do anything for performance. I'm confused about the boot loader part. Can I still flash dual recovery with twrp manager if I use this kernel? Stable?
RealityFails said:
Does it do anything for performance. I'm confused about the boot loader part. Can I still flash dual recovery with twrp manager if I use this kernel? Stable?
Click to expand...
Click to collapse
Sony released a new bootloader, we can fastboot TWRP now. No need for other hacks (dualrecovery, etc..).
If you're on the old bootloader, i don't know if it works, i've never used stuff like dualrecovery.
Tommy-Geenexus said:
Sony released a new bootloader, we can fastboot TWRP now. No need for other hacks (dualrecovery, etc..).
If you're on the old bootloader, i don't know if it works, i've never used stuff like dualrecovery.
Click to expand...
Click to collapse
I'm not sure about old bootloader, I unlocked my bootloader on 4.4.4 with flash tool. Now I'm on stock 5.0.2
locked bootloader?
Tommy-Geenexus said:
Hi all,
The following Kernel builds are only suitable for Sony 5.02/Sony 5.02-based roms.
Sidenote:
This Kernel is aimed to give maximum security. It has some additional restrictions enabled to protect various parts.
RIC is left enabled to ensure maximum security, only change is that /system is writable, /data and /cache are still protected with flags.
I won't add many custom features, as Wifi breaks easily, i'll keep this as a security-enhanced Stock-based Kernel.
No Recovery will be added due to Sony's new bootloader!
Features:
* Compiled with GCC 4.8 AOSP Toolchain
* Sony RIC-Module enabled (but /system is r/w mountable)
* Sound Control 3.x
* Many security patches - this Kernel is aimed at maximum security
Todo:
* Add CPU-Boost (eventually)
* KCAL Color Driver
Downloads:
https://www.androidfilehost.com/?fid=23991606952611162
Installation:
Code:
fastboot flash boot boot.img
fastboot reboot
Source:
https://github.com/Tommy-Geenexus/android_kernel_sony_msm8974_togari_5.0.2/commits/master
XDA:DevDB Information
Advanced Stock Kernel, Kernel for the Sony Xperia Z Ultra
Contributors
Tommy-Geenexus
Kernel Special Features:
Version Information
Status: Stable
Created 2015-05-28
Last Updated 2015-05-28
Click to expand...
Click to collapse
i have locked bootloader on my c6833 ,can i flash this kernel? i dont want to unlock my bootloader yet.
Superb Azam said:
Hi all,
The following Kernel builds are only suitable for Sony 5.02/Sony 5.02-based roms.
Sidenote:
This Kernel is aimed to give maximum security. It has some additional restrictions enabled to protect various parts.
RIC is left enabled to ensure maximum security, only change is that /system is writable, /data and /cache are still protected with flags.
I won't add many custom features, as Wifi breaks easily, i'll keep this as a security-enhanced Stock-based Kernel.
No Recovery will be added due to Sony's new bootloader!
Features:
* Compiled with GCC 4.8 AOSP Toolchain
* Sony RIC-Module enabled (but /system is r/w mountable)
* Sound Control 3.x
* Many security patches - this Kernel is aimed at maximum security
Todo:
* Add CPU-Boost (eventually)
* KCAL Color Driver
Downloads:
https://www.androidfilehost.com/?fid=23991606952611162
Installation:
i have locked bootloader on my c6833 ,can i flash this kernel? i dont want to unlock my bootloader yet.
Click to expand...
Click to collapse
Nope, needs unlock.
Sound Control working perfect
Thanks
New build up.
Changelog:
* Added KCAL
* Removed eMMC Speed Cap
* Security Enhancements and physical memory protection
* Shrinked boot Image size by ~5Mb
Hey just a quick question about the sound control, can I use a kernel control app to increase/decrease gain???
zubeedubs said:
Hey just a quick question about the sound control, can I use a kernel control app to increase/decrease gain???
Click to expand...
Click to collapse
Yes.
Tommy-Geenexus said:
New build up.
Changelog:
* Added KCAL
* Removed eMMC Speed Cap
* Security Enhancements and physical memory protection
* Shrinked boot Image size by ~5Mb
Click to expand...
Click to collapse
Can you add these things please:
Kexec hardboot patch
DT2W
Intellidemand governor
I would be glad when you add these things
Thanks for your Hard work
V1 working good. No Problem.
Sound Control working good.
In the New build:
Kcal mod working good.
But my devices C6833 Crashed 4 Times in One Day.
Florian551 said:
Thanks for your Hard work
V1 working good. No Problem.
Sound Control working good.
In the New build:
Kcal mod working good.
But my devices C6833 Crashed 4 Times in One Day.
Click to expand...
Click to collapse
Alright, Kmesg please.
the-cortana-project said:
Can you add these things please:
Kexec hardboot patch
DT2W
Intellidemand governor
I would be glad when you add these things
Click to expand...
Click to collapse
Sorry, but none of these things will be added.
Tommy-Geenexus said:
Hi all,
The following Kernel builds are only suitable for Sony 5.02/Sony 5.02-based roms.
Sidenote:
This Kernel is aimed to give maximum security. It has some additional restrictions enabled to protect various parts.
RIC is left enabled to ensure maximum security, only change is that /system is writable, /data and /cache are still protected with flags.
I won't add many custom features, as Wifi breaks easily, i'll keep this as a security-enhanced Stock-based Kernel.
No Recovery will be added due to Sony's new bootloader which allows direct Recovery booting without hacking Ramdisk!
Features:
* Compiled with GCC 4.8 AOSP Toolchain
* Sony RIC-Module enabled (but /system is r/w mountable)
* Sound Control 3.x
* KCAL Color Driver
* Many security patches - this Kernel is aimed at maximum security
Todo:
* Add CPU-Boost (eventually)
* APQ-Hotplug
Downloads:
https://www.androidfilehost.com/?fid=23991606952613175
Installation:
Code:
fastboot flash boot boot-b2.img
fastboot reboot
Source:
https://github.com/Tommy-Geenexus/android_kernel_sony_msm8974_togari_5.0.2/commits/master
XDA:DevDB Information
Advanced Stock Kernel, Kernel for the Sony Xperia Z Ultra
Contributors
Tommy-Geenexus
Kernel Special Features:
Version Information
Status: Stable
Created 2015-05-28
Last Updated 2015-06-01
Click to expand...
Click to collapse
how to install sony new bootloader ?
and after installation my C6833 will be wipe??
Nimadroid said:
how to install sony new bootloader ?
and after installation my C6833 will be wipe??
Click to expand...
Click to collapse
I use Emma to install and no data will be wiped
destinygs said:
I use Emma to install and no data will be wiped
Click to expand...
Click to collapse
Tnx man a lot
And other question Emma dont send me verify email and I cant use that
C6802 GPE & 14.5.A.0.242 & unlocked bootloader.
Tommy-Geenexus said:
Hi all,
The following Kernel builds are only suitable for Sony 5.02/Sony 5.02-based roms.
Sidenote:
No Recovery will be added due to Sony's new bootloader which allows direct Recovery booting without hacking Ramdisk!
Created 2015-05-28
Last Updated 2015-06-01
Click to expand...
Click to collapse
This tutorial suit mine?
My XZU model is C6802 GPE with build number 14.5.A.0.242 and unlocked bootloader.
Thanks
My device is c6802......so i can't use the new bootloader because emma doesn't support it?????
Also about the kernel......can u plz make the selinux permissive by default????//

Wanted::Comprehensive Custom Kernel Development Guide Needed

Hey Fellow XDA Developers.....Sorry I've to start this thread due to a reason that I've toggled everywhere in existing guides & Threads but I'm fed up that none of them is comprehensive or Correct...
OK I want some of the answers to (I guess extremely silly) questions
Q.1:: So I want to Develop a Custom Kernel on Backbone of Aurora and stock Linux kernel. Any possible way how can i extract, mod ;
edit and add and recompile it.... any specific tools,links.(already visited android authority)
Q.2::Can anyone tell me where i can find additional "".KO"" files(Kernel object libraries/kernel expander)
Q.3::Since most apps have a <uses sdk> so it means somewhere in /root directory the sdk is save right so latest android like
lollipop has new revision of sdk. is his possible to copy kitkat and lollipop sdk files to system from Android studio(I know this
is the worst joke or some sort of question asked by a fool but still out of curiosity of my never ending thirst of development)
Q.4::Nowadays I'm in a Quest to develop a Custom ROM since my phone is "NOT EVEN UNOFFICIALLY PORTED".I tried finding
my phones stock ROM[Panasonic P81][Xda Forum of P81 is totally Crap](Some stupid guy modded and made it worst than
sh!t).I heard Rumour that my clone "Cool pad 7320" has CM 6 or 11 Successfully installed/flashed but referring to the website
I tried and Bricked it. (Ironically I'm now using that modded coolpad ROM by Xdafirmware.com)
Q.5::Can U Tell if I can flash Stock Marshmallow Nexus image on my phone!!!!!!!![greatest question] I'M Die Hard Fan Of
Marshmallow And can Brick my phone infinite times getting it..
Q.6::What happens if I Replace my Stock kernel with original Linux (the pc one) (that im having.) . Will it work,add functionality ,or
brick it.
=======System Specs=======
Device Name : Panasonic P81
Boot loader : Unknown.(Same for all Panasonic I guess)
Processor : Mediatek MT6592 @ 1.7 Ghz 8 cores 32 bit archetecture
Kernel version: 3.4.39 [email protected] #1
Custom Build : 1012
Android Version: 4.2.2 jellybean apl 17
RAM: 1 GB
MODEL/BUILD ID: EB-90S055P81V1012
Runtime: Dalvik(libdvm.so) version 1.6.0
Motherboard: yulong92_wet_jb9
Radio: MOLY.WR8.W1315.MD.WG.MP.V19.P2
SELinuxermissive by default (stock)
CPU ABI- Armeabi
Features: swp half thumb fastmult vfp edsp thumbee neon vfpv3 tls vfpv4 idiva idivt
BOGO MIPS: 1685.91
Kernel Feature: Entropy & SMP PREEMPT
Toolchain: dcc version 4.6.x-google 20120106(pre release) (GCC)
**NEON SUPPORTED
==eMMC==
Name: K7XVMB
==sensors==
1: BOSCH BMA056 3-AXIS Accelerometer
2:ROHM RPR 410 PROXIMITY SENSOR
3:ROHM RPR 410 LIGHT SENSOR
==GRAPHICS==
VENDOR-ARM
GPU Renderer- MALI 450 MP
OPENGL: OpenGL ES @.0
ShaderpenGL ES GLSL ES 1.00
*****Eagerly Awaiting for answers . Please a positive cheer ups will be appreciated I'm noob here :angel::highfive: [Not that extreme I've enough xp regarding flash,boot loop,recovery,porting etc. ]*****
Most guides for this are found here,
http://forum.xda-developers.com/chef-central/android
If none there are helpful, then I'm at a loss for a suggestion. There's a lot of resources in that link. :good:
You are gonna run into a ton of issues. First off the chip that device uses never releases kernel source. So that will put a stop to your work real fast.
As for some of the other questions.
No you can't put a stock Linux kernel on the device. Kernels are made for each devices. They don't all work on every device.
zelendel said:
You are gonna run into a ton of issues. First off the chip that device uses never releases kernel source. So that will put a stop to your work real fast.
As for some of the other questions.
No you can't put a stock Linux kernel on the device. Kernels are made for each devices. They don't all work on every device.
Click to expand...
Click to collapse
Hey my kernel by default is stock aosp Linux version 2.4.39
Tanmoy Mitra said:
Hey my kernel by default is stock aosp Linux version 2.4.39
Click to expand...
Click to collapse
And the original revision of Linux I'm referring is the one created by Linus torlavads that is backbone of PC platform of Ubuntu, KDE and many other operating system. OK Aurora kernel is out of date and no support is available but I'm impressed by or rather moved by its spects and I feel that it is fantastic kernel to start with....... I just want to modify and continue from where he left a full stop to support. Many user still uses Aurora and there exist a hidden community about it.I WANT TO PROVIDE THE UPDATES AND SUPPORT OR WANTED TO DEVELOP A NEW KERNEL. OK on my 15 day research over kernel I found it is best kernel with a negligible cons and many features to opt within. Tell me which kernel can give me 16+ Governors and 9 scheduler and 6 TCP congestion algorithm to play with. With NEON and selinux support init.d and best battery backup among other kernel without even compromising a bit on graphics and rendering......Tell me
Tanmoy Mitra said:
And the original revision of Linux I'm referring is the one created by Linus torlavads that is backbone of PC platform of Ubuntu, KDE and many other operating system. OK Aurora kernel is out of date and no support is available but I'm impressed by or rather moved by its spects and I feel that it is fantastic kernel to start with....... I just want to modify and continue from where he left a full stop to support. Many user still uses Aurora and there exist a hidden community about it.I WANT TO PROVIDE THE UPDATES AND SUPPORT OR WANTED TO DEVELOP A NEW KERNEL. OK on my 15 day research over kernel I found it is best kernel with a negligible cons and many features to opt within. Tell me which kernel can give me 16+ Governors and 9 scheduler and 6 TCP congestion algorithm to play with. With NEON and selinux support init.d and best battery backup among other kernel without even compromising a bit on graphics and rendering......Tell me
Click to expand...
Click to collapse
I know what you are talking about and it won't work. Each device kernel is different from each other. Android is not the same as a desktop Linux set up. Also kernels differ from one pc to another.
As for those options you will have to add them yourself.
Again without the kernel source For that device being released you are out of luck.
zelendel said:
You are gonna run into a ton of issues. First off the chip that device uses never releases kernel source. So that will put a stop to your work real fast.
As for some of the other questions.
No you can't put a stock Linux kernel on the device. Kernels are made for each devices. They don't all work on every device.
Click to expand...
Click to collapse
Well I set to build it and yes I FOUND THE SOURCECODE FINALLY!!! although not for my board and device... While my device is Panasonic P81 and board is: yulong92_wet_jb9 the source was of Gionee Elife S5.5 same processor and features. But marked as board: vanzo92_wet_jb9
I don't think it will be issue, also found out that my device can support FDD LTE (VoLTE too) but needs a port from mt6595(helio x10)
[MT 6575 = LTE BASEBAND OF MT6590 + OCTA CORE architecture of MT6592 WHICH I USE]
So your help will be appreciated:good::laugh:
Sent from my Panasonic P81 using XDA Labs

[KERNEL][DEV][3.4+] U8500 Linux kernel upgrading project

Hello!
This is a development thread for the project of upgrading of the Linux kernel for the U8500 platform.
Builds provided here (at the moment of writing this message) are not considered to be used as a daily driver, by any means, - these are rather a dev preview versions.
For now, there are a several LK builds (the highest currently supported kernel version is 3.10).
Because builds here are really not stable, I'll just leave a disclaimer here.
Code:
#include <std/disclaimer.h>
/*
* I am not responsible for bricked devices, dead SD cards, thermonuclear
* war, or the current economic crisis caused by you following these
* directions. YOU are choosing to make these modificiations, and
* if you point your finger at me for messing up your device, I will
* laugh at you.
*/
Working features
RIL
Camera (front & rear) - only works in <3.8
Video (playback & recording)
Audio (playback & recording)
Wifi
Bluetooth (broken in >=3.8, needs a workaround to manually startup)
USB, ADB
Tethering (not tested)
GPS (not tested)
Sensors
Known bugs
IRQs are mishandled by some device drivers (abb_btemp, abb_fg)
proximity sensor might not work (not tested, cause it's broken on my device)
deep sleep might not work at a times
MMC driver works unreliably in >=3.8 (contiguous usage might lead in a data corruption)
networking is not fully-functional (no mobile data)*
camera is broken in 3.8
*some other features of the android kernel might not present - it's because these kernels lacks android-specific patches.
Sources
LK 3.5
LK 3.6
LK 3.7
LK 3.8
LK 3.9
LK 3.10
Downloads
http://xda.mister-freeze.eu/XDA-files/ChronoMonochrome/misc/upgrading
Installation
install chrono kernel r5.2 or higher (this is needed to pick up the necessary scripts, incl. bootscripts, etc)
reboot to recovery
install build linked in "Downloads" section
Credits
Linux kernel development community
Google
ST-Ericcson
Samsung
Team Canjica
XDA:DevDB Information
U8500 Linux kernel upgrading project, Kernel for the Samsung Galaxy Ace II
Contributors
ChronoMonochrome
Kernel Special Features:
Version Information
Status: Alpha
Created 2017-05-09
Last Updated 2017-05-10
Reserved
Porting
The porting a higher kernel version tehnique I'll describe here is not intended to be a guide for dummies. I'll assume you've already built a kernel for your device, familiar with git versioning control usage and with some porting / coding tehniques.
Firstly, you need a cleaned source for your device. By "cleaned" I mean, there are no Linux incremental patches, android changes applied, manufacture-specific patches are avoided when possible and so on - you need sources as closest to a "pure" Linux kernel as possible. Otherwise you'll have later need to deal with conflicts resolution, you'll most likely be unable to resolve and the kernel won't boot.
So, without a further forewords, the tehnique is below:
1) As was previously mentioned, a clean kernel source is required, I'll assume we are starting from LK-3.4 ( https://github.com/ChronoMonochrome/Chrono_Kernel-1/commits/ea228ee0f5e9935841aff25c62fa163cd78dc01d ) and porting a higher kernel versions. A kernel base needs to be tested for any bugs just to distinguish, which bugs were intruduced during porting from those ones that already present in a kernel base.
2) The following steps will mostly use git bisect and git merge commands in order to merge all the changes from a higher kernel versions and help to find / resolve the bugs that were introduced. I suggest copying a git kernel repo that you use for building to a somewhere else, so you can use it , e.g. for grepping a different versions source, bisecting the revisions and so on, so don't need to bother messing up in your main repo that you use for build.
3) Firstly, lets just try to merge a higher kernel version, e.g. LK 3.5 by issuing a command git merge lk-3.5. You'll likely have a lot of merge conflicts, most of which you can resolve with resetting the paths to a some revision (either a kernel base - lk 3.4, or the version you do port, or just another suitable conflict resolution). So I suggest to write those paths to a text file, like so:
Code:
arch/arm/boot
arch/arm/mach-ux500
arch/arm/plat-nomadik
drivers/mmc
include/linux/mmc
drivers/usb
include/linux/usb
drivers/mfd
include/linux/mfd
...
Write all the paths you intend to reset to the kernel base, you most likely need to re-use them later. To actually perform a resetting source, you can issue
Code:
for path in $(cat file_with_a_paths.txt | xargs)
do
git checkout COMMIT $path
done
Be sure not to put to this file anything not the device-specific! Resetting to the kernel base should be avoided when possible (never ever try resetting archictecture-specific paths, e.g. arch/arm/kernel, arch/arm/mm and so on - unless you really know that kernel will boot thereafter, instead, you have to manually resolve such conflicts). Resolve any other conflicts by resetting paths to the porting source (e.g. LK 3.5).
Note. While resetting with a paths is probably not the most accurate tehnique, but people don't live that long to use more accurate approach, e.g. performing git cherry-pick for every upstream commit and then manually resolving all the conflicts, you'll just sooner or later get bothered and will abandon it.
4) When you're done with the previous steps you can try building kernel. You'll likely have a build errors - because some part of a source got not updated (e.g. the device-specific drivers), you need manually implement the necessary by a higher kernel version changes. Firstly check if an upstream kernel contains the necessary fixes (example: https://github.com/ChronoMonochrome/Chrono_Kernel-1/commit/9fae8c449b710f502662da1cbcf26ece5a098af9 , https://github.com/ChronoMonochrome/Chrono_Kernel-1/commit/fe027c25d6db0d100937deb5248e249ec5b24ee7 ). If the driver you are porting doesn't exist in the upstream, you can also try to find a similar change and mimic it: https://github.com/ChronoMonochrome/Chrono_Kernel-1/commit/5f2e7afbf2ac3284dc62b3d96a0627c7f99ed4e9 ( ported similarly to https://github.com/ChronoMonochrome/Chrono_Kernel-1/commit/526c597 ). In the worst case scenario you will need to examine the upstream changes and apply the changes so that the drivers complies to the upstream changes: https://github.com/ChronoMonochrome/Chrono_Kernel-1/commit/ea6432d167 .
5) If everything is done properly and you're lucky enough, the compiled kernel might already bootup. If not, you'll need to find a culprint that doesn't let the device to boot up. Switch to a copy of your kernel sources, reset the source to the base kernel version (e.g. LK 3.4), issue git bisect good, then issue git bisect bad lk-3.5, git will reset to a somewhere in a middle between of LK 3.4 and LK 3.5.
6) Save your changes in the kernel repo, by assigning a some branch to it, switch to the source base, merge all the fixes you've already introduced, then merge the revision you have got in the previous step by bisecting the tree. Repeat these steps until you'll find a first bad commit.
7) If you are already on this step, the most trickiest part starts here - testing (hopefully) working kernel for bugs (if any). While logs can be useful sometimes (so you can google the failing messages and find something useful), there are also many bugs you can find only performing git bisect tehnique decribed above.
The decribed algorithm only possible thanks to having a clean kernel source. The usage of this guide is not limited only to the kernel porting, it can be used on other projects as well, this is just what I've come across to, when I've ever started porting Linux kernel versions higher than LK3.4.
Reserved
I wonder if any of this expertise couldn't look pretty cool here too.
Wooooowwwewe
Oooh
Look whose good boys have been trying to win the STE mastermind prize as of lately
https://github.com/novathor-mainline/linux
https://git.kernel.org/pub/scm/linu...inux-nomadik.git/log/?h=ux500-skomer-v5.5-rc1
mirhl said:
Oooh
Look whose good boys have been trying to win the STE mastermind prize as of lately
https://github.com/novathor-mainline/linux
https://git.kernel.org/pub/scm/linu...inux-nomadik.git/log/?h=ux500-skomer-v5.5-rc1
Click to expand...
Click to collapse
Seriously!
mirhl said:
Oooh
Look whose good boys have been trying to win the STE mastermind prize as of lately
https://github.com/novathor-mainline/linux
https://git.kernel.org/pub/scm/linu...inux-nomadik.git/log/?h=ux500-skomer-v5.5-rc1
Click to expand...
Click to collapse
Wow, that's incredible
Exynos4412 already got some mainline support, it would be very nice to have this one supported too.
Aaaaand it's done, kinda.
ST-Ericsson NovaThor U8500 - postmarketOS
wiki.postmarketos.org
device/testing/linux-postmarketos-stericsson · master · postmarketOS / pmaports · GitLab
postmarketOS package build recipes
gitlab.com

Development [Kernel][12.04.2023][Android 13] Kirisakura 3.0.1 for Sony Xperia 1 III aka "Sagami"

Kirisakura-Kernel for the Sony Xperia 1 III
Hello everyone,
To keep it short: Here is Kirisakura - Kernel for the Sony Xperia 1 III aka Sagami. Sagami is the internal codename for this years development platform of Sony Mark III devices. Please note this kernel is made to run only on Xperia 1 III.
I would appreciate if everybody that flashes the kernel, reads at least once through this opening post and the following ones.
Kirisakura - Kernel is designed to bring a handful of beneficial features to the device, while ensuring excellent performance and smoothness to get you safely through the day!
If you expect a custom kernel to magically improve your devices battery life manifold and this is your only priority then this might not be the right place for you.
However the kernel is built to keep battery life close to the same as you would experience the on stock kernel while being tuned to perform better in various UI related benchmarks. The same benches are used by google to verify and ensure UI smoothness on the Pixel devices.
There´s also a cpu-battery saver mode that cuts back the CPU max- freqs, but without the disadvantages like delayed notifications from built into the system user-space power-saving modes.
If that got your curious, I welcome you to continue reading if you´re still interested!
The kernel includes a lot of improvements and contributions from other developers as well. Without this kernel would not exist.
A big part of improvements originate from @arter97´s, @kdrag0n´s and @Sultanxda´s work. Many others contributed in some way or another to this kernel.
A big thanks to all of them at this place!
Now lets continue with a list of features in the next paragraph!
Main Features:
- Based on latest kernel sources from Sony for Android 12 and intended to be used on the latest Stock-Firmware
- compiled with Clang 14.0.7 and built with -O3 speed optimizations
- Linux-Stable-Upstream included to 5.4.202
- upstreamed CAF base for the Snapdragon 888 (qcoms internal codename "lahaina")
- CPU-Battery saver to be able to restrict max cpufreqs on the fly, without enabling powersaving modes that might cause missed notifications (more info here)
- include important fixes/improvements from kernel/common
- reduce power consumption during deep sleep
- remove logging while device is suspended
- add SSG-IO scheduler from samsung (less overhead, better tuned towards android)
- disable various debugging mechanisms for drivers which are not needed on a perf build (e.g. binder)
- disable selinux auditing (we don´t have to adress selinux denials running a stock rom)
- disable unnecessary CPU errata for our specific SoC
- implement LRNG (thanks @arter97, see arter kernel OP for more info )
- Flashing the kernel will keep root!
- Flashable via EXKM, FKM or TWRP (if available) on a rooted system!
EAS related features:
- Implement dynamic WALT-Window size depending on current FPS, collecting information about CPU-Load to provide more precise information for the scheduler
- EAS implementation patched up to latest CAF state
- updates from kernel/common
- scheduler updates from sd888/ 5.4 kernel
CPU related features:
- Power saving workingqueues enabled by default (toggleable in EXKM)
- Change various drivers (WLAN, MM, audio, charger, power, thermal, glink etc) to use power efficient workingqueues. This compliments EAS in general
- improvements to cpufreq/times/stats
- vdso32 patches as found on Google Pixel devices (brief documentation here) (CAF 5.4 default, keep for documentation)
- remove event debug logging
- disable broken irq detection, disable debugmon
- improve suspend/resume from audio driver (caf-upstream for audio-kernel)
- cpuidle: wake only cpus for which qos has changed (this allows cores to keep idle states better)
- disable debugging during sleep states as per qcom recommendation
- remove RTB logging to reduce overhead
- disable trace_printk as it shouldn´t be used on production/perf kernel builds
- enable suspend_skip_sync to save power during suspend/resume
- disable edac and coresight (following google on the pixel kernels)
- disable jtagv8 debugging as recommended by qcom for perf builds to avoid potential power, performance and memory penalty
- disable s2idle in favor of deep idle state -> improves deep sleep drain (google initially used 2idle for improved suspend/resume latency on pixel 3 and pixel 4, but disabled it on pixel 5. qcom followed suit for sd 888, but apparently didn´t see google reverting it on pixel 5. Other OEMs such as Xiaomi or OnePlus already disabled s2idle on their SD888 devices in favor of deep- read more about s2idle vs deep here)
GPU related features:
- GPU driver updated to latest CAF-State
- gpu/kgsl improvements from pixel 4/pixel 5 kernel
- add low_prio_worker thread for gpu driver (Improves performance when tearing down processes (eg, via LMK) and not blocking currently running UI from submitting work to the GPU
File System related features:
- upstream BFQ-MQ to latest state in linux-mainline and default to 128KB readahead
- improve memory allocations in kernfs
- ufs improvements from pixel 4/ pixel 5 kernel
- improve GC as to not interfere while user interaction is happening and prevent possible jitter or latency spikes
Network related features:
- Wireguard Support (Details)
- advanced TCP algorithms enabled
- use bbr as default TCP congestion algorithm (fasted algo according to this excellent research from @kdrag0n found here )
- improved networking drivers from caf-upstream (especially wifi)
- remove unnecessary wakelock from WLAN driver to reduce thousands of very short wakeups during a 7 hour deep sleep period
- improved bluetooth performance (¹, ²)
- Enable support for TTL spoofing
Memory related features:
- Speculative Page Faults left enabled (1. 2) (CAF 5.4 default, keep for documentation)
- Fix various memory leaks in different subsystems
- improved mm with patches from mainline
- patches from kernel/common
- improve memory allocations in various subsystems, video encode/decode, kernfs, cgroup
- Backport to enable CONFIG_HAVE_MOVE_PMD (see here) , thanks @arter97
- Backport to enable CONFIG_HAVE_MOVE_PUD (commit here) , thanks @arter97
- free more RAM by removing unused reserved memory regions
- mm: Micro-optimize PID map reads for arm64 (improves game performance, especially unity based games such as genshin impact)
- MGLRU added (info here and here
Security related features:
- Control-Flow-Integration (CFI) and Link-Time-Optimization (LTO) (CAF 5.4 default, keep for documentation)
- Use ThinLTO which was first used in the Pixel 4 XL Android R-Kernel instead of full LTO (CAF 5.4 default, keep for documentation)
- Shadow Call Stack (SCS) Security-Feature ( 5.4 default, keep for documentation)
- enable init_on_alloc for even more security, more information can be found in the commit message (CAF 5.4 default, keep for documentation)
Misc Features:
Wakelock Blocker:
- advanced wakelock blocker with the ability to block any wakelocks (dangerous, use with caution)
- please read [URL="https://arstechnica.com/gadgets/2018/08/p-is-for-power-how-google-tests-tracks-and-improves-android-battery-life/"]this for further info
- blocking a kernel wakelock should only be done in case of firmware incompatabilities (WiFi network at work (can´t be changed) causes deep sleep to not work on the phone.) That´s the only use case I see for this feature. The kernel does not features this to improve battery life!
Other features:
- clean up asus drivers and fix a few warnings in kernel log
- disable logging and debugging to make the kernel more lightweight in various places (includes binder, mm, vma, gpu, ipa etc)
- fix several coding issues detected by newer Clang-Toolchains
- enlarge dmesg size to ease debugging
Flashing Guide, Download and Changelog
Requirements:
- unlocked Bootloader
- USB-Debugging in developer options enabled
- latest adb and fastboot binaries
- working adb and fastboot environment
- magisk root
- a backup of stock boot.img or your magisk patched boot.img in case you want to go back to stock.
How to flash the Kernel:
1. Download the latest kernel.zip and make sure you have properly updated to the latest matching Firmware (check the feature list for the current firmware the source is based on). When there´s an OTA update for the Sony Xperia 1 III it takes Sony a while to release the source code for the new OS and me a while to build a new kernel. If you don´t want to face any issues, wait until I either release an updated kernel or give green light because there were no kernel changes.
If you want to be sure there are no issues, always make sure to run the firmware the kernel is built for!
If you feel adventurous and try in advance, make sure you have a backup ready!
2. Flash the kernel.zip via latest TWRP (if available), EXKM or FKM app and do a full reboot.
3. Reboot and profit.
DOWNLOAD:
Download is located always in this folder:
https://www.androidfilehost.com/?w=files&flid=331114
Or attached to the release post starting with Android 13 as AFH is currently not working correctly
Important: Read after Download
Please take a look at the second post after flashing the kernel!
Changelog:
Android 11
1.0.0 Initial Release
1.0.1 https://forum.xda-developers.com/t/...xperia-1-iii-aka-sagami.4377449/post-86140929
Android 12
2.0.0
[Kernel][02.07.2022][Android 12] Kirisakura 2.0.0 for Sony Xperia 1 III aka "Sagami"
Kirisakura-Kernel for the Sony Xperia 1 III Hello everyone, To keep it short: Here is Kirisakura - Kernel for the Sony Xperia 1 III aka Sagami. Sagami is the internal codename for this years development platform of Sony Mark III devices. Please...
forum.xda-developers.com
Android 13
3.0.0 https://forum.xda-developers.com/t/...xperia-1-iii-aka-sagami.4377449/post-88048199
3.0.1 https://forum.xda-developers.com/t/...xperia-1-iii-aka-sagami.4377449/post-88404445
Donations:
Donations are not mandatory but very welcome if you want to support development or just buy me a coffee/tea
If you like my work: http://paypal.me/freak07
Credits:
Sony for the development device, giving me the opportunity to create this project!
@osm0sis for all his work, including the ak3 installer!
@tbalden for being the best HTC, Pixel, OnePlus and now Asus wingman!
@LeeDroid and @mwilky for their awesome roms and work I used on multiple devices!
@Captain_Throwback for all the mentoring and guidance!
@Eliminater74 for bringing me into the game and the Inspiration
@nathanchance for his upstream guidance and assistance
@RenderBroken for helping me out
@flar2 for all his work
@joshuous for all the help he provided to me in the past!
@arter97 for giving me advice
@kdrag0n for his help and advices!
@topjohnwu for magisk!
Source Code: https://github.com/freak07/Kirisakura_Sagami
F.A.Q:
Question: Is root preserved when flashing this kernel?
Answer: Yes, the AnyKernel.zip will detect root and keep it.
Question: Safetynet does not pass on my phone since I unlocked the phone, why is this so?
Answer: Google introduced hardware backed attestation recently. Unfortunately the old kernel tricks to still get safetynet passing won´t work. Instead you will have to rely on some magisk modules. Short guide in post #4 below.
Question: How do I return back to stock or another kernel.
Answer: Extract boot.img from the matching firmware you are on (you can do so by using this tool or similar ones found on XDA and when googling around) and flash them via fastboot. If you want to keep root flash back the magisk_patched_boot.img. Or dirty flash your rom and re-root.
Question: Why is having Magisk installed mandatory for this kernel?
Answer: The kernel uses a ramdisk overlay to apply some settings after boot. If you are not rooted these settings will not get applied and you miss some of the optimizations.
Question: How to report bugs properly?
Answer: Have a look at post #3 in the linked thread. The linked guide is a pretty good starting point.
Before reporting any bug make sure you´re running on a stock configuration. That´s means you´re not using any mods, tweaks in kernel managers or other root tweaks , magisk modules, scripts or other modifications that alter various functions like sound mods, data traffic, sleeping behaviour, scheduler, magical battery tweaks etc.
Try to describe the issue as detailed as possible! Give your exact setup, like rom, magisk version, kernel version.
Is the issue reproducible? Does it happen frequently?
Please make sure to meet the points described above, provide logs as detailed in the link above, otherwise debugging is a lot more time consuming and harder. (kernel flashing apps usually support exporting logs of flashes too) If these requirements aren´t met and I don´t find time to either reproduce the issue myself or I´m not able to reproduce the issue myself, reports might just be ignored. If you can already reproduce the issue and provide logs it greatly limits the amount of time I have to spent until I figure out how to reproduce it.
If the device force reboots/randomly reboots (that means you see the bootloader unlocked screen!) provide a .zip of /asdf.
Easiest way is immediately after booting up, with a root explorer navigate to /asdf. Copy the contents to your internal storage, zip it up and send it to me.
If the issue happens while the device is running provide a dmesg plus a logcat that you take while/shortly after the issue happens. This will log what´s running in the current session. Try to be as detailed as possible what´s happening when the issue appears. It will also help me in reading the log!
Feature Documentation:
Here´s a brief documentation about some of the features included in the kernel that can be changed as the user desires.
They can be accessed via either terminal, scripts or for example EXKM manager ( tools -> user settings).
CPU-Frequency Limiting:
Another option is CPU-Freq Limiting. You can now limit the CPU frequency to a few different levels with a sysfs interface. Original implementation is from @tbalden, I only changed it to be accessible via traditional root methods.
Main Switch:
sys/module/cpufreq/parameters/batterysaver
Set this option to "1" to enable the feature
Max-Frequency Selection (Input boosts, such as scrolling boost or app launching boosts will still apply, if touch boost restriction is not set to 1)
sys/module/cpufreq/parameters/batterysaver_level
Set this to "1" to restrict the max CPU-Freqs to 1,7GHZ/2,1GHZ/2,49GHZ (Little Cluster/Big Cluster/Prime Core)
Set this to "2" to restrict the max CPU-Freqs to 1,6GHZ/1,7GHZ/2,0GHZ (Little Cluster/Big Cluster/Prime Core)
Set this to "3" to restrict the max CPU-Freqs to 1,49GHZ/1,4GHZ/1,6GHZ (Little Cluster/Big Cluster/Prime Core)
Touch-Boost Restriction
sys/module/cpufreq/parameters/batterysaver_touch limiting
Set this to "1" to restrict the powerhal from boosting over the limit defined in batterysaver_level
Set this to "0" to allow the powerhal to boost above the values defined in batterysaver_level, but only during interaction with the Phone!
Screenshots:
View attachment 5309899View attachment 5309901View attachment 5309903
This is for example very useful during gaming to prevent additional heat, if not the highest performance from the CPU is required. Check if the game is running fine on level 1 or 2, and you´ll notice much less heat. Powerdraw will be reduced as well.
Another very useful trick while doing video calls or long extended navigation sessions with google maps to preserve battery or keep the phone from heating. Especially during summer if the ambient temperatures are high.
This is a very easy way to preserve battery or reduce heat without toggling the battery save mode in settings as that restricts background data usage, which can lead to delayed notifications.
How to pass Safetynet after unlocking the bootloader
With the introduction of hardware backed safetynet attestation, passing safetynet has become a lot more complicated.
Some probably remember a while ago, flashing a kernel that forced some flags was enough to pass it. However these days are gone.
Below is a short guide how to pass safetynet on phones that are flagged to use HW attestation (such as the ROG 5).
1. Make sure you´re running latest magisk canary.
2. In Magisk Manager enable both zygisk and deny list.
4. Download the latest Universal Safety Net Fix from @kdrag0n ´s github for zygisk cand flash it in Magisk Manager. Reboot.
5. Profit
this one is the last one
Freak07,
Please not this kernel is made to run only on Xperia 1 II
Click to expand...
Click to collapse
I guess it should be "Please note this kernel is made to run only on Xperia 1 III"
By the way, is there any plans to make same kernel for 5 III ?
Source Code: https://github.com/freak07/Kirisakura_Sagami
Click to expand...
Click to collapse
Leads me to nowhere (404).
dron39 said:
Freak07,
I guess it should be "Please note this kernel is made to run only on Xperia 1 III"
By the way, is there any plans to make same kernel for 5 III ?
Leads me to nowhere (404).
Click to expand...
Click to collapse
Fixed the typos and the link.
No, I only have the Xperia 1 III to work on.
Amazing work mate, very meticulous tuning. Would love to have this kernel on the 5 III. I understand the device architectures are quite similar?
treff89 said:
Amazing work mate, very meticulous tuning. Would love to have this kernel on the 5 III. I understand the device architectures are quite similar?
Click to expand...
Click to collapse
I asked the same question above
And unfortunatelly Freak07 do not support 5 III because he doesn't have it. Hope someone else could transfer his patches and things to 5 III.
Thanks for the kernel. However after installing the kernel my SD card gave an error. It says issue with the SD Card tap to fix and then asks me to format it?
BlazingKahn35 said:
Thanks for the kernel. However after installing the kernel my SD card gave an error. It says issue with the SD Card tap to fix and then asks me to format it?
Click to expand...
Click to collapse
I see. Thanks for the report!
I think i know whats up. They use a proprietary driver for exfat formatted sdcards ( I assume yours is formatted as exfat?) so it's not included in the source i build the kernel from.
I don't use a sdcard, that's why I missed it.
treff89 said:
Amazing work mate, very meticulous tuning. Would love to have this kernel on the 5 III. I understand the device architectures are quite similar?
Click to expand...
Click to collapse
dron39 said:
I asked the same question above
And unfortunatelly Freak07 do not support 5 III because he doesn't have it. Hope someone else could transfer his patches and things to 5 III.
Click to expand...
Click to collapse
They are similar, but I can't support a device i don't own. I also lack the time to do any remote debugging.
The phones however are similar as you mentioned, so if somebody is interested in starting to work on it all my work is up on GitHub. That might make it a lot easier than it would be otherwise.
Freak07 said:
I see. Thanks for the report!
I think i know whats up. They use a proprietary driver for exfat formatted sdcards ( I assume yours is formatted as exfat?) so it's not included in the source i build the kernel from.
I don't use a sdcard, that's why I missed it.
Click to expand...
Click to collapse
Yes mine is exfat since it's 256gb but not a big issue. I just transferred all my files to PC formatted the SD and transferred back now it works.
Also I'm using forced 4K all the time. But the only downside is the slowing down of the FP sensor. I think it's a kernel panic can you look in to that also maybe? (It was also slow on stock kernel)
Dear developer, if there is an opportunity, I would like to receive a kernel for PRO-I products!
I promise to donate
Update to 1.0.1
Good morning everybody,
thanks to @BlazingKahn35 ´s report exfat formatted sdcards are now working fine again.
Included an open source driver, that spoofs texfat support (the proprietary exfat driver) once an exfat sdcard is detected.
Download link can be found in the OP.
BlazingKahn35 said:
Also I'm using forced 4K all the time. But the only downside is the slowing down of the FP sensor. I think it's a kernel panic can you look in to that also maybe? (It was also slow on stock kernel)
Click to expand...
Click to collapse
Not sure what you mean. A kernel panic crashes the device so that it reboots.
The fingerprint scanner works fine for me. I place my finger on it, it scans and proceeds to unlock. It's not the fastest around, but it's quick enough for me.
Also used the adb commands to enable 4k and the speed of the fingerprint sensor stayed the same on my end.
I noticed just as I woke up that my phone was charged to 100%. Did you removed battery care from the kernel?
Freak07 said:
Not sure what you mean. A kernel panic crashes the device so that it reboots.
The fingerprint scanner works fine for me. I place my finger on it, it scans and proceeds to unlock. It's not the fastest around, but it's quick enough for me.
Also used the adb commands to enable 4k and the speed of the fingerprint sensor stayed the same on my end.
Click to expand...
Click to collapse
For me there is a big delay sometimes. Do you have AOD enabled?
BlazingKahn35 said:
I noticed just as I woke up that my phone was charged to 100%. Did you removed battery care from the kernel?
Click to expand...
Click to collapse
Not intentionally no. It might be not enabled the way I built the source or i need to see if the drivers is available somewhere else to be able to build it in.
I'll play around with it the next few days, see if I can reproduce the issue and find what's missing or broken. Thanks for the report again.
BlazingKahn35 said:
For me there is a big delay sometimes. Do you have AOD enabled?
Click to expand...
Click to collapse
Not constant AOD. Only waking to AOD screen when lifting the phone is enabled.

Categories

Resources