Commit graph

16 commits

Author SHA1 Message Date
Paul Crowley
0fd2626fc3 Add a mount with metadata encryption service
Don't use the FDE flow to support metadata encryption; just provide a
vold service which directly mounts the volume and use that.

Bug: 63927601
Test: Boot Taimen to SUW with and without metadata encryption.
Change-Id: Ifc6a012c02c0ea66893020ed1d0da4cba6914aed
2018-02-01 10:08:17 -08:00
Paul Lawrence
7ee87cfcbe Remove all references to FDE enable wipe
Bug: 64766105
Test: FBE boots, forceencrypt boots, set pattern, reboots, encryptable
      boots and can be encrypted
Change-Id: I8c6dc0acdc37c3a6f1bea28d5607ed8938a4eb0c
2017-12-22 11:17:15 -08:00
Jeff Sharkey
2048a2865c Test that plaintext can't be read from disk for encrypted files.
Bug: 36029169
Test: tested by hand on Taimen
Change-Id: I5717a8630bb2c8d8fe5c343d519c4e59862ecbdf
2017-10-27 15:14:56 -07:00
Paul Crowley
2d64b91823 Improve VDC's logging on failure.
Also refactor.
Bug: 36029169
Test: ensure that a command fails, check logs for failure.

Change-Id: I1dece2982f762f4522e17d45b5f04af104b95861
2017-10-27 13:37:24 -07:00
Paul Crowley
3c3e360546 Revert "Revert "Be more aggressive about obtaining vold service.""
This reverts commit 5687066dcc.

Reason for revert: ag/2966951 fixes the underlying problem.

Bug: 66739076
Bug: 65737446
Test: reboot-cycle.sh doesn't show a problem.
Change-Id: If4b9c5cc39e9e905d2b1e78f091609be641fc22a
2017-09-27 11:20:01 -07:00
Jeff Sharkey
5687066dcc Revert "Be more aggressive about obtaining vold service."
This reverts commit 4a53a9edb3.

Change-Id: Ie4058488226bf53b78063dd3feb011dbd0167d1e
2017-09-25 23:21:24 +00:00
Jeff Sharkey
4a53a9edb3 Be more aggressive about obtaining vold service.
vdc is typically invoked very early during boot, where it races with
vold starting up.  The default getService() implementation waits a
whole second between retrying, so write a local getServiceAggressive()
that only waits 10ms between attempts.

Test: builds, boots
Bug: 65737446
Change-Id: I581db3afcf7f81dd7cd9cc84dc03194759861669
2017-09-21 18:20:59 -06:00
Jeff Sharkey
49672b9351 Merge "Destroy vold socket interface completely." 2017-09-19 05:11:08 +00:00
Jeff Sharkey
cbe69fc060 Destroy vold socket interface completely.
Long live Binder.

Test: yes
Bug: 13758960
Change-Id: If6be379b5a873f1b0c66dd1522b87413ad10fc46
2017-09-18 16:00:14 -06:00
Jeff Sharkey
57b1874505 Add "mountdefaultencrypted" command to vdc.
It's being used by the emulator.

Test: vdc --wait cryptfs mountdefaultencrypted
Bug: 65795120
Change-Id: I8a5d622e4fa1ef93bb8e22f2665c882b1a152b3d
2017-09-18 13:49:53 -06:00
Jeff Sharkey
99f92689de Move vdc commands over to Binder.
Use nice clean AIDL instead of dirty sockets.

Test: vdc cryptfs init_user0
Bug: 13758960
Change-Id: Ia9dc2e8e1d23e694f1c299fa16d346b07b516718
2017-09-14 13:57:24 -06:00
Tom Cherry
f71511ac41 vdc: use libbase logging and log directly to kmsg on boot
Init is no longer calling vdc with logwrapper, so it must take care of
logging to kmsg directly.

Test: observe logging in kmsg on boot and stderr on normal usage
Change-Id: Ie3e59da433bd154f121ce103dea0c59eb0bab069
2017-03-29 17:06:31 -07:00
Jeff Sharkey
47695b29af Allow callers to prepare CE/DE user storage.
Give callers the option of preparing CE and/or DE storage.  The
framework will only prepare CE storage after the CE keys have been
unlocked for that user.

When init is calling enablecrypto, kick off the work in a thread so
that we can make other calls back into vold without causing
deadlock.  Leaves blocking call intact for framework callers.

Clean up 'vdc' tool to send useful transaction numbers, and
actually watch for the matching result to come back.  This fixes
race conditions when there are multiple 'vdc' callers.

Also add other system and misc directories to match spec.

Bug: 25796509
Change-Id: Ie4f853db6e387916b845d2b5fb92925d743b063d
2016-02-05 13:03:52 -07:00
Paul Lawrence
5c18a67579 Merge commit 'd0b4295c' into manualmerge
Change-Id: I6d7178edebf50663fa9622b539c8101627a84385
2015-06-04 16:01:47 -07:00
Paul Lawrence
d095d86705 am 0628fa25: Improve boot time
* commit '0628fa25141261e549f06d1c6f9e9f3d29e2b8f0':
  Improve boot time
2015-06-04 19:13:24 +00:00
Paul Crowley
fde9cd8c82 Make vdc a C++ file as a base for further improvement.
Bug: 19704432
Change-Id: I784e8a91d3b0f4d6cd0dc668e9e55d0290f768e8
2015-05-06 12:41:10 +01:00
Renamed from vdc.c (Browse further)