Commit graph

5178 commits

Author SHA1 Message Date
Howard Chen
d718c8c577 Merge "Make the deleteAllKey feature aware of the DSU mode" 2021-09-22 04:09:18 +00:00
David Anderson
156d9d2293 Pre-create userdata metadata encryption device.
CreateDevice() implicitly calls WaitForDevice(), which can impact boot
time if there are many uevents waiting to be processed. To alleviate
this, create an empty "userdata" device when vold starts (if metada
encryption is enabled). When it comes time to actually enable metadata
encryption, the device can be re-used and the subsequent Wait should be
much faster.

Bug: 198405417
Test: manual test; device boots
Change-Id: Iaacd10858272f17353475e25075ea1dda13f8fc4
2021-09-21 17:25:33 -07:00
Daniel Rosenberg
bf19f0a80b Merge "Fix the incorrect parameter quota when userdata is formatted with EXT4" am: 8bd25f8e74 am: 9788b022dd am: b476bc2041 am: a911c46678
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1825558

Change-Id: I95d29f504d329cd6b3d848260384dc3e559f411f
2021-09-20 22:46:28 +00:00
Daniel Rosenberg
a911c46678 Merge "Fix the incorrect parameter quota when userdata is formatted with EXT4" am: 8bd25f8e74 am: 9788b022dd am: b476bc2041
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1825558

Change-Id: I8ccd657f612eb28d35d545b6e8bc1321531ec3f5
2021-09-20 22:31:41 +00:00
Daniel Rosenberg
b476bc2041 Merge "Fix the incorrect parameter quota when userdata is formatted with EXT4" am: 8bd25f8e74 am: 9788b022dd
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1825558

Change-Id: I1429919b9b952488484e51e88a5ff8a5c5ad24d0
2021-09-20 22:19:15 +00:00
Daniel Rosenberg
9788b022dd Merge "Fix the incorrect parameter quota when userdata is formatted with EXT4" am: 8bd25f8e74
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1825558

Change-Id: I258381abf0a516987abad5357165f8cc6daec4fd
2021-09-20 22:02:27 +00:00
Daniel Rosenberg
8bd25f8e74 Merge "Fix the incorrect parameter quota when userdata is formatted with EXT4" 2021-09-20 21:44:44 +00:00
Howard Chen
cbc1bdba59 Make the deleteAllKey feature aware of the DSU mode
Currently, the vold detects the factory reset by checking the
metadata encryption key. This logic is only valid when the
device is not in DSU mode.

Bug: 199222795
Test: run DSU installation on a Pixel device
Change-Id: Ib40bd44d2ef7c872eba177c9ccfefac8934a49e6
2021-09-15 01:59:59 +00:00
lin.gui
3101ac01ac Fix the incorrect parameter quota when userdata is formatted with EXT4
The userdata will be formatted by VOLD during bootup when the userdata
is not completed file system(EXT4 or F2FS).
For EXT4 on userdata and quota feature is enabled. the parameter quota
is incorrect in ext4::Format(). Change the parameter from
quotatype=prjquota to quotatype=usrquota:grpquota:prjquota.

Bug: 199802158
Test: run cts-on-gsi -m CtsAppSecurityHostTestCases -t
      android.appsecurity.cts.StorageHostTest

Change-Id: Ibff10e8e67b4e6ffabea97f534ff6551aed91963
2021-09-14 02:05:27 +00:00
Thiébaud Weksteen
a01f4f8a25 Merge "Replace security_context_t type" am: 530329222f am: cdbde55e7b am: 0bef24b06b am: 1d40040766
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1824052

Change-Id: Ie0b44ea22f3cbaf269906adc061d563c50d2ac82
2021-09-10 12:19:07 +00:00
Thiébaud Weksteen
1d40040766 Merge "Replace security_context_t type" am: 530329222f am: cdbde55e7b am: 0bef24b06b
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1824052

Change-Id: I741e052fe4a027505d858c1bac0ba63d3bd7c33f
2021-09-10 12:09:27 +00:00
Thiébaud Weksteen
0bef24b06b Merge "Replace security_context_t type" am: 530329222f am: cdbde55e7b
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1824052

Change-Id: Id934c4e2995134c5e1463e972ca7a2a27050aa2b
2021-09-10 11:53:41 +00:00
Thiébaud Weksteen
cdbde55e7b Merge "Replace security_context_t type" am: 530329222f
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1824052

Change-Id: Ie3c20ee9187f349c308798ec370f7aa754fdfa85
2021-09-10 11:31:07 +00:00
Thiébaud Weksteen
530329222f Merge "Replace security_context_t type" 2021-09-10 11:17:18 +00:00
Thiébaud Weksteen
ae8550fd20 Replace security_context_t type
security_context_t has been marked as deprecated in libselinux from
version 3.2. Update to the `char*` type.

