Documente Academic
Documente Profesional
Documente Cultură
Introduction
We Know that Android is universally accepted operating system throughout & the S
mart Phone/Device market is flooded with android devices. The initial impact was
"Cheap device & price". Not to ignore the fact that it has given the user not j
ust control over the device but the best part of it is the complete control of i
t core and explicitly user now able to choose what he wants and what does not.
Purpose of this Topic
Unless the Porter/User does not understand what Andoid is and how it operates/fu
nction, I am sure you would would not have see something unique like MIUI. The v
ery ver resson we are in this forum and this topic explains it.
Warning, Entering Geek World
That being said, a sneak peak at the partitions and boot sequence of a android d
evice.
Mainly there are 6 partitions in Android phones, tablets and any other Android d
evices. Below is the list of partition for Android File System.
/boot
/system
/recovery
/data
/cache
/misc
Note from author: There might be some other partitions available & may also diff
ers from Model to Model. But baseline partitions mention above do not change in
any Android devices.
Partition.jpg
Note to User(s):Boot.img, System.img, & recovery.img are all flashable partition
s with a unlocked boot loader.
For SD Card Fie System Partitions.
/sdcard
/sd-ext
Note to User(s):Only /sdcard partition can be found in all Android devices and S
D-Ext is present only in select devices.
Now that we know the partitions avalable of our device, we can see what can be c
hanged or wiped or erased. To illustrate: Wiping stock recovery and install TWRP
recovery means just changing the recovery partition is all.
Now Let us start with the brief intro for each partition. I would be dwelling mu
ch on each of these but just brief intro to each for wider audience.
/boot
Boot partition of your Android device, as the name suggests. It includes the and
roid kernel and the ramdisk. The device will not boot without this partition. Wi
ping this partition from recovery should only be done if absolutely required and
once done, the device must NOT be rebooted before installing a new one, which c
an be done by installing a ROM that includes a /boot partition.
/system
As the name suggests, this partition contains the entire Android OS, other than
the kernel and the ramdisk. This includes the Android GUI and all the system app
lications that come pre-installed on the device. Wiping this partition will remo
ve Android from the device without rendering it unbootable, and you will still b
e able to put the phone into recovery or bootloader mode to install a new ROM.
/recovery
This is specially designed for backup. The recovery partition can be considered
as an alternative boot partition, that lets the device boot into a recovery cons
ole for performing advanced recovery and maintenance operations on it.
/data
As the name suggest, it is userdata partition. This partition contains the user s
data like your contacts, sms, settings and all android applications that you hav
e installed. While you are doing factory reset on your device, this partition wi
ll wipe out, Then your device will be in the state, when you use for he first ti
me, or the way it was after the last official or custom ROM installation.
/cache
I hope you have some idea about cache, as you are expert on internet browsing. T
his is the partition where Android stores frequently accessed data and app compo
nents. Wiping the cache doesn t effect your personal data but simply gets rid of t
he existing data there, which gets automatically rebuilt as you continue using t
he device.
/misc
This partition contains miscellaneous system settings in form of on/off switches
. These settings may include CID (Carrier or Region ID), USB configuration and c
ertain hardware settings etc. This is an important partition and if it is corrup
t or missing, several of the device s features will will not function normally.
Android device execute following steps when you press power switch
Process.jpg
Android Boot Sequence / Process
Step 1 : Power On and System Startup
When power start Boot ROM code start execution from pre defined location which i
s hardwired on ROM. It load Bootloader into RAM and start execution
Step 2 : Bootloader
Bootloader is small program which runs before Android operating system running.
Bootloader is first program to run so It is specific for board and processor. De
vice manufacturer either use popular bootloaders like redboot,uboot, qi bootload
er or they develop own bootloaders, It s not part of Android Operating System. boo
tloader is the place where OEMs and Carriers put there locks and restrictions.
Bootloader perform execution in two stages, first stage It to detect external RA
M and load program which helps in second stage, In second stage bootloader setup
network, memory, etc. which requires to run kernel, bootloader is able to provi
de configuration parameters or inputs to the kernel for specific purpose.
Action / Service
Description
on early-init
Set init and its forked children's oom_adj.
Set the security context for the init process.
on init
setup the global environment
Create cgroup mount point for cpu accounting
and many
on fs
mount mtd partitions
on post-fs
change permissions of system directories
on post-fs-data
change permission of /data folders and sub folders
on boot
basic network init ,Memory Management ,etc
service servicemanager
start system manager to manage all native services like location, audio, shared
preference etc..
service zygote
start zygote as app_process
At this stage you can see
Android/OEM
Zygote fork new process to launch system services. You can find source code in Z
ygoteInit class and startSystemServer method.
Core Services which gets started along with the boot process
Starting Power Manager
Creating Activity Manager
Starting Telephony Registry
Starting Package Manager
Set Activity Manager Service as System Process
Starting Context Manager
Starting System Context Providers
Starting Battery Service
Starting Alarm Manager
Starting Sensor Service
Starting Window Manager
Starting Bluetooth Service
Starting Mount Service
Other services after booting process are
Starting Status Bar Service
Starting Hardware Service
Starting NetStat Service
Starting Connectivity Service
Starting Notification Manager
Starting DeviceStorageMonitor Service
Starting Location Manager
Starting Search Service
Starting Clipboard Service
Starting Checkin Service
Starting Wallpaper Service
Starting Audio Service
Starting HeadsetObserver
Starting AdbSettingsObserver
Step 7 : Boot Completed
Once System Services up and running in memory, Android has completed booting pro
cess, At this time ACTION_BOOT_COMPLETED standard broadcast action will fire.
You Smart Phone is now at your disposal