vold: Unmount /data from tmpfs during secure start-up with FDE

In early bootup with Full Disk Encryption(FDE) enabled, /data
is mounted on a temporary file system (tmpfs), and is mounted
on real block device only after correct password is provided
as part of secure startup. While the data is mounted on tmpfs,
some process like keystore might have created some files and
now accessing it. Leaving the data mounted on tmpfs and mounting
again on real block device might make the data of these process
inconsistent, since we never informed the process about new
mount point through unmount call to tempfs first. This leads
to different issues, failure to unlock device to enter home
screen due to key not found error from keystore being one
of them. Avoid this problem by unmounting /data from tmpfs once
credentials have been provided and /data is mounted on a real
block device.
Also set the property ro.crypto.fs_crypto_blkdev value to the
real block device path.

Test: 1. Bootup and reboots with FDE enabled.
      2. Reboot with secure startup enabled.
      3. Change lock type from PIN to pattern.
      4. Value of property ro.crypto.fs_crypto_blkdev.

CRs-Fixed: 3080836

Change-Id: I8a9da654b7a3c48e059e4da6551acf9140b49430
1 file changed