OSDN Git Service

android-x86/system-vold.git
8 years agoam 0331d4ae: am 685dfdd3: Merge "Error correction: Add libfec dependencies for vold"
Sami Tolvanen [Fri, 2 Oct 2015 10:55:10 +0000 (10:55 +0000)]
am 0331d4ae: am 685dfdd3: Merge "Error correction: Add libfec dependencies for vold"

* commit '0331d4ae3843f682e98bfa1aba0f8da7fbd9beb0':
  Error correction: Add libfec dependencies for vold

8 years agoam 685dfdd3: Merge "Error correction: Add libfec dependencies for vold"
Sami Tolvanen [Fri, 2 Oct 2015 10:47:23 +0000 (10:47 +0000)]
am 685dfdd3: Merge "Error correction: Add libfec dependencies for vold"

* commit '685dfdd33590ef8a93627015c434fea54b8f1b4d':
  Error correction: Add libfec dependencies for vold

8 years agoMerge "Error correction: Add libfec dependencies for vold"
Sami Tolvanen [Fri, 2 Oct 2015 10:42:16 +0000 (10:42 +0000)]
Merge "Error correction: Add libfec dependencies for vold"

8 years agoam 82fd804f: vold: Retry opening block device on failure when starting encryption
David Ng [Fri, 2 Oct 2015 08:27:19 +0000 (08:27 +0000)]
am 82fd804f: vold: Retry opening block device on failure when starting encryption

* commit '82fd804f8ba49399f425bf43681b9b7fe464d9a1':
  vold: Retry opening block device on failure when starting encryption

8 years agovold: Retry opening block device on failure when starting encryption
David Ng [Wed, 21 Jan 2015 21:55:21 +0000 (13:55 -0800)]
vold: Retry opening block device on failure when starting encryption

The device mapper storage device node can take some time to be
created; so retry.

Bug: 23024596
Change-Id: Ieeb3b697f9cef72d4ea9d106750696901f0a224d

8 years agoError correction: Add libfec dependencies for vold
Sami Tolvanen [Mon, 1 Jun 2015 14:38:29 +0000 (15:38 +0100)]
Error correction: Add libfec dependencies for vold

Vold requires libfec and related dependencies due to fs_mgr_mount_all.

Bug: 21893453
Change-Id: If59df0c5fd3395d4aac97dd8119b7c70c0fa5d4d

8 years agoam 1a20a648: Enable benchmark after trim, when requested.
Jeff Sharkey [Thu, 10 Sep 2015 00:44:21 +0000 (00:44 +0000)]
am 1a20a648: Enable benchmark after trim, when requested.

* commit '1a20a6487faad2869eaec962e4373402aa7461b3':
  Enable benchmark after trim, when requested.

8 years agoEnable benchmark after trim, when requested.
Jeff Sharkey [Wed, 9 Sep 2015 21:55:45 +0000 (14:55 -0700)]
Enable benchmark after trim, when requested.

The framework can request that a benchmark be run after an fstrim,
but it was disabled due to a kernel bug on certain devices.  That bug
has long been fixed, so it should be safe to enable this again.

Bug: 23942769
Change-Id: Ibe967a75856d0cbad45e2f8f3120f1970caf36d0

8 years agoam 480fcd27: Set uid/gid of newly created user dirs to system/system.
Paul Crowley [Thu, 3 Sep 2015 06:21:41 +0000 (06:21 +0000)]
am 480fcd27: Set uid/gid of newly created user dirs to system/system.

* commit '480fcd2750c1d30f3397d1f3152519a11f60990b':
  Set uid/gid of newly created user dirs to system/system.

8 years agoam 79b6fdfc: (-s ours) update bundled rc files to their contents from rootdir/init.rc
Tom Cherry [Thu, 27 Aug 2015 11:17:54 +0000 (11:17 +0000)]
am 79b6fdfc: (-s ours) update bundled rc files to their contents from rootdir/init.rc

* commit '79b6fdfcea593b9f1a2422f1327a279ee77a54c2':
  update bundled rc files to their contents from rootdir/init.rc

8 years agoam 685439bb: (-s ours) am 218f48d6: Merge "bundle init.rc contents with its service"
Tom Cherry [Thu, 27 Aug 2015 11:17:53 +0000 (11:17 +0000)]
am 685439bb: (-s ours) am 218f48d6: Merge "bundle init.rc contents with its service"

* commit '685439bbc7ef958a3472465ebdabf2b997889e76':

8 years agoam b1259ffd: (-s ours) am f298f6be: Merge "Use errno correctly."
Elliott Hughes [Thu, 27 Aug 2015 11:17:53 +0000 (11:17 +0000)]
am b1259ffd: (-s ours) am f298f6be: Merge "Use errno correctly."

* commit 'b1259ffd92f8965521f3f934548936dfd7650262':

8 years agoam 3097d0e1: (-s ours) am 6d24e086: Merge "Remove dead code."
Elliott Hughes [Thu, 27 Aug 2015 11:17:52 +0000 (11:17 +0000)]
am 3097d0e1: (-s ours) am 6d24e086: Merge "Remove dead code."

