Commit graph

5544 commits

Author SHA1 Message Date
Treehugger Robot
536beac4bd Merge "Remove unused function UnmountTreeWithPrefix()" 2022-03-10 22:00:46 +00:00
Treehugger Robot
afcb70bcef Merge "Stop using -Wno-missing-field-initializers" am: a10ce5db7d
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2021316

Change-Id: Ic9269bc43e78dc7071cad0a509ccb642d1945c20
2022-03-10 22:00:34 +00:00
Treehugger Robot
e3a45f74b9 Merge "Stop using -Wno-unused-variable" am: 8a73bf6710
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2021315

Change-Id: I1dd9dd0b1af0da5c7a0ee4e37f1fb5d0ba072375
2022-03-10 21:59:48 +00:00
Treehugger Robot
a10ce5db7d Merge "Stop using -Wno-missing-field-initializers" 2022-03-10 21:45:31 +00:00
Treehugger Robot
8a73bf6710 Merge "Stop using -Wno-unused-variable" 2022-03-10 21:40:02 +00:00
Eric Biggers
b5f688aaeb Remove unused function UnmountTreeWithPrefix()
Change-Id: I6940498e4d6269dfcb78cab75bf56d1d545dd784
2022-03-10 20:31:51 +00:00
Eric Biggers
4e152c1c1d Stop using -Wno-missing-field-initializers
There aren't actually any instances of this warning, so just stop
disabling this warning.

Change-Id: I3e810ab2b478851e0651e71b9fda109be70c3cc7
2022-03-10 20:19:46 +00:00
Eric Biggers
0d12fd668d Stop using -Wno-unused-variable
This is a useful warning, so remove two unused variables and stop
disabling this warning.

Change-Id: I3efe0b300ea139ea11d645dec6fb2613acc0e51b
2022-03-10 20:17:23 +00:00
Samiul Islam
b86b08d260 Merge "Create misc_ce and misc_de directories on /mnt/expand" into tm-dev 2022-03-10 11:50:58 +00:00
Eric Biggers
696b8cf721 Merge "Remove progress property support from encrypt_inplace()" am: 8bf0d914df am: 65c5e339cb am: 764f097287
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2019199

Change-Id: Ib9a6e5c472840a6721728c6c523eb087f018973b
2022-03-09 23:51:39 +00:00
Eric Biggers
764f097287 Merge "Remove progress property support from encrypt_inplace()" am: 8bf0d914df am: 65c5e339cb
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2019199

Change-Id: I8c5c03a134339f2cc2ab4f6c648d1f1235e697c5
2022-03-09 23:28:43 +00:00
Eric Biggers
65c5e339cb Merge "Remove progress property support from encrypt_inplace()" am: 8bf0d914df
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2019199

Change-Id: I15768cb52cf0c160f06a1532688cb31bac6055dd
2022-03-09 23:03:19 +00:00
Eric Biggers
8bf0d914df Merge "Remove progress property support from encrypt_inplace()" 2022-03-09 22:39:37 +00:00
Eric Biggers
640a1a9f43 Remove progress property support from encrypt_inplace()
Now that FDE support has been removed, encrypt_inplace() is only used by
metadata encryption, which passes false for the set_progress_properties
parameter.  Therefore, remove the set_progress_properties parameter and
the associated code to update the "vold.encrypt_inplace" and
"vold.encrypt_time_remaining" system properties.

Note that encrypt_inplace() still keeps track of its progress to some
extent, for the purpose of printing log messages; that hasn't changed.

Bug: 208476087
Change-Id: If695db1c4e23f568ff865bccc9fc1b98148815be
2022-03-09 21:03:52 +00:00
Mohammad Samiul Islam
b459591fd1 Create misc_ce and misc_de directories on /mnt/expand
We want to store sdk data on the same volume as app data. Since sdk data
is stored in misc_ce and misc_de directory, we need to ensure they exist
on adopted storage mounted at /mnt/expand/<volume-uuid>.

This CL creates `/mnt/expand/<volume-uuid>/misc_{ce,de}` directories
when disk is mouted and then when user storage is prepared, the sdk root
directory is created.

By having these directories, we can now move the sdk data to other
volume when app data is moved.

Bug: b/222034645
Test: atest SdkSandboxStorageHostTest (see ag/17120883)
Ignore-AOSP-First: End to end test added which exists in internal branch
    only. Will cherry-pick this CL to aosp standalone once it is safely
    merged to internal branch.
Change-Id: I0e73d9ce105abec4b77c378cde58aa7365258f01
2022-03-08 10:37:31 +00:00
Samiul Islam
417b2f5ce7 [automerger skipped] Merge changes I72734267,I66ef7a72 am: 6ace0c8ba0 am: 1e1bade6ff am: 46ae434bff -s ours
am skip reason: Merged-In I727342675f6817d4dced431b4ef57e909c02eb5a with SHA-1 bad7cd0fd7 is already in history

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

