5,595,760 Members 37,472 Now Online
XDA Developers Android and Mobile Development Forum

[Kernel][Release][Kexec] Kernel Lighter (KL) Beta 4 [Change Kernel WITHOUT PC]

Tip us?
 
Thunder07
Old
(Last edited by Thunder07; 2nd October 2013 at 11:33 PM.)
#1  
Thunder07's Avatar
Recognized Contributor / Recognized Developer - OP
Thanks Meter 1688
Posts: 1,241
Join Date: Sep 2007

 
DONATE TO ME
Default [Kernel][Release][Kexec] Kernel Lighter (KL) Beta 4 [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.

Quote:
Originally Posted by Wiki
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.

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.
Quote:
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:
@mkasick: For The Original Port.
@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.
@LlabTooFeR: For His Stock Kernel.
@Androguide.fr: For his recovery-less flash method
Sources:
Alex-V 1.7 Kernel Thanks To Alex-V
Hardboot patch Thanks To Tasssadar

Link In Post Below

The Following 78 Users Say Thank You to Thunder07 For This Useful Post: [ Click to Expand ]
 
Thunder07
Old
(Last edited by Thunder07; 4th January 2014 at 09:50 PM.)
#2  
Thunder07's Avatar
Recognized Contributor / Recognized Developer - OP
Thanks Meter 1688
Posts: 1,241
Join Date: Sep 2007

 
DONATE TO ME
Always have a backup.

Attachement & How-TO
ALL THE STEPS MUST BE FOLLOWED.

1) Download & Install KernelLighter.apk
2) A) For Sense ROMS : Download & Flash Sense 5 Stock(Works on Sense 4+) (courtesy of LlabTooFeR) through recovery or Android App - KernelLighter.
2) B) For ASOP/CM10.1 (Android 4.1.2/4.2.2) ROMS : Download & Flash ASOP/CM10.1 through recovery or Android App - KernelLighter. <-- Need people to confirm it's working. Report Back Please.
C) For ASOP/CM10.2 (Android 4.3) ROMS : Download & Flash ASOP/CM10.2 through recovery or Android App - KernelLighter. <-- Need people to confirm it's working. Report Back Please.
D) Custom Kernel : Just place a custom kernel zip of your choice into /sdcard/modules/ & flash it through the App.
3) Download & Flash KL-Zeus.img through fastboot <-- for both Sense & ASOP ROMs
4) You're Done. Reboot, the phone should reboot twice before booting.
Do Note: sometimes the kernel wont boot and would just freeze, force restart it yourself few times and it will boot...
if it still wont boot, check "Something Went Wrong" section below in this post.

Custom Kernel:
1) Download The KernelLighter.apk <-- if you haven't already
2) Download The Kernel & Modules zip from the kernel dev to /sdcard/modules/
3) Open KernelLighter Android App & Choose that zip
4) Follow the instruction & reboot.

Something Went Wrong:
Let say the phone wouldnt boot during kernel update after using the app,
the best solultion would be to go back to stock kernel, look at the recovery flashable zips in Back2Stock while keeping this [KEXEC] kernel section.

Back2Stock while keeping this [KEXEC] kernel
Download & Flash:
Through The App Or Through Recovery Sense 5 Stock
Through The App Or Through Recovery ASOP/CM10.1 <-- Need people to confirm it's working. Report Back Please.
Through The App Or Through Recovery ASOP/CM10.2 <-- Need people to confirm it's working. Report Back Please.

if you still had no luck booting, you should try flashing that kernel through fastboot and see if it makes any difference.

Note: All the zips provided are flashable through both The App & Recovery...
BUT DON'T FLASH THE KEXEC KERNEL THROUGH THE APP,
I've updated the app to prevent this,
but i have little control over those who insist on doing it, it will cause nothing but bootloops,
as it will continuously boot itself over and over and over again.
The Following 57 Users Say Thank You to Thunder07 For This Useful Post: [ Click to Expand ]
 
