vold: use blkid to detect filesystem type

In preparation for handling ext4 partitions via vold and fuse.

Change-Id: Ibaccded63a7a293ad53f16afb80448ddd493554c
vold: Add NTFS support

Squashed commit of the following:

Author: kallt_kaffe <kallt_kaffe@apedroid.com>
vold: Add ntfs (read-only) support.

See http://review.cyanogenmod.com/#change,7457 for more info.
Change-Id: Ic841e73be6435e8bbbb22984cc749e27c46826e8

Author: Steve Kondik <shade@chemlab.org>
vold: Add NTFS read+write support via ntfs-3g

 * Use ntfs-3g for full NTFS support.
 * Original code from Freescale.
Change-Id: I01191c3c339421904dc9415eb00143f7f8365152

Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
vold: Replace usage of discontinued logwrap()
Change-Id: Ia76bf8998064beee5e0ea4451c4dd8418c2193c4

Author: Steve Kondik <shade@chemlab.org>
Add support for formatting NTFS.

Change-Id: Ic841e73be6435e8bbbb22984cc749e27c46826e8
vold: exFAT support

 * Add support for exFAT using FUSE implementation.
Change-Id: I590c7b1bc8fbcb8c0b2c669f4073ac022857e4da

Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
vold: Replace usage of discontinued logwrap()
Change-Id: Ia76bf8998064beee5e0ea4451c4dd8418c2193c4

Change-Id: I590c7b1bc8fbcb8c0b2c669f4073ac022857e4da
vold: add support for ext4 media

Squashed commit of the following:

Author: codeworkx <codeworkx@cyanogenmod.org>
vold: add support for ext4 media

Depends on:
http://review.cyanogenmod.org/31202
http://review.cyanogenmod.org/31211

Result:
http://pastebin.com/nzUbvW7K
Change-Id: I5bd227e637f2a1ed4d13a2eb81390c56c953f482

Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
vold: Replace usage of discontinued logwrap()
Change-Id: Ia76bf8998064beee5e0ea4451c4dd8418c2193c4

Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Apply the mounts to the SDCARD /storage path instead of /mnt/media_rw
Change-Id: I6c8d73a00c6ffa64875f3c4c718d8a416d08d5c1

Author: Pawit Pornkitprasan <p.pawit@gmail.com>
vold: restore 4.4 sdcard logic

Mount points in 4.4 are always fuse-wrapped to provide granular
permission. Unix file systems no longer need to be manually
fuse-wrapped by us.
Change-Id: I6885b0baeaae7c380ec32d410a70a4f53801157b

Change-Id: I5bd227e637f2a1ed4d13a2eb81390c56c953f482
vold: Add selinux support to ext4

Squashed commit of the following:

Author: Pawit Pornkitprasan <p.pawit@gmail.com>
vold: mount ext4 with forced SELinux context

Always mount voldmanaged ext4 partitions with the SELinux sdcard_external
context. For other file systems, this is done via the genfs_context,
but since ext4 supports SELinux natively, it must be set here.
Change-Id: I1364f37018b25d79b1826c85849def64e868d72f

Author: Pawit Pornkitprasan <p.pawit@gmail.com>
vold: force SELinux context only for sdcard

Google uses this code to mount ASEC as well and we shouldn't force
their SELinux contexts
Change-Id: I873af4dc2309d3d0942ce466b8acf8158abb85ae

Author: Jorge Ruesga <jorge@ruesga.com>
vold: pass selinux context to ext4 mount (remount ro)
Change-Id: Ic0bb314b30e42489c45caec29d35d6896c9849eb
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>

Change-Id: I1364f37018b25d79b1826c85849def64e868d72f
vold: allow non-vfat devices to be used as ASEC

CM supports alternative file systems (which some devices specify
in the fstab as 'auto').

Change-Id: I7e78fe87a7efc49d6749d5892107085d55156cce
vold: Honor mount options for ext4 mounts

Change-Id: Ie77e0d402c2c16d544251f7fdaeaad34d030d121
vold: Use mke2fs to format ext4 when not creating containers.

Change-Id: I2bc0f92d59adb9604b35a1f70febccfba68715d3
Volume: Don't crap out when dealing with unformatted cards

Change-Id: I2ab58328d07a343a5ec9e1c4b58f8258f0c9133c
Add Flash-Friendly File System (f2fs) support.

Change-Id: If46bf7329a7453122a4379f9bc41cf9553426e74
f2fs: disable fsck check

fsck.f2fs does not fix any inconsistencies "yet".

Disable fsck routine as this is just wasting time consumed to mount f2fs volumes.

The kernel can determine if a f2fs volume is too damaged that it shouldn't get mounted.

We should wait for f2fs-tools version higher than v1.3.0.
(fsck.f2fs for fixing inconsistencies is a work-in-progress)

References:
https://github.com/torvalds/linux/blob/master/Documentation/filesystems/f2fs.txt#L261
https://git.kernel.org/cgit/linux/kernel/git/jaegeuk/f2fs-tools.git

Change-Id: I7e0a4662ac70860fe139bb9331b7aee1ad76220f
Signed-off-by: Park Ju Hyung <qkrwngud825@gmail.com>
Add new clean step for recent vold changes

Vold crashes on a non clobber build after recent changes

Change-Id: I909f5a8b0533f0ad12b69a779038756a296fb4dc
vold: Fix build for minivold and general cleanup

Change-Id: Ibc450dd86b77a0c4a25de08b2f07dfb9b2c70871