Commit graph

3735 commits

Author SHA1 Message Date
Paul Crowley
7f076f9142 Merge "Choose options format using property" am: 479588c68e am: 30c1b0225e
Change-Id: Ic6b4c8e252ea9f3285c0646c7ed26d0bb54a2a88
2020-04-07 04:07:38 +00:00
Paul Crowley
30c1b0225e Merge "Choose options format using property" am: 479588c68e
Change-Id: I67523617a54957da6a3fae7cd9233ff47627578d
2020-04-07 03:48:07 +00:00
Paul Crowley
479588c68e Merge "Choose options format using property" 2020-04-07 03:23:57 +00:00
Paul Crowley
f56d553bab 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
Change-Id: Ib51071b7c316ce074de72439741087b18335048c
2020-04-06 08:45:32 -07:00
Alex Buynytskyy
fb9001b917 Additional operation check when enabling read logs. am: 605a44fe93
Change-Id: Ie068daae873a7796873e4170cd18617d8161916f
2020-04-04 04:08:57 +00:00
Alex Buynytskyy
605a44fe93 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
2020-04-03 18:42:04 -07:00
Jaegeuk Kim
f64d30aa82 vold: support F2FS compression
Bug: 134580167
Change-Id: Iadd001dc5ce0f91a4337f5b27ea8cc54f9760b0d
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2020-04-03 14:02:14 -07:00
Yurii Zubrytskyi
0c0ed9d6b5 Merge "[vold] update with incfs_ndk.h" am: 29ee196fb5 am: e296f9cbf6
Change-Id: I0173898669ca7d4b3a03449d2488f69cddb0ba3f
2020-04-03 18:10:50 +00:00
Yurii Zubrytskyi
16548b2538 [automerger skipped] Merge "[vold] update with incfs_ndk.h" am: 29ee196fb5 am: e296f9cbf6 -s ours
am skip reason: Change-Id I5166c49cf48f353dab35e385571ada517cb751ac with SHA-1 01c4e91c09 is in history

Change-Id: I954834a99ef8253dee7ed1cd5d776dbc405427c6
2020-04-03 18:09:40 +00:00
Yurii Zubrytskyi
e296f9cbf6 Merge "[vold] update with incfs_ndk.h" am: 29ee196fb5
Change-Id: If51dfb7c76c6593ecf31c2b42712c4ac114d2b83
2020-04-03 17:49:01 +00:00
Yurii Zubrytskyi
29ee196fb5 Merge "[vold] update with incfs_ndk.h" 2020-04-03 17:25:05 +00:00
Linus Tufvesson
f7dccbbf7b Replace EnsureDirExists with a call to setupAppDir am: 75973cb0dd
Change-Id: I7cc9c77bd27c459684698069cd85f544d8cb2571
2020-04-03 13:28:37 +00:00
Linus Tufvesson
75973cb0dd 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
2020-04-03 10:29:51 +00:00
Alex Buynytskyy
31e2a7c5c5 Merge "Checking LOADER_USAGE_STATS before enabling read logs." into rvc-dev am: 6ce90ced12
Change-Id: I9b04f7a6201cf148c310dc7c1598c40076839f64
2020-04-02 00:48:17 +00:00
Alex Buynytskyy
6ce90ced12 Merge "Checking LOADER_USAGE_STATS before enabling read logs." into rvc-dev 2020-04-02 00:36:26 +00:00
Songchun Fan
27819332a8 [vold] update with incfs_ndk.h
BUG: 150470163
Test: atest PackageManagerShellCommandIncrementalTest
Change-Id: I5166c49cf48f353dab35e385571ada517cb751ac
Merged-In: I5166c49cf48f353dab35e385571ada517cb751ac
2020-04-01 16:27:37 -07:00
TreeHugger Robot
1735b4620d Merge "Send earlyBootEnded notice to all Keymasters" into rvc-dev am: be39b1d53e
Change-Id: Ice2298726632bc0e6299669d5e56e6d5470bce5b
2020-04-01 22:42:49 +00:00
TreeHugger Robot
be39b1d53e Merge "Send earlyBootEnded notice to all Keymasters" into rvc-dev 2020-04-01 22:31:35 +00:00
Shawn Willden
50397a72f1 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
2020-04-01 10:04:32 -06:00
Alex Buynytskyy
91e0bf4998 Checking LOADER_USAGE_STATS before enabling read logs.
Bug: b/152633648
Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest
Change-Id: I29bf16d06a013566c8dd08e64be2a23ad805e37d
2020-03-31 16:28:30 -07:00
TreeHugger Robot
e52e4f2e1e Merge "Prefer f2fs for virtual (private) storage volumes." into rvc-dev am: 60d7c823ee
Change-Id: Id0dc7498977c658b397f1e24e6f5f11a8b141ed3
2020-03-31 11:12:23 +00:00
TreeHugger Robot
60d7c823ee Merge "Prefer f2fs for virtual (private) storage volumes." into rvc-dev 2020-03-31 11:00:31 +00:00
David Anderson
8d6ada6fc8 [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: If44408e84cabcadf9b3c7058375df4c5d976607e
2020-03-30 09:12:14 +00:00
David Anderson
1c29e84b70 [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: I30e748f7983e661ba2abd9bbd2ec12dc453b1eb1
2020-03-30 09:00:10 +00:00
David Anderson
87bf96a60e [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
2020-03-30 09:00:04 +00:00
Songchun Fan
48dd647aa7 [vold] update with incfs_ndk.h am: 01c4e91c09
Change-Id: I3c917640ee14bdafeb012ca1ff59cab6c399d8a9
2020-03-29 17:15:03 +00:00
Songchun Fan
01c4e91c09 [vold] update with incfs_ndk.h
BUG: 150470163
Test: atest PackageManagerShellCommandIncrementalTest
Change-Id: I5166c49cf48f353dab35e385571ada517cb751ac
2020-03-27 17:07:06 -07:00
David Anderson
5ba8aeaa80 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
2020-03-27 20:16:44 +00:00
Yurii Zubrytskyi
58802279e2 Merge changes from topic "merge-incremental-vold" am: 10a372f1d2 am: 41c1c40afc
Change-Id: I542b7a48e7d94b78bf3fb01e44263e2b161df60f
2020-03-26 07:59:46 +00:00
Yurii Zubrytskyi
b52e063350 Expose new IncFS interface through Vold am: d05bcc8070 am: 636da65360
Change-Id: I349002a3eb80d962c86b24f89816c4ce76d5d65e
2020-03-26 07:59:44 +00:00
Yurii Zubrytskyi
100553416a [automerger skipped] Merge changes from topic "merge-incremental-vold" am: 10a372f1d2 am: 41c1c40afc -s ours
am skip reason: Change-Id I03a8cab0dd6abd7d5c9dcbbc2acb651e818e6cd8 with SHA-1 131365a3e5 is in history

Change-Id: Ic73870d77b44d60bd7bdcbb44ca43267fd456945
2020-03-26 07:55:47 +00:00
Yurii Zubrytskyi
7867b1299c [automerger skipped] Expose new IncFS interface through Vold am: d05bcc8070 am: 636da65360 -s ours
am skip reason: Change-Id I09b33a34ff1ac7f6e415b7bd090c22e7df24d72d with SHA-1 3497cb5be5 is in history

Change-Id: I71e68b76895658e5546f7c96678905b249ff8ffc
2020-03-26 07:55:45 +00:00
Yurii Zubrytskyi
41c1c40afc Merge changes from topic "merge-incremental-vold" am: 10a372f1d2
Change-Id: Id6fe791310761aa715fdf0e37760052a1534a4f0
2020-03-26 07:33:58 +00:00
Yurii Zubrytskyi
636da65360 Expose new IncFS interface through Vold am: d05bcc8070
Change-Id: Icbdb9f233850e70e8ca7c458fd30c4bea93a9923
2020-03-26 07:33:56 +00:00
Yurii Zubrytskyi
10a372f1d2 Merge changes from topic "merge-incremental-vold"
* changes:
  [vold] Add argument verification to IncFS methods
  Expose new IncFS interface through Vold
2020-03-26 07:23:11 +00:00
Yurii Zubrytskyi
ae78344623 [vold] Add argument verification to IncFS methods am: 131365a3e5
Change-Id: I8a19bea4ca9c8f30f754cf7d43feba432152e204
2020-03-26 04:25:24 +00:00
Yurii Zubrytskyi
9e7482ece1 [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
Merged-In: I03a8cab0dd6abd7d5c9dcbbc2acb651e818e6cd8
2020-03-25 17:21:49 -07:00
Yurii Zubrytskyi
131365a3e5 [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
2020-03-25 14:33:24 -07:00
Yurii Zubrytskyi
d05bcc8070 Expose new IncFS interface through Vold
CL is a part of multi-repository topic and will be merged
to AOSP

Bug: 146080380
Test: manual

Change-Id: I09b33a34ff1ac7f6e415b7bd090c22e7df24d72d
Merged-In: I09b33a34ff1ac7f6e415b7bd090c22e7df24d72d
2020-03-24 14:26:27 -07:00
Paul Crowley
94abae03a9 Record use of metadata encryption in property
Bug: 152150018
Test: Cuttlefish with and without keydirectory option
Change-Id: I400873ec207cb63f0407fefc83962bb3a927e294
2020-03-24 09:12:48 -07:00
Martijn Coenen
7b64ad549a Merge "Bind mount Android/data and Android/obb individually." into rvc-dev am: 81872e826c
Change-Id: I1a454da8ca2f14c2e77f29d0b9e0f6e2a48528e1
2020-03-24 08:51:18 +00:00
Martijn Coenen
81872e826c Merge "Bind mount Android/data and Android/obb individually." into rvc-dev 2020-03-24 08:31:44 +00:00
TreeHugger Robot
aab174907a Merge "Add quota / casefold options to f2fs if needed." into rvc-dev am: fe6253e3a2
Change-Id: Ia97181187e3eff582d2edf887b21811aa88ea7d2
2020-03-20 14:48:23 +00:00
TreeHugger Robot
fe6253e3a2 Merge "Add quota / casefold options to f2fs if needed." into rvc-dev 2020-03-20 14:35:07 +00:00
Martijn Coenen
449a7d8ae0 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
2020-03-20 13:24:41 +01:00
Xin Li
8db17c3111 DO NOT MERGE - Empty merge qt-qpr1-dev-plus-aosp@6304901 into stag-aosp-master am: 4e13a60b8d
Change-Id: Ic6e88b868f1e8de04713198d892411caab957906
2020-03-19 04:22:43 +00:00
Xin Li
f54a1177ad [automerger skipped] DO NOT MERGE - Empty merge qt-qpr1-dev-plus-aosp@6304901 into stag-aosp-master am: 4e13a60b8d -s ours
am skip reason: subject contains skip directive

Change-Id: I8ad9a8221d0713df7d28b42a46fe270bd6ffd134
2020-03-19 04:19:36 +00:00
Xin Li
4e13a60b8d DO NOT MERGE - Empty merge qt-qpr1-dev-plus-aosp@6304901 into stag-aosp-master
Bug: 151763422
Change-Id: I3f26efbcf61365bfac87aa83a0bc8a5dbb2d0a65
2020-03-18 19:40:59 -07:00
Zim
3b6d40f941 Fix vold wedge when unmounting Android/ am: b6488f3f04
Change-Id: Iad3d05b416a9ace3986c3d9db35322fd2c8a099d
2020-03-18 09:55:44 +00:00
Zim
b6488f3f04 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
2020-03-17 16:14:56 +00:00