Commit graph

4521 commits

Author SHA1 Message Date
rickywai
61d8298959 Merge "Vold should still create obb / data dirs for sdcardfs device" am: f5967975b0
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1541768

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ide8c10f8f6da015d94f39754e1b24c9e00c62e6f
2021-01-08 13:37:08 +00:00
rickywai
f5967975b0 Merge "Vold should still create obb / data dirs for sdcardfs device" 2021-01-08 13:14:57 +00:00
Ricky Wai
1cdd35618a Vold should still create obb / data dirs for sdcardfs device
Otherwise, zygote can't find those dirs and bind mount them.

Bug: 176959830
Test: atest AdoptableHostTest
Change-Id: Ib8a7616f8e248fed244d4f23d3ae36b1419a732d
2021-01-07 09:57:44 +00:00
Jaegeuk Kim
f25b1c1236 Merge "Let vold format the encrypted partition" am: 9cecd65006 am: d062817906
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1530599

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I72de2abed0f1cf2014b6767ec6e37395147e8df3
2021-01-06 20:00:50 +00:00
Jaegeuk Kim
d062817906 Merge "Let vold format the encrypted partition" am: 9cecd65006
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1530599

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic39f55d0b76e408bef5c1ae410cf194344f494a2
2021-01-06 19:43:27 +00:00
Jaegeuk Kim
9cecd65006 Merge "Let vold format the encrypted partition" 2021-01-06 19:12:35 +00:00
Alan Stokes
e0b7f306c1 Remove ro.vold.level_from_user.
This is on everywhere, we no longer have any need for it.

Fix: 171462631
Test: Presubmits
Change-Id: I240361619acafeee6cac383037887e15a46c0c38
2021-01-05 09:49:24 +00:00
Martijn Coenen
60537dad69 Merge "Revert "Set a default ACL on /data/media/userId."" am: 6836a8bda7 am: ca97626e08
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1535266

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I7124285f41c6a854ad5c86677bc94d78ddca5a97
2020-12-24 09:44:48 +00:00
Martijn Coenen
ca97626e08 Merge "Revert "Set a default ACL on /data/media/userId."" am: 6836a8bda7
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1535266

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I6148b6f31eda0d01f1db2fc324b6f3425f5eb4ed
2020-12-24 09:22:27 +00:00
Martijn Coenen
6836a8bda7 Merge "Revert "Set a default ACL on /data/media/userId."" 2020-12-24 08:38:02 +00:00
Martijn Coenen
a71323ec0e Set a default ACL on /data/media/userId.
This directory is used as a root for external storage on adopted storage
devices. It needs to be writable by processes holding the AID_MEDIA_RW
GID permission; in particular, it should be writable by the FUSE daemon.

On devices with sdcardfs, this was ensured automatically, because
sdcardfs presented a view of this directory that was writable, that we
could use for the FUSE daemon. But on devices without sdcardfs, the FUSE
daemon sees the raw filesystem and its permissions. This also means that
files created by the FUSE daemon will have their uid/gid set to the uid
of the FUSE daemon; to ensure these files stay writable to other system
applications that have AID_MEDIA_RW, use a default ACL to make sure the
gid stays AID_MEDIA_RW.

In particular, this fixes an issue with app cloning, where we want the
FUSE daemon of user 0 to be able to access the files of the app clone
user, and vice versa.

Bug: 154057120
Test: inspect uid/gid of /data/media/0 and contents
Change-Id: Ib718b8362df84754ee3cac33865bca3c12df2e3a
2020-12-23 21:05:02 +00:00
Martijn Coenen
94d6c1275d Revert "Set a default ACL on /data/media/userId."
This reverts commit 8688eb4f47.

Reason for revert: Probably causing b/176240229

