Commit graph

465 commits

Author SHA1 Message Date
Paul Lawrence
ae59fe6c19 Fast ext4 encryption
For ext4 filesystems, only encrypt blocks in use.

Needs matching ext4 utils changes from
 https://googleplex-android-review.git.corp.google.com/#/c/409575

Bug: 11985952
Change-Id: I89df051c25105daf3f469cc980195202f8be6786
2014-01-29 22:29:10 +00:00
Doug Zongker
6fd5771337 allow encrypted filesystems to be mounted readonly
By setting ro.crypto.readonly to 1, cryptfs will mount an encrypted
filesystem that is normally mounted read-write as read-only instead.
To be used when recovery mounts /data.

Bug: 12188746
Change-Id: If3f3f9a3024f29ebc4ad721a48546a332cb92b6b
2013-12-17 09:43:23 -08:00
JP Abgrall
dbf5b6652c am 46f8c2b9: am 7bdfa52d: vold: cryptfs: Don\'t update KDF without validating pwd/key.
* commit '46f8c2b954e11c2266871b8110b74bd6a11f3661':
  vold: cryptfs: Don't update KDF without validating pwd/key.
2013-11-15 14:25:37 -08:00
JP Abgrall
46f8c2b954 am 7bdfa52d: vold: cryptfs: Don\'t update KDF without validating pwd/key.
* commit '7bdfa52d934465e2182e2f1c200c4d8581ad5da6':
  vold: cryptfs: Don't update KDF without validating pwd/key.
2013-11-15 14:21:32 -08:00
JP Abgrall
7bdfa52d93 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
2013-11-15 13:42:56 -08:00
Jeff Sharkey
74a8ca7ec2 am 86697c72: am 6bcd362e: Handle missing UUID/LABEL from blkid.
* commit '86697c72ae29661ad64cfd7b134fa3d3215e0cc3':
  Handle missing UUID/LABEL from blkid.
2013-11-11 20:51:51 -08:00
Jeff Sharkey
86697c72ae am 6bcd362e: Handle missing UUID/LABEL from blkid.
* commit '6bcd362edd1f0ad97807276ff7f9f16991df99a4':
  Handle missing UUID/LABEL from blkid.
2013-11-11 15:29:25 -08:00
Jeff Sharkey
6bcd362edd Handle missing UUID/LABEL from blkid.
Bug: 11627785
Change-Id: Iee757abbc3795234f41d513a6aed8ad33855cb7a
2013-11-11 14:46:39 -08:00
JP Abgrall
502dc74153 vold: cryptfs: Retry encryption after killing processes using /data
Currently, if a non-framework process or service is using /data,
unmounting will fail as nothing will kill it.
Instead of rebooting on unmount failure, we now kill all processes
using /data, then try one more time.

Bug: 11291208
Change-Id: I6c5276c78aa55965914ace96e1db74dc80fca3c1
2013-11-01 13:08:46 -07:00
Blair Prescott
0291262a68 am 3aefb598: am cc21d6ea: Use correct minor device number to format SD card
* commit '3aefb598e4811acc5a198cc9ba20025d95803353':
  Use correct minor device number to format SD card
2013-10-25 16:14:00 -07:00
Blair Prescott
3aefb598e4 am cc21d6ea: Use correct minor device number to format SD card
* commit 'cc21d6ea5881a9f576296317bde8d818b3e4fc01':
  Use correct minor device number to format SD card
2013-10-25 15:06:12 -07:00
Blair Prescott
cc21d6ea58 Use correct minor device number to format SD card
When formatting SD card partitions, instead of assuming partition
minor device numbers start from 1, use (minor device number of
the disk device + 1) as the starting point.

Bug: 11352632
Change-Id: I69d37f57aec6b62fe2a055470f7525ec09dc3859
Signed-off-by: Blair Prescott <blairp@broadcom.com>
Signed-off-by: Pierre <pierre@broadcom.com>
2013-10-25 13:06:25 -07:00
Jeff Sharkey
18caf5b717 am 32e20905: am bcdbd9ac: Merge "Clean up ASEC unmounting on physical storage." into klp-dev
* commit '32e2090562552041a15e73afcce1e9948d9eb634':
  Clean up ASEC unmounting on physical storage.
2013-10-17 18:59:02 -07:00
Jeff Sharkey
0368cd4355 am f4a8c0b9: am 10939ac7: Merge "Extract UUID and label from inserted volumes." into klp-dev
* commit 'f4a8c0b9f646cd9fa51fe3746bc8a00bb987124b':
  Extract UUID and label from inserted volumes.