* commit '3097d0e151b4f07552e987ee5819e9e7c6953a71':

8 years agoam 7206b42b: (-s ours) am eddf9bd6: Request specific tags from blkid.
Jeff Sharkey [Thu, 27 Aug 2015 11:17:51 +0000 (11:17 +0000)]
am 7206b42b: (-s ours) am eddf9bd6: Request specific tags from blkid.

* commit '7206b42badd044e3fcc75c1e1e842bf6d5475867':

8 years agoam 2b8f194f: (-s ours) am 1bd078fa: Protect runtime storage mount points.
Jeff Sharkey [Thu, 27 Aug 2015 11:17:51 +0000 (11:17 +0000)]
am 2b8f194f: (-s ours) am 1bd078fa: Protect runtime storage mount points.

* commit '2b8f194f1a3c4929e7921a3cb31defd98579e87c':

8 years agoam 3a60599a: (-s ours) am 8474ee32: Return useful path when not visible.
Jeff Sharkey [Thu, 27 Aug 2015 11:17:49 +0000 (11:17 +0000)]
am 3a60599a: (-s ours) am 8474ee32: Return useful path when not visible.

* commit '3a60599ae83aadc9eb2dcc5f645508100ede58f9':

8 years agoam 26934b09: (-s ours) am d46687ee: Use random data for benchmark instead of zeros.
Jeff Sharkey [Thu, 27 Aug 2015 11:17:48 +0000 (11:17 +0000)]
am 26934b09: (-s ours) am d46687ee: Use random data for benchmark instead of zeros.

* commit '26934b0954f28d2d465097bf78f6be0139839b14':

8 years agoam 09b542f2: (-s ours) am 20642ae7: Give secondary users read-only physical cards.
Jeff Sharkey [Thu, 27 Aug 2015 11:17:47 +0000 (11:17 +0000)]
am 09b542f2: (-s ours) am 20642ae7: Give secondary users read-only physical cards.

* commit '09b542f269bfd0726de53c2d230c5266f5227f1c':

8 years agoam 15c6489a: (-s ours) am 32679a82: Create user directory on emulated storage.
Jeff Sharkey [Thu, 27 Aug 2015 11:17:46 +0000 (11:17 +0000)]
am 15c6489a: (-s ours) am 32679a82: Create user directory on emulated storage.

* commit '15c6489aa9de4a11f4ec25b69841fb1c936b6380':

8 years agoam 0d3fe815: (-s ours) am 81f55c6d: Mount emulated volumes as consistent location.
Jeff Sharkey [Thu, 27 Aug 2015 11:17:46 +0000 (11:17 +0000)]
am 0d3fe815: (-s ours) am 81f55c6d: Mount emulated volumes as consistent location.

* commit '0d3fe8152ef0e15bd4105013faaee7961e6a6ea9':

8 years agoSet uid/gid of newly created user dirs to system/system.
Paul Crowley [Mon, 24 Aug 2015 13:53:28 +0000 (14:53 +0100)]
Set uid/gid of newly created user dirs to system/system.

Bug: 23395513
Change-Id: I3d76b77339f995103c0aec09c6de77b3c8cdc0dd

8 years agoupdate bundled rc files to their contents from rootdir/init.rc
Tom Cherry [Fri, 21 Aug 2015 19:36:40 +0000 (12:36 -0700)]
update bundled rc files to their contents from rootdir/init.rc

Bug 23186545

Change-Id: I634b682b7a4cef9e1b817561b4458e1442443c63
(cherry picked from commit 6cb234dc57ae24f1dd0cb01217221d946eaed0aa)

8 years agoupdate bundled rc files to their contents from rootdir/init.rc
Tom Cherry [Fri, 21 Aug 2015 19:36:40 +0000 (12:36 -0700)]
update bundled rc files to their contents from rootdir/init.rc

Bug 23186545

Change-Id: I634b682b7a4cef9e1b817561b4458e1442443c63
(cherry picked from commit 6cb234dc57ae24f1dd0cb01217221d946eaed0aa)

8 years agoam 218f48d6: Merge "bundle init.rc contents with its service"
Tom Cherry [Fri, 21 Aug 2015 18:24:14 +0000 (18:24 +0000)]
am 218f48d6: Merge "bundle init.rc contents with its service"

* commit '218f48d6c55a7ee5115a7a8fc4248d33ea01811f':
  bundle init.rc contents with its service

8 years agoam 218f48d6: Merge "bundle init.rc contents with its service"
Tom Cherry [Fri, 21 Aug 2015 18:20:19 +0000 (18:20 +0000)]
am 218f48d6: Merge "bundle init.rc contents with its service"

* commit '218f48d6c55a7ee5115a7a8fc4248d33ea01811f':
  bundle init.rc contents with its service

