Thursday, January 28, 2016

rom flashing - What Android parts do these terms describe?


Android users frequently use a lot of words with unclear meanings. In particular, they use these words a lot:



  • Framework / framework-res.apk: What purpose does this structure serve?

  • Flashing: What does this refer to?

  • ROM: What does this refer to?

  • Firmware: What does this refer to?


  • update.zip: This is an update package replaces files on your filesystem. What parts of the system can update.zip change?

  • Kernel: The kernels they talk about seem to persist across 'flashing' and 'resets' of the device.

  • Android Release: When someone talks about Android 'KitKat,' or 'Gingerbread' or '4.2.2,' what parts of the whole system are they referring to?

  • Custom ROM: What parts of the system do 'CyanogenMod' and other 'Custom ROMs' replace?

  • Titanium Backup: What parts of the system does Titanium Backup back up?

  • Factory Reset: If I wiped the internal storage (say, dd if=/dev/null of=), what can it reset to!?




Here are some relevant terms that are publicly well-documented and known:





  • BIOS. When the system is powered on the BIOS initializes and does sanity checks on the computer's hardware and peripherals. The BIOS is 'firmware' and exists outside of the computer's normal storage. Even if the system was started with no mass storage, the BIOS would still be there. The BIOS runs a piece of software in the system's storage called the bootloader.




  • Bootloader. The bootloader uses and is itself a set of files on the filesystem, sometimes in the /boot directory. The bootloader (depending on the case) presents a list of options for how you want to proceed in starting the system.




  • Each option (usually) corresponds to starting a kernel with specific boot parameters. The kernel is a binary contained in a package file called vmlinuz (or similar) that resides somewhere on the filesystem (like the /boot directory). The kernel creates abstractions between hardware and software, like the hardware interfaces, filesystem abstraction, processes and threads.





  • Sometimes vmlinuz also contains some utilities that are put into folders like /sbin. Things that are in vmlinuz cannot be modified without repackaging a new vmlinuz file, and replacing the old one.




  • The kernel loads kernel modules which do various things and are sometimes drivers. Some kernel modules are built into the kernel's binary file and some are separate files on the filesystem, sometimes in the /usr/lib/modules directory.




  • The kernel also starts a program called init which is in a location that is sometimes specified in the boot parameters. init mounts mass storage devices to directories and starts a bunch of programs. These programs are on the filesystem and usually have all their files in /usr. They are called the system's userland.




  • In Android, there is a Java-like virtual machine called Dalvik which is started by init, which is what most programs run within.





  • Rooting: Rooting a device allows users to grant themselves root permissions.




  • To simplify managing all the software on the system, a system usually has a special program called the package manager which can manage, update and install sets of related files as `packages' corresponding to individual development projects. Android's interface to its package manager is the Application Manager in settings. Applications are available for download via the Play Store




  • Home Folder: Users have a directory in /home where all their files are stored (including local configuration settings for applications).





  • Recovery: a separate userland which the bootloader launches that only does system related tasks. You get to it by restarting your device while doing a special dance with the buttons.






No comments:

Post a Comment

samsung galaxy s 2 - Cannot restore Kies backup after firmware upgrade

I backed up my Samsung Galaxy S2 on Kies before updating to Ice Cream Sandwich. After the upgrade I tried to restore, but the restore fails ...