国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發設計 > 正文

Adoptable Storage

2019-11-09 18:12:20
字體:
來源:轉載
供稿:網友

Adoptable Storage

IN THIS DOCUMENT

SecurityPerformance and stability

Android has always supported external storage accessories (such as SD cards), but these accessories were historically limited to simple file storage, due to their expected impermanence and the minimal data PRotection offered to traditional external storage. Android 6.0 introduces the ability to adopt external storage media to act like internal storage.

When external storage media is adopted, it’s formatted and encrypted to only work with a single Android device at a time. Because the media is strongly tied to the Android device that adopted it, it can safely store both apps and private data for all users.

When users insert new storage media (such as an SD card) in an adoptable location, Android asks them how they want to use the media. They can choose to adopt the media, which formats and encrypts it, or they can continue using it as-is for simple file storage. If they choose to adopt, the platform offers to migrate the primary shared storage contents (typically mounted at /sdcard) to the newly adopted media, freeing up valuable space on internal storage. Unlike traditional storage, which is limited to 2TB due to its use of MBR, adoptable storage usesGPT and therefore has file storage limit of ~9ZB.

Apps can be placed on adopted storage media only when the developer has indicated support through theandroid:installLocation attribute. New installs of supported apps are automatically placed on the storage device with the most free space, and users can move supported apps between storage devices in the Settingsapp. Apps moved to adopted media are remembered while the media is ejected, and return when the media is reinserted.

Security


The platform randomly generates an encryption key for each adopted device, and that key is stored on the internal storage of the Android device. This effectively makes the adopted media as secure as internal storage. Keys are associated with adopted devices based on the adopted partition GUID. The adopted device is encrypted using dm-crypt configured with the aes-cbc-essiv:sha256 algorithm and a 128-bit key size.

The on-disk layout of the adopted device closely mirrors the internal data partition, including SElinux labels, etc. When multi-user is supported on the Android device, the adopted storage device also supports multi-user with the same level of isolation as internal storage.

Because the contents of an adopted storage device are strongly tied to the Android device that adopted it, the encryption keys should not be extractable from the parent device, and therefore the storage device can't be mounted elsewhere.

Performance and stability


Only external storage media in stable locations, such as a slot inside a battery compartment or behind a protective cover, should be considered for adoption to help avoid accidental data loss or corruption. In particular, USB devices connected to a phone or tablet should never be considered for adoption. One common exception would be an external USB drive connected to a TV-style device, because the entire TV is typically installed in a stable location.

When a user adopts a new storage device, the platform runs a benchmark and compares its performance against internal storage. If the adopted device is significantly slower than internal storage, the platform warns the user about a possibly degraded experience. This benchmark was derived from the actual I/O behavior of popular Android apps. Currently, the AOSP implementation will only warn users beyond a single threshold, but device manufacturers may adapt this further, such as rejecting adoption completely if the card is extremely slow.

Adopted devices must be formatted with a filesystem that supports POSIX permissions and extended attributes, such as ext4 or f2fs. For optimal performance, the f2fs filesystem is recommended for Flash-based storage devices.

When performing periodic idle maintenance, the platform issues FI_TRIM to adopted media just like it does for internal storage. The current SD card specification does not support the DISCARD command; but the kernel instead falls back to the ERASE command, which SD card firmware may choose to use for optimization purposes.


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 镇远县| 盈江县| 延庆县| 玉林市| 铁岭县| 兰溪市| 德格县| 河间市| 怀仁县| 凤山县| 泊头市| 乳山市| 滨州市| 安西县| 许昌县| 南开区| 长治县| 临武县| 萨迦县| 武汉市| 郯城县| 关岭| 油尖旺区| 株洲市| 长兴县| 锡林郭勒盟| 本溪| 天水市| 德昌县| 乐东| 九江市| 通海县| 高尔夫| 兴和县| 泉州市| 容城县| 庆城县| 景德镇市| 盐山县| 沁阳市| 塔城市|