Change-Id: I03ef260fa3d118692072d4b2048c7d42e8c883cf
2022-03-07 16:07:07 +00:00
Samiul Islam
2753b21a0d [automerger skipped] Create root directory for supplemental data during user creation am: a6f36ae8d0 am: 17eca61449 am: 967c2dcc59 -s ours
am skip reason: Merged-In I66ef7a7241c9f82cecedaeb6c9a91f127668300a with SHA-1 0cf90d7ca0 is already in history

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

Change-Id: I2d5101836a9c9d1e891cdd85597be74b2092b983
2022-03-07 16:07:05 +00:00
Samiul Islam
46ae434bff Merge changes I72734267,I66ef7a72 am: 6ace0c8ba0 am: 1e1bade6ff
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2005652

Change-Id: Icf3d15d3c78c68d566faeccc8da2300a4e2d4f62
2022-03-07 15:45:42 +00:00
Samiul Islam
967c2dcc59 Create root directory for supplemental data during user creation am: a6f36ae8d0 am: 17eca61449
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2005651

Change-Id: I3ddd3070837d3ceec42845238150cf14ba0315c8
2022-03-07 15:45:41 +00:00
Samiul Islam
1e1bade6ff Merge changes I72734267,I66ef7a72 am: 6ace0c8ba0
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2005652

Change-Id: I23ecce1614673146253c000c71701e32c2d9e10c
2022-03-07 15:24:13 +00:00
Samiul Islam
17eca61449 Create root directory for supplemental data during user creation am: a6f36ae8d0
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2005651

Change-Id: Ie7c16c5562932432818ac138abbfce9aa4cb90a6
2022-03-07 15:24:11 +00:00
Samiul Islam
6ace0c8ba0 Merge changes I72734267,I66ef7a72
* changes:
  Rename SupplementalProcess to SdkSandbox
  Create root directory for supplemental data during user creation
2022-03-07 15:03:18 +00:00
Eric Biggers
739fc57c89 Merge "Remove broken code for mounting encrypted OBB files" am: 74d9fb9757 am: b643247502 am: 24d38cba52
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2003210

Change-Id: I352c2e9088fee23c8371c080a60fa3854bf77fc5
2022-03-04 22:11:49 +00:00
Eric Biggers
24d38cba52 Merge "Remove broken code for mounting encrypted OBB files" am: 74d9fb9757 am: b643247502
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2003210

Change-Id: I5334a64345ca86fb4b4d4ad235e14b79809ef8e6
2022-03-04 21:50:29 +00:00
Eric Biggers
b643247502 Merge "Remove broken code for mounting encrypted OBB files" am: 74d9fb9757
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/2003210

Change-Id: Iebc830bc01a54ce1292cf98f5c7905adcea55b5f
2022-03-04 21:27:43 +00:00
Eric Biggers
74d9fb9757 Merge "Remove broken code for mounting encrypted OBB files" 2022-03-04 20:58:13 +00:00
Nikita Ioffe
d302608a07 Rename SupplementalProcess to SdkSandbox
Ignore-AOSP-First: code not in AOSP yet
Bug: 220320098
Test: presubmit
Change-Id: I727342675f6817d4dced431b4ef57e909c02eb5a
Merged-In: I727342675f6817d4dced431b4ef57e909c02eb5a
(cherry picked from commit bad7cd0fd7)
2022-03-02 16:11:26 +00:00
Samiul Islam
a6f36ae8d0 Create root directory for supplemental data during user creation
In order to store supplemental data for apps, we want to create a root
directory at location `/data/misc_ce/<user-id>/supplmental` and
`/data/misc_de/<user-id>supplemental`. These directories will then host
supplemental data for each app based on package name, e.g,
`/data/misc_ce/0/supplemental/<app-name>`.

Since these are sub-directories of misc directory, vold should prepare
them for consistency.

Bug: 217543371
Test: atest SupplementalProcessStorageHostTest
Test: see ag/16681989
Ignore-AOSP-First: Feature is being developed in internal branch
Change-Id: I66ef7a7241c9f82cecedaeb6c9a91f127668300a
Merged-In: I66ef7a7241c9f82cecedaeb6c9a91f127668300a
(cherry picked from commit 0cf90d7ca0)
2022-03-02 14:14:41 +00:00
Eric Biggers
7e79a43a72 Remove broken code for mounting encrypted OBB files
Mounting encrypted OBB files has never worked reliably across devices,
partly due to its reliance on Twofish encryption support in the kernel.
This is because Twofish support (CONFIG_CRYPTO_TWOFISH) has never been
required or even recommended for Android.  It has never been enabled in
GKI, but even before GKI it wasn't required or recommended.  Moreover,
this is now the only Android feature that still uses dm-crypt
(CONFIG_DM_CRYPT), and some devices don't have that enabled either.