Thunder07
Old
(Last edited by Thunder07; 2nd October 2013 at 11:36 PM.)
#3  
Thunder07's Avatar
Recognized Contributor / Recognized Developer - OP
Thanks Meter 1688
Posts: 1,241
Join Date: Sep 2007

 
DONATE TO ME
Phase 1:Kexec(Phase 1 Done)
SubPhase 1 Part 1: (Complete)
Boot Kernel Through Kexec

SubPhase 1 Part 2: (Complete)
Create An App To Swap Kernels
Phase 2:Multiboot (Not Started)
SubPhase 2 Part 1:
Success Boot A Rom From Another Directory (Other Than /System Root)

SubPhase 2 Part 2:
Create An App To Swap Between Roms
The Following 35 Users Say Thank You to Thunder07 For This Useful Post: [ Click to Expand ]
 
maxstep
Old
#4  
Junior Member
Thanks Meter 4
Posts: 19
Join Date: Sep 2005
Location: Toronto
Quote:
Originally Posted by Thunder07 View Post
& Another One.
Can't wait to try, sound incredible
 
slebit
Old
#5  
slebit's Avatar
Senior Member
Thanks Meter 616
Posts: 1,804
Join Date: Dec 2010
Awesome! Looking forward to try it.

Sent from my Nexus 7 using Tapatalk 4
Phone: LG G2

Tablet: LG G Pad 8.3
 
TouchscreenLover1
Old
#6  
TouchscreenLover1's Avatar
Senior Member
Thanks Meter 364
Posts: 973
Join Date: Jan 2013
Location: Weinstadt
Someone tried it?

Never again without Sense 5! *~* <3
 
Dexxmor
Old
#7  
Dexxmor's Avatar
Senior Member
Thanks Meter 697
Posts: 1,346
Join Date: May 2011
Location: near munich

 
DONATE TO ME
This i call development, thanks for that solution.

Device History: Xperia x8, Galaxy Ace, Xperia Pro, HTC One X, Galaxy Tab 2
and then
|
V
Galaxy Note 8" N5100 / CM11 / TWRP
Nexus 4 / CM11 / Hellskernel / TWRP

Firmwares for all Devices i have
you want an Firmware? PM me
The Following User Says Thank You to Dexxmor For This Useful Post: [ Click to Expand ]
 
Thunder07
Old
(Last edited by Thunder07; 20th August 2013 at 09:15 PM.)
#8  
Thunder07's Avatar
Recognized Contributor / Recognized Developer - OP
Thanks Meter 1688
Posts: 1,241
Join Date: Sep 2007

 
DONATE TO ME
Quote:
Originally Posted by TouchscreenLover1 View Post
Someone tried it?

Never again without Sense 5! *~* <3
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

Quote:
Originally Posted by Dexxmor View Post
This i call development, thanks for that solution.
The Following 3 Users Say Thank You to Thunder07 For This Useful Post: [ Click to Expand ]
 
Dexxmor
Old
#9  
Dexxmor's Avatar
Senior Member
Thanks Meter 697
Posts: 1,346
Join Date: May 2011
Location: near munich

 
DONATE TO ME
Anyone a Sense 5 Kernel.zip? Kexec boots a descriptet, will try this solution.

Device History: Xperia x8, Galaxy Ace, Xperia Pro, HTC One X, Galaxy Tab 2
and then
|
V
Galaxy Note 8" N5100 / CM11 / TWRP
Nexus 4 / CM11 / Hellskernel / TWRP

Firmwares for all Devices i have
you want an Firmware? PM me
 
Thunder07
Old
#10  
Thunder07's Avatar
Recognized Contributor / Recognized Developer - OP
Thanks Meter 1688
Posts: 1,241
Join Date: Sep 2007

 
DONATE TO ME
Quote:
Originally Posted by Dexxmor View Post
Anyone a Sense 5 Kernel.zip? Kexec boots a descriptet, will try this solution.
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

The Following 4 Users Say Thank You to Thunder07 For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes