OSDN Git Service

android-x86/system-vold.git
4 years agoMerge "vold: Support aborting FUSE connections." into rvc-dev am: cbb69e548a am:...
Martijn Coenen [Fri, 29 May 2020 16:15:08 +0000 (16:15 +0000)]
Merge "vold: Support aborting FUSE connections." into rvc-dev am: cbb69e548a am: 8714d59e29

Change-Id: I91c1b387d8cf5967fa3ad412ca7453364668d812

4 years agoMerge "vold: Support aborting FUSE connections." into rvc-dev am: cbb69e548a
Martijn Coenen [Fri, 29 May 2020 15:59:55 +0000 (15:59 +0000)]
Merge "vold: Support aborting FUSE connections." into rvc-dev am: cbb69e548a

Change-Id: I587b49c9baed58fb87d27e060faf5d3d4ef8d788

4 years agoMerge "vold: Support aborting FUSE connections." into rvc-dev
Martijn Coenen [Fri, 29 May 2020 15:47:05 +0000 (15:47 +0000)]
Merge "vold: Support aborting FUSE connections." into rvc-dev

4 years agoFuseDaemonHostTest is migrated to CTS and renamed. am: de83802e41 am: 13bfc2465c
Abhijeet Kaur [Fri, 29 May 2020 15:18:56 +0000 (15:18 +0000)]
FuseDaemonHostTest is migrated to CTS and renamed. am: de83802e41 am: 13bfc2465c

Change-Id: I1419edbe7c7004cee2cdb14bb5861d07e39d7b2f

4 years agoFuseDaemonHostTest is migrated to CTS and renamed. am: de83802e41
Abhijeet Kaur [Fri, 29 May 2020 15:06:57 +0000 (15:06 +0000)]
FuseDaemonHostTest is migrated to CTS and renamed. am: de83802e41

Change-Id: Iebe048b3e1dd31a63ed62df8c2010e9e5d5d5e4a

4 years agoFuseDaemonHostTest is migrated to CTS and renamed.
Abhijeet Kaur [Thu, 28 May 2020 17:12:40 +0000 (18:12 +0100)]
FuseDaemonHostTest is migrated to CTS and renamed.

FuseDaemonHostTest is migrated to CTS and renamed to
CtsScopedStorageHostTest.

Bug: 142926859
Test: atest --test-mapping
Change-Id: I24c74e20909ccf8868d1487e1cc93f6f2c0108fc

4 years agovold: Support aborting FUSE connections.
Martijn Coenen [Wed, 29 Apr 2020 05:49:41 +0000 (07:49 +0200)]
vold: Support aborting FUSE connections.

This can be done through binder as well as vdc, using 'vdc volume
abort_fuse'.

Bug: 153411204
Test: adb shell vdc volume abort_fuse
Change-Id: I93e46dc1cd361729cc1162c63520cf73152ea409

4 years agoMove enabling sdcardfs behind a property am: f36bdddc7e am: 09daf93c62
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

4 years agoMove enabling sdcardfs behind a property am: f36bdddc7e
Daniel Rosenberg [Thu, 21 May 2020 08:41:18 +0000 (08:41 +0000)]
Move enabling sdcardfs behind a property am: f36bdddc7e

Change-Id: I6ded03167243e9fc60dc2206b5781a84a0140aa3

4 years agoMove enabling sdcardfs behind a property
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

4 years agoMerge "Handle virtio in private fs mapping" into rvc-dev am: 0d1fcb90d6 am: 34d72f126b
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

4 years agoMerge "Handle virtio in private fs mapping" into rvc-dev am: 0d1fcb90d6
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

4 years agoMerge "Handle virtio in private fs mapping" into rvc-dev
TreeHugger Robot [Wed, 20 May 2020 04:28:31 +0000 (04:28 +0000)]
Merge "Handle virtio in private fs mapping" into rvc-dev

4 years agoHandle virtio in private fs mapping
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

4 years agoMerge "Record use of metadata encryption in property" into rvc-dev am: 09ff429e2a...
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

4 years agoMerge "Record use of metadata encryption in property" into rvc-dev am: 09ff429e2a
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

4 years agoMerge "Record use of metadata encryption in property" into rvc-dev
Paul Crowley [Tue, 19 May 2020 22:59:13 +0000 (22:59 +0000)]
Merge "Record use of metadata encryption in property" into rvc-dev

4 years agoExpand virtio_block check to other virtual devices am: ff1fc9bc41 am: ac8027eed5
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

4 years agoExpand virtio_block check to other virtual devices am: ff1fc9bc41
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

4 years agoExpand virtio_block check to other virtual devices
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

4 years agoMerge "Mount storage Android/data and Android/obb as tmpfs in app namespace" into...
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

4 years agoMerge "Mount storage Android/data and Android/obb as tmpfs in app namespace" into...
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

4 years agoMerge "Mount storage Android/data and Android/obb as tmpfs in app namespace" into...
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

4 years agoRevert "ARC++ swap for AppFuseUtil" am: 58d4044082 am: 198657d332
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

4 years agoRevert "ARC++ swap for AppFuseUtil" am: 58d4044082
Satoshi Niwa [Wed, 13 May 2020 14:00:54 +0000 (14:00 +0000)]
Revert "ARC++ swap for AppFuseUtil" am: 58d4044082

Change-Id: I46e6d976324d956b1ad173ba8ed97de760999451

4 years agoRevert "ARC++ swap for AppFuseUtil"
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

4 years agoMount storage Android/data and Android/obb as tmpfs in app namespace
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

4 years agoIntroduce postMount() VolumeBase helper. am: 5ec8658abc am: 2e05806850
Martijn Coenen [Wed, 6 May 2020 09:44:18 +0000 (09:44 +0000)]
Introduce postMount() VolumeBase helper. am: 5ec8658abc am: 2e05806850

Change-Id: I8fa1780662fd27adbb5729fdc89b06d8db545df5

4 years agoIntroduce postMount() VolumeBase helper. am: 5ec8658abc
Martijn Coenen [Wed, 6 May 2020 09:29:56 +0000 (09:29 +0000)]
Introduce postMount() VolumeBase helper. am: 5ec8658abc

Change-Id: Id8ce7dbaabafef41121dbdf9f6169f1377ae1174

4 years agoIntroduce postMount() VolumeBase helper.
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

4 years ago[incfs] Use new IncFs_ReleaseControlFds() instead of duping am: fc7b6697b4 am: 12ffb988c2
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

4 years ago[incfs] Use new IncFs_ReleaseControlFds() instead of duping am: fc7b6697b4
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

4 years ago[incfs] Use new IncFs_ReleaseControlFds() instead of duping
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

4 years agoMerge "Introduce ro.crypto.uses_fs_ioc_add_encryption_key property" into rvc-dev...
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

4 years agoMerge "Introduce ro.crypto.uses_fs_ioc_add_encryption_key property" into rvc-dev...
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

4 years agoMerge "Introduce ro.crypto.uses_fs_ioc_add_encryption_key property" into rvc-dev
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

4 years agoMerge "Don't do private app-dir permissions/quota on public volumes." 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

4 years agoMerge "Don't do private app-dir permissions/quota on public volumes." into rvc-dev...
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

4 years agoMerge "Don't do private app-dir permissions/quota on public volumes." into rvc-dev
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

4 years agoMerge "Bind mount install and android writable DATA and OBB dirs" into rvc-dev am...
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

4 years agoMerge "Bind mount install and android writable DATA and OBB dirs" into rvc-dev am...
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

4 years agoMerge "Bind mount install and android writable DATA and OBB dirs" into rvc-dev
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

4 years agoIntroduce ro.crypto.uses_fs_ioc_add_encryption_key property
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

4 years agoBind mount install and android writable DATA and OBB dirs
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

4 years agoDon't do private app-dir permissions/quota on public volumes.
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

4 years agoRename casefold/projectid properties (for f2fs). am: e9239f757e am: 3426c36540
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

4 years agoRename casefold/projectid properties (for f2fs). am: e9239f757e
Martijn Coenen [Fri, 17 Apr 2020 14:40:56 +0000 (14:40 +0000)]
Rename casefold/projectid properties (for f2fs). am: e9239f757e

Change-Id: I6829424a1ecee05ef8784159789a3a9991d897be

4 years agoRename casefold/projectid properties. am: aee6b6fccd am: f417e12e56
Martijn Coenen [Fri, 17 Apr 2020 08:24:29 +0000 (08:24 +0000)]
Rename casefold/projectid properties. am: aee6b6fccd am: f417e12e56

Change-Id: If0f2bebdcb520cccc4d37f33be9e3fe956fae9d3

4 years agoRename casefold/projectid properties. am: aee6b6fccd
Martijn Coenen [Fri, 17 Apr 2020 08:10:36 +0000 (08:10 +0000)]
Rename casefold/projectid properties. am: aee6b6fccd

Change-Id: I43a490414c4bd816edb707ba350b4ee151133f8f

4 years agoRename casefold/projectid properties (for f2fs).
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

4 years agoRename casefold/projectid properties.
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

4 years agoMerge "Choose options format using property" into rvc-dev am: 0fbd0c1542 am: a46dc6fe7a
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

4 years agoMerge "Choose options format using property" into rvc-dev am: 0fbd0c1542
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

4 years agoMerge "Choose options format using property" into rvc-dev
TreeHugger Robot [Wed, 8 Apr 2020 00:10:59 +0000 (00:10 +0000)]
Merge "Choose options format using property" into rvc-dev

4 years agoChoose options format using property
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

4 years agoAdditional operation check when enabling read logs. am: 605a44fe93 am: 5cbdc3153c
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

4 years agoAdditional operation check when enabling read logs. am: 605a44fe93
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

