Flashing a Custom Kernel - Nexus 4 Q&A, Help & Troubleshooting

Hi, I have some question about flashing a custom kernel (+Franco kernel):
1. Let's say I have Franco Kernel and a new version comes out, do I need to flash it again or I can use the app to flash it? Also, do I need to wipe something before I flash?
2. If I switch to another kernel from Franco, what exactly do I have to do? Just wipe cache+dalvik and re-flash my rom?
3. Will I have to re-flash the kernel after each rom update?
Thanks!

Hi I'm not sure about #1 because I don't use Franco's app, but 2) Sometimes you can just flash a new kernel over the old one. Personally I prefer to dirty flash my ROM, then flash my choice of kernel. 3) You'll need to flash the kernel after a ROM update. The ROM is compiled with it's own kernel.

chrisbo4 said:
Hi I'm not sure about #1 because I don't use Franco's app, but 2) Sometimes you can just flash a new kernel over the old one. Personally I prefer to dirty flash my ROM, then flash my choice of kernel. 3) You'll need to flash the kernel after a ROM update. The ROM is compiled with it's own kernel.
Click to expand...
Click to collapse
So I need to dirty flash my ROM (=wipe cache+dalvik & flash) then install a new kernel? Thanks.
Still need an answer to Q1 though

I use CM 10.1 and just flash the new Franco kernel ZIP over the old one and it's been fine...

[email protected] said:
Hi, I have some question about flashing a custom kernel (+Franco kernel):
1. Let's say I have Franco Kernel and a new version comes out, do I need to flash it again or I can use the app to flash it? Also, do I need to wipe something before I flash?
2. If I switch to another kernel from Franco, what exactly do I have to do? Just wipe cache+dalvik and re-flash my rom?
3. Will I have to re-flash the kernel after each rom update?
Thanks!
Click to expand...
Click to collapse
1. When a new version comes out all you have to do is flash the new version on top of the old one. You can simply download it from the app and let it do a auto-flash. No need to wipe anything.
2. It depends. Some kernels will need you to flash the stock kernel first then flash the custom kernel you want to you. Ex. Faux kernel. Don't forget to read the first post of every thread to look for installation instructions.
3. Yes, you will need to reflash the kernel after a rom is flashed. Make sure to flash the kernel last.
Sent from my SGH-T999 using Tapatalk 2

scream4cheese said:
1. When a new version comes out all you have to do is flash the new version on top of the old one. You can simply download it from the app and let it do a auto-flash. No need to wipe anything.
2. It depends. Some kernels will need you to flash the stock kernel first then flash the custom kernel you want to you. Ex. Faux kernel. Don't forget to read the first post of every thread to look for installation instructions.
3. Yes, you will need to reflash the kernel after a rom is flashed. Make sure to flash the kernel last.
Sent from my SGH-T999 using Tapatalk 2
Click to expand...
Click to collapse
1. Does the app need a special recovery to work? I have a TWRP recovery..
2. What do you mean by stock kernel? And is it correct that Franco is the only kernel that I need to re-flash my ROM to switch to another kernel because it changes something in the ramdisk? If so, do I just need to do a dirty flash?
Thanks.

[email protected] said:
1. Does the app need a special recovery to work? I have a TWRP recovery..
2. What do you mean by stock kernel? And is it correct that Franco is the only kernel that I need to re-flash my ROM to switch to another kernel because it changes something in the ramdisk? If so, do I just need to do a dirty flash?
Thanks.
Click to expand...
Click to collapse
1. No special recovery needed. I too use TWRP.
2. Nothing special need be done to flash to Franco. Going from Franco to another kernel it is easiest to reflash your ROM. You are correct about the ramdisk.

grubbster said:
1. No special recovery needed. I too use TWRP.
2. Nothing special need be done to flash to Franco. Going from Franco to another kernel it is easiest to reflash your ROM. You are correct about the ramdisk.
Click to expand...
Click to collapse
2. So going from Franco to another kernel - just dirty flash without a factory reset?
Thank you very much.