Bug: 190808996
Test: m
Change-Id: I6f40e161251c79893d41e12c368715736578aacc
2021-09-10 10:54:19 +02:00
Keith Mok
fd20244d42 [automerger skipped] Merge "Set a property if seed binding is enabled." into sc-v2-dev am: 4fb97923e5 -s ours
am skip reason: Merged-In Ie1dad1735193ce722ec036e38f826a6b90e94526 with SHA-1 e8600253ac is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/vold/+/15747971

Change-Id: Iddb9be188821f933347782e7c8ad9cebe329c5c8
2021-09-08 22:40:16 +00:00
Keith Mok
4fb97923e5 Merge "Set a property if seed binding is enabled." into sc-v2-dev 2021-09-08 22:25:19 +00:00
Keith Mok
143b0df2df Set a property if seed binding is enabled.
For vehicle binding seed atest

Bug: 157501579
Test: atest vehicle-binding-seed-sh

Merged-In: Ie1dad1735193ce722ec036e38f826a6b90e94526
Change-Id: Ie1dad1735193ce722ec036e38f826a6b90e94526
2021-09-02 17:25:35 +00:00
Keith Mok
6872a26c1a Merge "Set a property if seed binding is enabled." am: cc63a93fd6 am: d5f0a5751e am: 7586bba487 am: 2a305d48a9
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1816736

Change-Id: I4ebb0fd8e34e0d534e08bceafb9e72504553367b
2021-09-02 00:58:04 +00:00
Keith Mok
2a305d48a9 Merge "Set a property if seed binding is enabled." am: cc63a93fd6 am: d5f0a5751e am: 7586bba487
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1816736

Change-Id: I31bf53fb43e6f6367a70cbcf51cccf8f82342a70
2021-09-02 00:45:22 +00:00
Keith Mok
7586bba487 Merge "Set a property if seed binding is enabled." am: cc63a93fd6 am: d5f0a5751e
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1816736

Change-Id: Idfb5e71271458418b23abf8741f2b0179435dc3a
2021-09-02 00:33:43 +00:00
Keith Mok
d5f0a5751e Merge "Set a property if seed binding is enabled." am: cc63a93fd6
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1816736

Change-Id: I80fde534da01e49298c9e7b82617befa32959414
2021-09-02 00:18:47 +00:00
Keith Mok
cc63a93fd6 Merge "Set a property if seed binding is enabled." 2021-09-01 23:55:08 +00:00
Keith Mok
e8600253ac Set a property if seed binding is enabled.
For vehicle binding seed atest

Bug: 157501579
Test: atest vehicle-binding-seed-sh
Change-Id: Ie1dad1735193ce722ec036e38f826a6b90e94526
2021-09-01 22:06:10 +00:00
Haiping Yang
ff875233dd Revert "Add ROLLBACK_RESISTANCE tag to key usage" am: c0a46c8106 am: 28f635a556
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/vold/+/15718439

Change-Id: Iaaeb2a8106c3885897ed00d7789fb99bc93c9bfb
2021-09-01 17:46:06 +00:00
Haiping Yang
3a2b4a0295 Revert "Add ROLLBACK_RESISTANCE tag to key usage" am: c0a46c8106 am: 28f8d9e74e
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/vold/+/15718439

Change-Id: If138cef859388a8dbc73cc35c393be4237c92318
2021-09-01 17:45:31 +00:00
Haiping Yang
28f635a556 Revert "Add ROLLBACK_RESISTANCE tag to key usage" am: c0a46c8106
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/vold/+/15718439

Change-Id: I22035c8c8f548d07c6ddcc9e03333515a0dc959b
2021-09-01 17:34:30 +00:00
Haiping Yang
28f8d9e74e Revert "Add ROLLBACK_RESISTANCE tag to key usage" am: c0a46c8106
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/vold/+/15718439

Change-Id: Id48e98c471efd97e378d92f63f5808528d3fb1ae
2021-09-01 17:34:30 +00:00
Haiping Yang
c0a46c8106 Revert "Add ROLLBACK_RESISTANCE tag to key usage"
This reverts commit 2601eb7f8c.

Ignore-AOSP-First: reverted change was introduced in sc-dev
Bug: 196887752
Test: R11 boots on master
Reason for revert: R11 boot failure on master
Change-Id: I8d2f566f3991f30cd65c48d959d26df8b6c85f32
2021-08-30 21:04:59 +00:00
Xin Li
888961428a [automerger skipped] Merge sc-dev-plus-aosp-without-vendor@7634622 am: b9d97763d2 -s ours am: 8148068444 -s ours am: 7c343190da -s ours
am skip reason: Merged-In I78039d08a9bc7d9a2d285744e6d64f4af6ac851a with SHA-1 e4190a395a is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/vold/+/15571875

