[Q] How can CWM be built in a kernel? - Android Q&A, Help & Troubleshooting

I was learning about android, bootloader etc in xda wiki and I read somewhere that the recovery has its own kernel, so it can load even when the firmware is damaged. Ok, but then i read that some custom kernels have CWM built-in. How can a kernel and a recovery be built in another kernel?
Sorry if I expressed it badly or misunderstood something.
And sorry for my bad english, I'm brazilian.

Related

[Q] Fantasy or Solution for Bad block in Nand memory?

My xperia ray has bad block in Nand memory and I can't flash custom kernel. I try aire and doomlord kernel, but the phone bricks (log with 1 bad block encounter).
I read that it's a hardware issue and isn't possible to fix, but in some case small kernel can flash correctly, because kernel isn't written in damage part.
My question is: if I use a light kernel without cwm and other "big staff", to have a smaller kernel to flash, can it work correctly? Is this my fantasy or possible solution?
My target is overclock my phone.
I don't know how to recompile a kernel, but I can learn.
Ps: sorry for my bad English, I hope you understand.
Sent from my ST18i using xda app-developers app
moved to device specific Q&A section
A custom kernel works without CWM? Is it to possible to have a custom kernel without CWM, preferably GB kernel?
Yes, a kernel would work without a cwm ( even the stock kernel dosen't have a recovery). If you want you try removing the recovery on your own. Try searching on google or the forums on how to modify a kernel.
Sent from my P300(Funbook) using Tapatalk 4 Beta

Kernels and ROMs

Hi xda!
I'm noob on this forum, so don't swear me for coming up with noob questions.
I hope I posted this thread for the right pleace, If not, let me know that.
So.. I bought a Galaxy S2.. I head the stock ICS 4.0.3 android OS on it, but I decided to try some custom ROMs. (Thanks for my cousin for that.)
So I started with the ROM S4. Worked very fine, the battery life was good.
In fact.. My question is, that... Can I flash any kind of Kernel on any kind of ROM?
I mean.. If I flash a custom ROM such as Cyanogenmod 10.2 on my phone, I can flash a Franco Kernel on it?
Or. Now I use Vivek ROM bassed on android 4.1.2 Jelly Bean using Jeboo Kernel v2.2. Can I flash on this a Franco Kernel ? Or it will brick my phone?
I would really need an answer.. I've been searching on the forum, but couldn't find anything..
PS: Sorry for my bad english. I'm Romanian, and the English language is only my 3rd language.
Hi...
If you installing Any custom rom on your device check that if that rom needs any custom kernel or not . The publisher specified that kernel in their thread. If they not mentioned that it means your stock kernel will be fine with that rom
Any more quesions regarding this.. post below ...
Press Thank Button (left corner of my post) if I helped you..
Sent from my GT-S6102 using xda app-developers app

[Q] Changing ROM changes recovery as well?

Hi!
I am new to this phone an I am confused about one thing. With my previous phone, I installed any ROM that I wanted, and the cwm recovery would be the same, and will not be affected at all. But, I changed my ROM to PACman ROM and I noticed that the cwm recovery version changed as well.
So, I have three questions:
- Firstly, How does this work? I opened up a ROM zip package, but I only found the regular android files, but I didn't find any recovery.img. So, how does replacing the ROM replace the recovery work when a ROM is flashed?
- Secondly, does changing only the kernel also change the cwm recovery? For example, if I flash Dorimanx kernel, will it also change the cwm recovery? If yes, then how does this work?
- Lastly, if I build a ROM, is it necessary to add a recovery with the ROM as well? Or, if I build a ROM without recovery, will it affect the recovery when it is flashed?
I know that these questions might have long answers, but I am keen to know the answers, no matter how long they are.
Please try to answer all three of the questions. Or, answer as many as you can, because those questions regarding the changing of cwm recovery is very confusing.
Thank You.
Hello, congrats on your new phone Unfortunately, i can't give you lenghty information about this because i don't think i know that much, but here are some facts for you:
-When you flash a new ROM, it will overwrite kernel too, so you will have a new kernel,
-When you flash a new kernel, it will overwrite the recovery, so you will have a new recovery,for example if A kernel has cwm as recovery, if you flash A kernel you will have cwm, and if B kernel has TWRP as recovery, when you flash B kernel you will have TWRP recovery,
-Since you have to have a kernel for your ROM, if you build a ROM, you must have a kernel=recovery, you can build the kernel yourself or use someone's kernel, but recovery must be embedded in the kernel (As far as i know)
When you start building your own ROM, i think you will find out the "how"s yourself though
Dakura said:
Hello, congrats on your new phone Unfortunately, i can't give you lenghty information about this because i don't think i know that much, but here are some facts for you:
-When you flash a new ROM, it will overwrite kernel too, so you will have a new kernel,
-When you flash a new kernel, it will overwrite the recovery, so you will have a new recovery,for example if A kernel has cwm as recovery, if you flash A kernel you will have cwm, and if B kernel has TWRP as recovery, when you flash B kernel you will have TWRP recovery,
-Since you have to have a kernel for your ROM, if you build a ROM, you must have a kernel=recovery, you can build the kernel yourself or use someone's kernel, but recovery must be embedded in the kernel (As far as i know)
When you start building your own ROM, i think you will find out the "how"s yourself though
Click to expand...
Click to collapse
That was short, but it does kind of make sense. Since I am using CM kernel right now, I guess the recovery will already be in there. But, If I want to create my own kernel from scratch, then are there any guides or information pages that give me an idea on how to do it?
Thanks.
All that stuff is in the development sections (where the devs live), Q&A is the wrong place for stuff like this (Q&A is for n00bs with busted phones). Google/XDA search for specifics or maybe ask a few devs in the threads devoted to their kernels/roms.
Yep, the recovery will be embedded to kernel. Here is the index of guides: http://forum.xda-developers.com/showthread.php?t=1826497 (thanks to pelpa87)
Index of kernels: http://forum.xda-developers.com/showthread.php?t=1702166 (thanks to GaboWinter)
I use G variant and there is a nice tutorial for us, you can read and see if there is anything you want to learn from there : http://forum.xda-developers.com/showthread.php?t=2495727 (thanks to Black_Prince)
MistahBungle said:
All that stuff is in the development sections (where the devs live), Q&A is the wrong place for stuff like this (Q&A is for n00bs with busted phones). Google/XDA search for specifics or maybe ask a few devs in the threads devoted to their kernels/roms.
Click to expand...
Click to collapse
I don't believe you.
Dakura said:
Yep, the recovery will be embedded to kernel. Here is the index of guides: http://forum.xda-developers.com/showthread.php?t=1826497 (thanks to pelpa87)
Index of kernels: http://forum.xda-developers.com/showthread.php?t=1702166 (thanks to GaboWinter)
I use G variant and there is a nice tutorial for us, you can read and see if there is anything you want to learn from there : http://forum.xda-developers.com/showthread.php?t=2495727 (thanks to Black_Prince)
Click to expand...
Click to collapse
Thanks for your time.
Dakura said:
Yep, the recovery will be embedded to kernel.
Click to expand...
Click to collapse
But, if, for example, I install dorimanx kernel, then the recovery embedded in dorimanx kernel will be installed. So, if I dualboot a second ROM from dorimanx recovery, then the recovery from the second ROM would be installed. That would mean that I won't be able to dualboot again?
Hmm, i think dualbooting has some different mechanisms, since you dual boot you have to have ONE kernel that supports dual boot, recovery will be the same since kernel is the same. So basically, you have A rom which has A kernel, then you flash B rom which has B kernel to dualboot, but there can't be two kernels at the same time so you must choose between A kernel or B kernel (both has to support dualboot ofc), and since recovery is embedded in kernel, you will have A recovery or B recovery, not both.

[Q] Cant install rom

Hey guys,
last time if i would like to install a new rom on my gt-i9300 it hangs on booting. I must boot in to the recovery and flash another kernel, but than the second problem, the camera FC(cannot connect to camera).
sorry for my bad english
What rom, kernel etc are you flashing? This should really be in the ROM thread rather than here.
Sent from my GT-I9300

Kernel and recovery

Hi,
I wish to install a newer ROM than the one I currently have, yet it seems I might need a new kernel and CWM instead if TWRP.
So my questions are:
1. How do I know if I need a new kernel?
2. At some kernel threads, it is said that they only work with kitkat ROMs for example, and other ROMs might brick the phone with this kernel.
So do I flash a new kernel first or a new ROM first? Basically, how do I not brick my phone?
3. I read somewhere that SGS2 users can't install recovery without installing a new kernel. Is it true?
4. I would appreciate some directions about installing a new recovery (I would probably need CWM).
5. Why is it so hard to find answers to these probably many times asked questions?
Thanks.
peasmaker said:
Hi,
I wish to install a newer ROM than the one I currently have, yet it seems I might need a new kernel and CWM instead if TWRP.
So my questions are:
1. How do I know if I need a new kernel?
2. At some kernel threads, it is said that they only work with kitkat ROMs for example, and other ROMs might brick the phone with this kernel.
So do I flash a new kernel first or a new ROM first? Basically, how do I not brick my phone?
3. I read somewhere that SGS2 users can't install recovery without installing a new kernel. Is it true?
4. I would appreciate some directions about installing a new recovery (I would probably need CWM).
5. Why is it so hard to find answers to these probably many times asked questions?
Thanks.
Click to expand...
Click to collapse
1 - if you are happy with your current rom, dont flash a kernel if not sure what you are doing!
2 - kk and LP kernels are not compatible between them as your cpu doesn't fit in a incompatible motherboard ! newer kernels are safe from brickbug ! you wont brick your phone with a wrong kernel (kk kernel over LP rom), just a bootloop.
3 - because a kernel is a recovery and a recovery is a kernel.
4 - Slimsaber is a good rom to start see first and second post
5 - is not hard to find if you know were to look!
ultravy said:
3 - because a kernel is a recovery and a recovery is a kernel.
Click to expand...
Click to collapse
Just a small correction. A recovery (CWM or TWRP) can not be installed by itself because we don't have a recovery partition. Therefore kernel with a custom recovery needs to be installed.
ultravy said:
1 - if you are happy with your current rom, dont flash a kernel if not sure what you are doing!
2 - kk and LP kernels are not compatible between them as your cpu doesn't fit in a incompatible motherboard ! newer kernels are safe from brickbug ! you wont brick your phone with a wrong kernel (kk kernel over LP rom), just a bootloop.
3 - because a kernel is a recovery and a recovery is a kernel.
4 - Slimsaber is a good rom to start see first and second post
5 - is not hard to find if you know were to look!
Click to expand...
Click to collapse
1. I am happy with the current ROM, yet I want to flash the kernel to fix the annoying FPBug and to finally get LP ROM. And I might not know what am I doing, but if I won't try I will never know
I've flashed a new kernel and a new LP ROM, and I'm trying some others.
I still find it difficult to find a kernel that answers my needs since many kernels are hiding in specific posts and some kernel threads doesn't mention which recovery they install.
gsstudios said:
Just a small correction. A recovery (CWM or TWRP) can not be installed by itself because we don't have a recovery partition. Therefore kernel with a custom recovery needs to be installed.
Click to expand...
Click to collapse
I appreciate both help, I learned some new stuff thanks to you guys.

Categories

Resources