Apps without sdcard_r or sdcard_rw need to have someone create
package-specific directories on their behalf. If apps have trouble
creating on their own, they now delegate through system to have
vold create the paths.
Requires that the requested path is actually managed by vold.
Bug: 10577808
Change-Id: I6835fc8f52240f9de07f89742a426a153e3ca32a
With the recent selinux changes imposed on vold, it no longer has
permission to run a shell, so invoking the filesystem formatting
commands with system(3) gives an error. So change to using
android_fork_execvp().
Bug: 10279958
Change-Id: Ifa18b28867618858ec7c5cfcc67935e377de38fb
A quick fix to a broken build resulted in using a static library
to build vold when a shared library was available. This fixes
that.
Bug: 10332978
Change-Id: I31c2b4a87c7b37647e71f7f3c93b0d64dd52da44
scrypt is a sequential memory-hard key derivation algorithm that makes
it more difficult for adversaries to brute force passwords using
specialized equipment. See http://www.tarsnap.com/scrypt/scrypt.pdf for
more details of the algorithm.
This adds support for initializing disk encryption using scrypt and
upgrading from the previous PBKDF2 algorithm.
Change-Id: I1d26db4eb9d27fea7310be3e49c8e6219e6d2c3b
In order to make it easier to upgrade the crypto footer, extract some
constants to a header file instead. Then the header can control what the
current version is and the upgrade_crypto_ftr code should be the only
thing that needs to be updated.
Change-Id: I3ed5a7d3b640419cd8af91388d94a00de8cc09db
In the future, we'd like to have the ability to upgrade from any
supported version to any future version. Change the upgrade function
slightly to support this.
Change-Id: I3b20ccfff51c4c86f1e5e08690c263dc95ff5ce4
The new wipe option to the vold format command will invoke BLKDISCARD
on the partition before invoking newfs_msdos. This will be used whenever
a full wipe of the device is wanted, as this is more secure than just
doing newfs_msdos.
Bug: 9392982
Change-Id: Ie106f1b9cc70abc61206006d1821641c27c7ccae
The new selinux_reload_policy command can take a while to complete on
some systems. The reason is being investigated, and hopefully a fix can
be found to improve performance, but for now, increase the timeout that
vold waits for the post_fs_data section to complete when decrypting a
device on boot.
Also, emit a decent error message if the device times out.
Bug: 8967715
Change-Id: Ifb01c983dffe095a9de752c17c467a1751e9ce99
Fstrim can take a while, so grab a wakelock so it finishes now,
not when the user picks up the device and wakes it back up.
This change does not protect against multiple calls to fstrim
before the first one completes. When the first one completes, it
will release the wakelock, and the device will go to sleep.
However, normal usage is this will not be invoked by the framework
more than once a day, so this should not be an issue.
Bug: 8781133
Change-Id: I8065d1380eaf52ca8a7ca308af66fb6e86d60a66
Fstrim can take a while, so grab a wakelock so it finishes now,
not when the user picks up the device and wakes it back up.
This change does not protect against multiple calls to fstrim
before the first one completes. When the first one completes, it
will release the wakelock, and the device will go to sleep.
However, normal usage is this will not be invoked by the framework
more than once a day, so this should not be an issue.
Bug: 8781133
Change-Id: I8065d1380eaf52ca8a7ca308af66fb6e86d60a66
In order to display the correct language, timezone, airplane
mode and other settings on the decrypt screen, a copy of those
settings needs to be stored unencrypted so the framework can
query them. This adds support to vold to store up to 32
property like key/value pairs that are not encrypted.
Change-Id: Id5c936d2c57d46ed5cff9325d92ba1e8d2ec8972
Some devices can take up to a few minutes to do fstrim. If done
in the same thread as the rest of the vold command listener, then
vold is blocked from responding to any other commands until the
trim is done. So create a thread to do the work, and return
immediately.
bug: 8688454
Change-Id: I780baae03ba7de2d3e805c3e9f103ec03be84c47
When mounting an encrypted filesystem vold calls fs_mgr, which
will call e2fsck on the fielsystem if it's configured to, and
fs_mgr will attempt to log the output the kernel log. However,
if won't log anything unless the klog level is set to 6, aka INFO.
Change-Id: I8ac34941330262ea3414681b872fbbeb75391461
The fstrim subsystem implements the dotrim command, which goes
through all the writable filesystems on the device, and invokes
the FITRIM ioctl() on them. This marks all the unused blocks on
the underlying flash device as unused, so the device performs better.
Change-Id: I5fc8c2f60e0bc823f162d0f89580fb288ecb2160