Storage space partition of Android phone and selection of compression map path

Source: Internet
Author: User

using the 360 phone assistant icon,We can clearly see that the entire cell phone storage space is divided into three pieces:




The directory structure diagram is as follows:
Viewed from the phone itself,
16G in the figure refers to:system partition +cache partition +recovery partition +data partition +sdcard (built-in SD card) partition add up 16GB The relationship between three people:Install the program to the phone or SD card, are divided into two parts of the program installation, part of the "System file disk" to establish a program in the first part, and then on the internal or external SD card to establish the second part of the program, so say 360 mobile phone defender installation program to the phone or SD card options,refers to the second part of the program's storage location, the first section is always in the "System file disk." The program can only be installed in the data partition or SDcard partition external SD card can not be used to install the program (if you have a built-in SD card, if you do not have a built-in SD card, then the external SD card is the SDcard partition), can only store some files, tablets, music, video and so on. System space is generally not visible on the computer, through 360 and other programs can be seen.
Our program uses two parts of space: One is the data file directory in the system space,The Getfiledir method gets. one is built-in SD card space throughenvironment.getexternalstoragedirectory (), the following are verified separately. 1, verify the System space: Our program through the Getfiledir method to obtain the path /data/data/com.example.testwebview/files, this path corresponds to the data directory in the system space. We do the demo to getThe remaining size of the storage space corresponding to the environment.getdatadirectory () directory is 128M, which corresponds to the remaining capacity of the system space,Show Red circle Callout                 
2. Verify the built-in SD card space. Our program is throughenvironment.getexternalstoragedirectory () method gets the path/storage/emulated/0,This path corresponds to the path of the built-in SD card. Only the system space holds the mapping of the built-in SD card. We do the demo to getEnvironment.getexternalstoragedirectory ()The remaining size of the storage space corresponding to the directory is 107M, which corresponds to the remaining capacity of the SD card, showing the red circle callout

Aboutenvironment.getexternalstoragedirectory ()method, we look at the interpretation of the official document, can be seen in detail the red logo part is visible, the storage path obtained by this method is built-in memory (built-in SD card), this memory is different from the protected internal storage space (System space)
Our 2.9 program is such a process,
In fact, this is not very reasonable, because the system space includes the internal SD card space, so the reasonable pressure diagram flow should be:

Storage space partition of Android phone and selection of compression map path

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.