2013-10-17 18:59:02 -07:00
Jeff Sharkey
32e2090562 am bcdbd9ac: Merge "Clean up ASEC unmounting on physical storage." into klp-dev
* commit 'bcdbd9ac0657a27ff9f7772e74c45ec1e2d460c7':
  Clean up ASEC unmounting on physical storage.
2013-10-17 18:53:27 -07:00
Jeff Sharkey
f4a8c0b9f6 am 10939ac7: Merge "Extract UUID and label from inserted volumes." into klp-dev
* commit '10939ac7e8c9fd141f45f1d6d82c78d5f5f5319c':
  Extract UUID and label from inserted volumes.
2013-10-17 18:53:26 -07:00
Jeff Sharkey
bcdbd9ac06 Merge "Clean up ASEC unmounting on physical storage." into klp-dev 2013-10-18 01:46:43 +00:00
Jeff Sharkey
10939ac7e8 Merge "Extract UUID and label from inserted volumes." into klp-dev 2013-10-18 01:45:47 +00:00
Jeff Sharkey
8c2c15b1c6 Clean up ASEC unmounting on physical storage.
When physical devices are unsafely removed, unmountAllAsecsInDir()
fails to find any ASECs, and leaves them all mounted, preventing the
rest of volume from going down.

Now we examine all ASEC containers, and remove when on external
storage, or when the storage media is no longer found.

Bug: 11175082
Change-Id: Iffa38ea43f7e5ad78b598374ebeb60a8727d99fd
2013-10-17 15:30:30 -07:00
Jeff Sharkey
0de365fc0a Extract UUID and label from inserted volumes.
Uses "blkid" tool to extract metadata from an inserted volume, and
reports it up to the framework.  This needs to happen in vold, since
only the FUSE-wrapped volume is visible to userspace.

Remove autorun sanitization, since FUSE takes care of this now.

Bug: 11175082
Change-Id: Ie69b38011ad6011bfb50e40d4f35a29e02150c19
2013-10-17 09:51:19 -07:00
Jeff Sharkey
fd0eec49b7 am ece855c2: (-s ours) am 18afaca1: Merge "DO NOT MERGE. Fix crash in vold" into klp-dev
* commit 'ece855c21d5f21603edf7a67c56181502857b1df':
  DO NOT MERGE. Fix crash in vold
2013-10-17 09:43:18 -07:00
Jeff Sharkey
ece855c21d am 18afaca1: Merge "DO NOT MERGE. Fix crash in vold" into klp-dev
* commit '18afaca1ad6f480ab6ac259278c8c8013aaab45a':
  DO NOT MERGE. Fix crash in vold
2013-10-17 09:18:31 -07:00
Jeff Sharkey
18afaca1ad Merge "DO NOT MERGE. Fix crash in vold" into klp-dev 2013-10-17 16:12:38 +00:00
Ed Heyl
6a12dd0ffd am a9266df5: am 4d9c9bd5: merge in klp-release (no-op)
* commit 'a9266df57798d1f8f27ab4ab0cde098d1de801c4':
2013-10-16 18:12:59 -07:00
Ed Heyl
a9266df577 am 4d9c9bd5: merge in klp-release (no-op)
* commit '4d9c9bd5cc5f81954b1e9724d125b8947b412b04':
2013-10-16 18:07:28 -07:00
Ed Heyl
4d9c9bd5cc merge in klp-release (no-op) 2013-10-16 17:48:33 -07:00
Marco Nelissen
5ab02e787a DO NOT MERGE. Fix crash in vold
b/11239345

Change-Id: I46a8d6b38e3c093e20e1e5c4f01efc13d1960ad4
2013-10-16 10:52:29 -07:00
Marco Nelissen
9202c083bc Fix crash in vold
b/11239345

Change-Id: I46a8d6b38e3c093e20e1e5c4f01efc13d1960ad4
2013-10-15 15:22:28 -07:00
Kenny Root
0c978df6db am 1e89211d: am 98d05700: Merge "Remove unused MAX_PARTS define"
* commit '1e89211d109482979a55f47bb4b091009017b4ef':
  Remove unused MAX_PARTS define
2013-10-10 10:39:05 -07:00
Kenny Root
1e89211d10 am 98d05700: Merge "Remove unused MAX_PARTS define"
* commit '98d05700d6055532e6e37675e21b83b3c97b7c6e':
  Remove unused MAX_PARTS define
