什么是/ cache分区?


31

Android中的/ cache分区有什么作用?在任何情况下,清除/ cache分区可能会导致数据丢失?

Answers:


27

/cache分区主要用于保存从Google Play商店下载的内容(位于中)/cache/downloads。它还可以保存恢复的日志中发现的/cache/recovery叫做last_log以及(该持有任何错误和/或诊断从recovery二进制点菜CWM或股票,这将被记录到日志文件中,以帮助调试和开发recovery二进制)。

其中还有一个名为的目录,lost+found该目录包含由于文件系统损坏而导致的所有恢复文件(如果有的话),例如,错误地删除了SD卡而未卸载它。

因此,确实,清除数据不会丢失任何数据。

实际上,在Android启动时,该脚本将清除,/cache/downloads以便为从Google Play商店进行的任何新下载/更新让路。


14

为了更深入地概述Android设备上使用的文件系统,下面是一个简短的表格,其中列出了一些比较重要的文件系统:

+---------------+------------------+------------------------------------------+
| Mount Point   | File System Type | What to find here                        |
+---------------+------------------+------------------------------------------+
| /proc         | proc             | metadata about the system such as file   |
|               |                  | system statistics                        |
| /data/data[1] | YAFFS2           | almost all app data                      |
| /data[2]      | EXT3/EXT4/YAFFS2 | data from apps (except those stored on   |
|               |                  | /data/data) plus system                  |
| /cache        | YAFFS2/EXT3      | Cache file system used by some apps and  |
|               |                  | by the system                            |
| /mnt/asec     | tmpfs            | unencrypted .apk file (the encrypted     |
|               |                  | counterpart is stored in                 |
|               |                  | /mnt/sdcard/.android_secure; decrypted   |
|               |                  | variant is needed for running systems to |
|               |                  | access/execute                           |
| /app-cache    | tmpfs            | temporary file system used e.g. by the   |
|               |                  | stock-browser on some HTC devices        |
| /mnt/sdcard   | vfat             | FAT32 file system on the SD-card         |
| /mnt/emmc     | vfat             | FAT32 file system on the embedded        |
|               |                  | (internal) eMMC                          |
+---------------+------------------+------------------------------------------+

[1]在较旧的系统上,整个/data只是一个分区/文件系统[2]在较新的设备上,/data可以进一步细分

您不会在所有设备上都找到所有这些文件系统-但是,如果找到其中的一些,则此列表应该为您提供了一个原始的想法。

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.