8 years agoMerge "bundle init.rc contents with its service"
Tom Cherry [Fri, 21 Aug 2015 17:42:33 +0000 (17:42 +0000)]
Merge "bundle init.rc contents with its service"

8 years agobundle init.rc contents with its service
Tom Cherry [Fri, 14 Aug 2015 20:06:45 +0000 (13:06 -0700)]
bundle init.rc contents with its service

Bug: 23186545
Change-Id: I82d8b6dc54ebe32ceb1ed997aaab3701ee7b6c4a

8 years agoam f298f6be: Merge "Use errno correctly."
Elliott Hughes [Mon, 17 Aug 2015 17:43:54 +0000 (17:43 +0000)]
am f298f6be: Merge "Use errno correctly."

* commit 'f298f6be4c8df8745735676e37ccc963909ff3b2':
  Use errno correctly.

8 years agoam f298f6be: Merge "Use errno correctly."
Elliott Hughes [Mon, 17 Aug 2015 17:43:52 +0000 (17:43 +0000)]
am f298f6be: Merge "Use errno correctly."

* commit 'f298f6be4c8df8745735676e37ccc963909ff3b2':
  Use errno correctly.

8 years agoMerge "Use errno correctly."
Elliott Hughes [Mon, 17 Aug 2015 17:33:35 +0000 (17:33 +0000)]
Merge "Use errno correctly."

8 years agoUse errno correctly.
tao.pei [Mon, 17 Aug 2015 12:18:49 +0000 (20:18 +0800)]
Use errno correctly.

Make sure to check errno prior to doing anything
else that can modify it.

Change-Id: Id81ecc2c3fa07c222ab1e2ef6441331a1eaad635

8 years agoam 6d24e086: Merge "Remove dead code."
Elliott Hughes [Sat, 15 Aug 2015 02:19:16 +0000 (02:19 +0000)]
am 6d24e086: Merge "Remove dead code."

* commit '6d24e0866f61aba0ac3023408ead083ad9b6cdab':
  Remove dead code.

8 years agoam 6d24e086: Merge "Remove dead code."
Elliott Hughes [Sat, 15 Aug 2015 02:19:04 +0000 (02:19 +0000)]
am 6d24e086: Merge "Remove dead code."

* commit '6d24e0866f61aba0ac3023408ead083ad9b6cdab':
  Remove dead code.

8 years agoMerge "Remove dead code."
Elliott Hughes [Sat, 15 Aug 2015 02:06:36 +0000 (02:06 +0000)]
Merge "Remove dead code."

8 years agoRemove dead code.
Elliott Hughes [Sat, 15 Aug 2015 01:41:14 +0000 (18:41 -0700)]
Remove dead code.

Change-Id: I042f8aacfa8a7900b5684aaa24da368cdcb41b1f

8 years agoam eddf9bd6: Request specific tags from blkid.
Jeff Sharkey [Thu, 13 Aug 2015 00:43:05 +0000 (00:43 +0000)]
am eddf9bd6: Request specific tags from blkid.

* commit 'eddf9bd63c1f7e0f9709f7c58a1035fa43338325':
  Request specific tags from blkid.

8 years agoam 008c1ac2: am eddf9bd6: Request specific tags from blkid.
Jeff Sharkey [Thu, 13 Aug 2015 00:15:51 +0000 (00:15 +0000)]
am 008c1ac2: am eddf9bd6: Request specific tags from blkid.

* commit '008c1ac225c1ca29f38b57203d82a63f6f85b865':
  Request specific tags from blkid.

8 years agoam eddf9bd6: Request specific tags from blkid.
Jeff Sharkey [Wed, 12 Aug 2015 23:55:26 +0000 (23:55 +0000)]
am eddf9bd6: Request specific tags from blkid.

* commit 'eddf9bd63c1f7e0f9709f7c58a1035fa43338325':
  Request specific tags from blkid.

8 years agoRequest specific tags from blkid.
Jeff Sharkey [Wed, 12 Aug 2015 23:04:35 +0000 (16:04 -0700)]
Request specific tags from blkid.

Otherwise blkid can emit tags like SEC_TYPE which mess with the value
extraction code.

Bug: 23069906
Change-Id: Id2a588ff43a538747d1e44cd8218c96ebd0192c2

8 years agoam 4fc30636: am 1bd078fa: Protect runtime storage mount points.
Jeff Sharkey [Thu, 6 Aug 2015 21:31:57 +0000 (21:31 +0000)]
am 4fc30636: am 1bd078fa: Protect runtime storage mount points.

* commit '4fc30636065aa819a866cfcb3962d55b37db3312':
  Protect runtime storage mount points.

8 years agoam 1bd078fa: Protect runtime storage mount points.
Jeff Sharkey [Thu, 6 Aug 2015 19:58:08 +0000 (19:58 +0000)]
am 1bd078fa: Protect runtime storage mount points.

* commit '1bd078fa7b5ca613cb3e793d67ccd86d2602787d':
  Protect runtime storage mount points.