[email protected] said:
1. Does the app need a special recovery to work? I have a TWRP recovery..
2. What do you mean by stock kernel? And is it correct that Franco is the only kernel that I need to re-flash my ROM to switch to another kernel because it changes something in the ramdisk? If so, do I just need to do a dirty flash?
Thanks.
Click to expand...
Click to collapse
1. Having a recovery is good. When you download a new kernel there is an option to let it do a auto-flash and it'll flash it you. The phone will reboot itself when it's done.
2. Some custom kernels need to flash the stock kernel, (the original factory kernel that it's shipped in) if you're going to switch to another custom kernel like Faux's kernel. So when the next time you want to make a switch to another kernel, please make sure to read the first post of the thread to look for instructions to install the kernel. If you're updating to a new rom or switching to a new rom, you will need to flash whichever custom kernel you were using on top of the updated/new rom. When you flash a new rom, it is recommended to do a full wipe to avoid issues. After every rom flash you need to flash the kernel.
http://forum.xda-developers.com/showthread.php?t=2008222
---------- Post added at 10:20 AM ---------- Previous post was at 10:19 AM ----------
[email protected] said:
2. So going from Franco to another kernel - just dirty flash without a factory reset?
Thank you very much.
Click to expand...
Click to collapse
No. no. You don't need to do a factory reset. I don't know how many times I'm going to say this but read my answers to all of your questions again. (Don't mean to sound like a jerk or anything)

scream4cheese said:
1. Having a recovery is good. When you download a new kernel there is an option to let it do a auto-flash and it'll flash it you. The phone will reboot itself when it's done.
2. Some custom kernels need to flash the stock kernel, (the original factory kernel that it's shipped in) if you're going to switch to another custom kernel like Faux's kernel. So when the next time you want to make a switch to another kernel, please make sure to read the first post of the thread to look for instructions to install the kernel. If you're updating to a new rom or switching to a new rom, you will need to flash whichever custom kernel you were using on top of the updated/new rom. When you flash a new rom, it is recommended to do a full wipe to avoid issues. After every rom flash you need to flash the kernel.
http://forum.xda-developers.com/showthread.php?t=2008222
---------- Post added at 10:20 AM ---------- Previous post was at 10:19 AM ----------
No. no. You don't need to do a factory reset. I don't know how many times I'm going to say this but read my answers to all of your questions again. (Don't mean to sound like a jerk or anything)
Click to expand...
Click to collapse
I think that's what he was saying/asking... That's correct, no need to factory reset.

Related

Custom kernel is gone after flashing a rom

Why is it that I have to reflash a custom kernel every time I flash the newest build of a rom?
Any time you flash a custom ROM, it will always include some kernel along with it. Hence, when you flash the newest build of a rom, you're also re-flashing the original kernel that it came with.
btse said:
Any time you flash a custom ROM, it will always include some kernel along with it. Hence, when you flash the newest build of a rom, you're also re-flashing the original kernel that it came with.
Click to expand...
Click to collapse
I see. Thanks! So I pretty much gotta flash my own custom kernel every time then?
As far as I know yes. There could possible be some way of flashing without the kernel, but I think it's much safer to just flash the whole custom ROM and then re-flashing your own custom kernel.
Yeah the easiest thing to do is just install the ROM with its kernel then just flash your kernel of choice.
Sent from my Nexus 4 using Tapatalk 2

[Q] Flashing different Kernels - Nexus 4

