[DEV][KERNEL]Kexec-hardboot patch - Sony Xperia M

I would like to explain this a little bit:
What is kexec?
It is a function which allows you to boot an alternative kernel without needing to flash it or using `fastboot boot`. I am not going to write a thousand words to explain this, so if you want more info, search it yourself.
What is kexec hardboot?
It does the same as what kexec aims to do, but instead of booting another kernel directly, it reboots the device before doing so so that the hardware can be reinitialized by the bootloader. Normal kexec boots the kernel with the hardware in an unclean state, which is not very healthy. Kexec hardboot is somehow healthier.
I know I am not explaining very well, so please refer to the original thread by @Tasssadar
So what is this post about?
At this moment, there aren't any non-stock ROM, CAF or CM kernel isn't ported yet, so this is pretty useless actually.
In the future, if there are any custom ROMs, this will come in handy because it will allow "installing" multiple ROMs without having to flash them to the device memory.
Basically, this is just to prepare for the future.
Who should be reading this?
Well, developers who can properly compile a kernel.
Patches:
Kernel patch: https://gist.github.com/alvinhochun/7945428
Or, if you cloned my github stock kernel tree, check this: https://github.com/alvinhochun/sony-xperia-m-kernel/commit/2e818d81f21f6a627bc629e477052045426b0663
This is the kernel patch. Only the host kernel needs to be patched.
Related CONFIG options:
CONFIG_KEXEC=y
CONFIG_KEXEC_HARDBOOT=y
CONFIG_ATAGS_PROC=y
All these options must be enabled.​
Userspace kexec binary: Use the one compiled by @Tasssadar on http://forum.xda-developers.com/showthread.php?p=46223952​
Usage:
I have wrote a simple shell script to automatically set the correct cmdline here:
https://gist.github.com/alvinhochun/7945270
Basically, the most important thing is to make sure the addresses are correct and the cmdline has the proper information in it.
The script requires kernel to be packed with CWM which also provides /boot/busybox. You can use this tool: http://forum.xda-developers.com/showthread.php?t=2481864
Just download the kexec binary and put it in place.
Authors:
This patch was made by Mike Kasick for Samsung Epic 4G. Since that, it was ported to several devices.
My patch is based on the one by @Tasssadar on http://forum.xda-developers.com/showthread.php?p=46223952

So, are this is like 'Live CD' for android?

Richardsentosa said:
So, are this is like 'Live CD' for android?
Click to expand...
Click to collapse
Well, that analogy can't exactly be used. It's more like the kernel acts as a bootloader that is used to boot another kernel.

alvinhochun said:
Well, that analogy can't exactly be used. It's more like the kernel acts as a bootloader that is used to boot another kernel.
Click to expand...
Click to collapse
after see N4 multiboot, i think this is a great feature.

alvinhochun said:
I would like to explain this a little bit:
What is kexec?
It is a function which allows you to boot an alternative kernel without needing to flash it or using `fastboot boot`. I am not going to write a thousand words to explain this, so if you want more info, search it yourself.
What is kexec hardboot?
It does the same as what kexec aims to do, but instead of booting another kernel directly, it reboots the device before doing so so that the hardware can be reinitialized by the bootloader. Normal kexec boots the kernel with the hardware in an unclean state, which is not very healthy. Kexec hardboot is somehow healthier.
I know I am not explaining very well, so please refer to the original thread by @Tasssadar
So what is this post about?
At this moment, there aren't any non-stock ROM, CAF or CM kernel isn't ported yet, so this is pretty useless actually.
In the future, if there are any custom ROMs, this will come in handy because it will allow "installing" multiple ROMs without having to flash them to the device memory.
Basically, this is just to prepare for the future.
Who should be reading this?
Well, developers who can properly compile a kernel.
Patches:
Kernel patch: https://gist.github.com/alvinhochun/7945428
Or, if you cloned my github stock kernel tree, check this: https://github.com/alvinhochun/sony-xperia-m-kernel/commit/2e818d81f21f6a627bc629e477052045426b0663
This is the kernel patch. Only the host kernel needs to be patched.
Related CONFIG options:
CONFIG_KEXEC=y
CONFIG_KEXEC_HARDBOOT=y
CONFIG_ATAGS_PROC=y
All these options must be enabled.​
Userspace kexec binary: Use the one compiled by @Tasssadar on http://forum.xda-developers.com/showthread.php?p=46223952​
Usage:
I have wrote a simple shell script to automatically set the correct cmdline here:
https://gist.github.com/alvinhochun/7945270
Basically, the most important thing is to make sure the addresses are correct and the cmdline has the proper information in it.
The script requires kernel to be packed with CWM which also provides /boot/busybox. You can use this tool: http://forum.xda-developers.com/showthread.php?t=2481864
Just download the kexec binary and put it in place.
Authors:
This patch was made by Mike Kasick for Samsung Epic 4G. Since that, it was ported to several devices.
My patch is based on the one by @Tasssadar on http://forum.xda-developers.com/showthread.php?p=46223952
Click to expand...
Click to collapse
can we use this to boot cm10 cm11 on sony Xperia z?

nabelar82 said:
can we use this to boot cm10 cm11 on sony Xperia z?
Click to expand...
Click to collapse
I guess you are mislead this is a kernel feature and is not at all related to booting of a rom

SpinXO said:
I guess you are mislead this is a kernel feature and is not at all related to booting of a rom
Click to expand...
Click to collapse
Well I read that but I been looking the way that we can install cm11 on our xperia z with locked bootloader and this seems to help cause we can't flash boot img on locked bootloader

nabelar82 said:
Well I read that but I been looking the way that we can install cm11 on our xperia z with locked bootloader and this seems to help cause we can't flash boot img on locked bootloader
Click to expand...
Click to collapse
Not really.
But Recognized Developer @Rachit Rawat has explained how the Locked Bootloader CM is booted and I see @Olivier have worked on the same for Xperia S you can try to contact him
Explanation Link: http://forum.xda-developers.com/showthread.php?p=49073506#post49073506