8 years agoam 1bd078fa: Protect runtime storage mount points.
Jeff Sharkey [Thu, 6 Aug 2015 19:41:34 +0000 (19:41 +0000)]
am 1bd078fa: Protect runtime storage mount points.

* commit '1bd078fa7b5ca613cb3e793d67ccd86d2602787d':
  Protect runtime storage mount points.

8 years agoProtect runtime storage mount points.
Jeff Sharkey [Thu, 6 Aug 2015 18:40:00 +0000 (11:40 -0700)]
Protect runtime storage mount points.

We have a bunch of magic that mounts the correct view of storage
access based on the runtime permissions of an app, but we forgot to
protect the real underlying data sources; oops.

This series of changes just bumps the directory heirarchy one level
to give us /mnt/runtime which we can mask off as 0700 to prevent
people from jumping to the exposed internals.

Also add CTS tests to verify that we're protecting access to
internal mount points like this.

Bug: 22964288
Change-Id: I83f09f0423f4993e766273c50389dd29b1c50589

8 years agoam 157ba435: am 8474ee32: Return useful path when not visible.
Jeff Sharkey [Fri, 31 Jul 2015 02:12:10 +0000 (02:12 +0000)]
am 157ba435: am 8474ee32: Return useful path when not visible.

* commit '157ba4356da6d771194f0276ed1fdd69a14b85a5':
  Return useful path when not visible.

8 years agoam 8474ee32: Return useful path when not visible.
Jeff Sharkey [Fri, 31 Jul 2015 01:51:32 +0000 (01:51 +0000)]
am 8474ee32: Return useful path when not visible.

* commit '8474ee323131fdadcc17f09eab25003a7ae934e0':
  Return useful path when not visible.

8 years agoam 8474ee32: Return useful path when not visible.
Jeff Sharkey [Fri, 31 Jul 2015 01:51:23 +0000 (01:51 +0000)]
am 8474ee32: Return useful path when not visible.

* commit '8474ee323131fdadcc17f09eab25003a7ae934e0':
  Return useful path when not visible.

8 years agoReturn useful path when not visible.
Jeff Sharkey [Thu, 30 Jul 2015 23:54:23 +0000 (16:54 -0700)]
Return useful path when not visible.

This allows apps like ExternalStorageProvider to still read/write
files on transient storage devices which aren't mounted as visible.

Bug: 22545248
Change-Id: Idacb15f2233245a8e1861d9be977535a82b218ec

8 years agoam 4864af92: am d46687ee: Use random data for benchmark instead of zeros.
Jeff Sharkey [Wed, 29 Jul 2015 21:01:57 +0000 (21:01 +0000)]
am 4864af92: am d46687ee: Use random data for benchmark instead of zeros.

* commit '4864af926d1ee6acc5a9853360af3d6b6e8a88ee':
  Use random data for benchmark instead of zeros.

8 years agoam d46687ee: Use random data for benchmark instead of zeros.
Jeff Sharkey [Wed, 29 Jul 2015 20:13:08 +0000 (20:13 +0000)]
am d46687ee: Use random data for benchmark instead of zeros.

* commit 'd46687ee5da7c9847c6188241ccc699d3a0826c2':
  Use random data for benchmark instead of zeros.

8 years agoam d46687ee: Use random data for benchmark instead of zeros.
Jeff Sharkey [Wed, 29 Jul 2015 20:10:22 +0000 (20:10 +0000)]
am d46687ee: Use random data for benchmark instead of zeros.

* commit 'd46687ee5da7c9847c6188241ccc699d3a0826c2':
  Use random data for benchmark instead of zeros.

8 years agoUse random data for benchmark instead of zeros.
Jeff Sharkey [Wed, 29 Jul 2015 16:14:21 +0000 (09:14 -0700)]
Use random data for benchmark instead of zeros.

If we always write zeros, we're leaving a giant pile of known
plaintext at an almost deterministic location on newly formatted
volumes.  To avoid this, repeat a 64K chunk of random data.

Bug: 22816936
Change-Id: Iedc067a519bd676a93b9d74ea4f9f77c84c8461c

8 years agoam 20642ae7: Give secondary users read-only physical cards.
Jeff Sharkey [Wed, 29 Jul 2015 04:04:44 +0000 (04:04 +0000)]
am 20642ae7: Give secondary users read-only physical cards.

* commit '20642ae71aa93ec2658d09c92a1ffc3844f5a555':
  Give secondary users read-only physical cards.

8 years agoam 27f98a12: am 20642ae7: Give secondary users read-only physical cards.
Jeff Sharkey [Wed, 29 Jul 2015 03:20:54 +0000 (03:20 +0000)]
am 27f98a12: am 20642ae7: Give secondary users read-only physical cards.

* commit '27f98a12df1e9513124448d0d7464664d798cc60':
  Give secondary users read-only physical cards.

8 years agoam 20642ae7: Give secondary users read-only physical cards.
Jeff Sharkey [Wed, 29 Jul 2015 01:34:47 +0000 (01:34 +0000)]
am 20642ae7: Give secondary users read-only physical cards.