Change-Id: Id92d1f1589e8927f372960ec2cc5d262d10ad161
2020-12-23 19:14:15 +00:00
Martijn Coenen
0fc5327261 Merge "Set a default ACL on /data/media/userId." am: c5c3cdee24 am: ad7b138161
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1530814

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9d464a65e45e9250dbf161e0d35a991b99a86c3a
2020-12-23 08:51:25 +00:00
Martijn Coenen
ad7b138161 Merge "Set a default ACL on /data/media/userId." am: c5c3cdee24
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1530814

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I43a6b3483fa3542f76ebe7961c46560646e7e370
2020-12-23 08:13:14 +00:00
Martijn Coenen
c5c3cdee24 Merge "Set a default ACL on /data/media/userId." 2020-12-23 07:56:19 +00:00
Jaegeuk Kim
0c52c7125f Let vold format the encrypted partition
Bug: 172378121
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Change-Id: I03997eb4cbf25a80e36ea738c50e0adb7f4013dd
2020-12-22 11:28:50 -08:00
Martijn Coenen
8688eb4f47 Set a default ACL on /data/media/userId.
This directory is used as a root for external storage on adopted storage
devices. It needs to be writable by processes holding the AID_MEDIA_RW
GID permission; in particular, it should be writable by the FUSE daemon.

On devices with sdcardfs, this was ensured automatically, because
sdcardfs presented a view of this directory that was writable, that we
could use for the FUSE daemon. But on devices without sdcardfs, the FUSE
daemon sees the raw filesystem and its permissions. This also means that
files created by the FUSE daemon will have their uid/gid set to the uid
of the FUSE daemon; to ensure these files stay writable to other system
applications that have AID_MEDIA_RW, use a default ACL to make sure the
gid stays AID_MEDIA_RW.

In particular, this fixes an issue with app cloning, where we want the
FUSE daemon of user 0 to be able to access the files of the app clone
user, and vice versa.

Bug: 154057120
Test: inspect uid/gid of /data/media/0 and contents
Change-Id: I6dfae41f9cb6a8283978b2667b02708a000f07c0
2020-12-16 17:54:22 +01:00
rickywai
76e648d54a Merge "Check if storage app data and obb directories exist in vold" am: 168893621b am: fac72e2ec8
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1515332

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Idb66d49c9149b22c9b502faed15b1b05237d1e99
2020-12-14 14:49:04 +00:00
rickywai
fac72e2ec8 Merge "Check if storage app data and obb directories exist in vold" am: 168893621b
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1515332

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iabe64c6a23be2df782f7993311c3b89e3bd5a898
2020-12-14 14:41:26 +00:00
rickywai
168893621b Merge "Check if storage app data and obb directories exist in vold" 2020-12-14 14:24:36 +00:00
Jeffrey Vander Stoep
9abb5fd8f1 Merge "OWNERS: add alan and jeff, alphabetize" am: 23bfcbb6be am: 020ecea66d
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1523057

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iebe0908d1ac725ac1595dcf1a593e7b3893bb9cf
2020-12-10 14:49:17 +00:00
Jeffrey Vander Stoep
020ecea66d Merge "OWNERS: add alan and jeff, alphabetize" am: 23bfcbb6be
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1523057

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I16e904386de3cbc6be18e1fbfabf5f10fda068ef
2020-12-10 14:11:22 +00:00
Jeffrey Vander Stoep
23bfcbb6be Merge "OWNERS: add alan and jeff, alphabetize" 2020-12-10 13:59:45 +00:00
Alan Stokes
41fa197c9a Merge "Enable improved user separation by default." am: 9ad4f042ff am: 66aedd52a2
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1522938

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2c7d8951108250458b19bac6a35ef3517cebdcc4
2020-12-10 13:15:40 +00:00
Alan Stokes
66aedd52a2 Merge "Enable improved user separation by default." am: 9ad4f042ff
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1522938

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I03847bcfc16d02713d0edcd1435852a813c80e7a
2020-12-10 12:45:48 +00:00
Alan Stokes
9ad4f042ff Merge "Enable improved user separation by default." 2020-12-10 12:30:43 +00:00
Jeff Vander Stoep
2c347c75c1 OWNERS: add alan and jeff, alphabetize
Test: n/a
Change-Id: I3b9f18906b72d0a3aed712f6c6990180294d0d2b
2020-12-10 13:08:28 +01:00
Alan Stokes
1dafff79e1 Enable improved user separation by default.
This is already on for all Pixel devices with no problems observed.