nabelar82 said:
Well I read that but I been looking the way that we can install cm11 on our xperia z with locked bootloader and this seems to help cause we can't flash boot img on locked bootloader
Click to expand...
Click to collapse
Surely there is a way known as 2nd-init, with which we can change the ramdisk without changing the kernel.
Xperia SP has 3-4 ROMs booted with the same method on locked bootloader. You can search in SP forums and contact the respective persons for porting the feature.

aweosomeabhijeet said:
Surely there is a way known as 2nd-init, with which we can change the ramdisk without changing the kernel.
Xperia SP has 3-4 ROMs booted with the same method on locked bootloader. You can search in SP forums and contact the respective persons for porting the feature.
Click to expand...
Click to collapse
Well I am very interested on this patch but I am not a developer it will be very interesting if someone apply on a xperia z an we can test can someone try? I can test

aweosomeabhijeet said:
Surely there is a way known as 2nd-init, with which we can change the ramdisk without changing the kernel.
Xperia SP has 3-4 ROMs booted with the same method on locked bootloader. You can search in SP forums and contact the respective persons for porting the feature.
Click to expand...
Click to collapse
Contact Skrilax_CZ on freenode at channel #motomagic and he might be able to help us.

Related

[KERNEL]{S} Advanced Stock ICS Kernel Build 17 [08/12/12]