* commit '20642ae71aa93ec2658d09c92a1ffc3844f5a555':
  Give secondary users read-only physical cards.

8 years agoGive secondary users read-only physical cards.
Jeff Sharkey [Tue, 28 Jul 2015 17:57:29 +0000 (10:57 -0700)]
Give secondary users read-only physical cards.

Long ago, we mounted secondary physical cards as readable by all
users on the device, which enabled the use-case of loading media on
a card and viewing it from all users.

More recently, we started giving write access to these secondary
physical cards, but this created a one-directional channel for
communication across user boundaries; something that CDD disallows.

This change is designed to give us the best of both worlds: the
package-specific directories are writable for the user that mounted
the card, but access to those "Android" directories are blocked for
all other users.  Other users remain able to read content elsewhere
on the card.

Bug: 22787184
Change-Id: I75dbd339f11402ae774c7e4b8f2b15ee216270e8

8 years agoam 78003caf: am 32679a82: Create user directory on emulated storage.
Jeff Sharkey [Fri, 24 Jul 2015 03:45:44 +0000 (03:45 +0000)]
am 78003caf: am 32679a82: Create user directory on emulated storage.

* commit '78003caff32e8220ebd6ca89703916d9297b77b3':
  Create user directory on emulated storage.

8 years agoam 32679a82: Create user directory on emulated storage.
Jeff Sharkey [Thu, 23 Jul 2015 19:12:57 +0000 (19:12 +0000)]
am 32679a82: Create user directory on emulated storage.

* commit '32679a82d9542ec26ea8b4e32d29dd7b02202611':
  Create user directory on emulated storage.

8 years agoam 32679a82: Create user directory on emulated storage.
Jeff Sharkey [Thu, 23 Jul 2015 18:26:46 +0000 (18:26 +0000)]
am 32679a82: Create user directory on emulated storage.

* commit '32679a82d9542ec26ea8b4e32d29dd7b02202611':
  Create user directory on emulated storage.

8 years agoCreate user directory on emulated storage.
Jeff Sharkey [Tue, 21 Jul 2015 21:22:01 +0000 (14:22 -0700)]
Create user directory on emulated storage.

When mounting a primary external storage device that is multi-user
aware, ensure that the user-specific directory actually exists before
moving forward.

Bug: 22472026
Change-Id: I33c8eed261a9c0d5acedd5be6133ed9990679d08

9 years agoam 93363482: Evict the key before we delete it.
Paul Crowley [Tue, 14 Jul 2015 15:06:49 +0000 (15:06 +0000)]
am 93363482: Evict the key before we delete it.

* commit '9336348200758d067fed164368636521b4e58621':
  Evict the key before we delete it.

9 years agoam e76d9e6b: Fix erroneous comment in secdiscard.cpp, plus style fixes.
Paul Crowley [Tue, 14 Jul 2015 15:06:49 +0000 (15:06 +0000)]
am e76d9e6b: Fix erroneous comment in secdiscard.cpp, plus style fixes.

* commit 'e76d9e6be65c9af52a0ed722267521256269cc18':
  Fix erroneous comment in secdiscard.cpp, plus style fixes.

9 years agoam cd307b7c: Scrub the key from the disk with BLKSECDISCARD.
Paul Crowley [Tue, 14 Jul 2015 15:06:48 +0000 (15:06 +0000)]
am cd307b7c: Scrub the key from the disk with BLKSECDISCARD.

* commit 'cd307b7c6301593727892d1fa9bb92aadb5fdaca':
  Scrub the key from the disk with BLKSECDISCARD.

9 years agoam 5bd0daf9: Add tool for scrubbing files with BLKSECDISCARD.
Paul Crowley [Tue, 14 Jul 2015 15:06:47 +0000 (15:06 +0000)]
am 5bd0daf9: Add tool for scrubbing files with BLKSECDISCARD.

* commit '5bd0daf926ea8096dc091d7b99ff9e56cc5746aa':
  Add tool for scrubbing files with BLKSECDISCARD.

9 years agoam b33e8873: Add "cryptfs deleteuserkey" command to vold.
Paul Crowley [Tue, 14 Jul 2015 15:06:46 +0000 (15:06 +0000)]
am b33e8873: Add "cryptfs deleteuserkey" command to vold.

* commit 'b33e8873ea78b92e536aa33f48130a91ca150f0c':
  Add "cryptfs deleteuserkey" command to vold.

9 years agoam 95376d61: Add vold commands for setting up per-user encrypted user directories
Paul Crowley [Tue, 14 Jul 2015 15:06:45 +0000 (15:06 +0000)]
am 95376d61: Add vold commands for setting up per-user encrypted user directories

* commit '95376d612c91236c8cd751b9af02c9aa57f4870f':
  Add vold commands for setting up per-user encrypted user directories

9 years agoam f25a35a1: (-s ours) Break key installation into its own function so we can install...
Paul Crowley [Tue, 14 Jul 2015 15:06:45 +0000 (15:06 +0000)]
am f25a35a1: (-s ours) Break key installation into its own function so we can install non-master keys.

* commit 'f25a35a1c98d4fac118ee9abe34d6bbf2d3a2201':
  Break key installation into its own function so we can install non-master keys.

9 years agoEvict the key before we delete it.
Paul Crowley [Tue, 7 Jul 2015 14:17:22 +0000 (15:17 +0100)]
Evict the key before we delete it.

Change-Id: I9eef440a1f406c2c73c859f5ae7cee35f6a36ca4

9 years agoFix erroneous comment in secdiscard.cpp, plus style fixes.
Paul Crowley [Mon, 22 Jun 2015 11:32:26 +0000 (12:32 +0100)]
Fix erroneous comment in secdiscard.cpp, plus style fixes.

Bug: 19706593

(cherry picked from commit 747e1f7a6d0ae43fce33217e6f0215ceeaf44617)

Change-Id: I9a605c736a2fa909cd4999e1e8d022d49a562767

9 years agoScrub the key from the disk with BLKSECDISCARD.
Paul Crowley [Tue, 19 May 2015 16:31:39 +0000 (17:31 +0100)]
Scrub the key from the disk with BLKSECDISCARD.

Bug: 19706593

(cherry-picked from commit 8d0cd7ffd903a753c6bb5c6f33987a7a66621cef)

Change-Id: Ieea73da233fe53767b5adcdb4d49f9bb00fedac1

9 years agoAdd tool for scrubbing files with BLKSECDISCARD.
Paul Crowley [Tue, 19 May 2015 16:31:39 +0000 (17:31 +0100)]
Add tool for scrubbing files with BLKSECDISCARD.

Bug: 19706593

(based on work in commit 8d0cd7ffd903a753c6bb5c6f33987a7a66621cef)

Change-Id: I9699275a63f2d0a110435bd4a725d7dfcce4ed90

9 years agoAdd "cryptfs deleteuserkey" command to vold.
Paul Crowley [Tue, 19 May 2015 11:34:09 +0000 (12:34 +0100)]
Add "cryptfs deleteuserkey" command to vold.

Bug: 19706593

(cherry-picked from commit eebf44563bf9c6f2795442e8d2bc886e4eb3bbbe)

Change-Id: I50dc4c39595c06bf0016d6a490130bbbc25de91b

9 years agoAdd vold commands for setting up per-user encrypted user
Paul Crowley [Wed, 6 May 2015 14:04:43 +0000 (15:04 +0100)]
Add vold commands for setting up per-user encrypted user
directories

Bug: 19704432

(cherry-picked from commit 75a5202d9f65747edabb1dd0ebd50a779d4142c2)

Change-Id: I733e8745ec21f8e53c2cc6d8a98313275db7d897

9 years agoBreak key installation into its own function so we can install
Paul Crowley [Wed, 6 May 2015 12:38:53 +0000 (13:38 +0100)]
Break key installation into its own function so we can install
non-master keys.

Bug: 19704432
(cherry-picked from commit 1da96dc549b86a1c7ec02d7a808a9532cdcb5fe7)

Change-Id: I762e8f6c927db3a337fa8ce6bd428262d9e05c7a

9 years agoam f733ae63: Don\'t break on setting default password
Paul Lawrence [Mon, 13 Jul 2015 18:04:40 +0000 (18:04 +0000)]
am f733ae63: Don\'t break on setting default password

* commit 'f733ae6306b1a6226492015e7f475a17df32f681':
  Don't break on setting default password

9 years agoDon't break on setting default password
Paul Lawrence [Tue, 7 Jul 2015 22:43:14 +0000 (15:43 -0700)]
Don't break on setting default password

Bug: 22329642
Change-Id: I58dac4dba8e65c7015d50ca0c3575f77f550a215

9 years agoam 81f55c6d: Mount emulated volumes as consistent location.
Jeff Sharkey [Wed, 8 Jul 2015 22:52:08 +0000 (22:52 +0000)]
am 81f55c6d: Mount emulated volumes as consistent location.

* commit '81f55c6dc1a14ed68e404fa3a2c244dd343e4990':
  Mount emulated volumes as consistent location.

9 years agoam 81f55c6d: Mount emulated volumes as consistent location.
Jeff Sharkey [Wed, 8 Jul 2015 22:08:07 +0000 (22:08 +0000)]
am 81f55c6d: Mount emulated volumes as consistent location.

* commit '81f55c6dc1a14ed68e404fa3a2c244dd343e4990':
  Mount emulated volumes as consistent location.

9 years agoMount emulated volumes as consistent location.
Jeff Sharkey [Tue, 7 Jul 2015 21:37:03 +0000 (14:37 -0700)]
Mount emulated volumes as consistent location.

We really only support a single emulated volume on the device at a
time, either on internal storage, or moved to a private volume.  To
avoid kicking off a giant rescan of all media when moved, keep all
the paths the same when mounted as primary.

Also ensure we have /data/media/0 ready on private volumes.

Bug: 20275423
Change-Id: I0c102f430b865ca7536772b1fae56d8c9660a97a

9 years agoam c86ab6f5: Trim both internal and adopted private storage.
Jeff Sharkey [Thu, 2 Jul 2015 00:58:16 +0000 (00:58 +0000)]
am c86ab6f5: Trim both internal and adopted private storage.

* commit 'c86ab6f538bec63638c168d6c843fe7cf73add3b':
  Trim both internal and adopted private storage.

9 years agoTrim both internal and adopted private storage.
Jeff Sharkey [Fri, 26 Jun 2015 21:02:09 +0000 (14:02 -0700)]
Trim both internal and adopted private storage.

Refactor fstrim code to be encapsulated in unique task object, and
give it option of benchmarking when finished.  Trimming now includes
both storage from fstab and adopted private volumes.  Cleaner timing
stats are logged for each unique volume.

Add wakelock during ongoing async move tasks.  Push disk sysfs path
to framework so it can parse any SD card registers as desired.

Bug: 21831325
Change-Id: I76577685f5cae4929c251ad314ffdaeb5eb1c8bf

9 years agoam c7b5b570: Null-terminate readlink() result, full remount.
Jeff Sharkey [Wed, 1 Jul 2015 00:30:39 +0000 (00:30 +0000)]
am c7b5b570: Null-terminate readlink() result, full remount.

* commit 'c7b5b570bd05ed3bc921b0c2dc346416a52b4e3e':
  Null-terminate readlink() result, full remount.

9 years agoNull-terminate readlink() result, full remount.
Jeff Sharkey [Tue, 30 Jun 2015 22:54:17 +0000 (15:54 -0700)]
Null-terminate readlink() result, full remount.

In order to compare results from readlink() calls, we need to null
terminate the read value, otherwise we can end up doing an infinitely
recursive remount in the root namespace.

When remounting inside a namespace, unmount all existing mounts before
mounting the new storage into place.  This also means we need to mount
the user-specific symlinks back into place.

Skip spinning up the FUSE daemon when not visible, otherwise we get
stuck waiting for a daemon that never shows up.

Bug: 2219251822204412
Change-Id: Icc7db822354ab7ffc47c39cd0611f65edecc32e5

9 years agoam 63123c06: Last ditch check for partition on raw disk.
Jeff Sharkey [Fri, 26 Jun 2015 20:38:18 +0000 (20:38 +0000)]
am 63123c06: Last ditch check for partition on raw disk.

* commit '63123c067a4e709198d9b8d3279c98561f8c990e':
  Last ditch check for partition on raw disk.

9 years agoLast ditch check for partition on raw disk.
Jeff Sharkey [Fri, 26 Jun 2015 18:16:14 +0000 (11:16 -0700)]
Last ditch check for partition on raw disk.

Some storage devices can be formatted as bare partitions, without an
MBR or GPT header.  If we found no partitions, try poking at the raw
disk, and treat it as a public volume if we found a valid filesystem.

Bug: 20503551
Change-Id: I80304e1ad865435321c341b667c0daf2daf4d56c

9 years agoam 66270a21: Let\'s reinvent storage, yet again!
Jeff Sharkey [Fri, 26 Jun 2015 16:05:27 +0000 (16:05 +0000)]
am 66270a21: Let\'s reinvent storage, yet again!

* commit '66270a21df1058434e4d63691221f11ff5387a0f':
  Let's reinvent storage, yet again!

9 years agoLet's reinvent storage, yet again!
Jeff Sharkey [Wed, 24 Jun 2015 18:49:24 +0000 (11:49 -0700)]
Let's reinvent storage, yet again!

Now that we're treating storage as a runtime permission, we need to
grant read/write access without killing the app.  This is really
tricky, since we had been using GIDs for access control, and they're
set in stone once Zygote drops privileges.

The only thing left that can change dynamically is the filesystem
itself, so let's do that.  This means changing the FUSE daemon to
present itself as three different views:

/mnt/runtime_default/foo - view for apps with no access
/mnt/runtime_read/foo - view for apps with read access
/mnt/runtime_write/foo - view for apps with write access

There is still a single location for all the backing files, and
filesystem permissions are derived the same way for each view, but
the file modes are masked off differently for each mountpoint.

During Zygote fork, it wires up the appropriate storage access into
an isolated mount namespace based on the current app permissions.  When
the app is granted permissions dynamically at runtime, the system
asks vold to jump into the existing mount namespace and bind mount
the newly granted access model into place.

Bug: 21858077
Change-Id: Iade538e4bc7af979fe20095f74416e8a0f165a4a

9 years agoam 5d268fda: Merge "Make sure volume is vfat before fsck\'ing." into mnc-dev
Makoto Onuki [Wed, 24 Jun 2015 21:05:39 +0000 (21:05 +0000)]
am 5d268fda: Merge "Make sure volume is vfat before fsck\'ing." into mnc-dev