4 years agoAdditional operation check when enabling read logs.
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

4 years agoReplace EnsureDirExists with a call to setupAppDir am: 75973cb0dd am: c00e508709
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

4 years agoReplace EnsureDirExists with a call to setupAppDir am: 75973cb0dd
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

4 years agoReplace EnsureDirExists with a call to setupAppDir
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

4 years agoMerge "Checking LOADER_USAGE_STATS before enabling read logs." into rvc-dev am: 6ce90...
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

4 years agoMerge "Checking LOADER_USAGE_STATS before enabling read logs." into rvc-dev am: 6ce90...
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

4 years agoMerge "Checking LOADER_USAGE_STATS before enabling read logs." into rvc-dev
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

4 years agoMerge "Send earlyBootEnded notice to all Keymasters" into rvc-dev am: be39b1d53e...
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

4 years agoMerge "Send earlyBootEnded notice to all Keymasters" into rvc-dev am: be39b1d53e
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

4 years agoMerge "Send earlyBootEnded notice to all Keymasters" into rvc-dev
TreeHugger Robot [Wed, 1 Apr 2020 22:31:35 +0000 (22:31 +0000)]
Merge "Send earlyBootEnded notice to all Keymasters" into rvc-dev

4 years agoSend earlyBootEnded notice to all Keymasters
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

4 years agoChecking LOADER_USAGE_STATS before enabling read logs.
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

4 years agoMerge "Prefer f2fs for virtual (private) storage volumes." into rvc-dev am: 60d7c823e...
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

4 years agoMerge "Prefer f2fs for virtual (private) storage volumes." into rvc-dev am: 60d7c823ee
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

4 years agoMerge "Prefer f2fs for virtual (private) storage volumes." into rvc-dev
TreeHugger Robot [Tue, 31 Mar 2020 11:00:31 +0000 (11:00 +0000)]
Merge "Prefer f2fs for virtual (private) storage volumes." into rvc-dev

4 years ago[automerger skipped] Block and wait for /dev/block/loop<N> to appear in case it was...
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

4 years ago[automerger skipped] Block and wait for /dev/block/loop<N> to appear in case it was...
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

4 years ago[automerger skipped] Block and wait for /dev/block/loop<N> to appear in case it was...
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

4 years ago[vold] update with incfs_ndk.h am: 01c4e91c09 am: c0aaacbd28
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

4 years ago[vold] update with incfs_ndk.h am: 01c4e91c09
Songchun Fan [Sun, 29 Mar 2020 17:15:00 +0000 (17:15 +0000)]
[vold] update with incfs_ndk.h am: 01c4e91c09

Change-Id: I70d5449b42f1126885582b701bc45d9a501514e8

4 years ago[vold] update with incfs_ndk.h
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

4 years agoBlock and wait for /dev/block/loop<N> to appear in case it was created asynchronously.
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

4 years ago[vold] Add argument verification to IncFS methods am: 131365a3e5 am: 8a24abaabe
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

4 years ago[vold] Add argument verification to IncFS methods am: 131365a3e5
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

4 years ago[vold] Add argument verification to IncFS methods
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

4 years agoRecord use of metadata encryption in property
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

4 years agoMerge "Bind mount Android/data and Android/obb individually." into rvc-dev am: 81872e...
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

4 years agoMerge "Bind mount Android/data and Android/obb individually." into rvc-dev am: 81872e826c
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

4 years agoMerge "Bind mount Android/data and Android/obb individually." into rvc-dev
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

4 years agoMerge "Add quota / casefold options to f2fs if needed." into rvc-dev am: fe6253e3a2...
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

4 years agoMerge "Add quota / casefold options to f2fs if needed." into rvc-dev am: fe6253e3a2
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

4 years agoMerge "Add quota / casefold options to f2fs if needed." into rvc-dev
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

4 years agoBind mount Android/data and Android/obb individually.
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

4 years agoFix vold wedge when unmounting Android/ am: b6488f3f04 am: 90c928a725
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

4 years agoFix vold wedge when unmounting Android/ am: b6488f3f04
Zim [Wed, 18 Mar 2020 09:55:29 +0000 (09:55 +0000)]
Fix vold wedge when unmounting Android/ am: b6488f3f04

Change-Id: Idc5260aca207ee933720a7762cf4be9ea1b18686

4 years agoFix vold wedge when unmounting Android/
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

4 years agoMake storage dirs remount fork() safe am: 6b12257702 am: d0d09131fd
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

4 years agoMake storage dirs remount fork() safe am: 6b12257702
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

4 years agoMake storage dirs remount fork() safe
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

4 years agoPrefer f2fs for virtual (private) storage volumes.
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

4 years agoAdd quota / casefold options to f2fs if needed.
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

4 years agoMerge "Only set quota project ID inheritance on app-private dirs." into rvc-dev am...
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

4 years agoMerge "Only set quota project ID inheritance on app-private dirs." into rvc-dev am...
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