Advanced Stock ICS Kernel for Xperia S​Here is a kernel based on the Stock ICS kernel with some features which come from DoomLord's GB kernel.
Features
autorooting
CWM recovery (with reboot recovery support)
init.d support (thanks DoomLord)
TUN/TAP driver
Download links
Build 17 (Fastboot)
Build 17 (CWM)
Build 16 (Fastboot)
Build 16 (CWM)
Prerequisites
An unlocked bootloader: Tuto here.
A stock ICS ROM (6.1.A.0.452 to 6.1.A.2.55). Don't expect this kernel to work with CM9/10.
How to flash
For elf files :
Read DoomLord's guide
You just have to replace kernel.elf by the name of the downloaded kernel in the flash command (eg : ics4.elf)
For zip files:
Flash the zip file from the recovery
Changelogs
Build 17 (08/12/12) :
Merge 6.1.A.2.55 kernel sources
Autodetect rom version in default.prop based on build.prop
Updated recovery, adbd and busybox (JB version)
Build 16 (01/11/12) :
Random reboot issue probably fixed (patch from CM10 kernel, thanks Kali)
Rom version increased to 6.1.A.2.50
Updated recovery, adbd and busybox (JB version)
SD card mounted by default in recovery
Vibration at boot removed, only led and backlight now
Build 15 (05/09/12) : Increase ROM version in default.prop from 6.1.A.0.452 to 6.1.A.2.45
Build 14 :
New MMC driver (from codeaurora) : it fixes issue while formatting partitions in CWM
Wifi module built from source (in the ramdisk)
Updated recovery
Disable again hardware clock
Build 13 :
Backup / Restore fixed with dedupe
Backlight enabled in CWM
Better "reboot recovery" handling in adbd / busybox and recovery
Build 12 :
Updated recovery
Hardware clock correctly saved (from CM9 kernel)
Build 11 : Go back to GCC 4.4 (fix artifacts with camera preview)
Build 10 :
Kernel built with GCC 4.6
Several autoroot fixes (Superuser app pushed just once and correctly removed in /data)
Working reboot recovery command (with adb too)
Updated su (3.1.1) and Superuser (3.1.3)
A bunch of new command included in the new busybox (ifconfig, wget, vi, and many more !)
Build 9 :
Kernel built from sources
TUN/TAP driver included (for VPN)
Build 8 : Fix mass storage in CWM
Build 7 : Fix MTP
Build 6 : Key mapping in CWM fixed
Build 5 :
New recovery built from latest CM9 sources
Fixed generation of md5sum with nandroid
Increased font size in CWM
Boot partition backup and restore
New adbd built from CM9 sources (fixed an issue with hardcoded sh path in /system)
Build 4 :
Correct su binary
Don't wait 3 sec if /cache/recovery/boot exists
Build 3 :
Leds and vibrator at startup fixed
Sources
Ramdisk sources
Kernel sources
Credits
DoomLord : many thanks to him for its kernel and all his scripts.
championswimmer and sminki for their help
FreeXperia team for their work on CM
makes it perfectly start does not make any errors
greetings and thanks
yes it boots!
(maybe you can help with my Question here )
Hey, I also have tested several times to include recovery, but withut succes, didn't get any further then a booting kernel without recovery or vibration and LED on to enter recovery but no entering recovery and kernel that doesn't boot.
Please pm me if you want to work together, I saw your kernel is from ICX team? I know nick very well so I'd would be a pleasure to work with you too
sminki said:
yes it boots!
(maybe you can help with my Question here )
Click to expand...
Click to collapse
for this question and any other other question similar to this
head here
http://forum.xda-developers.com/showthread.php?t=1659584
it has menu driven process to extract and repack kernel.elf (ramdisk also can be extracted and packed )
Welcome Champ, good to see you mate.
I will leave the thread here as knowing you, you will have a kernel ready for us in a few hours.:fingers-crossed:
thanks for the test guys... so now i'm diving into including recovery....
good to know i could pull off kernel.elf editing in my first attempt lol
@colossus if not in hours, then definitely within 1 or 2 days
EDIT :
can someone send me the kernel.elf from FXP122 cm9 ??
will save me the time to download the whole ROM
This is sweet, good job!!
john9 said:
This is sweet, good job!!
Click to expand...
Click to collapse
Only a few files to edit now
We'll keep you updated
Sent from my LT26i using XDA
championswimmer said:
btw if anyone wishes to do this before me,
this diffstats should help you
https://github.com/championswimmer/xps-ramdisk/commit/a61969aefca00ce3a6e4e112e97403fb6f0c79e9
it shows how doomlord added recovery to gb kernel..
Click to expand...
Click to collapse
cool.. well that's a hell of a lot easier than the manual route I was taking. This was my goal, but for personal rather than pseudo "xda glory" as I'm working with DooM's stuff I didn't feel right posting it without his permission, but he's probably too busy to care
go for it championswimmer :victory:
Excuse my noob-ish question, but... what's the difference between a 'stock' kernel with recovery and a completely custom kernel like DoomLord's? Is it to do with core frequencies/governors?
fNOOB said:
Excuse my noob-ish question, but... what's the difference between a 'stock' kernel with recovery and a completely custom kernel like DoomLord's? Is it to do with core frequencies/governors?
Click to expand...
Click to collapse
Frequencies and governors are one possible customicing for kernels, for the most users the most important thing. also Kernel modifing can allows you init.d support, undervoltscripts and also allows (or denies) MSC support... and, for shure, clean out some tings, make things more efficiently and and and... a dev is nearly totaly free to create a very customiced kernel with or without special Driver support or so
noob.fl said:
Frequencies and governors are one possible customicing for kernels, for the most users the most important thing. also Kernel modifing can allows you init.d support, undervoltscripts and also allows (or denies) MSC support... and, for shure, clean out some tings, make things more efficiently and and and... a dev is nearly totaly free to create a very customiced kernel with or without special Driver support or so
Click to expand...
Click to collapse
Cheers mate
sminki said:
cool.. well that's a hell of a lot easier than the manual route I was taking. This was my goal, but for personal rather than pseudo "xda glory" as I'm working with DooM's stuff I didn't feel right posting it without his permission, but he's probably too busy to care
go for it championswimmer :victory:
Click to expand...
Click to collapse
using someone's work just because 'he's too busy to care' is not the aim which we at xda strive for ...
i've already talked with Doomlord regarding using his recovery... and as long as I clearly mention it's his work and provide links back to his thread, he has no issues with anyone else using it...
(and i'll surely do that ^^ when i release a kernel containing his recovery, if i ever do that)
championswimmer said:
using someone's work just because 'he's too busy to care' is not the aim which we at xda strive for ...
i've already talked with Doomlord regarding using his recovery... and as long as I clearly mention it's his work and provide links back to his thread, he has no issues with anyone else using it...
(and i'll surely do that ^^ when i release a kernel containing his recovery, if i ever do that)
Click to expand...
Click to collapse
cool, i was only making a bad joke, we all know DooM cares
sminki said:
cool, i was only making a bad joke, we all know DooM cares
Click to expand...
Click to collapse
lol.. ok
and i'll bring you some unicorns soon
championswimmer said:
lol.. ok
and i'll bring you some unicorns soon
Click to expand...
Click to collapse
I can't wait! :victory:
so this kernel has the ro.secure property in default.prop set to 0??
Tnaks mate for your job!
tested right now the test version and the sony logo fades and reboots
can you plug it into a pc and run a logcat from command prompt and give me the output of any comes??

[Q] Important question about KEXEC - custom rom for locked bootloader

I MADE MISTAKE AT TOPIC
KEXEC is script/app/pony that allow to run custom kernel on LOCKED BOOTLOADER
I know it works on Moto RAZR
Hello. I remember that some Motorola devices has locked BL. I searched for some info and found:
Something for NOOK
http://forum.xda-developers.com/showthread.php?t=1361943
And for Moto
http://forum.xda-developers.com/showthread.php?t=1599648
IMPORTANT: i dont know - do i found something intresting?
Edit: Hmm it looks something like this:
1.Reboots phone
2.Delete Kernel from ram or it is rewriting in RAM
3.Launches System
Soooo it could be used in ous Arcs? I think it could.
IF anyone who knows something bout android could say something about it....
boss134 said:
IMPORTANT: i dont know - do i found something intresting?
Click to expand...
Click to collapse
It's interesting no doubt, let's see if anything comes from it.
I hope this will push our Locked Bootloader arcs to next level
Can someone look after that project? As you can see i am not dev and i think that someone with expirience should ask dev's of this KEXEC thing how do they done it and is this method uniwersal to evry Android device or at lest Quallcomm devices.
Ohh I remember Kexec from the old Xperia X10 days... FxP (Jerpelea) and Zdizihu both were able to run CM and Stock Froyo on custom kernels using Kexec for our Locked BL X10's....
The work was then abandoned when Sony decided to start unlocking Bootloaders when possible...
We have chance?
So can somebody make rom with that piece of software? I want to test some roms beafore i unlock my bootloader.
Besides this could be cheap way to have custom rom
Any hope to make working kexec to Arc S? I have locked bootloader,cannot unlocked...
Odd, how I have missed this topic. I will look into it as soon as I can and do some testing.
kexec
Someguyfromhell said:
Odd, how I have missed this topic. I will look into it as soon as I can and do some testing.
Click to expand...
Click to collapse
Hi!
I appearently found a working kexec command (compiled for armv7), i cannot test it,because i haven't got my USB cable now, but i can run, it displays help from terminal emulator.
trying kexec
Thats my result, not so good..
255|[email protected]:/system/bin # ./kexec /mnt/sdcard/lupus.img
./kexec /mnt/sdcard/lupus.img
Cannot open /proc/atags: No such file or directory
kexec_load failed: Function not implemented
entry = 0x208000 flags = 280000
nr_segments = 2
segment[0].buf = 0x2e008
segment[0].bufsz = 10
segment[0].mem = 0x201000
segment[0].memsz = 1000
segment[1].buf = 0x2ab3c008
segment[1].bufsz = 720000
segment[1].mem = 0x208000
segment[1].memsz = 720000
Thats Ok
I think that lupus.img kernel should have implemented some Kexec thngs to get it load to RAM, without it its useless :/
kernel
Hi!
I searched a lot, but i cannot found good information about kexec thing..it's not sure that if you have kexec compatible kernel you MUST got atags or no.( i suspect you must got atags only when you are trying to use a non kexec kernel) Someone needed who can make a kexec compatible kernel first, because i cannot compile android kernel I will found a tutorial to this, but i never compiled we need a surely working kernel..I hope some devs interested in this..

[Kernel][Kexec][aromaKLflasher] Kernel Lighter (KL) Beta 11[Change Kernel WITHOUT PC]

Please Don't Quote This Post,
It's Just way too big and would make any comment look stupid,
Thanks
Just When You Thought Your Favourite Dev Is Out Of Ideas... He Comes Up With This
ok so alot are complaining how we can't flash kernel away from the pc among other things (which ill get to later ), (mostly @One-X-master)
so i looked for a way to get around this and found Kexec as the answer.
Wiki said:
In computing, kexec (kernel execution) is a mechanism of the Linux kernel that allows "live" booting of a new kernel "over" the currently running kernel. kexec skips the bootloader stage (hardware initialization phase by the firmware or BIOS) and directly loads the new kernel into memory, where it starts executing immediately. This avoids the long times associated with a full reboot,and can help systems to meet high-availability requirements by minimizing downtime.
Click to expand...
Click to collapse
however, with that comes managing online hardware which is somewhat problematic,
thus that prompted few people to come up with an ingenious solution called Kexec-hardboot.
Kexec-hardboot:​This works by loading the kernel into memory and force restarting the phone with new kernel.​
All of that with some ramdisk tweak allowed me to set a kernel at boot and restart to it,
avoiding having to flash it in the 1st place
Updating the kernel is called flashing..
A Flash is also what precedes Thunder
its also refered to as Lightning, Thus I came up with the name Kernel Lighter
Lighter= To Set Things On Fire/To Ignite (The Kernel)
Thus this is a kernel igniter
I Know, i've got to much time on my hand.
If you have a smart name, please do suggest.​
Special Thanks:​ @Tasssadar: For His N7 Port, which made this port a breeze and for his help in debugging.
@Alex-V: Currently using his kernel as Base Kexec Kernel.
@Androguide.fr: For his recovery-less flash method.
@amarullz: For His AromaFM Source Code.
@LlabTooFeR: For His Stock Kernel.
@faux123: For His Kernel Source.
@mkasick: For The Original Port.​
Sources:​Alex-V 1.7 Kernel
Hardboot Patch
Faux Kitkat Kernel
AromaFM KL​
Download Link In Post Below
​
Always have a backup.
Attachement & How-TO
ALL THE STEPS MUST BE FOLLOWED.
Requirements
S-off/Unlocked Bootloader
Android App & Recovery App
Fastboot flash boot Zeus.img
For ZeusKL.v10.img (New Layout) You must first switch to the new layout
Flashing Kernels Though Recovery
Boot Into Recovery
Flash AromaFM-KL.zip
Select Kernel Zip To Flash
Choose Flash Location
Choose Boot.img
Yes/No To Flash Zip (useful for flashing modules)
Reboot
Flashing Kernels Though Android(deprecated)
Start KL Android App
Choose Kernel Zip*
Kernel & Ramdisk
Reboot To Recovery --> Flash Modules
Reboot
* For zips to be listed, they must be placed in /sdcard/modules/
* otherwise click browse and happy hunting​
Something Went Wrong:
Let say the phone wouldnt boot during kernel update after using the app,
the best solution would be to go back to stock kernel, look at the recovery flashable zips in Extras section,
If none seem to fit, try another custom kernel
if you still had no luck booting, you should try flashing that kernel through fastboot and see if it makes any difference.​
Warning!!
Note: All the zips provided are flashable through both The App & Recovery... but I recommend recovery
BUT DON'T FLASH THE KEXEC (KL.Zeus.img) KERNEL THROUGH THE APP or Recovery,
as it will continuously boot itself over and over and over again.​
Download Link In Post Below
Downloads
Kexec Kernel: KL.Zeus.img(CM12 Based)(V10)(Old Layout Only)
Kexec Kernel: KL.Zeus.img(CM12 Based)(v11)(New Layout Only)
Android App: KernelLighter.apk(No longer in active development, use the Recovery App instead)
Recovery App: AromaFM-KL Flasher(v4.1)(ZeusKL v9- only)
Recovery App: AromaFM-KL Flasher(4.6)(ZeusKL v10+ only)
Extras(deprecated)
Sense 5 Stock Kernel(Works on Sense 4+)(courtesy of LlabTooFeR) flash via recovery
ASOP/CM10.1(Android 4.1.2/4.2.2) flash via recovery
ASOP/CM10.2(Android 4.3) flash via recovery
Archieve
Multirom
ZeusKL
Thunder07 said:
& Another One.
Click to expand...
Click to collapse
Can't wait to try, sound incredible
Awesome! Looking forward to try it.
Sent from my Nexus 7 using Tapatalk 4
Someone tried it?
Never again without Sense 5! *~* <3
This i call development, thanks for that solution.
TouchscreenLover1 said:
Someone tried it?
Never again without Sense 5! *~* <3
Click to expand...
Click to collapse
i made a small typo in one of the files..
after flashing zip
do this
adb shell
mount /data -o rw
echo /data/boot/Kernels/Stock/boot.img-zImage>/data/boot/kernel
echo /data/boot/Kernels/Stock/boot.img-ramdisk.gz>/data/boot/ramdisk
Will Fix Zip soon
Edit: FIXED
Dexxmor said:
This i call development, thanks for that solution.
Click to expand...
Click to collapse
Anyone a Sense 5 Kernel.zip? Kexec boots a descriptet, will try this solution.
Dexxmor said:
Anyone a Sense 5 Kernel.zip? Kexec boots a descriptet, will try this solution.
Click to expand...
Click to collapse
this works on both sense 5 and 4+
i had this running for almost a week now on sense 4+
and just moved to sense 5 and thought it will be a good time to release this.
The Stock kernel comes from sense 5 ROM
I know, but back to 4.1.1 is not a solution for me (Sense 5 is the dealbreaker with AOSP ROMs )
Another Question, if i change to AOSP, it will work too? or must we flash (an not realeased) Kexec AOSP kernel? (i ask not for me, i ask for everyone on AOSP with ORD xD )
Dexxmor said:
I know, but back to 4.1.1 is not a solution for me (Sense 5 is the dealbreaker with AOSP ROMs )
Another Question, if i change to AOSP, it will work too? or must we flash (an not realeased) Kexec AOSP kernel? (i ask not for me, i ask for everyone on AOSP with ORD xD )
Click to expand...
Click to collapse
you dont have to go back to 4.1.1, this will work with sense 5 rom
if you want to use AOSP you must follow the custom kernel guide.
Ahh, (my english is bad..) i think we misunderstand each other, i asked for an Sense 5 kernel.zip to try your "Flash kernel in Recovery" Solution, it exists not so many Kernel.zip with the "Flash Kernel Script" to flash the kernel in recovery... I hope its clear what i mean
this wiil be work on maximus 21 ?
Yes
Dexxmor said:
Ahh, (my english is bad..) i think we misunderstand each other, i asked for an Sense 5 kernel.zip to try your "Flash kernel in Recovery" Solution, it exists not so many Kernel.zip with the "Flash Kernel Script" to flash the kernel in recovery... I hope its clear what i mean
Click to expand...
Click to collapse
im not 100% sure, but if you're looking for the zip, its in the 2nd post
the 1st time you must flash the kernel through fastboot AND zip through recovery,
later i will make an app that will work to replace kernels.
but even that all will require 1 flash through fastboot.
NOTE:
the zip contains to kernel, one that you flash in fastboot
one that will be copied to /data/boot/
the 1st is kexec which will boot the one in /data/boot/
Not clear enough xD, this (the kernel.zip) was not a request to you, it was an request to somebody to make me a flashable kernel zip, as an example repacked Alex-V kernel for Sense 5, to test this.
Its late here, so my explanation will suffer, sorry for that.
Dexxmor said:
Not clear enough xD, this (the kernel.zip) was not a request to you, it was an request to somebody to make me a flashable kernel zip, as an example repacked Alex-V kernel for Sense 5, to test this.
Its late here, so my explanation will suffer, sorry for that.
Click to expand...
Click to collapse
ok that was clear enough,
so far as far as i hear,
only trips kernel work with sense 5
Thanks, sorry for my poor english.
---------- Post added at 11:31 PM ---------- Previous post was at 11:18 PM ----------
EDIT: Now we can flash kernel without a PC, testet and it worked.
So, we can flash kernels through the rom itself by replacing boot.img in data/boot and reboot, can't we ?

[honami][CWM Advanced Edition] PhilZ Touch

Main thread + features + install instructions + dev support
http://forum.xda-developers.com/showthread.php?t=2201860
PhilZ Touch is a CWM Advanced Edition that adds all the features you could ever miss in CWM
It is a well proven recovery for many phones
It also adds a full touch interface a completely configurable GUI
Please give your feedback, what works, and any bug you could encounter
Read the features, and check if you are missing something
Also, do not forget to read about the powerful aroma file manager integration and double tap shortcut
Download links
Last version can be found here:
Sony Xperia Z1 (honami)
http://goo.im/devs/philz_touch/CWM_Advanced_Edition
Click to expand...
Click to collapse
Big credits to @DooMLoRD for his help to rebase on stock kernel
XDA:DevDB Information
[honami][CWM Advanced Edition] PhilZ Touch, a Tool/Utility for the Sony Xperia Z1
Contributors
Phil3759, DooMLoRD, [NUT]
Version Information
Status: Testing
Created 2014-03-29
Last Updated 2014-03-29
hello and thank you.
I have found the file. img I can not find my method for installing or flashed to the files on my Z1.
sorry i use google translation I'm French
Français
bonjour et merci . j'ai bien trouvé le fichier .img mes je ne trouve pas la méthode pour l installer ni pour flashé le fichiers sur mon Z1
Bien cordialement
Xque_31
Envoyé de mon C6903 en utilisant Tapatalk
Phil3759 said:
Main thread + features + install instructions + dev support
http://forum.xda-developers.com/showthread.php?t=2201860
PhilZ Touch is a CWM Advanced Edition that adds all the features you could ever miss in CWM
It is a well proven recovery for many phones
It also adds a full touch interface a completely configurable GUI
Please give your feedback, what works, and any bug you could encounter
Read the features, and check if you are missing something
Also, do not forget to read about the powerful aroma file manager integration and double tap shortcut
Download links
Last version can be found here:
Click to expand...
Click to collapse
hi @Phil3759,
firstly welcome to the Z1 forums!
the kernel image you posted will not boot on any device as it misses the crucial device tree files... here are detailed instructions on how to build bootable kernels for many Xperia device since 2011:
http://forum.xda-developers.com/showthread.php?t=2447310
I have fixed this by integrating the ramdisk with stock FW 290 (android 4.3) so that people can test out this recovery..
download link for fixed image is:
http://d-h.st/Iz2
BTW me and my colleague @Napstar have worked on similar "Advanced recovery" before (it was released some time in late 2011/early 2012):
our sources have also been released quite some time back:
http://forum.xda-developers.com/showthread.php?t=1485829
but i discontinued work on it as i got busy with personal work
I would recommend getting in touch with @Napstar, may be we can collaborate for some bigger things
also another thing... since I have worked on multi-recoveries in my kernels, i had 4 recoveries in my X10 kernel way back in septmber 2011!!, and since you are actively developing this advanced recovery, do i have your permission to integrate this recovery in my DooMKernel? (I have made my DooMKernel for close to 21 devices from various vendors Sony, HTC, Samsung, Huawei, Kindle, etc; currently I actively support only 4 devices though: Xperia Z1, Z, SP & T)
note to users:
if you want to test out this recovery then you need to HOTBOOT this kernel:
Code:
fastboot boot kernel.img
regards,
DooMLoRD
DooMLoRD said:
hi @Phil3759,
firstly welcome to the Z1 forums!
the kernel image you posted will not boot on any device as it misses the crucial device tree files... here are detailed instructions on how to build bootable kernels for many Xperia device since 2011:
http://forum.xda-developers.com/showthread.php?t=2447310
I have fixed this by integrating the ramdisk with stock FW 290 (android 4.3) so that people can test out this recovery..
download link for fixed image is:
http://d-h.st/Iz2
BTW me and my colleague @Napstar have worked on similar "Advanced recovery" before (it was released some time in late 2011/early 2012):
our sources have also been released quite some time back:
http://forum.xda-developers.com/showthread.php?t=1485829
but i discontinued work on it as i got busy with personal work
I would recommend getting in touch with @Napstar, may be we can collaborate for some bigger things
also another thing... since I have worked on multi-recoveries in my kernels, i had 4 recoveries in my X10 kernel way back in septmber 2011!!, and since you are actively developing this advanced recovery, do i have your permission to integrate this recovery in my DooMKernel?
note to users:
if you want to test out this recovery then you need to HOTBOOT this kernel:
Code:
fastboot boot kernel.img
regards,
DooMLoRD
Click to expand...
Click to collapse
Many thanks for your support
Yes, I looked at your amazing work. TWRP-ifying CWM is just amazing
However, the codes we use diverge too much, but yes, why not, collaboration can be always welcome. It just take a big effort to start so that each one familiarizes with other's code
Obviously you can use and repack any of my files to your wish
I also should added a note that this is a sample for devs to use it at their wish, like I do for Xperia Z. I knew well that it won't boot any stock ROM. Thought it would boot cm-11.0 roms though...
Anything I have to do when compiling to make it at least boot cm-11.0?
If you agree, I will add your recovery.img to goo.im instead of actual one + add full credits in OP
Phil3759 said:
Many thanks for your support
Yes, I looked at your amazing work. TWRP-ifying CWM is just amazing
However, the codes we use diverge too much, but yes, why not, collaboration can be always welcome. It just take a big effort to start so that each one familiarizes with other's code
Obviously you can use and repack any of my files to your wish
I also should added a note that this is a sample for devs to use it at their wish, like I do for Xperia Z. I knew well that it won't boot any stock ROM. Thought it would boot cm-11.0 roms though...
Anything I have to do when compiling to make it at least boot cm-11.0?
If you agree, I will add your recovery.img to goo.im instead of actual one + add full credits in OP
Click to expand...
Click to collapse
well @Napstar is currently working on something new please get in touch with him, he is busy with his PhD work but I am sure he can find out some time
it wont even boot on any Z1 irrespective of ROM... actually the kernel formats for Sony devices vary A LOT! they are not using standard boot.img format... and anyways especially for the msm8974 board (and beyond) the new device tree format will be used... its a bit tricky to explain but Krab has a good tutorial here:
http://forum.xda-developers.com/showthread.php?t=2469421
sure go ahead... u can link the recovery.img where ever u want i just repacked ur ramdisk with the correct zImage & dt.img
Phil3759 said:
Many thanks for your support
Yes, I looked at your amazing work. TWRP-ifying CWM is just amazing
However, the codes we use diverge too much, but yes, why not, collaboration can be always welcome. It just take a big effort to start so that each one familiarizes with other's code
Obviously you can use and repack any of my files to your wish
I also should added a note that this is a sample for devs to use it at their wish, like I do for Xperia Z. I knew well that it won't boot any stock ROM. Thought it would boot cm-11.0 roms though...
Anything I have to do when compiling to make it at least boot cm-11.0?
If you agree, I will add your recovery.img to goo.im instead of actual one + add full credits in OP
Click to expand...
Click to collapse
here is a bonus for you...
build tools for honami...
http://d-h.st/Vk3
just extract the archive, replace the ramdisk.cpio.gz with new compressed ramdisk and run makeit.sh
that should build a bootable boot.img for Z1 (honami)
DooMLoRD said:
here is a bonus for you...
build tools for honami...
http://d-h.st/Vk3
just extract the archive, replace the ramdisk.cpio.gz with new compressed ramdisk and run makeit.sh
that should build a bootable boot.img for Z1 (honami)
Click to expand...
Click to collapse
That's a lot
I will take a look at it or maybe just provide recovery.zip installer so that interested devs can repack, or even the ramdisk
Huge thanks
I will get in touch with Napster :good:
DooMLoRD said:
here is a bonus for you...
build tools for honami...
http://d-h.st/Vk3
just extract the archive, replace the ramdisk.cpio.gz with new compressed ramdisk and run makeit.sh
that should build a bootable boot.img for Z1 (honami)
Click to expand...
Click to collapse
I took a look at your script
I was aware of the dt.img and already use it for Note 3 and Note 10.1 2014 from Samsung and on many of the new LG devices
Actually, cm-11.0 build tree is fixed to use a custom bootimg make file:
https://github.com/CyanogenMod/android_device_sony_rhine-common/blob/cm-11.0/custombootimg.mk#L56
The dt.img is kernel specific and is built along the zImage as you surely know. When compiling cm-11.0 boot.img, the zImage and matching dt.img are compiled and repacked using custombootimg.mk
Unpacking your fixed recovery.img I see the only changes are the dt.img and zImage to be able to use with stock ROMs. That's great and most people would prefer it that way
However, I am still unsure why you say that my original release won't boot a cm-11.0 ROM? Is it mandatory to have the kernel built along the ROM ? I do not think else your repack with zImage would work only on one specific ROM
Hope you can enlighten me on that
Phil3759 said:
I took a look at your script
I was aware of the dt.img and already use it for Note 3 and Note 10.1 2014 from Samsung and on many of the new LG devices
Actually, cm-11.0 build tree is fixed to use a custom bootimg make file:
https://github.com/CyanogenMod/android_device_sony_rhine-common/blob/cm-11.0/custombootimg.mk#L56
The dt.img is kernel specific and is built along the zImage as you surely know. When compiling cm-11.0 boot.img, the zImage and matching dt.img are compiled and repacked using custombootimg.mk
Unpacking your fixed recovery.img I see the only changes are the dt.img and zImage to be able to use with stock ROMs. That's great and most people would prefer it that way
However, I am still unsure why you say that my original release won't boot a cm-11.0 ROM? Is it mandatory to have the kernel built along the ROM ? I do not think else your repack with zImage would work only on one specific ROM
Hope you can enlighten me on that
Click to expand...
Click to collapse
the original boot.img didnt have a dt.img
DooMLoRD said:
the original boot.img didnt have a dt.img
Click to expand...
Click to collapse
really wired as I used the device tree with custom bootimg make file I linked above
I will look at it and thank you for your repack. I added to main goo.im repo
Afternoon chaps,
Just wanted to give this a whirl as i've used your recoveries before, so out of the two which are on the download section, which one should work on 4.2.2, with a locked bootloader?
Cheers m8 an glad you've made it onto the Z1
@Phil3759
For some reason on locked bootloader devices, while the texfat module has been loaded, I'm unable to get philz touch to mount any exFAT sdcard unless I change the extra.fstab line for it from 'auto' to 'texfat' ... any way to get this working normal again?
[NUT] said:
@Phil3759
For some reason on locked bootloader devices, while the texfat module has been loaded, I'm unable to get philz touch to mount any exFAT sdcard unless I change the extra.fstab line for it from 'auto' to 'texfat' ... any way to get this working normal again?
Click to expand...
Click to collapse
The honami version is compiled without minivold support for exfat modules. It will only work with fuse
https://github.com/PhilZ-cwm6/philz_touch_cwm6/blob/cm-11.0/boardconfig/BoardConfig.mk#L520
You can try to use the yuga minivold binary instead. If it is ok and you want to add support it officially with updates, I will do like yuga and enable the exfat flag
hey I have the Xperia T & SP can you create a touch version for them too?
i can be your guinea pig for testing
SP: https://github.com/CyanogenMod/android_device_sony_huashan
T: https://github.com/CyanogenMod/android_device_sony_mint
DooMLoRD said:
hey I have the Xperia T & SP can you create a touch version for them too?
i can be your guinea pig for testing
SP: https://github.com/CyanogenMod/android_device_sony_huashan
T: https://github.com/CyanogenMod/android_device_sony_mint
Click to expand...
Click to collapse
Compiled and opened dedicated threads
Feel free to put your magic if needed :angel:
@Phil3759: The backlight is really very dim on locked bootloader devices... setting that to the max setting doesn't change it all that much either.
Anything I can do to test if it's philz touch causing this?
[NUT] said:
@Phil3759: The backlight is really very dim on locked bootloader devices... setting that to the max setting doesn't change it all that much either.
Anything I can do to test if it's philz touch causing this?
Click to expand...
Click to collapse
I use this path:
Code:
/sys/class/leds/wled:backlight/brightness
Since the repack was done using a stock kernel, not sure if it still matches!
Phil3759 said:
I use this path:
Code:
/sys/class/leds/wled:backlight/brightness
Since the repack was done using a stock kernel, not sure if it still matches!
Click to expand...
Click to collapse
It does still match. It's like the value to it got cut in half...
[NUT] said:
It does still match. It's like the value to it got cut in half...
Click to expand...
Click to collapse
try to set brightness in recovery gui, then:
Code:
adb shell
cat "/sys/class/leds/wled:backlight/brightness"
Post the value here, maybe you're getting some crap because I did not properly escape those ":"
No idea why Sony have such genius ideas in naming their paths
Phil3759 said:
try to set brightness in recovery gui, then:
Code:
adb shell
cat "/sys/class/leds/wled:backlight/brightness"
Post the value here, maybe you're getting some crap because I did not properly escape those ":"
No idea why Sony have such genius ideas in naming their paths
Click to expand...
Click to collapse
Busy with making a system dump on my Z1 now, will do that soon though.
---------- Post added at 12:55 AM ---------- Previous post was at 12:36 AM ----------
Phil3759 said:
try to set brightness in recovery gui, then:
Code:
adb shell
cat "/sys/class/leds/wled:backlight/brightness"
Post the value here, maybe you're getting some crap because I did not properly escape those ":"
No idea why Sony have such genius ideas in naming their paths
Click to expand...
Click to collapse
[NUT] said:
Busy with making a system dump on my Z1 now, will do that soon though.
Click to expand...
Click to collapse
Done that:
Code:
~ # cat "/sys/class/leds/wled:backlight/brightness"
10
~ # cat "/sys/class/leds/wled:backlight/brightness"
255
First one is from the screen/power save mode, the second is when fully lit... but still the screen is only half as bright or maybe even less then half compared to using the XZ philz ...

[REFERENCE] Umbrella Kernel

WARNING:
This is not a post targeted to end users. It is a development reference. If you expect any installable download or even added features out of this thread, please close your browser. Thank you.
What is Umbrella?
Umbrella is a project that aims to make the kernel sources that HMD released for Nokia 8 Sirocco (A1N) compatible with the Nokia 8 (NB1). The idea behind this is to replace the outdated 8.0 kernel sources that HMD released for NB1 with more up to date ones that are used in the 9.0 builds for Nokia 8 Sirocco.
Why do this, you might ask. Well, the answer is simple: The devices are so similar that HMD / FIH already have their kernel sources in a shared source tree. You can validate that yourself, by downloading the kernel config from a stock NB1 kernel (under /proc/config.gz), unpacking it, and searching for the commended entry "CONFIG_FIH_A1N". What umbrella does is take the sources that were released for A1N, readd all device specific files for NB1 (they were pruned) from it's original kernel soure, and integrate the stock kernel config (also called defconf) from NB1.
Doing this also lead to some other small quality of life improvements that are not directly relevant to an end user.
Umbrella contains the latest changes from linux-stable (v4.4.179 at the time of writing, compared to the stock v4.4.153), and Qualcomms Codeaurora upstream
The WiFi driver from Qualcomm is compiled directly into the kernel, instead of being loaded as a module. This allows you to flash umbrella based kernels to every build version while keeping everything else working correctly. The stock kernels use signature enforcement, which means that the wifi module that is loaded from the system partition has to be signed against the kernel, which is not the case for every custom kernel or even the kernels that were built for a different security patch.
Unlike the officially released kernel sources, umbrella does not have stupid typos in it's device trees that cause the phone to display white bars on all of your screen etc.
Umbrella disables the block that FIH put in place to prevent users from rebooting into EDL mode from within android (using adb reboot edl).
Umbrella also includes a patch that causes the device to not reset it's entire memory when the kernel crashes, therefore retaining the last kernel output log, which can be used for debugging
You can compile the kernel with compilers newer than GCC 4.9 (not clang though), without having it immideately crash at boot.
It includes a tool that automatically sets up a crosscompiling environment for the kernel.
What Umbrella is not
Umbrella is not a project to add significant new features, or the ability to tweak things beyond what the stock kernel already offers (which is technically not that bad). It aims to be a reference kernel, a base for (potentially) other kernels that are based on it and add those features. I know that that is kind of a broad goal, considering I am the only one who seems to do actual development for this phone, but who knows. Having a lower entry level might help in case someone is curious and wants to get into kernel hacking. And I would certainly be happy if I wasn't the only one developing for this device.
If you want Umbrella to contain features like:
Overclocking
More governors / schedulers / whatever
Color / Sound / whatever control
Wakelock blocking
etc. etc. etc.
then please Alt-F4 your browser right now. Ok, don't do that but at least please don't request it because it will make you get ignored, nothing else.
Why the name Umbrella?
While I developed the initial prototype I watched through 3 Resident Evil movies, and this is kinda a zombie project, so I think the name fits quite well.
Why are you posting this?
I am posting this because I am hoping that it will be useful for anyone that would like to get into kernel development and tweaking without the hassle that comes with setting up the kernel sources that are released by HMD.
But, one disclaimer: I am not a kernel developer. I am a curious CS student suffering from a bad mix of too much time and stupid ideas that solve stupid problems. I am trying my best to produce something useful and be of help, but please don't expect wonders from me, thanks.
Links?
Source: https://github.com/resident-nokia/umbrella
Download: None, this is a development reference.
Looks promising
Sent from my NB1 using XDA Labs
Nice. this will likely be useful in the future
Updated the umbrella source to the latest 4.4.180 kernel, and May 07 CAF tag (LA.UM.7.4.r1-05100-8x98.0). Also readded some NB1 specific code where it was missing (discovered by doing a diff against the 5140 kernel source that Nokia recently released).
Just in case anyone actually cares about it
THMSP said:
Updated the umbrella source to the latest 4.4.180 kernel, and May 07 CAF tag (LA.UM.7.4.r1-05100-8x98.0). Also readded some NB1 specific code where it was missing (discovered by doing a diff against the 5140 kernel source that Nokia recently released).
Just in case anyone actually cares about it
Click to expand...
Click to collapse
I do. Who knows, in a year's time I might have enough knowledge to build a custom Rom for this phone
Kernel sources which is used on pie has been released officially. Finally, we have an "original" kernel and we've got closed one more step to custom roms.
https://www.nokia.com/phones/en_int/opensource/
techno_man000 said:
Kernel sources which is used on pie has been released officially. Finally, we have an "original" kernel and we've got closed one more step to custom roms.
https://www.nokia.com/phones/en_int/opensource/
Click to expand...
Click to collapse
@THMSP it would be interesting to let us know how different is your kernel mod from the newly released official pie kernel for Nokia 8
MDV106 said:
@THMSP it would be interesting to let us know how different is your kernel mod from the newly released official pie kernel for Nokia 8
Click to expand...
Click to collapse
As I described here: https://forum.xda-developers.com/nokia-8/development/official-source-code-releases-nokia-8-t3930324, they are identical. The only difference are the device tree files (which still contain typos that break the display), and of course all modifications I made to the sirocco kernel source that Umbrella is based on (wifi driver, EDL mode reactivation, upstreaming, etc.)
THMSP said:
As I described here: https://forum.xda-developers.com/nokia-8/development/official-source-code-releases-nokia-8-t3930324, they are identical. The only difference are the device tree files (which still contain typos that break the display), and of course all modifications I made to the sirocco kernel source that Umbrella is based on (wifi driver, EDL mode reactivation, upstreaming, etc.)
Click to expand...
Click to collapse
So, are these new codes broken like 4.84?
techno_man000 said:
So, are these new codes broken like 4.84?
Click to expand...
Click to collapse
I wouldn't call Nokia sources broken, but I would call them incomplete, outdated and impractical to work with. And that hasn't changed.
Iam currently building device tree for nokia 8..
Unable to figure out how to edit init folder specifically for nokia8
[email protected] said:
Iam currently building device tree for nokia 8..
Unable to figure out how to edit init folder specifically for nokia8
Click to expand...
Click to collapse
Please do so! We can't let this phone die so early!
which defconfig file should choose?
lk
[email protected] said:
which defconfig file should choose?
Click to expand...
Click to collapse
nb1_defconfig is for Nokia 8
Can somebody help me? I have built Lineage OS 16.0 for the Nokia 8 with the Umbrella Kernel. However I am facing issues with getting it into work. Firstly TWRP fails to flash it with error 7. I am including the recovery.log file in case anyone wants more detail. I then proceeded to extract the payload.bin file, and flashed boot.img and system.img seperately. However that didnt work either as my phone got stuck at the Bootloader unlocked warning screen. If anyone is interesteed I can upload the .zip outputed by the build
Device Tree: https://github.com/GPUCode/android_device_nokia_nb1
Recovery.log: https://hastebin.com/akohutiwed.sql
Thanks in advanced
emufan4568 said:
Can somebody help me? I have built Lineage OS 16.0 for the Nokia 8 with the Umbrella Kernel. However I am facing issues with getting it into work. Firstly TWRP fails to flash it with error 7. I am including the recovery.log file in case anyone wants more detail. I then proceeded to extract the payload.bin file, and flashed boot.img and system.img seperately. However that didnt work either as my phone got stuck at the Bootloader unlocked warning screen. If anyone is interesteed I can upload the .zip outputed by the build
Device Tree: https://github.com/GPUCode/android_device_nokia_nb1
Recovery.log: https://hastebin.com/akohutiwed.sql
Thanks in advanced
Click to expand...
Click to collapse
hey, did you wipe userdata before flashing this? I think you need to do that, like when switching to using GSIs.
also, have you checked this https://github.com/resident-nokia/twrp? Specifically the fstab file for NB1.
oaid said:
hey, did you wipe userdata before flashing this? I think you need to do that, like when switching to using GSIs.
Click to expand...
Click to collapse
Thanks for the suggestion. I have flashed GSIs before but never had any problems. Also I cannot find any userdata partition in TWRP. I asked in the Lineage OS discord and I was told that probably that TWRP image is broken. I am confused
emufan4568 said:
Thanks for the suggestion. I have flashed GSIs before but never had any problems. Also I cannot find any userdata partition in TWRP. I asked in the Lineage OS discord and I was told that probably that TWRP image is broken. I am confused
Click to expand...
Click to collapse
that's the data partition, if I'm not mistaken ?*
which twrp image are you using? Maybe try Dorian's latest?
oaid said:
that's the data partition, if I'm not mistaken ?*
which twrp image are you using? Maybe try Dorian's latest?
Click to expand...
Click to collapse
Yes I am using the latest TWRP. Before flashing I erased the data partition but still the error persisted

Categories

Resources