Android 5.x OTA Update official documentation (V. Partition ing in the Recovery System), androidota

Source: Internet
Author: User
Tags emmc storage

Android 5.x OTA Update official documentation (V. Partition ing in the Recovery System), androidota

Preface: if the translation can be translated, the translation will not be translated, and the translation will not be translated. In order to choose not to mislead others, the translation will also be missed. English is hard. If there is a mistake, ask a passing friend to correct it, so as not to mislead more friends.


The Recovery system contains many hook programs. Therefore, in addition to updating the Android system, OAT Updates can also be used to update other devices. (For example, baseband or radio processors ).

Partition ing

Since Android2.3, the platform began to support eMMC storage devices and ext4 file systems. It also supports MTD devices and yaffs2 file systems.

The partition ing file TARGET_RECOVERY_FSTAB is generally used by the rediscovery binary program and packaging tool. We can configure the ing file name in the BoardConfig. mk file as TARGET_RECOVERY_FSTAB.

The following is a simple partition ing file structure.

Device/yoyodyne/tardis/recovery. fstab

# Mount point fstype device [device2] [options (3.0 + only)]
/Sdcard vfat/dev/block/mmcblk0p1/dev/block/mmcblk0
/Cache yaffs2 cache
/Misc m td misc
/Boot mtd boot
/Recovery emmc/dev/block/platform/s3c-sdhci.0/by-name/recovery
/System ext4/dev/block/platform/s3c-sdhci.0/by-name/system length =-4096
/Data ext4/dev/block/platform/s3c-sdhci.0/by-name/userdata

In the above partition ing file,/sdcard is an exception, because it is optional here. Except for/sdcard, all mount points in this example must be defined. In this example, we can see five file system types, as shown below:

Yaffs2

YAFFS (Yet Another Flash File System) is a NAND flash Embedded File System developed by Aleph One. Therefore, the yaffs2 file system can only be used on MTD storage devices. "Device" must be the MTD partition name. It must be configured in/proc/mtd.

Mtd

An original mtd partition is often used for bootale partitions, such as boot partitions and recovery partitions. Mtd may not be mounted, but a mount point is often used as a key to find partitions. "Device" must be the mtd partition name. It must be configured in/proc/mtd.

Ext4

The ext4 file system is always used for emmc storage devices. "Device" must be the path of the block device.

Emmc

An original eMMC block device is often used for bootable partitions, such as boot partitions and recovery partitions. Therefore, it is similar to mtd. EMMC has never been attached, but the mount point eMMc is used to searching for devices in the partition table.

Vfat

Vfat is a FAT file system used in Block devices. This usually refers to peripheral storage devices such as SD cards. Device is a block Device, and device2 is the second block Device. If the first device fails to be mounted, the device is mounted to the second device.

All partitions must be mounted to the root directory. (For example, the mount point value must start with a diagonal line, and no additional diagonal lines are allowed. This principle is only applied to recovery. The master system can be freely attached anywhere. The/boot,/recovery, And/misc directories must be of the original type (for example, mtd or emmc), binary/system,/data,/cache, And/sdcard (if available) it should be a file system type such as (yaffs2, ext4, or vfat ).

An extension item has been added to the. fastb file for rediscovery since Android3.0. Generally, it is only used to specify the partition length.


The original article is as follows:

The rediscovery system provided des several hooks for inserting device-specific code so that OTA updates can also update parts of the device other than the Android system (e.g., the baseband or radio processor ).

The following sections and examples customizeTardisDevice produced byYoyodyneVendor.

Partition map

As of Android 2.3, the platform supports eMMC flash devices and the ext4 filesystem that runs on those devices. It also supports Memory Technology Device (MTD) flash devices and the yaffs2 filesystem from older releases.

The partition map file is specified by TARGET_RECOVERY_FSTAB; this file is used by both the recovery binary and the package-building tools. you can specify the name of the map file in TARGET_RECOVERY_FSTAB in BoardConfig. mk.

A sample partition map file might look like this:

device/yoyodyne/tardis/recovery.fstab

# mount point       fstype  device       [device2]        [options (3.0+ only)]/sdcard     vfat    /dev/block/mmcblk0p1 /dev/block/mmcblk0/cache      yaffs2  cache/misc       mtd misc/boot       mtd boot/recovery   emmc    /dev/block/platform/s3c-sdhci.0/by-name/recovery/system     ext4    /dev/block/platform/s3c-sdhci.0/by-name/system length=-4096/data       ext4    /dev/block/platform/s3c-sdhci.0/by-name/userdata

With the exception/sdcard, Which is optional, all mount points in this example must be defined (devices may also add extra partitions). There are five supported filesystem types:

Yaffs2
A yaffs2 filesystem atop an MTD flash device. "device" must be the name of the MTD partition and must appear in /proc/mtd.
Mtd
A raw MTD partition, used for bootable partitions such as boot and recovery. MTD is not actually mounted, but the mount point is used as a key to locate the partition. "device" must be the name of the MTD partition in /proc/mtd.
Ext4
An ext4 filesystem atop an eMMC flash device. "device" must be the path of the block device.
Emmc
A raw eMMC block device, used for bootable partitions such as boot and recovery. similar to the mtd type, eMMc is never actually mounted, but the mount point string is used to locate the device in the table.
Vfat
A fat filesystem atop a block device, typically for external storage such as an SD card. the device is the block device; device2 is a second block device the system attempts to mount if mounting the primary device fails (for compatibility with SD cards which may or may not be formatted with a partition table ).

All partitions must be mounted in the root directory (I. e. the mount point value must begin with a slash and have no other slashes ). this restriction applies only to mounting filesystems in recovery; the main system is free to mount them anywhere. the directories/boot,/recovery, And/miscShocould be raw types (mtd or emmc), while the directories/system,/data,/cache, And/sdcard(If available) shocould be filesystem types (yaffs2, ext4, or vfat ).

Starting in Android 3.0, the recovery. fstab file gains an additional optional field,Options. Currently the only defined option isLength, Which lets you explicitly specify the length of the partition. this length is used when reformatting the partition (e.g ., for the userdata partition during a data wipe/factory reset operation, or for the system partition during installation of a full OTA package ). if the length value is negative, then the size to format is taken by adding the length value to the true partition size. for instance, setting "length =-16384" means the last 16 k of that partition willNotBe overwritten when that partition is reformatted. This supports features such as encryption of the userdata partition (where encryption metadata is stored at the end of the partition that shocould not be overwritten ).

Note:TheDevice2AndOptionsFields are optional, creating ambiguity in parsing. If the entry in the fourth field on the line begins with a'/'character, it is consideredDevice2Entry; if the entry does not begin with a'/'character, it is consideredOptionsField.


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.