Commit graph

5001 commits

Author SHA1 Message Date
Ken Sumrall
d4b3661cae Fix vdc to add sequence number for NativeConectorDaemon
NativeConnectorDaemon was changed to use an optional sequence number,
and most services were changed to require it.  Now that vold requires
a sequence number, vdc must provide one.

Change-Id: Ibdff9878faf19eae25525221c80bcb5e5f87cfea
2012-03-09 16:48:48 -08:00
Glenn Kasten
c7ad326381 Merge "Use sched_policy to avoid hard-coded cpuctl path" 2012-03-07 07:15:48 -08:00
Glenn Kasten
1b4807b19a Use sched_policy to avoid hard-coded cpuctl path
Change-Id: I8f62287d1b60d8eef72d1dfc64be5c3d56e9f498
2012-03-05 15:14:33 -08:00
Robert Greenwalt
149aa3eb65 Use the new command numbering scheme.
Support multiple commands on a single socket via command numbers.
NativeDaemonConnector has been changed, so we need to use it here
too.

bug:5864209
Change-Id: Ie06e966d50057d122a958377731c0385ea367b69
2012-02-29 16:51:44 -08:00
Nick Kralevich
9713ed4639 vold: add -Werror=format
Stop format string bugs from creeping into root level processes.

Change-Id: Ifa19ac0cacba76392040ab16cebe557b5b016706
2012-02-23 13:20:30 -08:00
Mike Lockwood
ee6d8c42f3 Add support for wiping data immediately if crypt fails
Needed for headless devices that need to recover with no user intervention

Bug: 5556856

Change-Id: I0f85591df513a6893324fb057bde114ac1df044b
Signed-off-by: Mike Lockwood <lockwood@google.com>
2012-02-16 09:39:27 -08:00
Mike Lockwood
a6251c6f91 Add support for wiping data immediately if crypt fails
Needed for headless devices that need to recover with no user intervention

Bug: 5556856

Change-Id: Iabe5d68599259b14626bfcf45e6697d81b866101
Signed-off-by: Mike Lockwood <lockwood@google.com>
2012-02-15 13:43:28 -08:00
Ken Sumrall
e1a4585784 Fix to not return a bogus decryption error when a device is not encrypted.
If there is filesystem damage on a non-encrypted device, and /data is not
mountable, and if the device stores the keys in a file on a different
partition (like on Crespo) then, vold would return an error which caused
the crypto UI to present an option to the user to wipe the device because
it assumed encryption had failed.  This fixes it to not do that.

Change-Id: Ibff6299787b45768416dbc4052de7db3b140b808
2011-12-14 22:33:45 -08:00
Ed Heyl
43b80c229b keep previous history after reset to mr1 plus aah changes (ics-aah-wip) 2011-10-28 19:06:01 +00:00
Ed Heyl
fab5f878ac undo reset to ics-mr1 until we have a better method 2011-10-26 21:53:28 +00:00
Ed Heyl
e029169812 reset to ics-mr1, but keep history 2011-10-26 18:50:28 +00:00
Steve Block
71189e7f31 am 8c487331: (-s ours) Rename LOG() to ALOG() DO NOT MERGE
* commit '8c4873319a77c54cc198a4e5f4429099ff9da4f7':
  Rename LOG() to ALOG()  DO NOT MERGE
2011-10-25 10:59:51 -07:00
Steve Block
8c4873319a Rename LOG() to ALOG() DO NOT MERGE
See https://android-git.corp.google.com/g/#/c/141576

Bug: 5449033
Change-Id: Icc1c76abe506d53c07c7c3db526c6fa05f73988b
2011-10-25 10:52:23 +01:00
Ken Sumrall
3ad9072a5d Add the new verifypw command to vold/cryptfs
This vold command returns 0 if the given password matches the password
used to decrypt the device on boot.  It returns 1 if they don't match,
and it returns -1 on an internal error, and -2 if the device is not encrypted.

Also check the uid of the sender of the command and only allow the root and
system users to issue cryptfs commands.

Change-Id: I5e5ae3b72a2d7814ae68c2d49aa9deb90fb1dac5
2011-10-12 19:10:38 -07:00
Ken Sumrall
3be890f59c Fix cryptfs to work with a raw block device for key storage
If a raw block is specified for key storage, do not try to force the size
of the file to 16 Kbytes when writing the keys, and do not complain if
the size is not 16 Kbytes when reading the keys.  Only do them if the
keyfile is a regular file.

