The Android structure

My first post was about “reverse engineering on Nokia n81” and since then the story didn’t change.. I still love play around with telephones and that Nokia was my last one. Now my new toy is Android!
It was November 2009 when I bought my first Android device, suggested by friend, it was (and still is!) the HTC Dream or better known as G1, one of the first google/android smartphone.

After almost 10 hours I bought it, I broke it (in lingo, bricked.. because it is useful only as a brick).

That wasn’t bad at all, “if you don’t try you can’t know”. In that case, I tried to root it and flash a custom rom, I just flashed the wrong one and when tried to restore it with something found on internet.. my phone didn’t switched on again.
Nevermind.. I went to the shop and asked for a new one “because mine was mysteriously broken”. I then repeated the steps to tweak it and this time without errors! But.. I said root, flash.. I guess it is better to start from the ground..

Android is a linux-based operating system mostly written in java and works under ARM, MIPS and x86 platform, its kernel is based on linux as well but with some changes made by Google, it doesn’t have the X-server and its set of standard GNU libraries is limited.

Android use an IPL: Initial Program Loader and an SPL: Second Program Loader. The SPL in conjunction with the IPL comprise a device’s bootloader.
The Radio (or baseband) is the firmware that controls low-level functions such as network connectivity, Wi-Fi, Bluetooth and GPS, it controls only the network connectivity aspects, Wi-Fi Bluetooth and GPS are governed by OS drivers (like any other devices).
The radio is closely associated with the SPL and ROM, many (custom) ROMs in fact wants the latest radio and SPL.
As any other device, the firmware or ROM is the operative system who lets the phone work.

There are many ROMs, AOSP (Android Open Source Project) – Stock – Custom.
AOSP are the roms without customization, the ones with the core of Android without all the changes made from producers. It’s the pure Android compiled source code.
Stock roms are the roms customized by the vendor and installed in any device, let’s call them “the original roms”.
Custom roms are instead the ones compiled from the source code (AOSP) with tweak and extra features made by developers.
The most known is Cyanogenmod and from its website we can read “CyanogenMod is an aftermarket firmware for a number of cell phones based on the open-source Android operating system. It offers features not found in the official Android based firmwares of vendors of these cell phones.”

Since I use Android I always used Custom roms, of course before flashing this kind of rom the phone has to be rooted.
The root is the procedure to gain administrative access on the telephone, just like using an administrator account (root is the linux-administrator-account). Root account is disabled on stock roms not by mistake, vendors say that it is there to prevent owners from making accidental changes that may render the phone itself useless.
With the administrator rights it is possible (among other things) to Theme the device, install 3rd party drivers (such as wireless), tweak memory and graphic settings, Overclock and downclock the cpu (downclock for battery life), install apps who require root access like OpenVpn – Titanium backup (useful) – Metamorph – Rom Control (an app you may found on custom roms to tweak the rom itself).. With root privileges you may also flash a custom rom and make backups through a modified Recovery image.

The Unlock can have 2 different meanings: The first is the procedure to unlock the phone that usually is network/sim locked by the brand. The second instead is the bootloader unlock, that allow the phone to be rooted.

When an android system boot up it is possible to choose 3 different partition of the android system (by pressing specific buttons when powering on the phone).
There’s the rom where the phone normally boot up, the 2nd is the bootloader where it shows the model/version of android and the 3rd is the recovery, usually replaced with a custom one (just like the rom) to unlock more features such as backup of entire android rom, flash of update file (rom – mod – kernel..) in .zip format, the wipe function to erase all the user and system data, cache and dalvik-cache. It is possible to flash the recovery image from the bootloader using the fastboot tool, but of course android must be already rooted to perform such action. The most known recovery images are AmonRa, CWM (ClockWorkMod recovery).

Well, if you get here it means that I haven’t been tedious, I hope I gave a better point of view for who doesn’t know this new operative system.. It took me weeks before understanding the way Android works, I learnt by reading and testing!

XDA is without doubts the perfect site for android users, many worldwide developers use it to share their knowledge and projects and for any user it is the best place where to learn.