Tuesday, May 8, 2012

Android rooting and custom ROM : small lexicon before rooting HTC One X

What is :
  • hboot : It's the bootloader. It's what decides to boot into recovery or android. (http://androidforums.com/desire-all-things-root/436495-hboot.html#post3386080). HBOOT is the bootloader, the first thing that runs when you boot up your phone. Like your regular Linux bootloader, it lets you boot off of different partitions. (Can someone explain these Android ROM hacking terms: HBOOT/bootloader, radio, recovery image, update.zip, NAND unlocking, RUU?)
  • recovery : In Android, recovery refers to the dedicated, bootable partition that has the recovery console installed. (What is recovery? [Android A to Z])
  • S-OFF & S-ON : In a nutshell, S-OFF means that the NAND portion of the device is unlocked and can be written to. The default setting for HTC’s devices is S-ON, which means that neither can you access certain areas of the system nor can you guarantee a permanent root. Furthermore, signature check for firmware images is also ensured by the S-ON flag. (What Is S-OFF & How To Gain It On HTC Android Phones With unrevoked forever and another one What is S-OFF? Why would I want to do it?)
  • NAND : The phone's internal memory (not the SD card) is solid-state (flash) memory, AKA NAND. It can be partitioned much like a normal hard drive can be partitioned. The bootloader exists in its own partition. Recovery is another partition; radio, system, cache, etc are all partitions.
    [...]
    During the rooting process, a critical piece of the process is disabling a security system built into the bootloader that protects these partitions from accidental (or intentional) modification. This is what's referred to as "unlocking NAND." The security system can be set to active or inactive. S-ON means the security is in place (NAND locked). S-OFF means the security is off (NAND unlocked). When S-OFF, you have the ability to modify all partitions. With S-ON, you only have write access to /cache and /data. Everything else is read-only.(Android partitions, kernels explained)
  • NANDroid & NAND backup : It's a backup and restore tool that allows you to take a full image of all the phone's internal NAND memory (hence the name) and store it on your SD Card. Should something go wrong with the phone's software, you can use the previously saved backup to restore the phone to a working state. (What is the relation between ROM Manager, ClockworkMod and Nandroid? Which one(s) do I need?)
    A Nandroid backup is a backup of your phone that is an exact image of the state of your phone. So you could make an exact copy of your current phone, then do major changes to it, and then restore to your previous backup by flashing the backup back to the phone. Flashing means to copy or to install.... you are essentially wiping the device and restoring a previous state (a backup) or you are flashing a new ROM (which is a custom version of Android). (What do “NAND”, “ROM” and “to flash” mean? [closed])
  • Odexed : In Android file system, applications come in packages with the extension .apk. These application packages, or APKs contain certain .odex files whose supposed function is to save space. These ‘odex’ files are actually collections of parts of an application that are optimized before booting. Doing so speeds up the boot process, as it preloads part of an application. On the other hand, it also makes hacking those applications difficult because a part of the coding has already been extracted to another location before execution. (What does odexed and deodexed mean ?)
  • DeOdexed : Deodexing is basically repackaging of these APKs in a certain way, such that they are reassembled into classes.dex files. By doing that, all pieces of an application package are put together back in one place, thus eliminating the worry of a modified APK conflicting with some separate odexed parts.
    In summary, Deodexed ROMs (or APKs) have all their application packages put back together in one place, allowing for easy modification such as theming. Since no pieces of code are coming from any external location, custom ROMs or APKs are always deodexed to ensure integrity." (What does odexed and deodexed mean ?)

Here are some resources for a more complete introduction :
And what rooting is useful for :

No comments: