Commit graph

4441 commits

Author SHA1 Message Date
Martijn Coenen
14782046f3 Merge "Set a default ACL on /data/media/userId." 2021-01-19 09:38:55 +00:00
Risan
3164c0a238 Revert "Revert "Customize StubVolume implementation for ARC""
This reverts commit 0cf77b025d.

Reason for revert: The requird libarcvolume has been submitted to master (ag/13366009)

Change-Id: I86fada53aad2ec5faa497a9bcbce5435c35d040e
2021-01-19 02:24:38 +00:00
Mariia Sandrikova
4e8b1631b6 Merge "Revert "Customize StubVolume implementation for ARC"" am: 5558a72d03
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1553535

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5c7f898a1229e2c859a6add61b0024bb95c7d8ce
2021-01-18 18:18:08 +00:00
Mariia Sandrikova
5558a72d03 Merge "Revert "Customize StubVolume implementation for ARC"" 2021-01-18 18:00:07 +00:00
Treehugger Robot
9ae91a47f9 Merge "Add a method in vold to unmount app data and obb dir for testing" am: 502c283c22
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1551802

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Icc8f32345954752f08223bd99e40340759d49abc
2021-01-18 16:40:32 +00:00
Treehugger Robot
502c283c22 Merge "Add a method in vold to unmount app data and obb dir for testing" 2021-01-18 16:20:41 +00:00
Mariia Sandrikova
0cf77b025d Revert "Customize StubVolume implementation for ARC"
This reverts commit b5d7cb0a52.

Reason for revert: Broken build b/177828900
Fix: 177829766

Change-Id: Ic2984da3b11bcf5597203b511943d3058ea9ea19
2021-01-18 15:28:41 +00:00
Treehugger Robot
be4467f180 Merge "Add kVisible flag to vold::Disk" am: 5e103f1106
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1536564

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ibfc68bf8cce3b45188747974ac0304c9269d08bc
2021-01-18 15:15:43 +00:00
Treehugger Robot
5e103f1106 Merge "Add kVisible flag to vold::Disk" 2021-01-18 14:54:27 +00:00
Ricky Wai
a2ca11e49b Add a method in vold to unmount app data and obb dir for testing
This new method will be used in new sm command.
Tests can use this so data and obb dirs are unmounted, and won't
be killed when volume is unmounted.

Bug: 148049767
Test: New sm command able to unmount app's data and obb dirs
Change-Id: Ifbc661ca510e996abd4b7ce1fb195aaa7afc37ad
2021-01-18 13:47:44 +00:00
Risan
802d1d256a Merge "Customize StubVolume implementation for ARC" am: 253dd94521
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1532070

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I35c24968bf2df577ebdfcefb59d9bb9046405573
2021-01-18 13:06:47 +00:00
Risan
253dd94521 Merge "Customize StubVolume implementation for ARC" 2021-01-18 12:49:36 +00:00
Youkichi Hosoi
defc0454a2 Add kVisible flag to vold::Disk
The new flag is used to indicate that a stub volume (external storage
volume shared with Chrome OS) is visible to Android apps.

Bug: 123377807
Bug: 142684760
Bug: 132796154
Test: Check logcat logs for StorageManagerService.mount() when the
Test: visibility setting of a removable device is toggled in Chrome OS.
Test: Confirm that the visibility setting is properly set.
Test: (Tested in R)
Change-Id: Ica69110d5667837a72a5c8693ff3bccc0f09a82d
2021-01-18 11:58:10 +00:00
Risan
b5d7cb0a52 Customize StubVolume implementation for ARC
This allow ARC to customize StubVolume implementation in vendor
partition.

Bug: 132796154
Test: Customize the implementation of StubVolume and check on device.
Ignore-AOSP-First: Will cherry-pick to AOSP.
Change-Id: I626a7ed4113b6132bb456b3258ee4a93b4f8a72e
2021-01-18 08:31:58 +00:00
Yifan Hong
8f0d45441c Refactor HIDL HAL Dev GC invocation
Prefix all HIDL HAL types with the letter H.
Also make the invocation more generic so that we can use
the AIDL implementation in the future.

Test: TH
Bug: 177470478

Change-Id: Iee0af9727c48c532315203c138a4996a08fcaa34
2021-01-15 18:27:57 -08:00
Yifan Hong
e1e494519e Use AIDL HAL for Dev GC
Test: run idle maint
Bug: 177470478

Change-Id: Iefddf8628e31f020b86ff56dfb4926c2c9a2a888
2021-01-15 18:27:57 -08:00
rickywai
9aee3a9513 Merge "Remove persist.sys.fuse == false code paths" am: 610eba0ad0
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1549441

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4581ca20e4c377957547d1876dee8c20bd53a2ea
2021-01-15 14:21:47 +00:00
rickywai
610eba0ad0 Merge "Remove persist.sys.fuse == false code paths" 2021-01-15 14:00:35 +00:00
Ricky Wai
e78c78c2e6 Remove persist.sys.fuse == false code paths
Since Android R, the FUSE prop is always on and FUSE-off is no longer
supported

Test: m
Bug: 160159282
Merged-In: Ic4414b850511fe3b4fc6df3f8b736d21335db820
Change-Id: I5a7643f9ca2f37cd7f264331df76b42df31988d5
2021-01-14 15:51:54 +00:00
Alan Stokes
972317ce6d Merge "Remove ro.vold.level_from_user." am: c0e870af67
Original change: https://android-review.googlesource.com/c/platform/system/vold/+/1535004

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I35072449979077c9fdfa7bdb93c7018c91dacdb7
2021-01-12 11:34:02 +00:00
Alan Stokes
c0e870af67 Merge "Remove ro.vold.level_from_user." 2021-01-12 11:17:50 +00:00
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
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