vold: use blkid to detect filesystem type

In preparation for handling ext4 partitions via vold and fuse.

Change-Id: Ibaccded63a7a293ad53f16afb80448ddd493554c
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
vold: Handle disks with multiple major numbers

Squashed commits of the following:

commit 6a248052c43bd8c05b9485d8144f778e367a988e
Author:	Emilio López <turl@tuxfamily.org>
Date:   Nov 17, 2011 12:47 AM

    Reintroduce BOARD_VOLD_EMMC_SHARES_DEV_MAJOR

    Code taken from CM7's vold

commit e8caab58ea2992e884fddd4e310ecaf2bf489f37
Author: codeworkx <daniel.hillenbrand@codeworkx.de>
Date:   2012-01-04 16:49:50 +0100

    DirectVolume: handle discs with multiple major numbers

    CFlag: BOARD_VOLD_DISC_HAS_MULTIPLE_MAJORS

    Allows Direct Volume to handle discs with multiple major numbers.
    Needed on Samsung Galaxy S II and variants.

    For example:
    mmcblk0p1 - 179:0
    mmcblk0p2 - 179:1
    mmcblk0p3 - 179:2
    mmcblk0p4 - 256:0
    mmcblk0p5 - 256:1

commit eda64d531e882c46baf88d41a8d3a04874a795e6
Author: codeworkx <daniel.hillenbrand@codeworkx.de>
Date:   2012-04-19 10:50:22 +0200

    vold: fix handling of discs with multiple majors on DirectVolume::getShareDevice()

    The method DirectVolume::getShareDevice() returns an invalid device if the partition
    referenced by mPartIdx is bad. A bad partition is one where the major/minor numbers on
    disk don't match what is expected.

    The original major number is stored for bad partitions so the fix attempts to
    retrieve it and return it if applicable.

    This fix is one part of fixing ICS encryption on the i777 (and possibly other devices)
    where bad partitions may exist.

Conflicts:
	Android.mk

Change-Id: Ibdb05126144adb483c590dec425967362b8af91a
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
vold: Support external non-emulated storage

It tries to acess EMULATED_STORAGE_SOURCE which is not
defined if the device doesnt have an emulated storage

mkdirs() also needs to be valid for EXTERNAL_STORAGE

See also https://github.com/CyanogenMod/android_system_vold/commit/5ced6afb769f09ada6e3d1787a36c6f9f8469ed6

Change-Id: I6463979a06eab301acd59e815713abc3f550853f
vold: allow override of MAX_PARTITIONS for devices with > 32 partitions

Default was updated to 32 and the error messages were changed to be less cryptic.

(cherry picked from commit cb80fef89874cb2833f93e7c6f0da214467e96b8)

Change-Id: I244f48c576af05b6569c8c40ebeb4ed1bfa53469
vold: cryptfs: Don't update KDF without validating pwd/key.

Prior to this, the Key derivation function would get
 blindly updated even if the user entered the wrong password.
Now, we only attempt to upgrade the KDF if the pwd/key have
been verified (i.e. after a successful mount).

Bug: 11460197
Change-Id: I0469228cc9b87c47754e8ca3c7146651da177da5
merge in klp-release history after reset to klp-dev
vold: cryptfs: Don't update KDF without validating pwd/key.

Prior to this, the Key derivation function would get
 blindly updated even if the user entered the wrong password.
Now, we only attempt to upgrade the KDF if the pwd/key have
been verified (i.e. after a successful mount).

Bug: 11460197
Change-Id: I0469228cc9b87c47754e8ca3c7146651da177da5
Merge tag 'android-4.4_r1.2' into HEAD

Android 4.4 Release 1.2
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: force SELinux context only for sdcard

It needs of https://gerrit.omnirom.org/#/c/2746/

Change-Id: I7b3db6a88ca9c2268f9176acdfc292335f8e25b3
Merge "vold: force SELinux context only for sdcard" into android-4.4
Merge tag 'android-4.4.1_r1' into HEAD

Android 4.4.1 Release 1

Conflicts:
	Android.mk
	Volume.h
	VolumeManager.cpp

Change-Id: I669516cea527b93486b642bc81fb8aca641fa4db
[5/7] vold: exFAT Support

FUSE based exFAT Implementation

android: https://gerrit.omnirom.org/#/c/4448/
e2fsprogs: https://gerrit.omnirom.org/#/c/3191/
fuse: https://gerrit.omnirom.org/#/c/4443/
sepolicy: https://gerrit.omnirom.org/#/c/4444/
vold: https://gerrit.omnirom.org/#/c/4442/
omni: https://gerrit.omnirom.org/#/c/4449/

Change-Id: I4221ec183d4e7615afaf8d97f23514bf67f908da
[6/7] vold: exFAT Support

FUSE based exFAT Implementation

android: https://gerrit.omnirom.org/#/c/4448/
e2fsprogs: https://gerrit.omnirom.org/#/c/3191/
fuse: https://gerrit.omnirom.org/#/c/4443/
sepolicy: https://gerrit.omnirom.org/#/c/4444/
vold: https://gerrit.omnirom.org/#/c/4441/
omni: https://gerrit.omnirom.org/#/c/4449/

Change-Id: I97d41b88efe941b471e3a236f92374d3587aa6c4
vold: fix common flags

Signed-off-by: Humberto Borba <humberos@gmail.com>
Change-Id: Ia552365c28a32d814b1645547c77bc6e2a650e4c
Revert "vold: Handle disks with multiple major numbers"

This reverts commit 2fbdda6c82cd2553df129f02637e59ad457814a4.
Revert "vold: use blkid to detect filesystem type"

This reverts commit 0d67df22b87c7787cb26c12e2a5660a240648d5d.
Merge remote-tracking branch 'remotes/omni/android-4.4' into base