Commit graph

426 commits

Author SHA1 Message Date
Nick Kralevich
f07eeb92fd am 19df18af: am aecf0e2a: am f3d3ce5e: add bounds checking for mPartMinors[]
* commit '19df18af24490f17e82758c38157750c67da245b':
  add bounds checking for mPartMinors[]
2011-04-18 12:07:41 -07:00
Nick Kralevich
19df18af24 am aecf0e2a: am f3d3ce5e: add bounds checking for mPartMinors[]
* commit 'aecf0e2a3dd1a72e448d9df7ed69533578dda12c':
  add bounds checking for mPartMinors[]
2011-04-18 11:59:07 -07:00
Nick Kralevich
aecf0e2a3d am f3d3ce5e: add bounds checking for mPartMinors[]
* commit 'f3d3ce5e53ab7928f4c292c183c417a1bd051151':
  add bounds checking for mPartMinors[]
2011-04-18 11:44:57 -07:00
Nick Kralevich
f3d3ce5e53 add bounds checking for mPartMinors[]
Change-Id: I6d5b26756c8434d6396f3535252608ce61eabfd8
2011-04-18 11:16:13 -07:00
Mike Lockwood
850949485b Only create android_secure mountpoint on the primary external storage volume.
Change-Id: I4069297a799260b8ecf355e91a1594b4f03126af
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-04-04 15:49:31 -04:00
Mike Lockwood
9092b1dbd3 Mount secondary external storage writable by AID_MEDIA_RW rather than AID_SDCARD_RW
Change-Id: I8bb658bb2ab66026f0a54f9c1f80fc5c6e8d918a
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-25 13:42:56 -07:00
Ken Sumrall
ad2ac33460 Load persistent properties after mounting an encrypted /data partition.
Fix for bug 3415286.  Trigger an action in init.rc to load the persistent
properties after /data has been decrypted and mounted.

Change-Id: I5fe3b481bcc6963113e830728c204b22ffc3b722
2011-03-09 17:34:55 -08:00
Ken Sumrall
c290eaf685 Teach vold to use the new android_reboot() function.
The new android_reboot() function is a nicer way to reboot.
It can optionally sync(2) and remount as read-only writable
filesystems.  This fixes bug 3350709.

Change-Id: I4618bd5e8cccdce08494a7ca3f40ef72b2875e68
2011-03-09 17:34:44 -08:00
Ken Sumrall
cd235da6fb Enable detection of failed encryption process, for bug 3384231.
Need to detect if the encryption process didn't finish successfully, and if
so, provide a way for the UI to detect that and give the user an option to
wipe the system clean.  Otherwise, the user is stuck in a reboot loop, and
they will need to do magic button presses to enter recovery and wipe the
device to get out of it.

Change-Id: I58253e1e523ee42bdd1a59aa7d8a9d20071bd18b
2011-02-15 14:53:36 -08:00
The Android Automerger
4dd1cbf09b merge in honeycomb-release history after reset to honeycomb 2011-02-04 22:25:59 -08:00
The Android Automerger
906b81d74c merge in honeycomb-release history after reset to honeycomb 2011-02-04 21:55:48 -08:00
The Android Automerger
124a0d262e merge in honeycomb-release history after reset to honeycomb 2011-02-04 17:35:48 -08:00
The Android Automerger
bc1a67d54b merge in honeycomb-release history after reset to honeycomb 2011-02-04 11:49:09 -08:00
The Android Automerger
49f0e57ecc merge in honeycomb-release history after reset to honeycomb 2011-02-04 10:26:07 -08:00
The Android Automerger
946666311f merge in honeycomb-release history after reset to honeycomb 2011-02-04 07:19:09 -08:00
The Android Automerger
ad8ed73768 merge in honeycomb-release history after reset to honeycomb 2011-02-03 15:26:42 -08:00
The Android Automerger
faad095abc merge in honeycomb-release history after reset to honeycomb 2011-02-03 11:23:31 -08:00
The Android Automerger
07ecb8d797 merge in honeycomb-release history after reset to honeycomb 2011-02-03 07:17:58 -08:00
The Android Automerger
9726aabbde merge in honeycomb-release history after reset to honeycomb 2011-02-02 16:13:22 -08:00
The Android Automerger
057424a224 merge in honeycomb-release history after reset to honeycomb 2011-02-02 07:21:41 -08:00
Kenny Root
352d3f9a09 am 18ed5640: Merge "Use LOOP_GET_STATUS64 for checking loop devices" into honeycomb
* commit '18ed56400bb6ae999712ba70af385100d0cd6e55':
  Use LOOP_GET_STATUS64 for checking loop devices