Change-Id: I0a5ca84ac7625dcca659c2d9c16aa0771e02cadc
2021-08-17 20:32:33 +00:00
Xin Li
7c343190da [automerger skipped] Merge sc-dev-plus-aosp-without-vendor@7634622 am: b9d97763d2 -s ours am: 8148068444 -s ours
am skip reason: Merged-In I78039d08a9bc7d9a2d285744e6d64f4af6ac851a with SHA-1 e4190a395a is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/vold/+/15571875

Change-Id: If64c19baccca5aff77620422c987a70423064398
2021-08-17 19:46:29 +00:00
Xin Li
8148068444 [automerger skipped] Merge sc-dev-plus-aosp-without-vendor@7634622 am: b9d97763d2 -s ours
am skip reason: Merged-In I78039d08a9bc7d9a2d285744e6d64f4af6ac851a with SHA-1 e4190a395a is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/vold/+/15571875

Change-Id: I8578a86264433ab71215153d95274053e2def3c9
2021-08-17 18:35:58 +00:00
Xin Li
b9d97763d2 Merge sc-dev-plus-aosp-without-vendor@7634622
Merged-In: I78039d08a9bc7d9a2d285744e6d64f4af6ac851a
Change-Id: I958ef629f8ca43d6539ae90e037b846d9e0b44a3
2021-08-14 06:31:09 +00:00
Paul Crowley
b2b54ff32c Merge "Revert^2 "Detect factory reset and deleteAllKeys"" into sc-dev am: 1566a5bf00 am: eae11551bd am: 466e30dffe
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/vold/+/15547746

Change-Id: Ia81dee4f11e9e16d96479b046d9c78f13e3bb5ff
2021-08-13 23:25:52 +00:00
Shawn Willden
041b3d11a6 [automerger skipped] Merge "Revert "Detect factory reset and deleteAllKeys"" into sc-dev am: 90c818d9ee am: fb0d651988 am: 426ec8ad34 -s ours
am skip reason: Merged-In I9c5c547140e8b1bbffb9c1d215f75251f0f1354e with SHA-1 1e6a5f5106 is already in history. Merged-In was found from reverted change.

Reverted change: https://googleplex-android-review.googlesource.com/c/platform/system/vold/+/15517876

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/vold/+/15536478

Change-Id: Ib65e44b64a0ea74c29fc0f1275398030c6e86fd5
2021-08-13 23:25:30 +00:00
Paul Crowley
b0519d0d1e [automerger skipped] Merge "Revert^2 "Detect factory reset and deleteAllKeys"" into sc-dev am: 1566a5bf00 -s ours am: 068fbe2ea9 -s ours am: 82daf3dcad -s ours
am skip reason: skipped by user paulcrowley

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/vold/+/15547746

Change-Id: I3fae550d5a025f92cccf1c3761c7f57d4db62b92
2021-08-13 21:33:58 +00:00
Paul Crowley
74547c3e55 [automerger skipped] Merge "Revert^2 "Detect factory reset and deleteAllKeys"" into sc-dev am: 1566a5bf00 am: eae11551bd -s ours am: 23ba1a1b0d -s ours
am skip reason: skipped by user paulcrowley

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/vold/+/15547746

Change-Id: Ie2385b765cce35fd39b6d48f499fa444d2eb1855
2021-08-13 21:33:41 +00:00
Shawn Willden
d3c5dcbfc3 [automerger skipped] Merge "Revert "Detect factory reset and deleteAllKeys"" into sc-dev am: 90c818d9ee -s ours am: e4190a395a -s ours am: 22922e708e -s ours
am skip reason: Merged-In I9c5c547140e8b1bbffb9c1d215f75251f0f1354e with SHA-1 1e6a5f5106 is already in history. Merged-In was found from reverted change.

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/vold/+/15536478

Change-Id: Ia1c0995c739da147be4cf1951146d5d4a9ca097c
2021-08-13 21:30:23 +00:00
Paul Crowley
82daf3dcad [automerger skipped] Merge "Revert^2 "Detect factory reset and deleteAllKeys"" into sc-dev am: 1566a5bf00 -s ours am: 068fbe2ea9 -s ours
am skip reason: skipped by user paulcrowley

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/vold/+/15547746

Change-Id: I04b3bfa639a8838f17ddb0cc642cb78c1baf186f
2021-08-13 21:30:12 +00:00
Paul Crowley
23ba1a1b0d [automerger skipped] Merge "Revert^2 "Detect factory reset and deleteAllKeys"" into sc-dev am: 1566a5bf00 am: eae11551bd -s ours
am skip reason: skipped by user paulcrowley

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/vold/+/15547746