2013-10-10 10:36:33 -07:00
Kenny Root
98d05700d6 Merge "Remove unused MAX_PARTS define" 2013-10-10 15:51:12 +00:00
Ed Heyl
829eabcc1c am 3a941d68: merge in KQS81M
* commit '3a941d6812ccf52fd4fe1c1891041c14f25d0b91':
  Use android_fork_execvp() instead of system(3) to format filesystems
2013-10-09 09:12:49 -07:00
The Android Automerger
70de4e11a3 merge in klp-release history after reset to klp-dev 2013-10-09 06:02:14 -07:00
Jeff Sharkey
266a59441b am ba6ae8db: Add support for more expressive SD card permissions
* commit 'ba6ae8db137d012c9b8e11f9f8321c7771698e92':
  Add support for more expressive SD card permissions
2013-10-08 16:02:42 -07:00
Ed Heyl
3a941d6812 merge in KQS81M 2013-10-08 15:45:14 -07:00
Jeff Sharkey
ba6ae8db13 Add support for more expressive SD card permissions
We now run an sdcard fuse daemon on top of a physical SD card.
Add support for that.

Bug: 10330128

Change-Id: I6a291f861ccb0f2911c07cc8f659e2cec4e6d76c
2013-10-08 10:13:04 -07:00
Bjorn Andersson
63b69e1412 Remove unused MAX_PARTS define
The MAX_PARTS define is not used anywhere in the source code and as
the MAX_PARTITIONS constant was introduced at the same time and used
to hold the same value it's most likely just a remainder from the
development of the partition support code.

Change-Id: I2ae8a062c5643839429f4e3e30a9af05597ce499
2013-10-01 15:27:56 -07:00
The Android Automerger
bc9da81e20 merge in klp-release history after reset to klp-dev 2013-09-22 10:52:01 -07:00
Jeff Sharkey
530a6c1787 am 71ebe154: Add mkdirs() command.
* commit '71ebe154a5fbbb4b394a439ff0b6b9c84fbd04f5':
  Add mkdirs() command.
2013-09-20 15:59:36 -07:00
Jeff Sharkey
71ebe154a5 Add mkdirs() command.
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
2013-09-20 14:29:59 -07:00
Nick Kralevich
20bab9ffdc vold: Remove obsolete xwarp support.
This code appears to be unused. Delete it.

This is essentially a revert of 2350c44ff3.

Change-Id: I20a525bb49f6ee8fec8c1ec22e01ad47d0c72960
2013-09-17 13:21:03 -07:00
Ken Sumrall
b9a7179207 Use android_fork_execvp() instead of system(3) to format filesystems
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
2013-08-23 13:38:06 -07:00
Ken Sumrall
e550f78a3f Use android_fork_execvp() instead of system(3) to format filesystems
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
2013-08-21 11:30:16 -07:00
Ken Sumrall
550ac6c1ff Merge "Use a shared library when building vold" into klp-dev 2013-08-15 21:47:22 +00:00
Ken Sumrall
5cf759a9c5 Use a shared library when building vold
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
2013-08-14 20:15:17 -07:00
Kenny Root
2947e34e41 Initialize iterator
Iterator wasn't initialized in scrypt parameter scanning.

Bug: 10330227
Change-Id: If41fc25d9f827106fa8329bdb5966b7d786fddcb
2013-08-14 23:26:19 +00:00
Geremy Condra
c49f0f2f90 Add libext4 and libmincrypt to vold.
This accomodates verity changes, which now utilize these libraries.

Change-Id: I1ff8c012e972e245cf3e4bc3a02bef0989165d75
2013-08-07 13:13:24 -07:00
Jean-Baptiste Queru
2a18ea31bf am 5d09126a: am f99dfdb5: Merge "vold: fix potential socket leak"
* commit '5d09126ad1cd10c74e676fb158f1d057a37180b2':
  vold: fix potential socket leak
2013-07-02 12:41:36 -07:00
Nick Kralevich
a3026dfbac am 0002a85f: am 5d27f0a7: Merge "Fix spelling."
* commit '0002a85f8b94d96b9b86819bd33fdfd7cfe74080':
  Fix spelling.
2013-07-02 12:41:36 -07:00
Jean-Baptiste Queru
5d09126ad1 am f99dfdb5: Merge "vold: fix potential socket leak"
* commit 'f99dfdb5044ed6b120a8f2a86ddf2dd92a5bb9a2':
  vold: fix potential socket leak
2013-07-02 12:34:35 -07:00