Change-Id: I4de1cb7c3614479d93289d4f2767ca6ce1bbbc73
2011-09-14 16:53:46 -07:00
Ken Sumrall
0b8b597193 Add the ability to revert a crypto mapping when unmounting a volume
Add the force_and_revert option to the unmount command which will force
the unmount, and revert a crypto mapping.  This is used during factory
reset so that when the internal sdcard volume is formatted, it formats
the raw device, not the encrypted mapping.

Change-Id: I36b6ff9bb54863b121de635472a303bf4a2334a9
2011-08-31 18:09:35 -07:00
The Android Open Source Project
e14fcf99b5 Reconcile with gingerbread-release
Change-Id: Ia9383258bc25f7a82628a1c7238140b810e2f3d3
2011-07-18 08:10:23 -07:00
David 'Digit' Turner
5bf00e62a2 am 6c190fd3: am 137858b4: resolved conflicts for merge of 5284bcff to gingerbread-plus-aosp
* commit '6c190fd326099d8315e194b0ad0a173e21146e14':
  Avoid array overrun. We can now mount the /sdcard partition on our boot sdcards
2011-07-14 10:56:08 -07:00
David 'Digit' Turner
6c190fd326 am 137858b4: resolved conflicts for merge of 5284bcff to gingerbread-plus-aosp
* commit '137858b43b7e0ed46fb8ebce9230eb40f0a62432':
  Avoid array overrun. We can now mount the /sdcard partition on our boot sdcards
2011-07-14 09:18:29 -07:00
David 'Digit' Turner
137858b43b resolved conflicts for merge of 5284bcff to gingerbread-plus-aosp
Change-Id: I108a0c32efb5add1fec41bfe76f041971801d48d
2011-07-14 07:35:14 +02:00
Jeff Brown
81893259c9 Merge "Remove the simulator target from all makefiles. Bug: 5010576" 2011-07-12 12:17:00 -07:00
Jeff Brown
ea89f53387 Remove the simulator target from all makefiles.
Bug: 5010576

Change-Id: I7e531101ae057fb059d7d56c99433c4d66e866dc
2011-07-11 22:12:37 -07:00
Ken Sumrall
6f0b430815 Merge "Prevent sharing or formatting of a vold managed volumes during encryption." 2011-07-11 15:51:09 -07:00
Ken Sumrall
3b17005083 Prevent sharing or formatting of a vold managed volumes during encryption.
Mounting was already not allowed, but also unshare before starting
encryption, and don't allow sharing or formatting to be initiated
during encrytion.

Change-Id: Ida188d81f025739ba4dd90492b3e66088735991e
2011-07-11 15:38:57 -07:00
Ken Sumrall
396844d17a Merge "Fix to display the proper percentage complete during encryption." 2011-07-11 15:37:05 -07:00
Ken Sumrall
128626fc5a Fix to display the proper percentage complete during encryption.
Forgot to include the size of the userdata partition when computing
the total size of vold managed volumes to encrypt.

Change-Id: I237548439d4380b4225ffbc603fa972c3b1c5bae
2011-07-11 15:33:05 -07:00
android-merger
a0272d2c18 reset, and keep history 2011-07-08 12:29:24 -07:00
David 'Digit' Turner
5284bcffed merge intel x86 patches into gingerbread branch 2011-07-08 18:19:06 +02:00
The Android Open Source Project
5283052272 Reconcile with gingerbread-release
Change-Id: I3cb3d915837ebe59c2d7007d71ef3a1f334e9b8b
2011-07-07 15:22:42 -07:00
android-merger
1c55ddb758 Revert "add bounds checking for mPartMinors[]"
This reverts commit f3d3ce5e53.
2011-07-07 14:54:24 -07:00
android-merger
cf7369a458 Revert "vold: Enable the SO_PASSCRED socket option"
This reverts commit c51920c824.
2011-07-07 14:54:01 -07:00
Joseph Lehrer
507d31b86b vold: retry mounting partition
Works around a race condition between the vold and MountService uevent handlers

