[Excerpt] Graphic Tutorial: SD card partition in Android

Source: Internet
Author: User

New Android users may encounter SD card partitioning problems. Why partition? What are the shards? What is the partitioning method? These problems are actually very simple.

1. The purpose of the partition and the three main partitions of the SD card

The main purpose of SD card partitioning is to applyProgramInstall it on the SD card to solve the inconvenience caused by insufficient memory of the machine, and improve the system stability and speed. That is, app2sd.

How app2sd works:

Taking a 4g sd card as an example, we can divide a 4G card into three partitions. The fap32 partition is used as a normal storage partition for your music and images. The swap partition is a system cache, the larger the speed of the system, the higher the speed, but the general will not exceed 96 MB (because the swap partition has an impact on the life of the SD card); there is an ext4 partition, the purpose of this partition is to install the software you have installed on the SD card, without occupying the phone memory, to improve system stability and speed.

Taking magic as an example, the current folk self-made Rom basically requires that the SD card has three partitions to ensure that the Rom is successfully flushed and works properly.

The three partitions are:

(1) FAT32 primary partition: Common SD card space for file storage;
(2) ext4 primary partition: used for app2sd. The Rom will automatically complete the installation of the application to the SD card instead of the mobile phone memory;
(3) Swap primary partition: used to solve the problem of insufficient system memory. The system automatically calls this partition.

2. Information about Linux-swap partition, SD card partition, and SD card loss

Micro-SD storage units are divided into two types: SLC (single layer cell, single layer unit) and MLC (multi-level cell, multi layer unit ). The advantage of SLC flash memory is that the number of rewrites reaches 100000 times, which is 10 times higher than that of MLC flash memory. In addition, in order to ensure the life of MLC, the control chip is verified and smart wear Balancing TechnologyAlgorithmIn this way, the number of writes to each storage unit can be evenly distributed, reaching a fault interval of 1 million hours (MTBF ). Currently, the TF card manages the number of non-write operations evenly, resulting in a theoretical 10 thousand write times. Therefore, creating a swap Partition means that the system will perform frequent write operations on this group of units. Will the TF card be quickly damaged?

We can change the value of/dev/sys/Vm/swappiness in the system to tell the system how diligent you want to switch. In Linux, the size of the swappiness value is directly related to how to use the swap partition. When swappiness is set to 0, the physical memory is used to the maximum extent, and then the SWAp is empty. When swappiness is set to 100, the swap partition is actively used, in addition, the data in the memory is promptly moved to the swap space. Two extremes: for Ubuntu's default settings, this value is equal to 60. Therefore, we can modify swappiness to control the system's write frequency to the swap partition.

The role of swap partition in Linux is described as follows: when the physical memory of the system is insufficient, some space in the physical memory needs to be released for the currently running program. The released space may come from some programs that haven't been operated for a long time. The released space is temporarily saved to the swap space and will be executed by those programs, then, the stored data is restored from SWAp to the memory. In this way, the system always performs swap switching when the physical memory is insufficient.
The keyword is virtual memory.

3. Order and size of SD card partitions

The three SD card partitions are FAT32 primary partition, ext4 primary partition, and swap primary partition.

Example partition size: Linux-Swap: 96 m; ext4: 500 m; FAT32: All SD card space is left. Be sure to first partition FAT32, then partition ext4, and finally partition swap. The problem arises: how to determine the size of the FAT32 partition first? It's easy to look at your SD card space from the system, subtract MB of ext4 space, and then subtract 96 MB of Linux-swap space. For example, if the actual capacity of an 8g card is 7.59 GB, The FAT32 partition size is 7590-500-96 = 6994mb.

Another detail is that when you use the partition software to perform partition operations, the partition size may not be exactly the above value, more or less, or it doesn't matter if there is a decimal number.

4. Partitioning Method

The above mentioned a lot of SD card related knowledge, may be a lot of oil are impatient, so let's talk about the specific SD card partition operations. To partition, You need to first enter the recovery (recovery mode, flash mode). The magic operation is as follows:

First, disable the phone, and then press the Home Key and power key at the same time. Here, we can insert a sentence to explain why you need to connect the USB cable to your computer before entering the recovery. The following figure shows how to access the recovery:

Next we select the partition sdcard option by operating the trackball, and press the trackball to confirm:

Then go to the following screen:

Select the first partition SD:

Then a prompt is displayed asking if you want to divide the TF card:

Press the Home Key (that is, the Home Key) to continue:

In this case, swap = 32 MB should appear. Press the Home Key to confirm. If you want to upgrade to ext4, you can use the volume key to adjust the size. If you do not adjust the size, the system will display-53 in the notification bar when it is restarted, -70 and other numbers, this is because there is no adjustment. Okay. After adjusting this, this interface will appear:

The prompt is to ask how much space you want to divide as the second partition. We recommend that you do not exceed 800 mb. After the selection, press the Home Key to confirm. You can also adjust the size by the volume key. After confirmation, the following interface is displayed:

Now you can press the Home Key to continue. If you want to adjust the swap during this process, you can press the key other than the home key to exit, then press the Home Key to return to the page in Figure 06 and modify it. After you press the Home key, the TF card is formatted. After formatting is completed, the TF card is returned to figure 04.

If you need to upgrade ext2 to ext4, in partition sdcard, select SD: ext2 to ext3, press the Home Key, wait for the interface to return to figure 07, and then select SD: ext3 to ext4. If you do not want to upgrade to ext4, simply press the Home Key.

Return to the recovery main menu and select wipe:

Select the first item, and then press the Home key all the way (the wipe operation can not be done, but some problems may occur, resulting in failure to start ).

After completing the preceding operations, press the return key to return to the recovery interface. Click the USB-MS toggle, the TF card will be recognized by the computer as a removable disk. Note the following two points:

(1) the phone after clicking the USB-MS toggle, do not perform any operation temporarily, waiting for the computer to read the SD card.
(2) At the beginning, the SD card was not read from the USB connection to the computer. However, after this option is selected, the computer will read the SD card. It takes about 30 seconds to read the SD card, in this process, you can refresh "my computer" and wait until the computer reads the SD card before proceeding to the next step.

This is why we recommend that you connect the USB to your computer at the beginning, and avoid partition failure due to insufficient battery.

After the computer identifies the sdks, copy the downloaded rom(such as axing_3.121.zip) and press the Home Key to return to the main menu. Select Flash zip from sdcard:

Find the name (for example, axing_3.121.zip) of rom, press the trackball to confirm, and then press the Home key to start refreshing. After returning to the recovery interface, select reboot system now:

Restart your phone and enter the system. After the device is turned on, try installing the software. Is it possible to install it on the SD card? After you connect to your computer, you will find that your SD card has about MB less memory. Congratulations!

Reminder: After partitioning, the SD card will disappear. Pay attention to backup. We recommend that you install some commonly used software such as UC browser and QQ in built-in storage. Otherwise, it will take some time to read your SD card and install it again, which may cause some inconvenience.

All right, this SD card partitioning tutorial will talk about this. We suggest you read more tutorials on the engine oil of the new Android machine and familiarize yourself with the system. I hope this tutorial will help you.

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.