1. Are you ready for the Galaxy S20? Here is everything we know so far!

Firmware vs ROM and rooting

Discussion in 'Android Lounge' started by vantiveman, Dec 22, 2011.

  1. vantiveman

    vantiveman Member
    Thread Starter

    Hi All,
    I admit to being a newbie when it comes to rooting, but have recently taken the plunge and now have an insecure kernel, enabling me to use some great apps like titanium backup.
    However, I am still confused about the terms kernel and ROM (as I am from a Windows background).
    I understand that Kernel is basically the System OS programs, and that ROM is the collection of user programs that make up the look and feel of the user experience. However, when a new ROM is flashed, does that also include the kernel?
    I imagine that the level of kernel and the level of ROM have to be the same so, for example, if I just have an insecure kernel for version KI4, then the ROM also has to be at the same level. I am concerned primarily about flashing a new ROM that is not compatible with KI4.
    By the way, I have an unlocked Galaxy S2 and, now that it is rooted, I have also a custom boot animation. I read somewhere that boot animations were a problem on the S2, but I can confirm that as long as bootanimation.zip is copied to system/media there should not be a problem, though this may not be the case with branded S2s.

    All the best, and I wish all members a very Happy Christmas.
    Alan.
     



    1. Download the Forums for Android™ app!


      Download

       
  2. jerofld

    jerofld Fixing stuff is not easy

    No, you have the definitions mixed up.

    A kernel is like a collection of drivers. It operates wifi, your radios, bluetooth, the CPU, et cetera. But it operates at a lower level than the OS. It's like the foundation on which the OS is allowed to operate. Windows also has a kernel. Once I deleted kernel32.dll on an old Win 95 computer and, well...let's just say 3 hours later after reinstalling Windows, I knew better to do that again.

    A ROM is the Operating System. It's a customized version of the Android Operating System. This includes all system apps and sometimes 'user' apps that are installed in /data. It depends on how the ROM author wants to do things.

    If you flash a ROM, does it include a kernel? Sometimes yes, sometimes no. The ROM author will generally tell you (in the patch notes or feature notes) if a kernel is included. Can you flash a ROM without flashing a kernel? Yes. Can you flash a kernel without flashing a ROM? Yes. As long as you have 1 working kernel that's specifically made for your device and 1 working ROM that is designed for your device, you will have a working phone.

    And just because you flash a custom kernel, it does not mean it's 'insecure'. In fact, many custom kernels are more secure because the authors patch security holes.

    Bootanimations can be tricky. You can't just zip up a number of frames and expect it to work. The zip file has to be packed as 'store' (as in, no compression). Android won't open boot animations that have been compressed.
     
    Gmash, dan330 and vantiveman like this.
  3. vantiveman

    vantiveman Member
    Thread Starter

    Hi Jerofld,
    Thanks for your clarifications! Sound more like the kernel is the approximate equivalent of the BIOS of Windows systems, i.e the part that handles the interactions between programs and the device hardware.
    I called the kernal 'insecure' just because that's what it was called where I downloaded it. I assumed that 'insecure' (shouldn't that be unsecure?) referred to the fact that it was now completely 'open' to the phone user.
    Your point about having a kernel specific to my machine and a ROM specific to my machine - do you mean that I can have a kernel at XXKI4 (which is for my 2.3.4 ROM) but I can mix this with a ROM made for 2.3.6?

    I agree totally about the boot animations. I actually first changed mine based on a demo in YouTube but, after finding that it worked, I got an app from the market that provides shedloads of boot animations that can be installed just be pushing a button. I just wanted to make the point that it is working fine on my rooted (stock ROM) Galaxy S2.
    Maybe branded versions have been made less easy to modify in this way.
    Thanks again for your feedback. I truely appreciate your clarifications.

    Regards,
    Alan.
     
  4. T.M.M.L

    T.M.M.L Android Enthusiast

    This is Yes and No answer. Sometimes it works. Sometimes not.

    I usually try to match kernels with ROM versions, just to avoid unnecessary issues.
     
    vantiveman and jerofld like this.
  5. vantiveman

    vantiveman Member
    Thread Starter

    OK. Thanks Guys,

    Have a great Holidays!
     
  6. jerofld

    jerofld Fixing stuff is not easy

    For 'insecure' meaning 'not-official', I can understand that. But I assume you got it from XDA? XDA, in general, is a fairly reliable place to get ROMs, Kernels, and apps. If anyone puts out anything that isn't legit, people figure it out pretty quickly and the guy that put it out gets blacklisted just as fast. XDA is pretty strict on complying with the GNU (which means they have to provide source codes). It's hard to hide malware when your source code is in the open.

    As for branded models of the S2, I'm not so sure that matters. Once a device is rooted and you can flash custom ROMs/kernels from custom recoveries, branding matters little. Because you can pull out the stuff that the carrier put in and have a device as Samsung designed it.
     
  7. Crashdamage

    Crashdamage Android Expert

    Just to clear things up a bit...

    BIOS does NOT = kernel. Put simply, the bios is even lower level than the kernel. The BIOS does very basic setup that allows the kernel to load drivers, etc. and boot the computer.

    The kernel is part of the OS, but not really a complete OS. It's only the basics - drivers (not necessarily all that are used) memory management and some other low-level processes. The kernel is included in ROMs, and all Windows, Linux distros, MacOS etc.

    Other default software (utilities, etc.) flushes out a complete basic OS to make it useable. Additional drivers and software are loaded as needed or desired.
     
    dan330 and vantiveman like this.
  8. vantiveman

    vantiveman Member
    Thread Starter

    Yep, I used XDA as the source for the KI4 kernel, and thanks Crashdamage for the additional clarifications. It all helps me to understand how the system is structured. Very important if I need to dig myself out of some hole sometime!

    Can you suggest a stable ROM that I might be able to use on my Stock Galaxy S2? I'm really looking for somethung that already has bloatware removed and has performance and battery benefits over the stock rom.
    Thanks,
    Alan.
     
  9. jerofld

    jerofld Fixing stuff is not easy

  10. dan330

    dan330 Extreme Android User

    more clarification:

    Kernels and ROMs are not always interdependent.

    Kernels are normally tied to the android version / update version. They are not normally tied to ROMS. then the stock kernels are tweaked by the Dev for better performance or usability.

    all ROMs will come with a kernel..but usually just the stock kernel from the OEM.
    Some ROMs are more customized.. and the developer might change the stock kernel for one of the custom Kernels to help his ROM work better. Some Kernel Developers might customize their kernel to a specific ROM.
     
  11. vantiveman

    vantiveman Member
    Thread Starter

    Hi Dan,

    all ROMs will come with a kernel..but usually just the stock kernel from the OEM.

    Does the above mean that, if stock kernel is re-flashed with the rom, the phone will no longer be rooted?
    I might have a basic misunderstanding here, but I rooted by flashing an insecure kernel, so I assumed that re-loading a 'stock' kernel would remove root.
     
  12. jerofld

    jerofld Fixing stuff is not easy

    No, you'll still be rooted with a stock kernel. The ROM actually holds the superuser app and bins. So, if the ROM says it's a 100% stock ROM to unroot (for returns or whatever), then that would unroot you. Usually that ROM is a sticky in the ROM forum (assuming we're talking XDA at this point). So, as long as you avoid that, you'll always be rooted.

    Oh, and don't take any Over the Air (OTA) updates. That'll unroot you, too.
     
  13. dan330

    dan330 Extreme Android User

    if you get a ROM from a Dev... and most will have stock kernels in them.. they have unlocked the kernel for their ROM. must Dev just take the unlocked kernel from some other Dev that put it out, and use it in their ROM.

    you can find these stock unlocked Kernels for your backup.. .when you are flashing custom kernels, it is good to have the stock for backup! Just make sure you have the correct kernel for the version of android you are using.
     
  14. vantiveman

    vantiveman Member
    Thread Starter

    Hi Guys,

    I just flashed the stock kernel back to my Galaxy S2 and, as advised, I was still rooted and no longer have the yellow triangle when I power on.
    However, I also found that I now have the standard boot animation, even though I still have a bootanimation.zip file in system/media.
    This worked with the insecure kernel, but no longer works with stock back in again.
    Is this expected? I kinda liked having a customized boot animation, so maybe I need to go back to the insecure kernel again to get it back?
    Thanks,
    Alan.
     
Loading...
Similar Threads - Firmware ROM rooting
  1. luizcrf
    Replies:
    2
    Views:
    513
  2. Earendil_Strife
    Replies:
    5
    Views:
    1,389
  3. XforumasX
    Replies:
    8
    Views:
    2,838
  4. chump45
    Replies:
    4
    Views:
    528
  5. Bob_The_Aged
    Replies:
    1
    Views:
    1,476
  6. thesisSynthesis
    Replies:
    6
    Views:
    582
  7. Anarchy 2021
    Replies:
    0
    Views:
    586
  8. Charles Mbillo
    Replies:
    1
    Views:
    560
  9. androidtvfan
    Replies:
    1
    Views:
    553
  10. ErasedZim
    Replies:
    3
    Views:
    663

Share This Page

Loading...