OSDN Git Service
Daniel Rosenberg [Thu, 21 May 2020 09:01:53 +0000 (09:01 +0000)]
Move enabling sdcardfs behind a property am:
f36bdddc7e am:
09daf93c62
Change-Id: Iaf328bd2731b680a0da9d66555c0ed7ea5b01b7a
Daniel Rosenberg [Thu, 21 May 2020 08:41:18 +0000 (08:41 +0000)]
Move enabling sdcardfs behind a property am:
f36bdddc7e
Change-Id: I6ded03167243e9fc60dc2206b5781a84a0140aa3
Daniel Rosenberg [Tue, 12 May 2020 05:58:42 +0000 (22:58 -0700)]
Move enabling sdcardfs behind a property
This allows devices that have sdcardfs enabled in the kernel to not use
it. When external_storage.sdcardfs.enabled=0, sdcardfs will not be
mounted. This is treated as default true to not affect upgrading
devices. It does not use the old ro.sys.sdcardfs as that has been
repurposed over time and no longer can be relied on to turn off
sdcardfs. This is included within emulated_storage.mk
Bug:
155222498
Test: mount|grep "type sdcardfs" should find nothing after boot complete
if external_storage.sdcardfs.enabled=0
Change-Id: I23d75fb1225aeabbcb1a035ad62fd042b6b3c7b5
TreeHugger Robot [Wed, 20 May 2020 05:00:00 +0000 (05:00 +0000)]
Merge "Handle virtio in private fs mapping" into rvc-dev am:
0d1fcb90d6 am:
34d72f126b
Change-Id: I42ca63f91246d722681fc56aaf2a5e125eaf26eb
TreeHugger Robot [Wed, 20 May 2020 04:44:11 +0000 (04:44 +0000)]
Merge "Handle virtio in private fs mapping" into rvc-dev am:
0d1fcb90d6
Change-Id: I11bc694a26676dd9f8b0fda7f2078a9bc6ed8719
TreeHugger Robot [Wed, 20 May 2020 04:28:31 +0000 (04:28 +0000)]
Merge "Handle virtio in private fs mapping" into rvc-dev
Alistair Delva [Tue, 19 May 2020 22:49:26 +0000 (15:49 -0700)]
Handle virtio in private fs mapping
When the vold core decides if a device is SD or USB, it checks for MMC
or virtio, however when the filesystem type is decided, it does not
check for virtio, only MMC. This causes virtio SD cards to be formatted
with ext4 unconditionally.
This fix is independently correct, but it incidentally gets adopted
storage working on cuttlefish (and Android Emulator) because f2fs can
support fscrypt and casefolding at the same time; ext4 currently cannot.
Bug:
156286088
Change-Id: I0b41670d5f76b2506dad437917c2276f8e0aaccf
Paul Crowley [Tue, 19 May 2020 23:33:14 +0000 (23:33 +0000)]
Merge "Record use of metadata encryption in property" into rvc-dev am:
09ff429e2a am:
4ca39e4b56
Change-Id: Idaabb296a7c600dcf8d4798a3687e43788e9f00d
Paul Crowley [Tue, 19 May 2020 23:12:02 +0000 (23:12 +0000)]
Merge "Record use of metadata encryption in property" into rvc-dev am:
09ff429e2a
Change-Id: I75726c747937654cdaea15e299cedf0f72c7c5a5
Paul Crowley [Tue, 19 May 2020 22:59:13 +0000 (22:59 +0000)]
Merge "Record use of metadata encryption in property" into rvc-dev
Alistair Delva [Sat, 16 May 2020 02:06:11 +0000 (02:06 +0000)]
Expand virtio_block check to other virtual devices am:
ff1fc9bc41 am:
ac8027eed5
Change-Id: I3000836ad273d36434a2f191d5d96571cc842faa
Alistair Delva [Sat, 16 May 2020 01:47:58 +0000 (01:47 +0000)]
Expand virtio_block check to other virtual devices am:
ff1fc9bc41
Change-Id: I2eda581574e0adecf1617624a66af92b540c35c4
Alistair Delva [Thu, 14 May 2020 23:35:03 +0000 (16:35 -0700)]
Expand virtio_block check to other virtual devices
The Android Emulator isn't the only virtual device the virtio-block
detection code is useful for, and those platforms might not set any
discriminating properties to indicate that they are virtual.
Rework the virtio-block major detection to use /proc/devices instead
of hardcoding the assumption that any virtual platform can have
virtio-block at any experimental major; the new code permits only the
exact experimental major assigned to virtio-block.
The new code runs everywhere, but it will only run once and could be
expanded later to detect dynamic or experimental majors.
Bug:
156286088
Change-Id: Ieae805d08fddd0124a397636f04d99194a9ef7e5
TreeHugger Robot [Wed, 13 May 2020 14:47:51 +0000 (14:47 +0000)]
Merge "Mount storage Android/data and Android/obb as tmpfs in app namespace" into rvc-dev am:
dbc0da396a am:
08b5b882d6
Change-Id: I71baa4daf12d0d54ec2cb25f8c8a2391cbd6d421
TreeHugger Robot [Wed, 13 May 2020 14:27:17 +0000 (14:27 +0000)]
Merge "Mount storage Android/data and Android/obb as tmpfs in app namespace" into rvc-dev am:
dbc0da396a
Change-Id: Ib19a8ab5fc09b138b2dae8b1db2003127d277f10
TreeHugger Robot [Wed, 13 May 2020 14:17:04 +0000 (14:17 +0000)]
Merge "Mount storage Android/data and Android/obb as tmpfs in app namespace" into rvc-dev
Satoshi Niwa [Wed, 13 May 2020 14:16:54 +0000 (14:16 +0000)]
Revert "ARC++ swap for AppFuseUtil" am:
58d4044082 am:
198657d332
Change-Id: I6490832022117fa575263cd5ec52488b9e17ea1b
Satoshi Niwa [Wed, 13 May 2020 14:00:54 +0000 (14:00 +0000)]
Revert "ARC++ swap for AppFuseUtil" am:
58d4044082
Change-Id: I46e6d976324d956b1ad173ba8ed97de760999451
Satoshi Niwa [Tue, 12 May 2020 14:41:40 +0000 (14:41 +0000)]
Revert "ARC++ swap for AppFuseUtil"
This reverts commit
ab7c958cc5ca32aa4f79a6e1fc5784eb3286e326.
Reason for revert: ARC is migrating to ARCVM on R, which doesn't use AppFuse any more.
Bug:
110379912
Test: m
Change-Id: Icc827c59530274421e4c94789d96fd3d287e591e
Ricky Wai [Thu, 7 May 2020 15:01:33 +0000 (16:01 +0100)]
Mount storage Android/data and Android/obb as tmpfs in app namespace
So Android/data and Android/obb won't be accessing fuse anymore,
and apps should not see other packages as well as it's sandboxed
the tmpfs.
Bug:
155462341
Test: atest AppDataIsolationTests pass after feature flag is on
Change-Id: I5658440772e669c1235d318f708a3d336523754f
Martijn Coenen [Wed, 6 May 2020 09:44:18 +0000 (09:44 +0000)]
Introduce postMount() VolumeBase helper. am:
5ec8658abc am:
2e05806850
Change-Id: I8fa1780662fd27adbb5729fdc89b06d8db545df5
Martijn Coenen [Wed, 6 May 2020 09:29:56 +0000 (09:29 +0000)]
Introduce postMount() VolumeBase helper. am:
5ec8658abc
Change-Id: Id8ce7dbaabafef41121dbdf9f6169f1377ae1174
Martijn Coenen [Mon, 4 May 2020 12:57:35 +0000 (14:57 +0200)]
Introduce postMount() VolumeBase helper.
When we're mounting a private volume, we create stacked emulated volumes
on top of it. Due to the ordering there, we would broadcast the emulated
volumes being created *before* the "mounted" status update. This in turn
could cause us to try and mount these emulated volumes before the
underlying private volume is really mounted. This is problematic in
particular on devices that support a filesystem keyring, where we need
to do some additional setup before the devices can be used.
While we could modify StorageManagerService to delay the mount, a safer
fix at this stage of the release is to just fix the ordering of these
events. To achieve that, add a simple postMount() helper, that is called
after a succesful mount. This allows us to setup the volume properly
before trying to mount any stacked volumes.
Bug:
151079464
Test: atest AdoptableHostTest
Change-Id: I2cc4113d4d71d89aa629bb9c0fa9be441355c079
Yurii Zubrytskyi [Thu, 23 Apr 2020 22:10:49 +0000 (22:10 +0000)]
[incfs] Use new IncFs_ReleaseControlFds() instead of duping am:
fc7b6697b4 am:
12ffb988c2
Change-Id: Ie9a92124bdcc16dc854390d57dcbb22723b1f0c8
Yurii Zubrytskyi [Thu, 23 Apr 2020 21:56:23 +0000 (21:56 +0000)]
[incfs] Use new IncFs_ReleaseControlFds() instead of duping am:
fc7b6697b4
Change-Id: Ieff848e641fe40d7a199e460f327ef8aba041dae
Yurii Zubrytskyi [Thu, 23 Apr 2020 06:23:24 +0000 (23:23 -0700)]
[incfs] Use new IncFs_ReleaseControlFds() instead of duping
Vold needs to pass / accept IncFs control via Binder, so it
neeeds to get and put its internal FDs in and out. Using the new
release() function it works without extra fd duping
Bug:
153704006
Test: builds & boots
Change-Id: I64bc5b1ca9f2c69e34c3a860ed3edbe58bd9ea29
Nikita Ioffe [Tue, 21 Apr 2020 14:56:54 +0000 (14:56 +0000)]
Merge "Introduce ro.crypto.uses_fs_ioc_add_encryption_key property" into rvc-dev am:
4e1e7ef09a am:
a2596ddf5e
Change-Id: I5a0f8fcbbb32ee4f2390af15659b55575d2afa43
Nikita Ioffe [Tue, 21 Apr 2020 14:44:12 +0000 (14:44 +0000)]
Merge "Introduce ro.crypto.uses_fs_ioc_add_encryption_key property" into rvc-dev am:
4e1e7ef09a
Change-Id: I1d4f16c45ac8082ae5c6aa7216a4636a32e0c0b7
Nikita Ioffe [Tue, 21 Apr 2020 14:27:18 +0000 (14:27 +0000)]
Merge "Introduce ro.crypto.uses_fs_ioc_add_encryption_key property" into rvc-dev
Martijn Coenen [Tue, 21 Apr 2020 12:56:33 +0000 (12:56 +0000)]
Merge "Don't do private app-dir permissions/quota on public volumes." into rvc-dev am:
15070b1833 am:
fcabee6875
Change-Id: Ife40fbf8b0f2d17f73babe90cb0cf2e422dd2091
Martijn Coenen [Tue, 21 Apr 2020 12:41:54 +0000 (12:41 +0000)]
Merge "Don't do private app-dir permissions/quota on public volumes." into rvc-dev am:
15070b1833
Change-Id: I5b5d4b3f8b8b3ed94264eb79261097b1b93f53a2
Martijn Coenen [Tue, 21 Apr 2020 12:22:58 +0000 (12:22 +0000)]
Merge "Don't do private app-dir permissions/quota on public volumes." into rvc-dev
TreeHugger Robot [Tue, 21 Apr 2020 11:30:44 +0000 (11:30 +0000)]
Merge "Bind mount install and android writable DATA and OBB dirs" into rvc-dev am:
086c96ef6d am:
95d66bc103
Change-Id: Iebb0ce17064b3441aabfcdc45d66639fa3f36f01
TreeHugger Robot [Tue, 21 Apr 2020 11:24:14 +0000 (11:24 +0000)]
Merge "Bind mount install and android writable DATA and OBB dirs" into rvc-dev am:
086c96ef6d
Change-Id: I227d66a376dad24ca40612849fa8259ba4dd0aae
TreeHugger Robot [Tue, 21 Apr 2020 11:08:07 +0000 (11:08 +0000)]
Merge "Bind mount install and android writable DATA and OBB dirs" into rvc-dev
Nikita Ioffe [Mon, 20 Apr 2020 21:21:49 +0000 (22:21 +0100)]
Introduce ro.crypto.uses_fs_ioc_add_encryption_key property
Bug:
154327249
Test: adb shell getprop ro.crypto.uses_fs_ioc_add_encryption_key
Test: adb bugreport && checked content contains new property
Change-Id: I562df49deffdccdb2cfd657130fc05b24d40a6a6
Ricky Wai [Tue, 7 Apr 2020 12:43:20 +0000 (13:43 +0100)]
Bind mount install and android writable DATA and OBB dirs
To improvement performance, and also making them able to list
the dirs.
This should also be fine under b/
151055432, as the whole obb
directory is mounted, renameTo() from installer to apps should be
a move not copy.
Bug:
153422990
Bug:
153540919
Test: atest AdoptableHostTest
Change-Id: Ia18fd4393db14a0f11d6e5b947dd716515bdeeef
Martijn Coenen [Mon, 20 Apr 2020 13:14:48 +0000 (15:14 +0200)]
Don't do private app-dir permissions/quota on public volumes.
While looking at some emulator logs, I noticed that we fail to create
dirs like /Android/data/com.foo/cache on public volumes, because we try
to chmod it; public volumes go completely through FUSE, even for
Android/, and so these operations will fail, because the underlying
UID/GID is not setup correctly.
Really the only thing we really have to do on public volumes is create
the dirs, like we used to do.
Bug:
152618535
Test: manually verify cache dirs can be created successfully
Change-Id: I66e5d0873f1198123787943b17b468eadf0a853d
Martijn Coenen [Fri, 17 Apr 2020 15:00:59 +0000 (15:00 +0000)]
Rename casefold/projectid properties (for f2fs). am:
e9239f757e am:
3426c36540
Change-Id: I985a54206891e772becb08d9c68039c55fcc9f36
Martijn Coenen [Fri, 17 Apr 2020 14:40:56 +0000 (14:40 +0000)]
Rename casefold/projectid properties (for f2fs). am:
e9239f757e
Change-Id: I6829424a1ecee05ef8784159789a3a9991d897be
Martijn Coenen [Fri, 17 Apr 2020 08:24:29 +0000 (08:24 +0000)]
Rename casefold/projectid properties. am:
aee6b6fccd am:
f417e12e56
Change-Id: If0f2bebdcb520cccc4d37f33be9e3fe956fae9d3
Martijn Coenen [Fri, 17 Apr 2020 08:10:36 +0000 (08:10 +0000)]
Rename casefold/projectid properties. am:
aee6b6fccd
Change-Id: I43a490414c4bd816edb707ba350b4ee151133f8f
Martijn Coenen [Thu, 16 Apr 2020 08:16:29 +0000 (10:16 +0200)]
Rename casefold/projectid properties (for f2fs).
According to property naming guidelines.
Bug:
152170470
Bug:
153525566
Test: N/A
Change-Id: Iad1caff6e5cfb7f6a09b77532d64a24de9b0b3c6
Martijn Coenen [Wed, 15 Apr 2020 09:42:47 +0000 (11:42 +0200)]
Rename casefold/projectid properties.
According to property naming guidelines.
Bug:
152170470
Bug:
153525566
Test: N/A
Change-Id: Iaebff2a835288839a2faf0edbe0e47ceb96b4458
Merged-In: Iaebff2a835288839a2faf0edbe0e47ceb96b4458
TreeHugger Robot [Wed, 8 Apr 2020 00:37:28 +0000 (00:37 +0000)]
Merge "Choose options format using property" into rvc-dev am:
0fbd0c1542 am:
a46dc6fe7a
Change-Id: I73ae34a24775ac62d5fc11c901b932ad0adb50a2
TreeHugger Robot [Wed, 8 Apr 2020 00:24:40 +0000 (00:24 +0000)]
Merge "Choose options format using property" into rvc-dev am:
0fbd0c1542
Change-Id: I2d891dd6a28c8f599b68a5df840d0d331fc1c440
TreeHugger Robot [Wed, 8 Apr 2020 00:10:59 +0000 (00:10 +0000)]
Merge "Choose options format using property" into rvc-dev
Paul Crowley [Sun, 22 Mar 2020 15:02:06 +0000 (08:02 -0700)]
Choose options format using property
To make it easier to support disk formats created using old versions
of dm-default-key with new kernels, choose the disk format to use
based on options_format_version and first_api_version properties
instead of checking the version number of the kernel module.
Bug:
150761030
Test: crosshatch and cuttlefish boot normally; cuttlefish
fails with "default-key: Not enough arguments" as expected when
option is set to 1
Cherry-Picked-From:
f56d553babc368e557fe90513e78a5ba06626b0d
Merged-In: Ib51071b7c316ce074de72439741087b18335048c
Change-Id: Ib51071b7c316ce074de72439741087b18335048c
Alex Buynytskyy [Sat, 4 Apr 2020 04:14:05 +0000 (04:14 +0000)]
Additional operation check when enabling read logs. am:
605a44fe93 am:
5cbdc3153c
Change-Id: I717746754b52eeca16b92c1070c9a20f5aebafbe
Alex Buynytskyy [Sat, 4 Apr 2020 04:08:31 +0000 (04:08 +0000)]
Additional operation check when enabling read logs. am:
605a44fe93
Change-Id: I6b91438709189302d4afe64d3d5dfe28fadd513d
Alex Buynytskyy [Thu, 2 Apr 2020 22:21:47 +0000 (15:21 -0700)]
Additional operation check when enabling read logs.
Vold now does not check caller's permission, but only accepts
transactions from system_server. And it's up to system server to do the
right thing and check permissions/appops.
Bug: b/
152633648
Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest
Test: adb shell appops set 1000 GET_USAGE_STATS deny
Change-Id: Id56c1673b135b72b3ec86e572aa4bcca3afc19ab
Linus Tufvesson [Fri, 3 Apr 2020 13:57:14 +0000 (13:57 +0000)]
Replace EnsureDirExists with a call to setupAppDir am:
75973cb0dd am:
c00e508709
Change-Id: I33499481ca340f84317b9b367c708bb02c91b8e1
Linus Tufvesson [Fri, 3 Apr 2020 13:28:11 +0000 (13:28 +0000)]
Replace EnsureDirExists with a call to setupAppDir am:
75973cb0dd
Change-Id: I58cb29e233e98b588a2e66797bd260b548059ca2
Linus Tufvesson [Mon, 23 Mar 2020 11:59:43 +0000 (11:59 +0000)]
Replace EnsureDirExists with a call to setupAppDir
Test: Manually verified ownership of /storage/emulated/0/Android/data on cf_x86_phone-userdebug after enabling feature
Bug:
151455752
Change-Id: I75a1e3b769476e56094e41d82e7f8e1a72827ded
Alex Buynytskyy [Thu, 2 Apr 2020 01:05:50 +0000 (01:05 +0000)]
Merge "Checking LOADER_USAGE_STATS before enabling read logs." into rvc-dev am:
6ce90ced12 am:
19e3a19d75
Change-Id: If91da6aa21b74236154dd01270193ff751c1e2b7
Alex Buynytskyy [Thu, 2 Apr 2020 00:48:13 +0000 (00:48 +0000)]
Merge "Checking LOADER_USAGE_STATS before enabling read logs." into rvc-dev am:
6ce90ced12
Change-Id: Ib92de641097b748c417e0d4dfdc21213da7fd789
Alex Buynytskyy [Thu, 2 Apr 2020 00:36:26 +0000 (00:36 +0000)]
Merge "Checking LOADER_USAGE_STATS before enabling read logs." into rvc-dev
TreeHugger Robot [Wed, 1 Apr 2020 23:07:12 +0000 (23:07 +0000)]
Merge "Send earlyBootEnded notice to all Keymasters" into rvc-dev am:
be39b1d53e am:
ab75cad3ba
Change-Id: I5413a1920a9d21c828c63040d6e8271d4eed979a
TreeHugger Robot [Wed, 1 Apr 2020 22:42:32 +0000 (22:42 +0000)]
Merge "Send earlyBootEnded notice to all Keymasters" into rvc-dev am:
be39b1d53e
Change-Id: Ie48c8f230f88cab75c72594269adb1aed7529f3b
TreeHugger Robot [Wed, 1 Apr 2020 22:31:35 +0000 (22:31 +0000)]
Merge "Send earlyBootEnded notice to all Keymasters" into rvc-dev
Shawn Willden [Wed, 1 Apr 2020 16:02:16 +0000 (10:02 -0600)]
Send earlyBootEnded notice to all Keymasters
Vold incorrectly sends the earlyBootEnded signal only to the Keymaster
instance used for device encryption, but all of them need it.
Bug:
152932559
Test: VtsHalKeymasterV4_1TargetTest
Change-Id: Id8f01a1dc7d2398395f369c3ea74656a82888829
Alex Buynytskyy [Tue, 31 Mar 2020 21:46:25 +0000 (14:46 -0700)]
Checking LOADER_USAGE_STATS before enabling read logs.
Bug: b/
152633648
Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest
Change-Id: I29bf16d06a013566c8dd08e64be2a23ad805e37d
TreeHugger Robot [Tue, 31 Mar 2020 11:27:07 +0000 (11:27 +0000)]
Merge "Prefer f2fs for virtual (private) storage volumes." into rvc-dev am:
60d7c823ee am:
dd9a9a417a
Change-Id: Ifccb1b9a8c1adfa7aaaa301a9019822e909dfb44
TreeHugger Robot [Tue, 31 Mar 2020 11:11:49 +0000 (11:11 +0000)]
Merge "Prefer f2fs for virtual (private) storage volumes." into rvc-dev am:
60d7c823ee
Change-Id: Icf293e9f683a5a24c2c510c2201705c8c898fa88
TreeHugger Robot [Tue, 31 Mar 2020 11:00:31 +0000 (11:00 +0000)]
Merge "Prefer f2fs for virtual (private) storage volumes." into rvc-dev
David Anderson [Mon, 30 Mar 2020 09:18:57 +0000 (09:18 +0000)]
[automerger skipped] Block and wait for /dev/block/loop<N> to appear in case it was created asynchronously. am:
5ba8aeaa80 -s ours am:
87bf96a60e -s ours am:
459685a077 -s ours
am skip reason: Change-Id Id8616804bba622226ca21b8eff0d3eb577b4b7e0 with SHA-1
1dd5c4f787 is in history
Change-Id: Iee2615f280c6a78d840442ecbd48ddeff4a658ee
David Anderson [Mon, 30 Mar 2020 09:12:02 +0000 (09:12 +0000)]
[automerger skipped] Block and wait for /dev/block/loop<N> to appear in case it was created asynchronously. am:
5ba8aeaa80 -s ours am:
87bf96a60e -s ours
am skip reason: Change-Id Id8616804bba622226ca21b8eff0d3eb577b4b7e0 with SHA-1
1dd5c4f787 is in history
Change-Id: If9bb43422e10f5c5053f00191b1f1dcec1718aea
David Anderson [Mon, 30 Mar 2020 09:00:04 +0000 (09:00 +0000)]
[automerger skipped] Block and wait for /dev/block/loop<N> to appear in case it was created asynchronously. am:
5ba8aeaa80 -s ours
am skip reason: Change-Id Id8616804bba622226ca21b8eff0d3eb577b4b7e0 with SHA-1
1dd5c4f787 is in history
Change-Id: Iaffd50d7b736066cfa429edf28b3f18fb956715d
Songchun Fan [Sun, 29 Mar 2020 17:27:58 +0000 (17:27 +0000)]
[vold] update with incfs_ndk.h am:
01c4e91c09 am:
c0aaacbd28
Change-Id: I1f59183e390841f1c0bbea9f1a960658b278c96f
Songchun Fan [Sun, 29 Mar 2020 17:15:00 +0000 (17:15 +0000)]
[vold] update with incfs_ndk.h am:
01c4e91c09
Change-Id: I70d5449b42f1126885582b701bc45d9a501514e8
Songchun Fan [Wed, 4 Mar 2020 01:58:20 +0000 (17:58 -0800)]
[vold] update with incfs_ndk.h
BUG:
150470163
Test: atest PackageManagerShellCommandIncrementalTest
Change-Id: I5166c49cf48f353dab35e385571ada517cb751ac
David Anderson [Tue, 11 Jun 2019 21:51:25 +0000 (14:51 -0700)]
Block and wait for /dev/block/loop<N> to appear in case it was created asynchronously.
Bug:
134711825
Bug:
149462396
Test: StorageManagerTest
Change-Id: Id8616804bba622226ca21b8eff0d3eb577b4b7e0
Merged-In: Id8616804bba622226ca21b8eff0d3eb577b4b7e0
Yurii Zubrytskyi [Thu, 26 Mar 2020 04:36:54 +0000 (04:36 +0000)]
[vold] Add argument verification to IncFS methods am:
131365a3e5 am:
8a24abaabe
Change-Id: I1f40f5b273b211df34ba761b5ebd7aa311e2713a
Yurii Zubrytskyi [Thu, 26 Mar 2020 04:25:16 +0000 (04:25 +0000)]
[vold] Add argument verification to IncFS methods am:
131365a3e5
Change-Id: I149dfdef094804c5eeaa928ee841f7fd7a5f228f
Yurii Zubrytskyi [Wed, 25 Mar 2020 06:49:02 +0000 (23:49 -0700)]
[vold] Add argument verification to IncFS methods
+ Get rid of an extra string copy in path validation function
Bug:
152349257
Test: atest vold_tests
Change-Id: I03a8cab0dd6abd7d5c9dcbbc2acb651e818e6cd8
Paul Crowley [Mon, 23 Mar 2020 15:59:12 +0000 (08:59 -0700)]
Record use of metadata encryption in property
Bug:
152150018
Test: Cuttlefish with and without keydirectory option
Change-Id: I400873ec207cb63f0407fefc83962bb3a927e294
Martijn Coenen [Tue, 24 Mar 2020 09:06:10 +0000 (09:06 +0000)]
Merge "Bind mount Android/data and Android/obb individually." into rvc-dev am:
81872e826c am:
1201947a81
Change-Id: Iba57c0ac4565a2bf298563cb6f3467f7f967a3b5
Martijn Coenen [Tue, 24 Mar 2020 08:50:52 +0000 (08:50 +0000)]
Merge "Bind mount Android/data and Android/obb individually." into rvc-dev am:
81872e826c
Change-Id: I59741944c7731abe21c4b680f496d80beb911a38
Martijn Coenen [Tue, 24 Mar 2020 08:31:44 +0000 (08:31 +0000)]
Merge "Bind mount Android/data and Android/obb individually." into rvc-dev
TreeHugger Robot [Fri, 20 Mar 2020 15:01:27 +0000 (15:01 +0000)]
Merge "Add quota / casefold options to f2fs if needed." into rvc-dev am:
fe6253e3a2 am:
88788e9985
Change-Id: Ibe71145eee41772be80d30233feb1ba4b01d68b4
TreeHugger Robot [Fri, 20 Mar 2020 14:48:05 +0000 (14:48 +0000)]
Merge "Add quota / casefold options to f2fs if needed." into rvc-dev am:
fe6253e3a2
Change-Id: I7debdd40fc1193146816cb1c54f5a608d5f4af32
TreeHugger Robot [Fri, 20 Mar 2020 14:35:07 +0000 (14:35 +0000)]
Merge "Add quota / casefold options to f2fs if needed." into rvc-dev
Martijn Coenen [Mon, 16 Mar 2020 13:37:33 +0000 (14:37 +0100)]
Bind mount Android/data and Android/obb individually.
Because we want all other paths (in particular Android/media) to go
through FUSE.
Also use scope_guard to make unwinding some failures easier.
Bug:
151272568
Test: atest AdoptableHostTest
Change-Id: Ib487b9071b5b212c7bb12ce54f80c96d98acaef5
Zim [Wed, 18 Mar 2020 10:09:07 +0000 (10:09 +0000)]
Fix vold wedge when unmounting Android/ am:
b6488f3f04 am:
90c928a725
Change-Id: I32bd4141c8f9cd15895988309e5fdb65a748213f
Zim [Wed, 18 Mar 2020 09:55:29 +0000 (09:55 +0000)]
Fix vold wedge when unmounting Android/ am:
b6488f3f04
Change-Id: Idc5260aca207ee933720a7762cf4be9ea1b18686
Zim [Tue, 17 Mar 2020 15:15:42 +0000 (15:15 +0000)]
Fix vold wedge when unmounting Android/
In EmulatedVolume#doMount, if some operations fail, we call
EmulatedVolume#doUnmount.
During this unmount we try to unmount Android/ causing a FUSE_LOOKUP
on the FUSE mount. If the FUSE mount is not up, this can hang.
Now we introduce a new state to prevent unmounting Android/ if it
wasn't mounted.
Test: atest AdoptableHostTest
Bug:
151685786
Change-Id: I6246d3910c352034d2a4fb09ad9c1e7fd91cba5e
Automerger Merge Worker [Mon, 16 Mar 2020 16:10:08 +0000 (16:10 +0000)]
Make storage dirs remount fork() safe am:
6b12257702 am:
d0d09131fd
Change-Id: I2b9dd22888ae19ad8a0faa08f0d1ca938a20d0cf
Automerger Merge Worker [Mon, 16 Mar 2020 15:55:40 +0000 (15:55 +0000)]
Make storage dirs remount fork() safe am:
6b12257702
Change-Id: I99fd33c2969236efc8f245aafb55ba4a0d5e9691
Ricky Wai [Fri, 28 Feb 2020 16:30:47 +0000 (16:30 +0000)]
Make storage dirs remount fork() safe
Also, use the pids provided by system server to remount all existing
processes, so we don't need to do the heavy and unreliable scanning in
/proc anymore.
Bug:
149548518
Test: atest AdoptableHostTest
Change-Id: Ifb5b79a3bc5438f36e0d61ec8aec96bdbc60ca13
Martijn Coenen [Wed, 11 Mar 2020 14:33:22 +0000 (15:33 +0100)]
Prefer f2fs for virtual (private) storage volumes.
Since ext4 currently doesn't have the required kernel patches in place
on cuttlefish.
Bug:
150935323
Test: sm set-virtual-disk true
sm partition disk:7,xyz private
inspect mount output
Change-Id: Ief5bd9ace9d39bdfbae8d3857044a2143801f6be
Martijn Coenen [Tue, 10 Mar 2020 08:28:39 +0000 (09:28 +0100)]
Add quota / casefold options to f2fs if needed.
These were only added for ext4.
Bug:
150935323
Test: when creating a private f2fs volume, things work as expected.
Change-Id: I11ee04bfddecb6c95e223e66c9bf532c425e6fac
Automerger Merge Worker [Wed, 11 Mar 2020 13:29:34 +0000 (13:29 +0000)]
Merge "Only set quota project ID inheritance on app-private dirs." into rvc-dev am:
cbd458bb35 am:
a393ab1b10
Change-Id: Ib3fe032ecca608559e26e5ba29c192bf0fcb0664
Automerger Merge Worker [Wed, 11 Mar 2020 13:09:25 +0000 (13:09 +0000)]
Merge "Only set quota project ID inheritance on app-private dirs." into rvc-dev am:
cbd458bb35
Change-Id: Id8975b6e44e613285467eac8c4156f94fe76fb0d
TreeHugger Robot [Wed, 11 Mar 2020 12:54:58 +0000 (12:54 +0000)]
Merge "Only set quota project ID inheritance on app-private dirs." into rvc-dev
Automerger Merge Worker [Wed, 11 Mar 2020 12:14:51 +0000 (12:14 +0000)]
Merge "fskeyring & userspace reboot: support CE keys" into rvc-dev am:
58d89a355a am:
8968fc0219
Change-Id: I589d3047d3e6766965090988b1cc8b02438093eb
Automerger Merge Worker [Wed, 11 Mar 2020 12:00:54 +0000 (12:00 +0000)]
Merge "fskeyring & userspace reboot: support CE keys" into rvc-dev am:
58d89a355a
Change-Id: Id2460f313eac688973af9a20b4fc4fddd5cd609a
Nikita Ioffe [Wed, 11 Mar 2020 11:43:30 +0000 (11:43 +0000)]
Merge "fskeyring & userspace reboot: support CE keys" into rvc-dev
Martijn Coenen [Wed, 11 Mar 2020 10:51:45 +0000 (11:51 +0100)]
Only set quota project ID inheritance on app-private dirs.
Previously every directory on external storage had project ID quota
inheritance enabled; this means that if any new file/directory is
created under such a directory, it will inherit the project ID from the
parent. We use a default project ID of 1000 for generic directories, and
application-specific project IDs for app-specific directories.
MediaProvider is responsible for updating the quota type in the generic
directories, as it scans all files there. However, there is a problem
with this approach: if you move a file to a directory with project ID
inheritance set, and the project ID of that file differs from the
project ID of the dir, that results in an EXDEV error, and requires a
copy instead. For example, if /sdcard/DCIM/test.jpg has a project ID of
1003 (for images), and you try to move it to /sdcard/Pictures/test.jpg,
that would require a copy, because the project ID of /sdcard/Pictures is
1000.
While this is not a very common scenario, it's still better to avoid it.
Luckily we can - since MediaProvider anyway scans all files, it will set
the project ID on individual files correctly - there's no need to
inherit them.
We then only need to inherit quota in application-specific directories,
since in those directories the app can create files itself, and those
need to be tagged correctly.
This change enables that, by removing quota inheritance setting from the
top-level directory, and instead doing it for app-specific directories
instead.
Bug:
151078664
Test: atest StorageHostTest
atest com.android.tests.fused.host.FuseDaemonHostTest#testRenameAndReplaceFile
Change-Id: I38a057ec61cb627e39a3ff7ac58c7218dc251bdc
Nikita Ioffe [Fri, 28 Feb 2020 19:50:31 +0000 (19:50 +0000)]
fskeyring & userspace reboot: support CE keys
During userspace reboot /data might be unmounted & remounted, meaning
that CE keys stored in fs-level keyring will be lost. In order to be
able to restore them, when installing new key to fs-level keyring, it's
also added to session-level keyring with type "fscrypt-provisioning".
Then when init_user0 is called during userspace reboot, vold will try to
load CE keys from the session-level keyring back into fs-level keyring
for all the users that were unlocked before the reboot.
If for any user vold fails to install the key, init_user0 will fail and
fallback to hard reboot will be triggered.
Test: set a pin pattern
Test: adb shell setprop sys.init.userdata_remount.force_umount 1
Test: adb shell svc power reboot userspace
Test: atest CtsUserspaceRebootHostSideTestCases
Bug:
143970043
Change-Id: I37603dc136c7ededc7b0381e4d730cb0ffd912b4
Automerger Merge Worker [Fri, 6 Mar 2020 02:01:58 +0000 (02:01 +0000)]
Use the blk_device supplied by vdc encryptFstab am:
7de5377c89 am:
76c4dfa743
Change-Id: I3a9c811a16ec3e3cb939e24c23b389507e551f95