2011-02-01 23:38:11 -08:00
Kenny Root
18ed56400b Merge "Use LOOP_GET_STATUS64 for checking loop devices" into honeycomb 2011-02-01 23:33:44 -08:00
Ken Sumrall
06c6baf3af am 7f7dbaa2: Improve detection of incomplete encryption
* commit '7f7dbaa2784c10fd2989fb303e5edfb8136d53dc':
  Improve detection of incomplete encryption
2011-02-01 16:32:45 -08:00
Kenny Root
7c16502dbc Use LOOP_GET_STATUS64 for checking loop devices
To determine whether a loop device was available, we use an ioctl call
to LOOP_GET_STATUS, but this fails on devices with large storage
partitions with errno = EOVERFLOW. Instead use LOOP_GET_STATUS64 which
succeeds.

Bug: 3412121
Change-Id: Ica3cb48885d3555f2d27073c00e31fc51a08c730
2011-02-01 16:01:05 -08:00
Ken Sumrall
7f7dbaa278 Improve detection of incomplete encryption
Bug 3384231 is punted to MR1, but the code to set the flag is already
in the tree, so this CL does 3 things:

1.  Comments out the lines that set the flag
2.  Removes the change to the checkpw that was added in the last change.
3.  Implements a new command to check the flag (which no one is calling
    yet and the flag won't be set anyhow).

When MR1 comes, it will be a simple matter to enable the flag setting
code and start testing it.

The fear is a false positive detection of incomplete encryption could
cause people to be prompted to wipe their data when MR1 comes out and
the flag is checked.  Not setting this for first release, and testing
this more before MR1, will give us confidence that the code will not
detect false positives of encryption failure.

Change-Id: I6dfba11646e291fe5867e8375b71a53c815f3968
2011-02-01 15:46:41 -08:00
Ken Sumrall
71fac1e011 am d33d417e: Detect when encryption failed to complete
* commit 'd33d417e3a057fffad22c23f5f002177531db2a5':
  Detect when encryption failed to complete
2011-02-01 13:27:36 -08:00
The Android Automerger
999ff5ca61 merge in honeycomb-release history after reset to honeycomb 2011-02-01 10:12:18 -08:00
Ken Sumrall
d33d417e3a Detect when encryption failed to complete
For the case there encryption failes to complete because of a kernel
crash or the user power cycling the device, define a flag in the
crypto footer that says encryption is in progress.  Set it when starting
the actual encryption, and clear it when it successfully completes.

When the user is asked for the disk password, if the flag is set,
return a special error to the caller so the UI can know to tell the
user there is no valid data on the disk, and present a button to
wipe and reset the device.

Change-Id: I3723ec77f33437d94b3ac9ad5db0a5c950d11648
2011-02-01 00:49:13 -08:00
The Android Automerger
e16044bf34 merge in honeycomb-release history after reset to honeycomb 2011-01-31 17:24:38 -08:00
Ken Sumrall
3f0c0a28f3 am 5d4c68e4: Have vold grab a partial wakelock when encrypting
* commit '5d4c68e40700424b65a4331be75620706a0dd49c':
  Have vold grab a partial wakelock when encrypting
2011-01-30 19:44:27 -08:00
Ken Sumrall
5d4c68e407 Have vold grab a partial wakelock when encrypting
The Progress bar UI grabs a full wakelock when encrypting, but we've seen
a case where it looks like the progress bar UI crashes, and the wakelock is
lost, and then all hell breaks loose.  The enablecrypto command has a lot of
work to do, and it will take some time, so it should grab a wakelock to
ensure it can finish without being interrupted and put to sleep.

It grabs a partial wake lock, as it doesn't need the screen to be on to do
its work.  If the UI wants to keep it on, it should also grab a full wakelock,
which it does.  If the UI crashes, the screen may turn off, but the encryption
will keep going, and vold will reboot the device when it's done.

Change-Id: I51d3a72b8c77383044a3facb1604c1ee510733ae
2011-01-30 19:10:07 -08:00
The Android Automerger
1d3c186f88 merge in honeycomb-release history after reset to honeycomb 2011-01-30 13:37:48 -08:00
The Android Automerger
e30abd4fb2 merge in honeycomb-release history after reset to honeycomb 2011-01-30 09:59:01 -08:00
Ken Sumrall
7cb0f59b20 am 3f476690: Merge "Don\'t try to encrypt in place a filesystem that is too large and return proper errors" into honeycomb
* commit '3f476690eaef3b824255813ed335284ef9a90e91':
  Don't try to encrypt in place a filesystem that is too large and return proper errors
2011-01-29 20:50:03 -08:00
Ken Sumrall
3f476690ea Merge "Don't try to encrypt in place a filesystem that is too large and return proper errors" into honeycomb 2011-01-29 20:45:31 -08:00
Jason parks
939ec42d3c am 70a4b3fd: Change cryptfs changepw to only require a new password.
* commit '70a4b3fd7a84a84bbe6e9d6d4ca3ee2098259fd9':
  Change cryptfs changepw to only require a new password.
2011-01-29 12:06:28 -08:00
Ken Sumrall
3ed8236de1 Don't try to encrypt in place a filesystem that is too large and return proper errors
If the already existing filesystem encompasses the entire /data partition
and does not leave the last 16 Kbytes for the crypto footer, refuse to
do encrypt in place and return an error.  This is only an issue for folks
with early development systems trying to encrypt an old /data.  This should
not be seen in released devices.

Also, if there is an error, try to report back to the UI what the error was
so it can deal with it.

Change-Id: If66781a4fe03034c96c3dd12075240deb8663db0
2011-01-29 00:48:30 -08:00
The Android Automerger
ca279296da merge in honeycomb-release history after reset to honeycomb 2011-01-28 15:49:15 -08:00
Jason parks
70a4b3fd7a Change cryptfs changepw to only require a new password.
The master key is now stored unhashed in memory. This
is needed because certain operation like remote reseting
of passwords the old password is not avaliable.
The changepw interface has been changed to only take
the new password as the only argument. When this is
called we reencrypt the master key with the new password
and old salt.

Bug: 3382129
Change-Id: I9a596b89013194605d6d7790067691aa0dc75e72
2011-01-28 10:17:44 -06:00
The Android Automerger
959a21c78d merge in honeycomb-release history after reset to honeycomb 2011-01-28 07:25:12 -08:00
The Android Automerger
de9d2237be merge in honeycomb-release history after reset to honeycomb 2011-01-27 07:26:10 -08:00
The Android Automerger
b16f6ab0f9 merge in honeycomb-release history after reset to honeycomb 2011-01-26 07:26:30 -08:00
The Android Automerger
ce99c90b54 merge in honeycomb-release history after reset to honeycomb 2011-01-25 07:26:39 -08:00
The Android Automerger
bb9acd5783 merge in honeycomb-release history after reset to honeycomb 2011-01-24 07:22:25 -08:00
The Android Automerger
d805ede34e merge in honeycomb-release history after reset to honeycomb 2011-01-23 07:22:03 -08:00
The Android Automerger
7c536b7d8b merge in honeycomb-release history after reset to honeycomb 2011-01-22 07:23:20 -08:00
Jason parks
ab593e8e50 Always return success if the command was run.
The caller will check the result code for success. This prevents a exception from being thrown when the result code needs to be propagated to the caller.

Change-Id: I471e8d6eb6f339c6f4e40f47adf60d20f6a70974
2011-01-21 16:11:02 -08:00
Jason parks
bc281ee931 am 0167cb15: Always return success if the command was run.
* commit '0167cb15935592deea9abbd6a8bbe904e27bd101':
  Always return success if the command was run.
2011-01-21 12:39:35 -08:00
Jason parks
0167cb1593 Always return success if the command was run.
The caller will check the result code for success. This prevents a exception from being thrown when the result code needs to be propagated to the caller.

Change-Id: I471e8d6eb6f339c6f4e40f47adf60d20f6a70974
2011-01-21 14:00:43 -06:00
Ken Sumrall
2137c849a0 am e8744070: Create and use a salt when calling pbkdf2 to encrypt/decrypt the master key.
* commit 'e87440703663f5ee326326f6438f3b00ea315623':
  Create and use a salt when calling pbkdf2 to encrypt/decrypt the master key.
2011-01-19 03:48:12 -08:00