Lines Matching full:code
23 <p>External storage is managed by a combination of the <code>vold</code> init
24 service and <code>MountService</code> system service. Mounting of physical
25 external storage volumes is handled by <code>vold</code>, which performs
29 <p>For Android 4.2.2 and earlier, the device-specific <code>vold.fstab</code>
32 <pre><code>dev_mount <label> <mount_point> <partition> <sysfs_path> [flags]
33 </code></pre>
35 <li><code>label</code>: Label for the volume.</li>
36 <li><code>mount_point</code>: Filesystem path where the volume should be mounted.</li>
37 <li><code>partition</code>: Partition number (1 based), or 'auto' for first usable partition.</li>
38 <li><code>sysfs_path</code>: One or more sysfs paths to devices that can provide this mount
39 point. Separated by spaces, and each must start with <code>/</code>.</li>
40 <li><code>flags</code>: Optional comma separated list of flags, must not contain <code>/</code>.
41 Possible values include <code>nonremovable</code> and <code>encryptable</code>.</li>
44 recovery were unified in the <code>/fstab.<device></code> file. For external
45 storage volumes that are managed by <code>vold</code>, the entries should have the
47 <pre><code><src> <mnt_point> <type> <mnt_flags> <fs_mgr_flags>
48 </code></pre>
50 <li><code>src</code>: A path under sysfs (usually mounted at /sys) to the device that
51 can provide the mount point. The path must start with <code>/</code>.</li>
52 <li><code>mount_point</code>: Filesystem path where the volume should be mounted.</li>
53 <li><code>type</code>: The type of the filesystem on the volume. For external cards,
54 this is usually <code>vfat</code>.</li>
55 <li><code>mnt_flags</code>: <code>Vold</code> ignores this field and it should be set
56 to <code>defaults</code></li>
57 <li><code>fs_mgr_flags</code>: <code>Vold</code> ignores any lines in the unified fstab
58 that do not include the <code>voldmanaged=</code> flag in this field. This flag must
60 <code>auto</code>. Here is an example: <code>voldmanaged=sdcard:auto</code>.
61 Other possible flags are <code>nonremovable</code>,
62 <code>encryptable=sdcard</code>, <code>noemulatedsd</code>, and <code>encryptable=userdata</code>.</li>
67 through <code>MountService</code>.
73 The device-specific <code>storage_list.xml</code> configuration
74 file, typically provided through a <code>frameworks/base</code> overlay, defines the
75 attributes and constraints of storage devices. The <code><StorageList></code> element
76 contains one or more <code><storage></code> elements, exactly one of which should be marked
77 primary. <code><storage></code> attributes include:</p>
79 <li><code>mountPoint</code>: filesystem path of this mount.</li>
80 <li><code>storageDescription</code>: string resource that describes this mount.</li>
81 <li><code>primary</code>: true if this mount is the primary external storage.</li>
82 <li><code>removable</code>: true if this mount has removable media, such as a physical SD
84 <li><code>emulated</code>: true if this mount is emulated and is backed by internal storage,
86 <li><code>mtp-reserve</code>: number of MB of storage that MTP should reserve for free
88 <li><code>allowMassStorage</code>: true if this mount can be shared via USB mass storage.</li>
89 <li><code>maxFileSize</code>: maximum file size in MB.</li>
93 implementation is provided by the FUSE daemon in <code>system/core/sdcard</code>, which can
94 be added as a device-specific <code>init.rc</code> service:</p>
95 <pre><code># virtual sdcard daemon running as media_rw (1023)
98 </code></pre>
99 <p>Where <code>source_path</code> is the backing internal storage and <code>dest_path</code> is the
101 <p>When configuring a device-specific <code>init.rc</code> script, the <code>EXTERNAL_STORAGE</code>
103 storage. The <code>/sdcard</code> path must also resolve to the same location, possibly
109 device-specific <code>fstab</code> file, and several historical static configuration files/variables have been
112 <li>The <code>storage_list.xml</code> resource overlay has been removed and is no longer used by the framework.
113 Storage devices are now configured dynamically when detected by <code>vold</code>.
114 <li>The <code>EMULATED_STORAGE_SOURCE/TARGET</code> environment variables have been removed and are no longer used by Zygote to
116 with user-specific GIDs, and primary shared storage is mounted into place by <code>vold</code> at runtime.
120 location clearer for developers. (For example, <code>/storage/ABCD-1234/report.txt</code> is clearly a different file than <code>/storage/DCBA-4321/report.txt</code>.)
122 <li>The hard-coded FUSE services have been removed from device-specific <code>init.rc</code> files and are instead forked dynamically from <code>vold</code> when needed.
129 <p>To indicate an adoptable storage device in the <code>fstab</code>, use the <code>encryptable=userdata</code> attribute in the <code>fs_mgr_flags</code> field. Here?s a typical definition:</p>
130 <pre><code>/devices/platform/mtk-msdc.1/mmc_host* auto auto defaults
132 </code></pre>
136 <li>a small empty <code>android_meta</code> partition that is reserved for future use. The partition type GUID is
138 <li>a large <code>android_ext</code> partition that is encrypted using dm-crypt and formatted using either <code>ext4</code> or <code>f2fs</code> depending on the kernel capabilities. The partition type GUID is
142 <p>In the <code>fstab</code>, storage devices with the <code>voldmanaged</code> attribute are considered to be portable by default unless another attribute
143 like <code>encryptable=userdata</code> is defined. For example, here?s a typical definition for USB OTG devices:</p>
144 <pre><code>/devices/*/xhci-hcd.0.auto/usb* auto auto defaults
146 </code></pre>
147 <p>The platform uses <code>blkid</code> to detect filesystem types before mounting, and users can choose to format the