I am currently running a Nexus 4 with PARANOIDANDROID 2.99b+ (Feb03) flashed with the Franco r53 kernel.
I wanted to try out the Matrix 6.5 kernel on my phone and was wondering if there is any step that I need to perform before flashing the new kernel. I found the following post that includes a cleaner script: http://forum.xda-developers.com/showthread.php?t=2121701
I was wondering if this is required or if we can simply flash the matrix kernel over the franco kernel. Would that be possible?
Also, would it be possible to flash the new PARANOIDANDROID release (assuming it includes a kernel) then flash the matrix kernel over that? Would this cause problems because the cleaner script was not run before flashing the new rom which has its own kernel?
Was not sure how it exactly works and was hoping that someone would be able to help me out and clarify the process.
Currently, I think your safest option is to flash the newest version of the PA rom and gapps and then flash the kernel that you want. Because a lot of the kernel developers are are making changes to things that may not be overwriten when flashing a kernel from a different developer. For example I think that franco makes changes to the ramdisk that some other kernel devs don't touch.
linelock said:
Currently, I think your safest option is to flash the newest version of the PA rom and gapps and then flash the kernel that you want. Because a lot of the kernel developers are are making changes to things that may not be overwriten when flashing a kernel from a different developer. For example I think that franco makes changes to the ramdisk that some other kernel devs don't touch.
Click to expand...
Click to collapse
Cool, so I guess when we flash the rom and gapps it resets any changes that may have been made by Franco's kernel (or any other kernel for that matter). Hence, running any cleaner script is not required. Is this true?
Also, when flashing the kernel I wipe cahce, wipe dalvik, flash kernel, reboot. I read in another post that you should let it run for 10-15 minutes then reboot again to let the kernel "settle in". Is this actually required?
if you are running franco kernel, you want to either reflash your rom then the kernel, or flash the roms boot.img then the kernel. coming from other kernels, just flash the new kernel on top. the reason being that franco kernel uses its own ramdisk(and you want your roms ramdisk).
---------- Post added at 03:57 PM ---------- Previous post was at 03:56 PM ----------
jauwad.arshad said:
Cool, so I guess when we flash the rom and gapps it resets any changes that may have been made by Franco's kernel (or any other kernel for that matter). Hence, running any cleaner script is not required. Is this true?
Also, when flashing the kernel I wipe cahce, wipe dalvik, flash kernel, reboot. I read in another post that you should let it run for 10-15 minutes then reboot again to let the kernel "settle in". Is this actually required?
Click to expand...
Click to collapse
you do not wipe anything when flashing kernels, there is no need. wiping cache or dalvik has nothing to do with kernels, its just a misconception that keeps getting passed along.
simms22 said:
if you are running franco kernel, you want to either reflash your rom then the kernel, or flash the roms boot.img then the kernel. coming from other kernels, just flash the new kernel on top. the reason being that franco kernel uses its own ramdisk(and you want your roms ramdisk).
---------- Post added at 03:57 PM ---------- Previous post was at 03:56 PM ----------
you do not wipe anything when flashing kernels, there is no need. wiping cache or dalvik has nothing to do with kernels, its just a misconception that keeps getting passed along.
Click to expand...
Click to collapse
Awesome, thanks for the info. So I guess it is a safe practice to flash the boot.img (or just update the rom if you were going to anyways) and then flash the kernel.
jauwad.arshad said:
Awesome, thanks for the info. So I guess it is a safe practice to flash the boot.img (or just update the rom if you were going to anyways) and then flash the kernel.
Click to expand...
Click to collapse
yup. i tell people to just reflash their rom(and gapps) with the kernel, then reboot if they were running franco kernel. but its safe to flash the stock or your roms boot.img also, then the kernel.
simms22 said:
then reboot if they were running franco kernel.
Click to expand...
Click to collapse
I am not sure what you meant by that.
What I get out of all of this, is that if I want to try a new kernel this is what I should do in recovery:
Factory reset + wipe cache + dalvik cache
Flash new rom (PA rom in my example)
Flash gapps
Flash custom kernel if desired (Franco's kernel in my example)
Reboot
Is that correct or am I missing a step/doing something extra?
You might notice if you update your ROM (e.g. the next time PA gets updated, or if you switch to CM nightlies) that during the flash, the kernel will be overwritten - no matter which kernel you are using.
For example, flashing CM installs the CM kernel - regardless of if I was running Franco's before that. This is why apps like CyanDelta (which supports incremental updates to the ROM, but also the flashing of zips *after* flashing the ROM) are so handy. Every three days, I flash the latest CM nightly, and then Franco's kernel. If I left Franco's kernel off the CyanDelta list, the phone would be using the latest CM kernel after the flash.
EDIT: Your steps look good, if not a little bit overly protective. For instance, I don't think a full factory reset is required to test out a different kernel, generally speaking. Obviously, it wouldn't hurt to do... just takes time.
twitchcity said:
You might notice if you update your ROM (e.g. the next time PA gets updated, or if you switch to CM nightlies) that during the flash, the kernel will be overwritten - no matter which kernel you are using.
For example, flashing CM installs the CM kernel - regardless of if I was running Franco's before that. This is why apps like CyanDelta (which supports incremental updates to the ROM, but also the flashing of zips *after* flashing the ROM) are so handy. Every three days, I flash the latest CM nightly, and then Franco's kernel. If I left Franco's kernel off the CyanDelta list, the phone would be using the latest CM kernel after the flash.
EDIT: Your steps look good, if not a little bit overly protective. For instance, I don't think a full factory reset is required to test out a different kernel, generally speaking. Obviously, it wouldn't hurt to do... just takes time.
Click to expand...
Click to collapse
That is pretty cool. Would that same app work on the PA rom or is it just for CM nightly builds?
Yeah, I am doing the factory reset because its a new version of the PA rom. I prefer not to simply flash over my current rom.
If you're running the latest PA on a mako, just get their 'contrasty' kernel and no need for your voodoo rituals
I am currently on franco kernel milestone 2 and want to try trinity kernel.
I have taken a 'back-up' of the stock kernel on the franco kernel updater app before i flashed franco.
Can I now restore my phone to stock kernel using this back-up and then flash trinity?
Will this work?
auto freak said:
I am currently on franco kernel milestone 2 and want to try trinity kernel.
I have taken a 'back-up' of the stock kernel on the franco kernel updater app before i flashed franco.
Can I now restore my phone to stock kernel using this back-up and then flash trinity?
Will this work?
Click to expand...
Click to collapse
you can. or you can just reflash your rom and trinity, dont wipe a single thing. just flash the rom, kernel, then reboot.
jauwad.arshad said:
I am not sure what you meant by that.
What I get out of all of this, is that if I want to try a new kernel this is what I should do in recovery:
Factory reset + wipe cache + dalvik cache
Flash new rom (PA rom in my example)
Flash gapps
Flash custom kernel if desired (Franco's kernel in my example)
Reboot
Is that correct or am I missing a step/doing something extra?
Click to expand...
Click to collapse
Only if you have franco now and switch to another kernel. So if you want to flash franco you don't have to wipe anything.

[Q] Flashing kernel issue

I recently rooted my nexus 7 and now im trying to flash clemsyn's kernel to it, however i haven't been able to get it to work. I've tried rebooting into recovery and wiping the cache and dalvic cache, then installing from zip, but it always fails. any idea why?
You flashed it on which rom? I think it's not compatible with your rom.
Ensure you read the OP of the thread to verify that the kernel is compatible with the version of Android that you're using. Remember, always RTFM, even if you think you know what you're doing.
Do you have to flash a ROM before you flash a kernel?
The Drugs said:
Do you have to flash a ROM before you flash a kernel?
Click to expand...
Click to collapse
Roms include a kernel and will overwrite the previously installed kernel. If you want to flash a custom kernel in conjunction with a rom, you always flash the kernel after the rom.
Oh! That makes sense. I'll try that later and see if it works

Nexus 4 lag after kernel restore

Hi Everyone,
I have stock rom with franco kernel. Yesterday I reverted back to stock kernel and noticed that it lags now when I wake it from the unlock screen. I did a factory reset, but the lag is still there. This was never there when I had it from the begining. Should I flash the factory image?? Can the backup stock kernel get corrupted?
delf0s said:
Hi Everyone,
I have stock rom with franco kernel. Yesterday I reverted back to stock kernel and noticed that it lags now when I wake it from the unlock screen. I did a factory reset, but the lag is still there. This was never there when I had it from the begining. Should I flash the factory image?? Can the backup stock kernel get corrupted?
Click to expand...
Click to collapse
Try _motley's reset kernel, it restores other files that may have been changed too
http://forum.xda-developers.com/attachment.php?attachmentid=1737875&d=1361118181
Edit.. Note the link is the 4.2.2 version, check his thread if you need 4.2.1 reset.
delf0s said:
Hi Everyone,
I have stock rom with franco kernel. Yesterday I reverted back to stock kernel and noticed that it lags now when I wake it from the unlock screen. I did a factory reset, but the lag is still there. This was never there when I had it from the begining. Should I flash the factory image?? Can the backup stock kernel get corrupted?
Click to expand...
Click to collapse
after using franco kernel, you have to reflash your rom then kernel. franco kernel hides tweaks inits ramdisk. flashing another kernel on top will not change this ramdisk, so you have to flash your rom first(no wiping anything).
As I stated above...can I just fastboot then flash the factory image??
delf0s said:
As I stated above...can I just fastboot then flash the factory image??
Click to expand...
Click to collapse
absolutely. then youll need to reroot. its MUCH easier to flash a rooted stock(thats what im guessing you are using) rom though.
simms22 said:
absolutely. then youll need to reroot. its MUCH easier to flash a rooted stock(thats what im guessing you are using) rom though.
Click to expand...
Click to collapse
I would have to flash a custom recovery...then download a CWM stock rom and flash, huh? I currently have stock recovery
delf0s said:
I would have to flash a custom recovery...then download a CWM stock rom and flash, huh? I currently have stock recovery
Click to expand...
Click to collapse
You can fastboot flash the OEM boot.img; I'm guessing you fastbooted Franco's kernel?
http://forum.xda-developers.com/attachment.php?attachmentid=&d=1361814949
Flash this reset kernel which has the INITFRAMS.
all will be ok.
You don't have to reflash the whole phone.
Cheers
Sent from my Nexus 4 using xda premium
CMNein said:
You can fastboot flash the OEM boot.img; I'm guessing you fastbooted Franco's kernel?
Click to expand...
Click to collapse
No...I flashed the Franco kernel using the updater app.
mariosraptor said:
http://forum.xda-developers.com/attachment.php?attachmentid=&d=1361814949
Flash this reset kernel which has the INITFRAMS.
all will be ok.
You don't have to reflash the whole phone.
Cheers
Sent from my Nexus 4 using xda premium
Click to expand...
Click to collapse
Link is broken
delf0s said:
No...I flashed the Franco kernel using the updater app.
Click to expand...
Click to collapse
Either way, you can just flash the stock boot.img via fastboot and you're good to go.
CMNein said:
Either way, you can just flash the stock boot.img via fastboot and you're good to go.
Click to expand...
Click to collapse
I suppose I can...however....I currently have a chromebook (ARM)...dunno if I can use fastboot with it. I wanted a solution I could do straight on my phone, like, flashing CWM recovery, then downloading the stock (rooted, CWM flashable) ROM...and flashing it.
Get it from here http://forum.xda-developers.com/showthread.php?t=2101488
First post at attachments
Sent from my Nexus 4 using xda premium
---------- Post added at 11:50 PM ---------- Previous post was at 11:49 PM ----------
delf0s said:
I suppose I can...however....I currently have a chromebook (ARM)...dunno if I can use fastboot with it. I wanted a solution I could do straight on my phone, like, flashing CWM recovery, then downloading the stock (rooted, CWM flashable) ROM...and flashing it.
Click to expand...
Click to collapse
Just cause i am curious, why did you changed from Franco's?
Sent from my Nexus 4 using xda premium
simms22 said:
absolutely. then youll need to reroot. its MUCH easier to flash a rooted stock(thats what im guessing you are using) rom though.
Click to expand...
Click to collapse
Could you clarify this for me, If in the future I need to do it? So, after leaving franco kernel, i.e. If I'm using franco kernel and wanna go back to completely stock again; before flashing stock I'll need to re-flash the current rom that I'm using, to re-flash the rom's kernel and this way replace the ramdisk to the stock from rom? If I'm wrong, please correct me; you guys are awesome!
vjales said:
Could you clarify this for me, If in the future I need to do it? So, after leaving franco kernel, i.e. If I'm using franco kernel and wanna go back to completely stock again; before flashing stock I'll need to re-flash the current rom that I'm using, to re-flash the rom's kernel and this way replace the ramdisk to the stock from rom? If I'm wrong, please correct me; you guys are awesome!
Click to expand...
Click to collapse
yes, kinda. reflashing your rom will replace francos ramdisk. all the other kernels use anykernel, so dont have ramdisk included. generally, its only after using franco kernel do you want to do this, the other kernels you can flash right over each other. anykernel kernels grab the available ramdisk. theres plenty of stock/aosp rooted roms here on xda, any of them should work for you.

Want to change my kernel without wiping?

I'm currently on Franco Kernel but want to change to ElementalX kernel.
I've read that you can't just install the new kernel over the old kernel is that true?
Will I need to do wipe my device in order to install?
It's recommended to dirty flash stock or your rom, depending on what you use. No need to wipe anything.
Regards,
JoKe_42 said:
It's recommended to dirty flash stock or your rom, depending on what you use. No need to wipe anything.
Regards,
Click to expand...
Click to collapse
I'm not using any ROM just the Franco kernel.... so I should just flash over Franco with ElementalX kernel?
Newerabs said:
I'm not using any ROM just the Franco kernel.... so I should just flash over Franco with ElementalX kernel?
Click to expand...
Click to collapse
Flash a stock boot.img (which is the stock kernel) first then flash SuperSU if you want root, then flash elemental.

Categories

Resources