Change-Id: I941ac01cb256a82ab9222f2bc66484713911aa9c
2021-08-13 21:29:58 +00:00
Shawn Willden
215eb9f302 [automerger skipped] Merge "Revert "Detect factory reset and deleteAllKeys"" into sc-dev am: 90c818d9ee am: fb0d651988 -s ours am: 95b5da6fd4 -s ours
am skip reason: Merged-In I9c5c547140e8b1bbffb9c1d215f75251f0f1354e with SHA-1 1e6a5f5106 is already in history. Merged-In was found from reverted change.

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/vold/+/15536478

Change-Id: I4323b20355333d2edf7652b356bf25cc0d366b91
2021-08-13 21:28:07 +00:00
Paul Crowley
068fbe2ea9 [automerger skipped] Merge "Revert^2 "Detect factory reset and deleteAllKeys"" into sc-dev am: 1566a5bf00 -s ours
am skip reason: skipped by user paulcrowley

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/vold/+/15547746

Change-Id: Ib9daf1c3d27f913c99eddf09c29a45a9387fbca9
2021-08-13 13:50:16 +00:00
Paul Crowley
466e30dffe Merge "Revert^2 "Detect factory reset and deleteAllKeys"" into sc-dev am: 1566a5bf00 am: eae11551bd
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/vold/+/15547746

Change-Id: I5a25f5527538b36dc376bc1a56170411705e7afa
2021-08-13 03:01:43 +00:00
Paul Crowley
eae11551bd Merge "Revert^2 "Detect factory reset and deleteAllKeys"" into sc-dev am: 1566a5bf00
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/vold/+/15547746

Change-Id: I89bdf3d65c2461f882d39089e64961537888955b
2021-08-13 02:46:44 +00:00
Paul Crowley
1566a5bf00 Merge "Revert^2 "Detect factory reset and deleteAllKeys"" into sc-dev 2021-08-13 02:33:43 +00:00
Paul Crowley
d31f36d334 Revert^2 "Detect factory reset and deleteAllKeys"
Revert submission 15536724-revert-15521094-vold-deleteAllKeys-GDJSMLXRVZ

Reason for revert: Underlying KM problem fixed
Reverted Changes:
I8e2621bef:Revert "Detect factory reset and deleteAllKeys"
I546b980bb:Revert "Add deleteAllKeys to IKeystoreMaintenance"...
I1ed68dd9e:Revert "Allow vold to deleteAllKeys in Keystore"

Bug: 187105270
Test: booted Cuttlefish twice
Merged-In: 1e6a5f5106
Change-Id: Id641444b4ebba951aa8c5474ed60844cfaae1e20
2021-08-13 01:44:46 +00:00
Shawn Willden
22922e708e [automerger skipped] Merge "Revert "Detect factory reset and deleteAllKeys"" into sc-dev am: 90c818d9ee -s ours am: e4190a395a -s ours
am skip reason: Merged-In I9c5c547140e8b1bbffb9c1d215f75251f0f1354e with SHA-1 1e6a5f5106 is already in history. Merged-In was found from reverted change.

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/vold/+/15536478

Change-Id: If244cf6c5bb06335d07781d1e02e4c3d52fb319f
2021-08-12 01:57:45 +00:00
Shawn Willden
95b5da6fd4 [automerger skipped] Merge "Revert "Detect factory reset and deleteAllKeys"" into sc-dev am: 90c818d9ee am: fb0d651988 -s ours
am skip reason: Merged-In I9c5c547140e8b1bbffb9c1d215f75251f0f1354e with SHA-1 1e6a5f5106 is already in history. Merged-In was found from reverted change.

Reverted change: https://googleplex-android-review.googlesource.com/c/platform/system/vold/+/15517876

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/vold/+/15536478

Change-Id: I2a63cf3373bf1e02062429dff5695b4e50083ecd
2021-08-12 01:57:08 +00:00
Shawn Willden
426ec8ad34 Merge "Revert "Detect factory reset and deleteAllKeys"" into sc-dev am: 90c818d9ee am: fb0d651988
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/vold/+/15536478

Change-Id: Ib8b347507793c00f6f2c585c7cadf4bdbdb0961c
2021-08-12 01:57:03 +00:00
Shawn Willden
fb0d651988 Merge "Revert "Detect factory reset and deleteAllKeys"" into sc-dev am: 90c818d9ee
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/vold/+/15536478

Change-Id: Ie0847281b708c9eb06d54a7078fd6476e65a4099
2021-08-12 01:33:01 +00:00