If this causes issues with a specific device (e.g. vendor apps being
unable to access their data) it can be temporarily disabled by adding

PRODUCT_PROPERTY_OVERRIDES += ro.vold.level_from_user=0

to the device.mk file. Please file a bug if that happens.

Bug: 141677108
Test: presubmits
Change-Id: Ic9da534f1a5f4c9e3bd62ea5c09a3b11ebcb33e7
Merged-In: Ic9da534f1a5f4c9e3bd62ea5c09a3b11ebcb33e7
(cherry picked from commit 763393644a)
2020-12-10 09:54:06 +00:00
Ricky Wai
bbfb6ea1ac Check if storage app data and obb directories exist in vold
As storage is not mounted in system server, we use vold
to check if storage app data and obb directories exist instead.

We add a method in vold so it only creates app data and obb dirs
if dirs do not exist to speed up app starting time.

Bug: 160336374
Test: Data and obb directories are created when a new app is started
Change-Id: I1bd784d9c9e05463f71433fc782ac4e0c831cbf1
2020-12-03 15:38:03 +00:00
Treehugger Robot
f1238ff370 Merge "Follow vdc naming convention: earlyBootEnded" am: e8838a862d am: 12eb9de463
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1512480

Change-Id: Ibb7a80f05f3bb7c2f13a666bafc8d323db46825b
2020-12-02 08:57:03 +00:00
Treehugger Robot
12eb9de463 Merge "Follow vdc naming convention: earlyBootEnded" am: e8838a862d
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1512480

Change-Id: I7df00e8936fd2185541645594a9633317632fe99
2020-12-02 08:20:27 +00:00
Treehugger Robot
e8838a862d Merge "Follow vdc naming convention: earlyBootEnded" 2020-12-02 07:49:38 +00:00
Paul Crowley
ed06b3eabe Follow vdc naming convention: earlyBootEnded
vdc commands use camelCase, not kebab-case.

Test: EarlyBootKeyTest.CannotCreateEarlyBootKeys
Change-Id: I7be4d3008a731829e5d5e025216cb2ade238a530
2020-12-01 14:36:06 -08:00
Xin Li
bc9378c6f7 [automerger skipped] Skip rvc-qpr-dev-plus-aosp-without-vendor@6881855 am: 2d717e91f1 -s ours
am skip reason: Change-Id I51672944372d24483679d6f81df4e80869d3fd99 with SHA-1 3c11d4611a is in history

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

Change-Id: If77798f54d5570e882b6ddc8f7a4a3789f9998da
2020-11-24 03:44:30 +00:00
Xin Li
2d717e91f1 Skip rvc-qpr-dev-plus-aosp-without-vendor@6881855
Bug: 172690556
Merged-In: I51672944372d24483679d6f81df4e80869d3fd99
Change-Id: Ib64d7c9c68de9058bae79d0de9f9c59341d207c3
2020-11-23 16:26:04 -08:00
android-build-team Robot
cbe6b1daa3 Snap for 6986981 from 772008dbca to rvc-qpr2-release
Change-Id: If6202a71ac54ca1e9f1e499e2ae9bf2ca08b93e5
2020-11-21 00:05:56 +00:00
Martijn Coenen
eeff2fd76a [automerger skipped] Convert to lower fs path for createObb(). am: 772008dbca -s ours
am skip reason: Change-Id I98222bf844a6b7d8ec0d9873eddc71f61aa68c90 with SHA-1 d6a612ac20 is in history

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

Change-Id: I21651924e7b7f946aefb5e30a6d1fe17024b8e96
2020-11-20 11:20:58 +00:00
Martijn Coenen
772008dbca Convert to lower fs path for createObb().
Since /storage/emulated/userId isn't accessible for users != userId,
and vold should anyway try to avoid accessing the FUSE filesystem itself.

Bug: 172078780
Test: atest StorageManagerTest --user-type secondary_user
Change-Id: I98222bf844a6b7d8ec0d9873eddc71f61aa68c90
Merged-In: I98222bf844a6b7d8ec0d9873eddc71f61aa68c90
2020-11-20 07:51:04 +00:00
Martijn Coenen
39f8373ce4 Merge "Convert to lower fs path for createObb()." am: c237cbc575 am: 00382980e5 am: 1e3addab7f
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1505371

Change-Id: Ifd130be166f40ef78f3122444a25daeb2f36799c
2020-11-19 18:39:29 +00:00
Martijn Coenen
7befe510e1 Merge "Unmount pass_through path last." am: 2fb2757c2d am: 5b5083b8a9 am: a385e43146
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1505131

Change-Id: I910198959e1998dd385e6a105f85fe8fe4ad5458
2020-11-19 18:39:19 +00:00
Martijn Coenen
1e3addab7f Merge "Convert to lower fs path for createObb()." am: c237cbc575 am: 00382980e5
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1505371

Change-Id: Ibc7a9e7c4a3772e741d4f096fde99ee92e9dd06e
2020-11-19 18:07:45 +00:00
Martijn Coenen
a385e43146 Merge "Unmount pass_through path last." am: 2fb2757c2d am: 5b5083b8a9
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1505131

Change-Id: Ia2b063f404b23f794642d25e3755aeca571430c4
2020-11-19 18:07:35 +00:00
Martijn Coenen
00382980e5 Merge "Convert to lower fs path for createObb()." am: c237cbc575
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1505371

Change-Id: Ib2cacb3602bc21c5e6d03e15337c188ae2f7bdd5
2020-11-19 17:48:44 +00:00
Martijn Coenen
5b5083b8a9 Merge "Unmount pass_through path last." am: 2fb2757c2d
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1505131

Change-Id: I16944515f12a656d9b6a2da23a04b7615c9e2f1a
2020-11-19 17:48:36 +00:00
Martijn Coenen
c237cbc575 Merge "Convert to lower fs path for createObb()." 2020-11-19 17:31:54 +00:00
Martijn Coenen
2fb2757c2d Merge "Unmount pass_through path last." 2020-11-19 17:31:45 +00:00
Martijn Coenen
d6a612ac20 Convert to lower fs path for createObb().
Since /storage/emulated/userId isn't accessible for users != userId,
and vold should anyway try to avoid accessing the FUSE filesystem itself.

Bug: 172078780
Test: atest StorageManagerTest --user-type secondary_user
Change-Id: I98222bf844a6b7d8ec0d9873eddc71f61aa68c90
2020-11-19 15:27:55 +00:00
Martijn Coenen
64b3bba52e Unmount pass_through path last.
There've been reports of issues where, when a volume is ejected, the
MediaProvider process gets killed. This happens because the
MediaProvider has a file open on the volume (eg, during a scan). We do
abort the scan when the volume is ejected, however this could take some
time. So, we give MediaProvider a bit more time before getting killed,
by only looking for files open on the pass_through paths last. This
order anyway seems to make more sense - ideally we kill apps using
external storage before we unmount the pass_through path underlying it.

Bug: 171367622
Test: atets AdoptableHostTest
Change-Id: Ie8eacaa72a80ff8161ecf1e8c0243afcd890ee39
2020-11-19 09:08:50 +01:00
Martijn Coenen
a108cd8816 Merge "Call earlyBootEnded from vdc." am: 17ebcf7f99 am: 87869c2b77 am: 7faba479e3
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1496221

Change-Id: I06b3c1a67507da6d1cafa39079bb495f6ce6b800
2020-11-18 09:07:12 +00:00
Martijn Coenen
7faba479e3 Merge "Call earlyBootEnded from vdc." am: 17ebcf7f99 am: 87869c2b77
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1496221

Change-Id: I6ba0e5570a7e0d378f78a1d152e1133371f980ea
2020-11-18 08:37:38 +00:00