Change-Id: I71c92f2e9b92e1fefc192da166a91d81bc60e242
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-07-06 13:29:32 -04:00
Mike Lockwood
9322b103a3 am 273d3549: am 2c9d8de7: Merge "Prevent buffer overflows."
* commit '273d3549198d144331f3e502eeb1215417d72b16':
  Prevent buffer overflows.
2011-06-29 06:46:53 -07:00
Mike Lockwood
273d354919 am 2c9d8de7: Merge "Prevent buffer overflows."
* commit '2c9d8de79a0dd7f894c65777a197c86486aff96c':
  Prevent buffer overflows.
2011-06-29 06:42:33 -07:00
Mike Lockwood
2c9d8de79a Merge "Prevent buffer overflows." 2011-06-29 06:30:38 -07:00
Dianne Hackborn
736910ca99 Add new vold call to get the path to an asec fs.
Change-Id: Ife15628ed6e2493c9e85a2ade6d59a194fdddde5
2011-06-27 13:37:28 -07:00
Peter Bohm
092aa1c585 Prevent buffer overflows.
To eliminate possible buffer overflows some strcpy,
sprintf and strcat have been changed to strlcpy,
snprintf and strlcat.

Change-Id: Ieb9d4b600c894946a6492f8629ff39f2fcc106d3
Signed-off-by: Oskar Andero <oskar.andero@sonyericsson.com>
2011-06-27 10:04:05 +02:00
Mike Lockwood
97f2fc110b Update path for seting USB mass storage backing store
Change-Id: I0e5fab1624e5ef5d2f55e2584d8adc1b6bab91b0
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-06-17 23:57:12 -04:00
Mike Lockwood
6b715592ec Merge "Remove obsolete code for monitoring USB status" 2011-06-17 20:55:07 -07:00
Ken Sumrall
86bccb14d6 Merge "Don't abort the encryption process if an internal volume is present but unmounted." 2011-06-14 15:30:36 -07:00
Ken Sumrall
319b1043bb Don't abort the encryption process if an internal volume is present but unmounted.
It is not a failure if the SD card is not mounted.

Change-Id: If954f77c55ac124b9b7b39c89ffbafb4e5ea9e98
2011-06-14 14:01:55 -07:00
Nick Kralevich
5864fabc8b am 598e833d: am b20d54b2: Merge "fix double closing file descriptors"
* commit '598e833d42a687259bc3c9a5a39ad9ba8b105cbb':
  fix double closing file descriptors
2011-06-09 11:27:38 -07:00
Bruce Beare
d11b833201 Avoid array overrun. We can now mount the /sdcard partition on our boot sdcards
Orig-Change-Id: I6e9db8c55db49b4aa61dd40cd59495f55e5b3368
Signed-off-by: Bruce Beare <brucex.j.beare@intel.com>
2011-06-09 17:39:19 +02:00
Nick Kralevich
598e833d42 am b20d54b2: Merge "fix double closing file descriptors"
* commit 'b20d54b2309adee8d192942015740735ded975d3':
  fix double closing file descriptors
2011-06-07 16:28:11 -07:00
Nick Kralevich
b20d54b230 Merge "fix double closing file descriptors" 2011-06-07 15:44:51 -07:00
Mike Lockwood
a976656ff9 Remove obsolete code for monitoring USB status
Change-Id: I8ac8900b3135f03b7717540b825ff6df76f31c0b
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-06-07 08:34:08 -07:00
Robert CH Chou
06aaa41096 fix double closing file descriptors
Change-Id: I243628b77a0b7b138785167ccb5520e1a9374a78
2011-06-06 21:32:45 +08:00
Ken Sumrall
29d8da8cef vold: allow to store key in a file on another partition
Add support for keeping the keys in a separate file on another partition,
for devices with no space reserved for a footer after the userdata filesystem.

Add support for encrypting the volumes managed by vold, if they meet certain
criteria, namely being marked as nonremovable and encryptable in vold.fstab.
A bit of trickiness is required to keep vold happy.

Change-Id: Idf0611f74b56c1026c45742ca82e0c26e58828fe
2011-06-02 16:30:14 -07:00
The Android Open Source Project
10a9e42835 Reconcile with gingerbread-release honeycomb-release
Change-Id: I70f4170b78ed5412a4addd3c603c8ff52c8cfa0d
2011-05-20 14:19:46 -07:00
The Android Automerger
93f032122f merge in gingerbread-release history after reset to gingerbread 2011-05-13 14:27:41 -07:00