* commit '5d268fdac49bd3174a7f0c6dbb042162ae87a695':
  Make sure volume is vfat before fsck'ing.

9 years agoMerge "Make sure volume is vfat before fsck'ing." into mnc-dev
Makoto Onuki [Wed, 24 Jun 2015 20:33:55 +0000 (20:33 +0000)]
Merge "Make sure volume is vfat before fsck'ing." into mnc-dev

9 years agoMake sure volume is vfat before fsck'ing.
Makoto Onuki [Wed, 24 Jun 2015 20:30:45 +0000 (13:30 -0700)]
Make sure volume is vfat before fsck'ing.

Bug 21948137

Change-Id: I6843423fd8809d9e2f352059a810aa17dd83b3e3

9 years agoam 86af3557: Add purpose to vold-generated keymaster1 keys.
Shawn Willden [Wed, 24 Jun 2015 17:13:53 +0000 (17:13 +0000)]
am 86af3557: Add purpose to vold-generated keymaster1 keys.

* commit '86af3557e3dc0f6e4fa2c0d56f840eb4247f9f4f':
  Add purpose to vold-generated keymaster1 keys.

9 years agoAdd purpose to vold-generated keymaster1 keys.
Shawn Willden [Wed, 24 Jun 2015 14:21:54 +0000 (07:21 -0700)]
Add purpose to vold-generated keymaster1 keys.

Also remove the app ID and additional padding and digest options.

Bug: 22009890
Change-Id: Ibff9bbd0e0c11d651d11fac85d4ac907588f1cd2

9 years agoam bc40cc8f: Add method to forget private partition keys.
Jeff Sharkey [Mon, 22 Jun 2015 21:33:51 +0000 (21:33 +0000)]
am bc40cc8f: Add method to forget private partition keys.

* commit 'bc40cc8f07f69e0e26fc41516e2a83f0a8becbe0':
  Add method to forget private partition keys.

9 years agoAdd method to forget private partition keys.
Jeff Sharkey [Thu, 18 Jun 2015 21:25:08 +0000 (14:25 -0700)]
Add method to forget private partition keys.

Report both the disk and the partition GUID for private volumes to
userspace, and offer to forget the encryption key for a given
partition GUID.

Bug: 21782268
Change-Id: Ie77a3a58e47bf3563cdb3e4b0edfab1de4d0e6b4

9 years agoam 0417060e: Use correct error code for rate limiting.
Shawn Willden [Sat, 20 Jun 2015 19:32:57 +0000 (19:32 +0000)]
am 0417060e: Use correct error code for rate limiting.

* commit '0417060e8ebfd28171fd0aaef8f4e42d9ddd482e':
  Use correct error code for rate limiting.

9 years agoUse correct error code for rate limiting.
Shawn Willden [Thu, 18 Jun 2015 18:26:59 +0000 (12:26 -0600)]
Use correct error code for rate limiting.

Note that this CL depends on cl 712195, which must be submitted first.

Bug: 21607106
Change-Id: Iafc42d1c8a1145a31ea252b33b404044f92ec62b

9 years agoam da6e899f: Add keymaster1 support to vold.
Shawn Willden [Wed, 17 Jun 2015 21:07:23 +0000 (21:07 +0000)]
am da6e899f: Add keymaster1 support to vold.

* commit 'da6e899f4e1429add2ef023e0cc6b0fcca42c945':
  Add keymaster1 support to vold.

9 years agoAdd keymaster1 support to vold.
Shawn Willden [Wed, 3 Jun 2015 15:40:45 +0000 (09:40 -0600)]
Add keymaster1 support to vold.

Bug: 21607106
Change-Id: I498141b90888d4f0652912413b04519f61886935

9 years agoam b1ef4665: Improve boot time by 0.1s by reducing a polling sleep interval
Paul Lawrence [Thu, 11 Jun 2015 21:10:46 +0000 (21:10 +0000)]
am b1ef4665: Improve boot time by 0.1s by reducing a polling sleep interval

* commit 'b1ef4665e8df4abf0f3f134bf3090415fc834606':
  Improve boot time by 0.1s by reducing a polling sleep interval

9 years agoImprove boot time by 0.1s by reducing a polling sleep interval
Paul Lawrence [Thu, 11 Jun 2015 18:15:29 +0000 (11:15 -0700)]
Improve boot time by 0.1s by reducing a polling sleep interval

Bug: 21516860
Change-Id: I9e28f4d9cc20ec2a7d9e325c02ef85f0ad9b3d60

9 years agoam 210228a0: Merge "Start tracking added users with serial numbers." into mnc-dev
Jeff Sharkey [Wed, 10 Jun 2015 17:05:45 +0000 (17:05 +0000)]
am 210228a0: Merge "Start tracking added users with serial numbers." into mnc-dev

* commit '210228a089cd215bc671b9fb664d869d2c5ad986':
  Start tracking added users with serial numbers.