Learning the Android Hardware and Operating System

Last Updated:

  1. Wadester

    Wadester Well-Known Member

    Hi! I'm looking for some resources that explain how the Android hardware and OS works as a whole. Most of the posts I see on here have to do with specific areas. My goal is have a better understanding about:

    1. HBOOT - Different versions, How it works, how to update it, etc.
    2. Recovery - Different versions, How it works, how to update it, etc.
    3. System Partitions - System, Cache, SD-EXT, etc. - What each partition contains
    4. Kernels - Different versions, how to load/replace
    5. Radios

    I looked for an "Android for Dummies" book and notice there's one for app dev coming out in December -- which I'll probably get. But I'd like to know more about the OS itself first.

    Any suggestions?

    esj likes this.
  2. wake69

    wake69 Well-Known Member

    google.com works usually, or go to the wiki at xda, some good resources there
  3. Wadester

    Wadester Well-Known Member

    I've tried searching through Google and Wiki but can't find what I'm looking for. Most results are only about specific things or phone models. I'm looking for something like an overall guide.
  4. wake69

    wake69 Well-Known Member

    there a million topics out there with the answers you are looking for, i can not explain them all, but they are out there

  5. FestoKGB

    FestoKGB Well-Known Member

    [Newbie Guide] adb/fastboot/bootloader/android 101 - xda-developers

    esj and wake69 like this.
  6. Wadester

    Wadester Well-Known Member

    Thanks, guys. But I think the purpose of this forum is to ask questions and hopefully get answers from people who know about the subject -- other than "Google it". Otherwise, this forum has little purpose. I've helped others out by specifically answering their question. I didn't go and suggest they "Google it". I'm asking if someone know a location of a book or site that already exists.

    Thanks, FestoKGB, that XDA post comes close as it does she a little light on the subject. I guess I'm hungry for a lot more detail on the overall boot process.
  7. Mr. Ed

    Mr. Ed Well-Known Member

    honestly the best resources are going to come from google...as it is their operating system/ project.

    more specifically try:

    please note I haven't started looking at any of this...I just received it yesterday...and think it may have useful information in it.

  8. FestoKGB

    FestoKGB Well-Known Member

    I think the reason some folks get a little snarky with the "google it" stuff is because that is often how the person who answers the question gets the answer.

    I didn't just know that link that I gave you off-hand. I googled for it. I try different keyword combinations to vary my results.

    Anyway, here is another link that I googled that may help you. As Neo was instructed, so shall I instruct you. Return to The Source. There you will find enlightenment and guidance for your journey...

    What is Android? | Android Developers
  9. Wadester

    Wadester Well-Known Member

    You make a good point, FestoKGB. If no one else had a direct answer, I'll start there. I appreciate your assistance.
  10. novox77

    novox77 Leeeroy Jennnkinnns! VIP Member

    Not sure how technical you want this info, so I'll keep it simple.

    1) HBOOT is the bootloader. On the Evo, you can get to it by powering off your phone, then hold power and vol-down together until the white bootloader screen appears. There are two versions: the Release bootloader and the Engineering bootloader. Release is what we all got out of the box. Depending on your root method, you may have the Engineering bootloader. To fully unlock/root/jailbreak your phone, you want the Engineering bootloader. Not essential anymore ever since unrevoked forever and unrevoked 3.2x came out, but some custom ROMs require the extended fastboot commands available only with the Engineering bootloader.

    2 and 3) The phone's internal memory (not the SD card) is solid-state (flash) memory, AKA NAND. It can be partitioned much like a normal PC hard drive can be partitioned. The bootloader exists in its own partition. Recovery is another partition, radio, system, cache, etc are all partitions. The recovery image is the program that is written to the recovery partition. It's purpose is to recover your phone's system in case something gets corrupted. For the Evo, there are 2 choices for custom recovery images: clockworkmod and RA. Both have their uses. They give you the ability to flash ROMs. They also allow you to clear cache and make a NANDroid backup/restore (an image of all the partitions on the NAND flash memory). Here are the standard partitions on an Android phone:

    /misc - not sure what this is for.
    /recovery - the recovery partition, explained above
    /boot - bootloader, kernel
    /system - operating system goes here: Android, Sense, boot animation, Sprint crapware, etc
    /cache - cached data from OS usage
    /userdata - user applications, data, settings, etc.

    When you flash a custom ROM, that ROM typically includes a kernel and an OS. That means the boot and system partitions will be modified.

    When you do a factory reset (AKA: wipe, hard reset, factory wipe, etc.), you are erasing the /userdata and /cache partitions. Note that a factory reset does NOT put your phone back to its factory state. If you've upgraded to froyo, you will stay on froyo, because the OS lives in /system, and that is not touched during a factory reset. So it really is a poor choice of words.

    The SD card can also be partitioned to include a section dedicated to storing user apps. To create the partition, your SD card needs to be formatted. Typically a user will copy all the contents in the SD card to a PC hard drive, wipe the card and partition it, and then copy everything back.

    4) Operating systems and kernels go hand-in-hand. Some custom OSes will require a particular custom kernel that was built for that OS. Some kernels are intended for universal use (compatible with any OS). When you flash a custom ROM, you automatically get a kernel. But you can also flash a standalone kernel ROM on top of the existing, effectively overwriting it. A popular combination is a rooted stock ROM with a custom kernel. For the Evo, the hot features of kernels are:

    -- a fix to remove the 30fps cap imposed by HTC and improve touch tracking sensitivity (though the latest OTA update includes an HTC kernel that also fixes these problems)
    -- disabling perflock to enable CPU throttling. Great for increasing the performance of your phone and/or improving battery life
    -- iptables firewall to enable wifi-tethering via the wifi-tether app
    -- 3 or 5 point multitouch support (not too many practical applications tho)
    -- HAVS (a control system that dynamically adjusts the voltage based on CPU load). This has proven to be huge for battery life.

    5) Radios are in their own separate partition. I don't claim to know much about this. NANDroid backups do not back up the radio partition. AFAIK, there are no custom radio ROMs to flash. As long as you have the latest stock radios, you are good to go.
    Bleelas, EvoWalkman, 7shadows and 6 others like this.
  11. Wadester

    Wadester Well-Known Member

    Wow, novox77... that's awesome!! THANK YOU very much! It was really helpful!
  12. wadeos

    wadeos New Member

    Thanks for the great reply novox7, and thanks for asking the question Wadester! Very helpful to me... after my Google search. ;)
  13. Wadester

    Wadester Well-Known Member

    I'm glad someone else found his information very useful as well!
  14. wrapkgb

    wrapkgb Well-Known Member

    novox77 comes to the rescue again... Nice write up!
  15. esj

    esj New Member

    Yes, Thanks novox77 and wadster. I have had my evo for about 3 weeks now, and though I am an old unix hack, have been hesitant to root it because I just didn't have a clear picture of how all the pieces fit together. This thread and novox77's response really helped.
  16. Wadester

    Wadester Well-Known Member

    novox77, about "flashing"... you can flash an entire ROM, plus you can also flash a different HBOOT, Kernel and other things the same way, correct?

    For example, I use ROM Manager to load new ROMS I've downloaded via "Install ROM from SD Card" (Baked Snack, Fresh, etc.). Can I use that same method to load the Engineering HBOOT, for example? I have HBOOT-0.92.0000 now. All I need to do is find and download 0.72 and flash it in ROM Manager.

    I ask because I'm interested in Cyanogen's ROM but I hear you need the Engineering HBOOT for it to load correctly. And the Engineering version will work when loading all other ROMs, correct, so once it's flashed, I shouldn't need any other version? I'm just worried about my phone being stuck in a boot loop. :)
  17. novox77

    novox77 Leeeroy Jennnkinnns! VIP Member

    ROM is the general term for the thing you are flashing. A ROM is really a package. It can contain one thing, or it can contain a bunch of things.

    There are three ways to flash something:

    1) a .zip package in a standardized format that allows the recovery image to find all the individual images in the package. This is probably the most common format for flashing a ROM.

    2) an .img file which is flashed with the fastboot utility on the bootloader. Some custom ROMs include a shell command with the OS that allows you to flash .img files via the shell (adb shell or any other shell terminal into your phone). An .img ROM is specific to exactly one partition.

    3) a PC36IMG.ZIP package. When you first boot into the bootloader, you will see it scan for a bunch of files. One of the files it looks for is this one. If this file exists in the root of your sdcard, it will try to install its contents.

    Flashing a bootloader is usually done with a PC36IMG.ZIP file that contains the bootloader image. If you want to flash the engineering bootloader, google for it along with PC36IMG.ZIP. You should be able to find one easy. Then, put the file at the root of the sdcard, and then boot into your bootloader. It will ask if you want to install; say yes, and there you go.

    Kernels, radio, wimax, custom ROMs are typically distributed in .zip format. You can use ROM Manager, or you can boot into recovery and use the "install zip from sdcard" option. I prefer flashing from recovery rather than use ROM Manager, but that's just a personal preference.

    Recovery images are typically in .IMG format and flashed using fastboot from the bootloader. If you dig around, you can find clockworkmod recovery in .ZIP format as well. From RA, you can flash this zip and switch recoveries for 1 session. Next reboot reverts back to RA. Useful if your nandroid backups were made with clockwork (RA can't read CW nandroids).

    Fastboot can also be used to flash a custom splash page (to replace the stock white htc EVO 4G splash screen when your phone boots up).
    EvoWalkman and Wadester like this.
  18. Wadester

    Wadester Well-Known Member

    That's more awesome information!

    Well, I thought I knew enough to go ahead and change HBOOT to the Engineering version 0.76.2000. But once I flashed it, all my ROM Manager backups wouldn't load. So I guess the lesson learned is that if you change HBOOT's or Recoveries, you can't use your previous ROM backups.

    My phone kept booting to the HBOOT screen and wouldn't go any further even after trying to load a backed up ROM or a new one. So I remembered I had a PC36IMG.ZIP file I previously downloaded to my SD card which is an older stock ROM. I had to pull my SD card, copy the PC36IMG.ZIP file from a subfolder down to the root, re-insert the card and reboot. HBOOT saw it and re-loaded it so at least it got be back up and running. I'm now able to re-root and I even loaded CynogenMOD (very different).

    The only problem now is that the stock ROM from PC36IMG.ZIP is the previous version before the last one which removed the 30FPS cap. I checked for HTC software updates, downloaded the latest one but it won't load. I get the graphic triangle with exclamation point after it starts which requires a battery-pull. I even reloaded it without rooting and it failed. I'm guessing it's because my security setting is S-OFF and it doesn't like that. I'm going to look for the manual update which I needed because I originally loaded the pre-release but it fixed that.
    EvoWalkman likes this.
  19. AHP

    AHP Member

    Try the setup in my sig. I followed the directions on installing the Fresh rom and haven't looked back.
    I have linked everything to make it easier for you to find it.

    Hope this helps.
  20. Wadester

    Wadester Well-Known Member

    Thanks, AHP, but I'm already back up and ROMming again. :) I just had to re-load new ROMs and back them up again -- no biggie.
  21. EvoWalkman

    EvoWalkman Active Member

    So if I wanted to add a engineering version to the HBOOT I would have to find a ROM in PC36IMG.ZIP format? Im interested in doing this but I'm worried that I will never be able to boot my phone if I can't get my backups to load.
  22. Wadester

    Wadester Well-Known Member

    Yeah, that's how I recovered. Of course, it's a permanent addition to my SD card. :)
  23. EvoWalkman

    EvoWalkman Active Member

    Is that good or bad? Do you possible have a link to where I can find this file or a keyword to search for it?:)
  24. Wadester

    Wadester Well-Known Member

    You can search here or XDA for "PC36IMG.ZIP stock" and optionally "root".
    EvoWalkman likes this.
  25. EvoWalkman

    EvoWalkman Active Member

Share This Page