Therefore, it appears that this feature is unused.  That's perhaps not
surprising, considering that the documentation for OBBs
(https://developer.android.com/google/play/expansion-files) says that
they are deprecated, and also it explains OBBs as being app files that
are opaque to the platform; the ability of the platform to mount OBBs
that happen to be in a particular format is never mentioned.  That means
that OBB mounting is probably rarely used even with unencrypted OBBs.
Finally, the usefulness of OBBs having their own encryption layer (in
addition to what the platform already provides via FBE) is not clear
either, especially with such an unusual choice of cipher.

To avoid the confusion that is being caused by having the broken code
for mounting encrypted OBBs still sitting around, let's remove it.

Test: atest StorageManagerTest # on Cuttlefish
Test: atest StorageManagerIntegrationTest # on Cuttlefish
Bug: 216475849
Change-Id: Iaef32cce90f95ea745ba2b143f89e66f533f3479
2022-03-01 21:19:18 +00:00
Nikita Ioffe
bad7cd0fd7 Rename SupplementalProcess to SdkSandbox
Ignore-AOSP-First: code not in AOSP yet
Bug: 220320098
Test: presubmit
Change-Id: I727342675f6817d4dced431b4ef57e909c02eb5a
2022-02-21 19:03:26 +00:00
Samiul Islam
7413749004 Merge "Create root directory for supplemental data during user creation" 2022-02-17 09:38:38 +00:00
Samiul Islam
0cf90d7ca0 Create root directory for supplemental data during user creation
In order to store supplemental data for apps, we want to create a root
directory at location `/data/misc_ce/<user-id>/supplmental` and
`/data/misc_de/<user-id>supplemental`. These directories will then host
supplemental data for each app based on package name, e.g,
`/data/misc_ce/0/supplemental/<app-name>`.

Since these are sub-directories of misc directory, vold should prepare
them for consistency.

Bug: 217543371
Test: atest SupplementalProcessStorageHostTest
Test: see ag/16681989
Ignore-AOSP-First: Feature is being developed in internal branch
Change-Id: I66ef7a7241c9f82cecedaeb6c9a91f127668300a
2022-02-14 11:04:47 +00:00
Xin Li
bbb1412531 [automerger skipped] Empty merge of sc-v2-dev-plus-aosp-without-vendor@8084891 am: 891a5f7c8d -s ours am: d110ee22a1 -s ours
am skip reason: Merged-In I012cfb9b01e5d21ec71700c3c52ac9c096cd1a90 with SHA-1 999fceb07c is already in history

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

Change-Id: I7a4148f24af3eff622cfb5332131c1547e20ced0
2022-02-11 15:58:50 +00:00
Xin Li
d110ee22a1 [automerger skipped] Empty merge of sc-v2-dev-plus-aosp-without-vendor@8084891 am: 891a5f7c8d -s ours
am skip reason: Merged-In I012cfb9b01e5d21ec71700c3c52ac9c096cd1a90 with SHA-1 999fceb07c is already in history

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

Change-Id: I83dc2e0a7cf630d668ddaf71854b7ec3fcfba529
2022-02-11 15:41:46 +00:00
Xin Li
891a5f7c8d Empty merge of sc-v2-dev-plus-aosp-without-vendor@8084891
Bug: 214455710
Merged-In: I012cfb9b01e5d21ec71700c3c52ac9c096cd1a90
Change-Id: I67f80ee94d0f1f273ef49aa45ea0e4674311892b
2022-02-11 06:17:38 +00:00
Eric Biggers
6070f6f0f9 Merge "Remove HardwareAuthToken parameters from binder interface" 2022-02-08 05:08:08 +00:00
Presubmit Automerger Backend
e9aba35079 [automerger skipped] [automerged blank] Fix the incorrect parameter quota when userdata is formatted with EXT4 2p: 681c629a9e am: 8c67ceb8cd -s ours
am skip reason: Merged-In Ibff10e8e67b4e6ffabea97f534ff6551aed91963 with SHA-1 3101ac01ac is already in history

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

Change-Id: I1a438fecd86b449d5e5ca500c043378c690c9d09
2022-02-07 21:25:53 +00:00
Eric Biggers
5bb9faab49 Remove HardwareAuthToken parameters from binder interface
These are no longer used.

Test: atest com.android.server.locksettings
Bug: 184723544
Ignore-AOSP-First: prerequisite changes in frameworks/base have merge
                   conflicts between AOSP and internal master
Change-Id: I6160d30deb138a5366532de84cbf6f02cbc69b8c
2022-02-05 03:21:20 +00:00
Shikha Malhotra
f7bc4958c4 Enable ProjectID for the file systems by default.
This is in conjunction with enabling the project id for internal directories. The check whether project ids should be used or not, is done in installd process. If they cannot be used, then the installd process falls back to previous approaches.

Bug: b/215154615
Test: atest installd/StorageHostTest
Test: atest installd/installd_service_test.cpp
Change-Id: I2c6672640295ebbc5ec78075290fc8e8703384ef
2022-02-04 15:32:31 +00:00
Presubmit Automerger Backend
8c67ceb8cd [automerged blank] Fix the incorrect parameter quota when userdata is formatted with EXT4 2p: 681c629a9e
Blank merge reason: Change-Id Ibff10e8e67b4e6ffabea97f534ff6551aed91963 with SHA-1 3101ac01ac is in history

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

Bug: 199802158
Bug: 211847181
Change-Id: I37d3c5f354c7d03ddcb9c7169a75cdcb916419e0
2022-02-03 00:31:25 +00:00
lin.gui
681c629a9e 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
Bug: 211847181
Test: run cts-on-gsi -m CtsAppSecurityHostTestCases -t
      android.appsecurity.cts.StorageHostTest

Change-Id: Ibff10e8e67b4e6ffabea97f534ff6551aed91963
Merged-In: Ibff10e8e67b4e6ffabea97f534ff6551aed91963
(cherry picked from commit 3101ac01ac)
(cherry picked from commit 344cd3337903c3b5da35df3dc3f15d4badc253a4)
2022-02-03 00:31:14 +00:00
Treehugger Robot
0d7121aea9 [automerger skipped] Merge "[vold] Check incremental paths before mounting" am: 537b76cd98 am: 98fc484581 am: 718d74d66d -s ours am: 756d3f3bcd -s ours
am skip reason: Merged-In I6035447f94ef44c4ae3294c3ae47de2d7210683a with SHA-1 40389820e2 is already in history

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

Change-Id: I8fb4500ff02312f9dc54eb66c662728891874aea
2022-02-01 02:32:11 +00:00
Treehugger Robot
756d3f3bcd [automerger skipped] Merge "[vold] Check incremental paths before mounting" am: 537b76cd98 am: 98fc484581 am: 718d74d66d -s ours
am skip reason: Merged-In I6035447f94ef44c4ae3294c3ae47de2d7210683a with SHA-1 40389820e2 is already in history

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

Change-Id: I40f1b579fdf117f062dbd34f7edb02caea186a90
2022-02-01 02:17:58 +00:00
Treehugger Robot
718d74d66d Merge "[vold] Check incremental paths before mounting" am: 537b76cd98 am: 98fc484581
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1966063

Change-Id: I656c80873cbae20a1d85e3e66c9793202b1a1197
2022-02-01 02:02:24 +00:00
Treehugger Robot
98fc484581 Merge "[vold] Check incremental paths before mounting" am: 537b76cd98
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1966063

Change-Id: I6b3a1e77b153ea5d5180cd1210bfdb4e91d9aaf2
2022-02-01 01:45:30 +00:00
Treehugger Robot
537b76cd98 Merge "[vold] Check incremental paths before mounting" 2022-02-01 01:29:12 +00:00
Yurii Zubrytskyi
18eb877246 [vold] Check incremental paths before mounting
Vold was trusting system_server too much and allowed for pretty
much any path in mount()/bindMount() calls for incremental.
This CL adds validation to make sure it's only accessing own
directories. This includes enforcing no symlinks in the paths

Bug: 198657657
Bug: 216722132
Test: manual
Change-Id: I6035447f94ef44c4ae3294c3ae47de2d7210683a
Merged-In: I6035447f94ef44c4ae3294c3ae47de2d7210683a
2022-01-31 22:13:14 +00:00
Treehugger Robot
277ba83bfa Merge "Add timeout for fsck on untrusted media" am: 313e8556a6 am: d00aa3ec08 am: da54b106a8 am: d6f405cd8d
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1826726

Change-Id: I65c8c3daab439926cc92cd92694608345bcef033
2022-01-26 10:06:56 +00:00
Treehugger Robot
d6f405cd8d Merge "Add timeout for fsck on untrusted media" am: 313e8556a6 am: d00aa3ec08 am: da54b106a8
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1826726

Change-Id: Iae46a17c1754a0807627ea6110993f0154aeeda3
2022-01-26 09:42:00 +00:00
Treehugger Robot
da54b106a8 Merge "Add timeout for fsck on untrusted media" am: 313e8556a6 am: d00aa3ec08
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1826726

Change-Id: I3a8de5dee8ea4fe9fec2e2234434743e7d96c169
2022-01-26 09:32:15 +00:00