1. Android phones and tablets generally include the following standard internal partitions:
/ Boot
/system
/recovery
/data
/cache
/misc
Also with SD card partition:
/sdcard
/sd-ext
====================================================================
2. Detailed description of each partition
/ Boot
As the name stands for (Note: boot means start), this partition allows the phone to boot. It includes the kernel (Kerne) and the RAMDisk two parts. Without this partition, the phone usually fails to boot to the Android system. Only when necessary, to go through the Recovery Software Erase (format) This partition, once erased, the device will only install a new boot partition, can be installed by installing a ROM containing the boot partition, or you will not be able to start the Android system.
/system
This partition basically contains the entire Android operating system, in addition to the kernel (Kerne) and RAMDisk. Includes the Android user interface, and all preinstalled system applications. Erasing this partition will remove the all-in-one Android system, but will not cause the boot to fail. You can install a new ROM, which is the Android system, by entering the recovery program or the bootloader program.
/recovery
This partition can be considered as a substitute for a boot partition, which can be your mobile phone into the recovery program for advanced recovery or maintenance work on the Android system. To learn more about this section, refer to the Cwm Usage guide.
/data
This partition is also called the user data area, which contains the user's data: Contacts, SMS, settings, user-installed programs. Erasing this partition is essentially the same as the phone's factory reset, which is the state of the phone system when it first starts, or the last time the official or third-party ROM is installed. The "Data/factory Reset" operation in the recovery program is to erase this partition.
/cache
This partition is the Android system cache, which holds the data and applications most frequently accessed by the system. Erasing this partition does not affect personal data, but it removes the cached content that has been saved in the partition, and the cached content is automatically generated during subsequent phone use.
/misc
This partition includes some miscellaneous content: For example, some system settings and system features enable the Disable setting. These settings include the CID (carrier or zone ID), USB settings, and some hardware settings. This is a very important partition, and if this partition is damaged or some data is lost, some specific features of the phone may not work properly.
/sdcard
This partition is not a device system storage space, it is an SD card space. From the use, this is your own storage space, you can arbitrarily store photos, videos, documents, ROM installation package and so on. Erasing this partition is completely secure, as long as you back up the data you need in the partition to your computer. Although some user-installed programs will use this partition to save its data and settings information, erase the partition, the data of these programs, such as some of the game's archive, will be all lost. In devices that have both internal SD cards and external SD cards, such as Samsung Galaxy S and some tablets, the/sdcard partition usually points to an internal SD card. External SD card, if present, will correspond to a new partition, each device is not the same. In the Samsung Galaxy S phone,/SDCARD/SD represents an external SD card, while other devices may be/sdcard2. Unlike/sdcard, no system or application data is automatically stored in an external SD card. All the data in the external SD card is added by the user himself. After you have backed up the data needed in the partition to your computer, you can safely erase the partition.
/sd-ext
This is not a standard partition for Android, but it is popular in third-party ROM sessions. It essentially is an extra partition on your SD card, from the external features, the same functionality as the/data partition. Some third-party ROMs, with some special features called app2sd+ or Data2ext. This feature is useful when the internal storage space of the device is small (that is, the space allocated to the/data partition is relatively small). Therefore, users who need to install more programs, but not enough internal space, can use the third-party ROM that supports this feature to get additional space to install more applications. Erasing this partition and erasing the/data partition results in the same, you will lose contacts, SMS, install apps and settings.
3. Execute the ADB shell command to view the files for the current device:
ACCT: System Recycle Bin, deleted system file recovery by mistake
Cache: Cached Folder
MNT: mount point directory, such as after inserting T card, directory is/mnt/sdcard/
ETC: System Main configuration file
System:android System files
Sys:linux kernel files
Proc: Run-time Files
Init.rc: Startup script
Default.prop: System Properties configuration file
Data: User program directory (self-installed apk)
Dev: Device files
SDcard: SD card file for mobile phone
4. Other
Following quotes from Lao Luo blog http://blog.csdn.net/luoshengyang/article/details/29688041
Brush Rom:
The bottom is a variety of hardware devices, the upper layer is bootloader. What is the concept of bootloader? As we all know, there is a small program on the PC motherboard called the BIOS, when the motherboard is power on it is the first running program, responsible for initializing the hardware, as well as the OS start up. In the embedded world (mobile phones are also embedded devices), there is a small bios-like program, but it is not called the BIOS, but called bootloader. The most widely used bootloader is a program called Uboot, which supports a very large number of architectures. After compiling, Uboot generates a uboot.bin image, burns the image to a specific partition on the device, and can be used as a bootloader.
Bootloader supports interactive boot, that is, we can let bootloader initialize the hardware, not immediately to start the OS, but stay in the current state, waiting for the user to enter a command to tell it what to do next. This boot module is called the FastBoot mode. For Android devices, we can use the ADB reboot bootloader command to get it restarted and into fastboot mode.
Before discussing the FastBoot model, let's look at the ROM structure of the embedded device (chips like NAND flash). Typically, a ROM with an embedded device that starts normally can contain the following four partitions:
1. Bootloader partition, which is the partition that holds Uboot.bin
2. Bootloader the partition used to save environment variables
3. Kernel partition, which is the partition that holds the OS kernel
4. ROOTFS partition, which is the program that is stored in the system's first process init
When the device is in FastBoot mode, we can use another tool fastboot to let the device execute the specified command. For the machine player, the most common command is to brush the various image files, for example, to the kernel partition and ROOTFS partition to brush into the specified image.
For Android devices, when it's in fastboot mode, we can swipe a recovery.img image containing kernel and rootfs through the FastBoot tool into a partition called recovery on the device. This process is the brush recovery, it is also part of the brush ROM. Since the recovery partition contains kernel and ROOTFS, after the recovery.img is brushed into the device, we can allow the device to start up normally. This starting mode is called recovery mode. For Android devices, we can use the ADB reboot Recovery command to get it into recovery mode.
What can we do when the device is in recovery mode? The answer depends on the program included in the Rootfs included in the recovery.img that was brushed in. Rather, it depends on what the INIT program in the ROOTFS image does. But as the name implies, recovery is used to restore the meaning of the system, but also contains the meaning of updating the system. The system described here is a normal user system that contains an Android runtime framework that allows us to install and use a variety of apps.
When the user is using the Android device normally, the system is composed of two partitions, which are mainly included: System partition and boot partition. The system partition contains the Android runtime framework, System app, and preinstalled third-party apps, and the boot partition contains kernel and ROOTFS. The two mirrors that are brushed into the system partition and boot partition are called System.img and boot.img, and we typically package and compress them into a zip file, such as Update.zip, and upload it to the SDcard on Android devices. So when we go into recovery mode, we can use the recovery interface to update the system that the user used to use the Android device with the zip package we uploaded to SDcard. This process is usually called the brush ROM.
I wonder if you can see it? The brush ROM in the broad sense, actually contains the update recovery and update the user normal use of the system two meaning; In the narrow sense of the brush ROM, just update the user's normal use of the system. The update recovery needs to go into fastboot mode, and the system that updates the user's normal use needs to go into recovery mode. Android device in the process of booting, by default, once the bootloader boot is complete, it will directly start the user's normal use of the system, not into the recovery mode, or stay in the bootloader, that is, stay in the FastBoot mode. Only specific commands, such as ADB reboot recovery and adb reboot bootloader, or specific keys, such as holding down the volume down key and power on during device startup, To allow the device to enter recovery mode or FastBoot mode.
Therefore, a complete brush ROM process consists of the following two steps:
1. Put the device into FastBoot mode and swipe into a recovery.img image
2. Put the device into recovery mode, and swipe into a zip package containing the system.img image and boot.img image
However, it is important to note that System.img mirroring and boot.img images are not necessarily only available in recovery mode, but can also be brushed in fastboot mode, just like the fastboot image in recovery.img mode, except that they are more friendly when they are brushed into recovery mode. Some. Speaking of which, we have to say that another concept is the so-called bootloader lock. In the case of locking bootloader, we are unable to swipe into unofficial recovery.img, system.img, and boot.img mirrors. This is related to vendor-implemented bootloader, which can be used to verify that the image being brushed is officially published by certain algorithms, such as signatures. In this case, the bootloader must be unlocked before we can swipe into the unofficial image.
Partition related to Android phone