1## 7.6\. Memory and Storage 2 3### 7.6.1\. Minimum Memory and Storage 4 5Device implementations: 6 7* [C-0-1] MUST include a [Download Manager]( 8 http://developer.android.com/reference/android/app/DownloadManager.html) 9 that applications MAY use to download data files and they MUST be capable of 10 downloading individual files of at least 100MB in size to the default 11 “cache” location. 12 13Television device implementations: 14 15* [T-0-1] MUST have at least 4GB of non-volatile storage available for 16 application private data (a.k.a. "/data" partition) 17 18Automotive device implementations: 19 20* [A-0-1] MUST have at least 4GB of non-volatile storage available for 21 application private data (a.k.a. "/data" partition) 22 23Watch device implementations: 24 25* [W-0-1] MUST have at least 1GB of non-volatile storage available for 26 application private data (a.k.a. "/data" partition) 27* [W-0-2] MUST have at least 416MB memory available to the kernel and 28 userspace. 29 30Handheld device implementations: 31 32* [H-0-1] MUST have at least 4GB of non-volatile storage available for 33 application private data (a.k.a. "/data" partition) 34* [H-0-2] MUST return “true” for `ActivityManager.isLowRamDevice()` when there 35 is less than 1GB of memory available to the kernel and userspace. 36 37 38If Handheld device implementations are 32-bit: 39 40* [H-1-1] The memory available to the kernel and userspace MUST 41be at least: 512MB if any of the following densities are used: 42 43 * 280dpi or lower on small/normal screens 44 * ldpi or lower on extra large screens 45 * mdpi or lower on large screens 46 47* [H-2-1] The memory available to the kernel and userspace MUST 48be at least: 608MB if any of the following densities are used: 49 50 * xhdpi or higher on small/normal screens 51 * hdpi or higher on large screens 52 * mdpi or higher on extra large screens 53 54* [H-3-1] The memory available to the kernel and userspace MUST 55be at least: 896MB if any of the following densities are used: 56 57 * 400dpi or higher on small/normal screens 58 * xhdpi or higher on large screens 59 * tvdpi or higher on extra large screens 60 61* [H-4-1] The memory available to the kernel and userspace MUST 62be at least: 1344MB if any of the following densities are used: 63 64 * 560dpi or higher on small/normal screens 65 * 400dpi or higher on large screens 66 * xhdpi or higher on extra large screens 67 68If Handheld device implementations are 64-bit: 69 70* [H-5-1] The memory available to the kernel and userspace MUST 71be at least: 816MB if any of the following densities are used: 72 73 * 280dpi or lower on small/normal screens 74 * ldpi or lower on extra large screens 75 * mdpi or lower on large screens 76 77 78* [H-6-1] The memory available to the kernel and userspace MUST 79be at least: 944MB if any of the following densities are used: 80 81 * xhdpi or higher on small/normal screens 82 * hdpi or higher on large screens 83 * mdpi or higher on extra large screens 84 85* [H-7-1] The memory available to the kernel and userspace MUST 86be at least: 1280MB if any of the following densities are used: 87 88 * 400dpi or higher on small/normal screens 89 * xhdpi or higher on large screens 90 * tvdpi or higher on extra large screens 91 92* [H-8-1] The memory available to the kernel and userspace MUST 93be at least: 1824MB if any of the following densities are used: 94 95 * 560dpi or higher on small/normal screens 96 * 400dpi or higher on large screens 97 * xhdpi or higher on extra large screens 98 99Note that the "memory available to the kernel and userspace" above refers to the 100memory space provided in addition to any memory already dedicated to hardware 101components such as radio, video, and so on that are not under the kernel’s 102control on device implementations. 103 104### 7.6.2\. Application Shared Storage 105 106Device implementations: 107 108* [C-0-1] MUST offer storage to be shared by applications, also often referred 109 as “shared external storage”, "application shared storage" or by the Linux 110 path "/sdcard" it is mounted on. 111* [C-0-2] MUST be configured with shared storage mounted by default, in other 112 words “out of the box”, regardless of whether the storage is implemented on 113 an internal storage component or a removable storage medium (e.g. Secure 114 Digital card slot). 115* [C-0-3] MUST mount the application shared storage directly on the Linux path 116 `sdcard` or include a Linux symbolic link from `sdcard` to the actual mount 117 point. 118* [C-0-4] MUST enforce the `android.permission.WRITE_EXTERNAL_STORAGE` 119 permission on this shared storage as documented in the SDK. Shared storage 120 MUST otherwise be writable by any application that obtains that permission. 121 122Android handheld device implementations: 123 124* [H-0-1] MUST NOT provide an application shared storage smaller than 1GiB. 125 126Device implementations MAY meet the above requirements using either: 127 128* a user-accessible removable storage, such as a Secure Digital (SD) card slot. 129* a portion of the internal (non-removable) storage as implemented in the 130 Android Open Source Project (AOSP). 131 132If device implementations use removable storage to satisfy the above 133requirements, they: 134 135* [C-1-1] MUST implement a toast or pop-up user interface warning the user 136 when there is no storage medium inserted in the slot. 137* [C-1-2] MUST include a FAT-formatted storage medium (e.g. SD card) or show 138 on the box and other material available at time of purchase that the storage 139 medium has to be purchased separately. 140 141If device implementations use a protion of the non-removable storage to satisfy 142the above requirements, they: 143 144* SHOULD use the AOSP implementation of the internal application shared 145 storage. 146* MAY share the storage space with the application private data. 147 148If device implementations include multiple shared storage paths (such 149as both an SD card slot and shared internal storage), they: 150 151* [C-3-1] MUST allow only pre-installed and privileged Android 152applications with the `WRITE_EXTERNAL_STORAGE` permission to 153write to the secondary external storage, except when writing to their 154package-specific directories or within the `URI` returned by firing the 155`ACTION_OPEN_DOCUMENT_TREE` intent. 156 157If device implementations have a USB port with USB peripheral mode support, 158they: 159 160* [C-3-1] MUST provide a mechanism to access the data on the application 161 shared storage from a host computer. 162* SHOULD expose content from both storage paths transparently through 163 Android’s media scanner service and `android.provider.MediaStore`. 164* MAY use USB mass storage, but SHOULD use Media Transfer Protocol to satisfy 165 this requirement. 166 167If device implementations have a USB port with USB peripheral mode and support 168Media Transfer Protocol, they: 169 170* SHOULD be compatible with the reference Android MTP host, 171[Android File Transfer](http://www.android.com/filetransfer). 172* SHOULD report a USB device class of 0x00. 173* SHOULD report a USB interface name of 'MTP'. 174 175### 7.6.3\. Adoptable Storage 176 177If the device is expected to be mobile in nature unlike Television, 178device implementations are: 179 180* [SR] STRONGLY RECOMMENDED to implement the adoptable storage in 181a long-term stable location, since accidentally disconnecting them can 182cause data loss/corruption. 183 184If the removable storage device port is in a long-term stable location, 185such as within the battery compartment or other protective cover, 186device implementations are: 187 188* [SR] STRONGLY RECOMMENDED to implement 189[adoptable storage](http://source.android.com/devices/storage/adoptable.html). 190