OSDN Git Service

android-x86/system-vold.git
5 years agoMerge "Don't unmount /storage for early native processes" am: ee9554b2d9 am: b5acb5bfba
Jiyong Park [Sat, 9 Mar 2019 02:05:14 +0000 (18:05 -0800)]
Merge "Don't unmount /storage for early native processes" am: ee9554b2d9 am: b5acb5bfba
am: f1baff6ddd

Change-Id: I7107dd9d24dd07f9c17ea11d24db17db2cd10f12

5 years agoMerge "Don't unmount /storage for early native processes" am: ee9554b2d9
Jiyong Park [Sat, 9 Mar 2019 02:00:12 +0000 (18:00 -0800)]
Merge "Don't unmount /storage for early native processes" am: ee9554b2d9
am: b5acb5bfba

Change-Id: I2c3b48550a64486214835fbcfa1879cc2cbddb2b

5 years agoMerge "Don't unmount /storage for early native processes"
Jiyong Park [Sat, 9 Mar 2019 01:55:15 +0000 (17:55 -0800)]
Merge "Don't unmount /storage for early native processes"
am: ee9554b2d9

Change-Id: I985413323a86816b392bd00211c550aef93328ae

5 years agoMerge "Don't unmount /storage for early native processes"
Treehugger Robot [Sat, 9 Mar 2019 01:33:40 +0000 (01:33 +0000)]
Merge "Don't unmount /storage for early native processes"

5 years agoMerge changes I91cf0def,I47570e8e am: 5f01cf3cac am: 84ceaedb59
Daniel Rosenberg [Fri, 8 Mar 2019 04:07:29 +0000 (20:07 -0800)]
Merge changes I91cf0def,I47570e8e am: 5f01cf3cac am: 84ceaedb59
am: 738694469d

Change-Id: I3df9cd0523d2bfcdc716c855c8dca86aba09be9d

5 years agoMerge changes I91cf0def,I47570e8e am: 5f01cf3cac
Daniel Rosenberg [Fri, 8 Mar 2019 03:32:33 +0000 (19:32 -0800)]
Merge changes I91cf0def,I47570e8e am: 5f01cf3cac
am: 84ceaedb59

Change-Id: Ibc16fa468ce9f3253bc133d2cc52c966c8eac96d

5 years agoMerge changes I91cf0def,I47570e8e
Daniel Rosenberg [Fri, 8 Mar 2019 02:43:46 +0000 (18:43 -0800)]
Merge changes I91cf0def,I47570e8e
am: 5f01cf3cac

Change-Id: If269c0d3134dc98683982a96224885503b2f8434

5 years agoMerge changes I91cf0def,I47570e8e
Treehugger Robot [Thu, 7 Mar 2019 23:56:21 +0000 (23:56 +0000)]
Merge changes I91cf0def,I47570e8e

* changes:
  Make Checkpoint restore resume safe
  Add vdc checkpoint restoreCheckpointPart

5 years agoMake Checkpoint restore resume safe
Daniel Rosenberg [Sat, 2 Mar 2019 06:01:22 +0000 (22:01 -0800)]
Make Checkpoint restore resume safe

This allows us to resume rolling back in the event of an unexpected
shutdown during the restore process. We save  progress after we process
each log sector, and whenever restarting the current log sector would
result in invalid data.

Test: Run restore, interrupt it, and attempt to resume
Change-Id: I91cf0defb0d22fc5afdb9debc2963c956e9e171c

5 years agoAdd vdc checkpoint restoreCheckpointPart
Daniel Rosenberg [Thu, 7 Mar 2019 01:45:17 +0000 (17:45 -0800)]
Add vdc checkpoint restoreCheckpointPart

Restores the first n entries of a checkpoint. Allows automated testing
of interrupted restores.

Test: vdc checkpoint restoreCheckpoint [device] [n]
Change-Id: I47570e8eba0bc3c6549a04a33600df05d393990b

5 years agoMerge "Switch Checkpoint Restore code to c style File ops" am: bc1901f8af am: 73cfd4918b
Daniel Rosenberg [Thu, 7 Mar 2019 06:26:43 +0000 (22:26 -0800)]
Merge "Switch Checkpoint Restore code to c style File ops" am: bc1901f8af am: 73cfd4918b
am: 1467b739da

Change-Id: Ib5513522c9819215e42f8960c9e6d2231d0cf40c

5 years agoMerge "Switch Checkpoint Restore code to c style File ops" am: bc1901f8af
Daniel Rosenberg [Thu, 7 Mar 2019 06:21:45 +0000 (22:21 -0800)]
Merge "Switch Checkpoint Restore code to c style File ops" am: bc1901f8af
am: 73cfd4918b

Change-Id: I2df8869defe16ba3886f999dc993ab802b77086e

5 years agoMerge "Switch Checkpoint Restore code to c style File ops"
Daniel Rosenberg [Thu, 7 Mar 2019 06:16:41 +0000 (22:16 -0800)]
Merge "Switch Checkpoint Restore code to c style File ops"
am: bc1901f8af

Change-Id: I52f3551d5a86d7e2edbb116bec98e8d2a11535df

5 years agoMerge "Switch Checkpoint Restore code to c style File ops"
Daniel Rosenberg [Thu, 7 Mar 2019 06:10:58 +0000 (06:10 +0000)]
Merge "Switch Checkpoint Restore code to c style File ops"

5 years agoSwitch Checkpoint Restore code to c style File ops
Daniel Rosenberg [Tue, 5 Mar 2019 05:46:31 +0000 (21:46 -0800)]
Switch Checkpoint Restore code to c style File ops

In preparation for restore code, we need to guarantee fsync happens.
Switch over to fd based operations to prepare for that.

Test: Successfully restores device over reboots
Change-Id: Ic9901779e8a4258bf8090d6a62fa9829e343fd39

5 years agoPass unshared_obb flag to sdcardfs setup.
Sudheer Shanka [Tue, 5 Mar 2019 18:31:27 +0000 (10:31 -0800)]
Pass unshared_obb flag to sdcardfs setup.

Bug: 110960295
Test: atest cts/hostsidetests/appsecurity/src/android/appsecurity/cts/ExternalStorageHostTest.java
Change-Id: I945722849ce225ca701bba482c859f1a6567bb63

5 years agoDon't unmount /storage for early native processes
Jiyong Park [Fri, 4 Jan 2019 04:35:25 +0000 (13:35 +0900)]
Don't unmount /storage for early native processes

Motivation:

Early processes launched before the runtime APEX - that hosts the bionic
libs - is activated can't use the bionic libs from the APEX, but from the
system partition (which we call the bootstrap bionic). Other processes
after the APEX activation should use the bionic libs from the APEX.
In order to let both types of processes to access the bionic libs via
the same standard paths /system/lib/{libc|libdl|libm}.so, some mount
namespace magic is used.

To be specific, when the device boots, the init initially bind-mounts
the bootstrap bionic libs to the standard paths with MS_PRIVATE. Early
processes are then executed with their own mount namespaces (via
unshare(CLONE_NEWNS)). After the runtime APEX is activated, init
bind-mounts the bionic libs in the APEX to the same standard paths.
Processes launched thereafter use the bionic libs from the APEX (which
can be updated.)

Important thing is that, since the propagation type of the mount points
(the standard paths) is 'private', the new bind-mount events for the
updated bionic libs should not affect the early processes. Otherwise,
they would experience sudden change of bionic libs at runtime. However,
other mount/unmounts events outside of the private mount points are
still shared across early/late processes as before. This is made possible
because the propagation type of / is 'shared' .

Problem:

vold uses the equality of the mount namespace to filter-out processes
that share the global mount namespace (the namespace of the init). However,
due to the aforementioned change, the early processes are not filtered
out because they have different mount namespaces. As a result,
umount2("/storage/") is executed on them and this unmount event
becomes visible to the global mount namespace (because as mentioned before /
is 'shared').

Solution:

Fiter-out the early processes by skipping a native (non-Java) process
whose UID is < AID_APP. The former condition is because all early
processes are native ones; i.e., zygote is started after the runtime
APEX is activated. The latter condition is to not filter-out native
processes created locally by apps.

Bug: 120266448
Test: m; device boots

Change-Id: I054deedc4af8421854cf35be84e14995523a259a

5 years agoMerge "Make restore validation fast by using a map" am: decda14f02 am: 2962054d72
Paul Lawrence [Fri, 1 Mar 2019 21:47:28 +0000 (13:47 -0800)]
Merge "Make restore validation fast by using a map" am: decda14f02 am: 2962054d72
am: ca4d5af279

Change-Id: Ie92d406374ec1c335ecc12e32630772b7da73d62

5 years agoMerge "Make restore validation fast by using a map" am: decda14f02
Paul Lawrence [Fri, 1 Mar 2019 21:39:26 +0000 (13:39 -0800)]
Merge "Make restore validation fast by using a map" am: decda14f02
am: 2962054d72

Change-Id: I53a27dfb9a212646d27ff01960a49f040391d15b

5 years agoMerge "Make restore validation fast by using a map"
Paul Lawrence [Fri, 1 Mar 2019 21:35:24 +0000 (13:35 -0800)]
Merge "Make restore validation fast by using a map"
am: decda14f02

Change-Id: I92c5bdf046ac7e6b2211021698990592fe5f3895

5 years agoMerge "Make restore validation fast by using a map"
Paul Lawrence [Fri, 1 Mar 2019 21:19:27 +0000 (21:19 +0000)]
Merge "Make restore validation fast by using a map"

5 years agoIgnore packages whose sandboxes are already created.
Sudheer Shanka [Thu, 28 Feb 2019 18:46:48 +0000 (10:46 -0800)]
Ignore packages whose sandboxes are already created.

Bug: 124788246
Test: manual
Test: atest cts/hostsidetests/appsecurity/src/android/appsecurity/cts/ExternalStorageHostTest.java
Change-Id: Ie80bbdebc9d3d50e96d2cd17db804b7589b49055

5 years agoMake restore validation fast by using a map
Paul Lawrence [Tue, 22 Jan 2019 22:31:43 +0000 (14:31 -0800)]
Make restore validation fast by using a map

Test: Successfully restores device over reboots
Change-Id: I4f1c5bbe6c07697a925a1a4efb92aefd15b61332

5 years agoMerge "Look for visible vols for a user under /mnt/user/<userId>/package/."
Sudheer Shanka [Tue, 26 Feb 2019 16:18:15 +0000 (16:18 +0000)]
Merge "Look for visible vols for a user under /mnt/user/<userId>/package/."

5 years agoMerge "Ignore if the dir we are trying remove doesn't exist."
Sudheer Shanka [Tue, 26 Feb 2019 04:45:21 +0000 (04:45 +0000)]
Merge "Ignore if the dir we are trying remove doesn't exist."

5 years agoIgnore if the dir we are trying remove doesn't exist.
Sudheer Shanka [Mon, 25 Feb 2019 20:21:23 +0000 (12:21 -0800)]
Ignore if the dir we are trying remove doesn't exist.

Fixes: 126208830
Test: manual
Change-Id: I34788ebb2dd42e62ee3061f7d81dc03047048c3b

5 years agoMerge stage-aosp-master into pi-dev-plus-aosp
Xin Li [Mon, 25 Feb 2019 09:48:43 +0000 (01:48 -0800)]
Merge stage-aosp-master into pi-dev-plus-aosp
am: fc1ec3c66e

Change-Id: I229b0f5c1c473ae16867896dd8a722fef9b53a6c

5 years agoMerge stage-aosp-master into pi-dev-plus-aosp
Xin Li [Mon, 25 Feb 2019 08:32:04 +0000 (00:32 -0800)]
Merge stage-aosp-master into pi-dev-plus-aosp

Bug: 126125118
Change-Id: I9fc676dc36e9d71e959b635fc1f87acfaa30c7a6

5 years agoLook for visible vols for a user under /mnt/user/<userId>/package/.
Sudheer Shanka [Sun, 24 Feb 2019 18:16:09 +0000 (10:16 -0800)]
Look for visible vols for a user under /mnt/user/<userId>/package/.

Currently, we pass down visisble volumes for a user to zygote so that
it can set up appropriate bind mounts after forking. This method has
atleast a couple of race conditions, so instead make zygote just
look under /mnt/user/<userId>/package for volumes that need to be
handled for a particular user.

Bug: 126069494
Test: manual
Test: atest cts/hostsidetests/appsecurity/src/android/appsecurity/cts/ExternalStorageHostTest.java
Test: atest cts/tests/app/src/android/app/cts/DownloadManagerTest.java
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: If996cde24d9fc158729fcc8a8bdb17ca952a518e

5 years agoDon't delete /mnt/user/<userId>/package on reset.
Sudheer Shanka [Sat, 23 Feb 2019 01:03:02 +0000 (17:03 -0800)]
Don't delete /mnt/user/<userId>/package on reset.

We need this to stay mounted at /storage.

Bug: 124466384
Test: manual
Test: atest cts/hostsidetests/appsecurity/src/android/appsecurity/cts/ExternalStorageHostTest.java
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: I0cc835471ced2822d83d7056bec53d62ddc682f0

5 years agoAvoid creating /mnt/user/<userId>/package/<packageName> for all pkgs.
Sudheer Shanka [Thu, 21 Feb 2019 23:00:11 +0000 (15:00 -0800)]
Avoid creating /mnt/user/<userId>/package/<packageName> for all pkgs.

Bug: 124466384
Test: manual
Test: atest cts/hostsidetests/appsecurity/src/android/appsecurity/cts/ExternalStorageHostTest.java
Test: atest cts/tests/app/src/android/app/cts/DownloadManagerTest.java
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: I678e199ef03805bb85a8a7ad9f1f7bae0a9fc56a

5 years agoDO NOT MERGE - Merge pi-dev@5234907 into stage-aosp-master
Xin Li [Thu, 21 Feb 2019 00:20:13 +0000 (16:20 -0800)]
DO NOT MERGE - Merge pi-dev@5234907 into stage-aosp-master

Bug: 120848293
Change-Id: Ia3e46d3c5ca83da01e78e076d2810620812f5115

5 years agoMerge "Do not trim unless we are actually checkpointing" am: 2268c285a5 am: 9de5e3c028
Paul Lawrence [Wed, 20 Feb 2019 12:43:26 +0000 (04:43 -0800)]
Merge "Do not trim unless we are actually checkpointing" am: 2268c285a5 am: 9de5e3c028
am: 2b108efef1

Change-Id: I7ef6807671da4a1f34a90a5c5c14d3acca814d57

5 years agoMerge "Do not trim unless we are actually checkpointing" am: 2268c285a5
Paul Lawrence [Wed, 20 Feb 2019 12:30:53 +0000 (04:30 -0800)]
Merge "Do not trim unless we are actually checkpointing" am: 2268c285a5
am: 9de5e3c028

Change-Id: I6f3edfe3c3e98f03793bc3e598caff8d677422bc

5 years agoMerge "Do not trim unless we are actually checkpointing"
Paul Lawrence [Wed, 20 Feb 2019 12:22:43 +0000 (04:22 -0800)]
Merge "Do not trim unless we are actually checkpointing"
am: 2268c285a5

Change-Id: I031a25204269ea7d3d65349a3f281a3f1e07eadd

5 years agoMerge "Do not trim unless we are actually checkpointing"
Treehugger Robot [Wed, 20 Feb 2019 12:09:31 +0000 (12:09 +0000)]
Merge "Do not trim unless we are actually checkpointing"

5 years agoIgnore EEXIST errors when creating pkg specific dirs.
Sudheer Shanka [Tue, 19 Feb 2019 22:12:20 +0000 (14:12 -0800)]
Ignore EEXIST errors when creating pkg specific dirs.

Some of the pkg specific dirs could be created by zygote
and vold in parallel, so ignore any EEXIST errors while
creating these dirs.

Bug: 118185801
Test: manual

Change-Id: Ifaa9998131764304867ac027af335414dbfc291c

5 years agoDo not trim unless we are actually checkpointing
Paul Lawrence [Tue, 19 Feb 2019 22:18:54 +0000 (14:18 -0800)]
Do not trim unless we are actually checkpointing

I'm not convinced this explains the full regression, but it's a
worthwhile fix anyway.

Bug: 124774357
Test: Booted in checkpoint mode and non checkpoint mode

Change-Id: I6e0e1e59e27bd127feac218fff7d88bb3570b530

5 years agoMerge "Revert "Revert "Ensure necessary external storage dirs while creating sandboxe...
Sudheer Shanka [Fri, 15 Feb 2019 22:47:10 +0000 (22:47 +0000)]
Merge "Revert "Revert "Ensure necessary external storage dirs while creating sandboxes."""

5 years ago[automerger skipped] Merge "DO NOT MERGE - Skip pi-platform-release (PPRL.190205...
Xin Li [Fri, 15 Feb 2019 05:14:34 +0000 (21:14 -0800)]
[automerger skipped] Merge "DO NOT MERGE - Skip pi-platform-release (PPRL.190205.001) into stage-aosp-master" into stage-aosp-master am: c3df248685 -s ours
am: dd4cd4a721 -s ours
am skip reason: subject contains skip directive

Change-Id: I11b818628b916f6c9e1eef02fe4c3ca521d56470

5 years ago[automerger skipped] Merge "DO NOT MERGE - Skip pi-platform-release (PPRL.190205...
Xin Li [Thu, 14 Feb 2019 22:23:00 +0000 (14:23 -0800)]
[automerger skipped] Merge "DO NOT MERGE - Skip pi-platform-release (PPRL.190205.001) into stage-aosp-master" into stage-aosp-master
am: c3df248685 -s ours
am skip reason: subject contains skip directive

Change-Id: Ic08bbe29aa3bb45ae270210f7b1d2711fbed5b18

5 years agoMerge "DO NOT MERGE - Skip pi-platform-release (PPRL.190205.001) into stage-aosp...
Xin Li [Thu, 14 Feb 2019 22:11:30 +0000 (22:11 +0000)]
Merge "DO NOT MERGE - Skip pi-platform-release (PPRL.190205.001) into stage-aosp-master" into stage-aosp-master

5 years agoMerge "Enable metadata encryption for userdata_gsi." am: 99046b75c4 am: 8b90acafcd
David Anderson [Thu, 14 Feb 2019 20:50:52 +0000 (12:50 -0800)]
Merge "Enable metadata encryption for userdata_gsi." am: 99046b75c4 am: 8b90acafcd
am: 1f4307e51e

Change-Id: If3e65d967a99e3f757a1ab978067e61a3faeae66

5 years agoMerge "Enable metadata encryption for userdata_gsi." am: 99046b75c4
David Anderson [Thu, 14 Feb 2019 20:47:07 +0000 (12:47 -0800)]
Merge "Enable metadata encryption for userdata_gsi." am: 99046b75c4
am: 8b90acafcd

Change-Id: I1a8bde686283af1f467edaeb5c735f6ed1721234

5 years agoMerge "Enable metadata encryption for userdata_gsi."
David Anderson [Thu, 14 Feb 2019 20:41:46 +0000 (12:41 -0800)]
Merge "Enable metadata encryption for userdata_gsi."
am: 99046b75c4

Change-Id: I90d530403f635427c7695e6a106526b51a7fc146

5 years agoMerge "Enable metadata encryption for userdata_gsi."
David Anderson [Thu, 14 Feb 2019 20:27:05 +0000 (20:27 +0000)]
Merge "Enable metadata encryption for userdata_gsi."

5 years agoRevert "Revert "Ensure necessary external storage dirs while creating sandboxes.""
Sudheer Shanka [Thu, 14 Feb 2019 19:09:51 +0000 (19:09 +0000)]
Revert "Revert "Ensure necessary external storage dirs while creating sandboxes.""

This reverts commit 88114b2a563d5bbbc68a16566e223797f4136227.

Reason for revert: blocking issue in b/124345887 is resolved

Change-Id: Ie34843c12b7a471d2384b64ad049ede63aed09e8

5 years agoEnable metadata encryption for userdata_gsi.
David Anderson [Wed, 6 Feb 2019 01:32:05 +0000 (17:32 -0800)]
Enable metadata encryption for userdata_gsi.

When running a live GSI, userdata is a logical partition. If we don't
fix up the fstab we'll derive the underlying block device instead of
the device-mapper node for userdat_gsi, resulting in a corrupt data
partition for both images.

Bug: 123906417
Test: manual test
Change-Id: Ic0101f30504de26e725442da2da3888008c31b63

5 years agoRevert "Ensure necessary external storage dirs while creating sandboxes."
Jeff Sharkey [Thu, 14 Feb 2019 15:41:28 +0000 (15:41 +0000)]
Revert "Ensure necessary external storage dirs while creating sandboxes."

This reverts commit 083377e593429a6db7d64de69dcc9d7209f0f66d.

Reason for revert: b/124345887

Change-Id: I388d45fab68b611917464a204269a48bf771ac57

5 years agoEnsure necessary external storage dirs while creating sandboxes.
Sudheer Shanka [Tue, 12 Feb 2019 03:25:51 +0000 (19:25 -0800)]
Ensure necessary external storage dirs while creating sandboxes.

Bug: 124058579
Test: manual
Test: atest cts/hostsidetests/appsecurity/src/android/appsecurity/cts/ExternalStorageHostTest.java
Test: atest cts/tests/app/src/android/app/cts/DownloadManagerTest.java
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*

Change-Id: I0e62de38e9ceff80df75e253443af69d4391a49e

5 years agoDO NOT MERGE - Skip pi-platform-release (PPRL.190205.001) into stage-aosp-master
Xin Li [Wed, 13 Feb 2019 00:41:37 +0000 (16:41 -0800)]
DO NOT MERGE - Skip pi-platform-release (PPRL.190205.001) into stage-aosp-master

Bug: 124234733
Change-Id: I5f6bd6a42230b0c9e54dc6221cfa12f366585e40

5 years agoEnable isolated storage by default.
Jeff Sharkey [Mon, 11 Feb 2019 19:18:48 +0000 (12:18 -0700)]
Enable isolated storage by default.

We've been dogfooding the isolated storage feature for many months
on various internal groups, and we're ready to enable it globally.

Bug: 112545973
Test: executed entire CTS suite using forrest
Change-Id: I612b6aba4f08dc0ac13f4f94b03c4bddd6de12df

5 years agoSnap for 5180536 from 2ab3b948d787852b2b34c4c7fe623c35ae214ae3 to pi-platform-release
android-build-team Robot [Sat, 9 Feb 2019 02:36:27 +0000 (02:36 +0000)]
Snap for 5180536 from 2ab3b948d787852b2b34c4c7fe623c35ae214ae3 to pi-platform-release

Change-Id: Idc5557adef8d2cbc60a594ab3ea1aa3669140926

5 years agoMerge "Support header versioning in dm-bow" am: 96336c716b am: 06181f3605
Paul Lawrence [Fri, 8 Feb 2019 22:07:57 +0000 (14:07 -0800)]
Merge "Support header versioning in dm-bow" am: 96336c716b am: 06181f3605
am: 96bdc38fb7

Change-Id: I76f8e0b5d231f1ca103efcefc1800dabdddc5fa0

5 years agoMerge "Support header versioning in dm-bow" am: 96336c716b
Paul Lawrence [Fri, 8 Feb 2019 22:03:33 +0000 (14:03 -0800)]
Merge "Support header versioning in dm-bow" am: 96336c716b
am: 06181f3605

Change-Id: Ifc24e161ccf3564bf94c695053d51cbb600dd963

5 years agoMerge "Support header versioning in dm-bow"
Paul Lawrence [Fri, 8 Feb 2019 22:00:32 +0000 (14:00 -0800)]
Merge "Support header versioning in dm-bow"
am: 96336c716b

Change-Id: I8d71b57c51e2290c2633b286ea91a54a3ea0d582

5 years agoMerge "Support header versioning in dm-bow"
Treehugger Robot [Fri, 8 Feb 2019 21:55:29 +0000 (21:55 +0000)]
Merge "Support header versioning in dm-bow"

5 years agoMerge "Suport variable blocksizes in dm-bow restore" am: 73c0028901 am: fdac3684c4
Paul Lawrence [Fri, 8 Feb 2019 21:36:49 +0000 (13:36 -0800)]
Merge "Suport variable blocksizes in dm-bow restore" am: 73c0028901 am: fdac3684c4
am: fd742dbf30

Change-Id: I63742c9f263735b549b25aaae372d34ec82c8a18

5 years agoMerge "Suport variable blocksizes in dm-bow restore" am: 73c0028901
Paul Lawrence [Fri, 8 Feb 2019 21:32:47 +0000 (13:32 -0800)]
Merge "Suport variable blocksizes in dm-bow restore" am: 73c0028901
am: fdac3684c4

Change-Id: Id4c4aae860bc819d240864f3d60edf03a1c5e255

5 years agoMerge "Suport variable blocksizes in dm-bow restore"
Paul Lawrence [Fri, 8 Feb 2019 21:27:49 +0000 (13:27 -0800)]
Merge "Suport variable blocksizes in dm-bow restore"
am: 73c0028901

Change-Id: I42cf7db1bca5905e93546b1df78b8439c22ef198

5 years agoMerge "Suport variable blocksizes in dm-bow restore"
Treehugger Robot [Fri, 8 Feb 2019 21:16:58 +0000 (21:16 +0000)]
Merge "Suport variable blocksizes in dm-bow restore"

5 years agoSupport header versioning in dm-bow
Paul Lawrence [Fri, 18 Jan 2019 18:28:34 +0000 (10:28 -0800)]
Support header versioning in dm-bow

Test: Make sure still boots, restores
Change-Id: I903f58cb22472dbbbbb4c27ed1d88ed1f7c7dc5d

5 years agoSuport variable blocksizes in dm-bow restore
Paul Lawrence [Thu, 10 Jan 2019 21:06:07 +0000 (13:06 -0800)]
Suport variable blocksizes in dm-bow restore

Test: Test that restore still works
Change-Id: I7259e3efd1cd0ee13c74336a7e53158b6bceed57

5 years agoMerge "Mark A/B Boot success before committing checkpoint" am: d6bbe746d7 am: 294a252092
Daniel Rosenberg [Fri, 8 Feb 2019 02:19:20 +0000 (18:19 -0800)]
Merge "Mark A/B Boot success before committing checkpoint" am: d6bbe746d7 am: 294a252092
am: f3d55f4e0c

Change-Id: I545b0fb45d3ed1bde6fa4002c37675cce6a6a37d

5 years agoMerge "Mark A/B Boot success before committing checkpoint" am: d6bbe746d7
Daniel Rosenberg [Fri, 8 Feb 2019 02:02:10 +0000 (18:02 -0800)]
Merge "Mark A/B Boot success before committing checkpoint" am: d6bbe746d7
am: 294a252092

Change-Id: I8887afd2726724d6c9b9da0fa7595bde741fb748

5 years agoMerge "Mark A/B Boot success before committing checkpoint"
Daniel Rosenberg [Fri, 8 Feb 2019 01:49:55 +0000 (17:49 -0800)]
Merge "Mark A/B Boot success before committing checkpoint"
am: d6bbe746d7

Change-Id: I2876835681d42bade620081d508a7490d664c8aa

5 years agoMerge "Mark A/B Boot success before committing checkpoint"
Daniel Rosenberg [Fri, 8 Feb 2019 01:40:54 +0000 (01:40 +0000)]
Merge "Mark A/B Boot success before committing checkpoint"

5 years agoRemove sandbox specific bind mounts from root namespace.
Sudheer Shanka [Wed, 6 Feb 2019 20:39:19 +0000 (12:39 -0800)]
Remove sandbox specific bind mounts from root namespace.

Update vold to only create package sandboxes and not do any bind mounts.
After zygote forks, all the necessary bind mounts will be setup for
the process.

Bug: 124009234
Test: manual
Test: atest cts/hostsidetests/appsecurity/src/android/appsecurity/cts/ExternalStorageHostTest.java
Test: atest DownloadProviderTests
Test: atest cts/tests/app/src/android/app/cts/DownloadManagerTest.java
Test: atest MediaProviderTests
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*

Change-Id: Ia42209cb74cbc423bb09c1c51cb7a164f7c568da

5 years agoMerge "Fix search for values in blkId output" am: 0fbc5af676 am: 56715503b5
Paul Crowley [Wed, 6 Feb 2019 03:42:50 +0000 (19:42 -0800)]
Merge "Fix search for values in blkId output" am: 0fbc5af676 am: 56715503b5
am: 464ff37019

Change-Id: I5d47ddedc29cafa05424e6bfcfd6b99885614d7c

5 years agoMerge "Fix search for values in blkId output" am: 0fbc5af676
Paul Crowley [Wed, 6 Feb 2019 03:38:50 +0000 (19:38 -0800)]
Merge "Fix search for values in blkId output" am: 0fbc5af676
am: 56715503b5

Change-Id: I9b24f0bd748a38ca29e2b258a54cd2b9bdcb7cc3

5 years agoMerge "Fix search for values in blkId output"
Paul Crowley [Wed, 6 Feb 2019 03:33:46 +0000 (19:33 -0800)]
Merge "Fix search for values in blkId output"
am: 0fbc5af676

Change-Id: Ica4be0ea315c0aa6a2d6289139a88a8fa944deac

5 years agoMerge "Fix search for values in blkId output"
Treehugger Robot [Wed, 6 Feb 2019 03:19:32 +0000 (03:19 +0000)]
Merge "Fix search for values in blkId output"

5 years agoFix search for values in blkId output
Paul Crowley [Tue, 5 Feb 2019 23:33:34 +0000 (15:33 -0800)]
Fix search for values in blkId output

Bug: 122497152
Test: atest tests/Utils_test.cpp
Test: adb shell sm partition disk:7,32 private ; adb logcat -d
Change-Id: Ic7d32bdbc0c55ce1d21f7f9e74c6a6fb3dcf332a

5 years agoMark A/B Boot success before committing checkpoint
Daniel Rosenberg [Wed, 23 Jan 2019 23:16:04 +0000 (15:16 -0800)]
Mark A/B Boot success before committing checkpoint

This marks the slot as successful within commitChanges, increasing the
available roll back window significantly.

Test: When taking an update on a checkpoint enabled device, it
      marks the slot as successful just before committing the
      checkpoint. Visible in logs as call to vdc commitChanges,
      followed by "Marked slot as booted succesfully."
Bug: 123260515
Change-Id: If71fcde57b3bdee2cfaabb590f123a2d00da3228

5 years agoMerge "Use global default_fstab instead of re-reading" am: 64f5e5bb38 am: fd5d1b173c
Daniel Rosenberg [Mon, 4 Feb 2019 23:34:06 +0000 (15:34 -0800)]
Merge "Use global default_fstab instead of re-reading" am: 64f5e5bb38 am: fd5d1b173c
am: 8442c10304

Change-Id: I218e252ff21f51cb87bbd1bddc9a0c1048072476

5 years agoMerge "Use global default_fstab instead of re-reading" am: 64f5e5bb38
Daniel Rosenberg [Mon, 4 Feb 2019 23:30:00 +0000 (15:30 -0800)]
Merge "Use global default_fstab instead of re-reading" am: 64f5e5bb38
am: fd5d1b173c

Change-Id: I7ec6ba24f23b3ab62317802422eb2b01e616bce1

5 years agoMerge "Use global default_fstab instead of re-reading"
Daniel Rosenberg [Mon, 4 Feb 2019 23:25:00 +0000 (15:25 -0800)]
Merge "Use global default_fstab instead of re-reading"
am: 64f5e5bb38

Change-Id: Ief94647963db3c48f1aeb89e7d8ccd5f7cb63da7

5 years agoMerge "Use global default_fstab instead of re-reading"
Daniel Rosenberg [Mon, 4 Feb 2019 23:14:51 +0000 (23:14 +0000)]
Merge "Use global default_fstab instead of re-reading"

5 years agoUse global default_fstab instead of re-reading
Daniel Rosenberg [Sat, 2 Feb 2019 03:25:47 +0000 (19:25 -0800)]
Use global default_fstab instead of re-reading

VoldUtils already has a pre-parsed fstab. Use it instead.

Test: Checkpoint functions continue to work
Change-Id: I96cbab467a7b809c92c4f6cdf7a06abca8c5aa5e

5 years agoMerge "Move over to the C++ Fstab class" am: b6d5cd20d7 am: 4e8e70a949
Tom Cherry [Fri, 1 Feb 2019 01:23:24 +0000 (17:23 -0800)]
Merge "Move over to the C++ Fstab class" am: b6d5cd20d7 am: 4e8e70a949
am: f61f61a6a0

Change-Id: I90f0f0e1161463cef8542a586b53274ec5a2f5ee

5 years agoMerge "Move over to the C++ Fstab class" am: b6d5cd20d7
Tom Cherry [Fri, 1 Feb 2019 01:18:20 +0000 (17:18 -0800)]
Merge "Move over to the C++ Fstab class" am: b6d5cd20d7
am: 4e8e70a949

Change-Id: I08d7937f718739f6444780cbd0cc72634dba841c

5 years agoMerge "Move over to the C++ Fstab class"
Tom Cherry [Fri, 1 Feb 2019 01:13:44 +0000 (17:13 -0800)]
Merge "Move over to the C++ Fstab class"
am: b6d5cd20d7

Change-Id: Ia9c8b38cb014f30f0ca609bd71cfe1b0de9c27d3

5 years agoMerge "Move over to the C++ Fstab class"
Tom Cherry [Fri, 1 Feb 2019 01:02:50 +0000 (01:02 +0000)]
Merge "Move over to the C++ Fstab class"

5 years agoMove over to the C++ Fstab class
Tom Cherry [Tue, 29 Jan 2019 22:34:01 +0000 (14:34 -0800)]
Move over to the C++ Fstab class

Test: build and boot
Change-Id: Id3850c9c133f6644073a2439368501253a2a94a9

5 years agoMerge "Remove secontext.h, secontext.cpp, hash.h" am: eb00112e09 am: f058440b3b
LongPing Wei [Wed, 30 Jan 2019 16:50:43 +0000 (08:50 -0800)]
Merge "Remove secontext.h, secontext.cpp, hash.h" am: eb00112e09 am: f058440b3b
am: b6bd5f21b8

Change-Id: I6e11c6a1d7633ef4e5f9c9d2f7fff19306c7753b

5 years agoMerge "Remove secontext.h, secontext.cpp, hash.h" am: eb00112e09
LongPing Wei [Wed, 30 Jan 2019 16:45:42 +0000 (08:45 -0800)]
Merge "Remove secontext.h, secontext.cpp, hash.h" am: eb00112e09
am: f058440b3b

Change-Id: I339fb6d110cc76ae7bc650736f94880789b0d5a4

5 years agoMerge "Remove secontext.h, secontext.cpp, hash.h"
LongPing Wei [Wed, 30 Jan 2019 16:40:38 +0000 (08:40 -0800)]
Merge "Remove secontext.h, secontext.cpp, hash.h"
am: eb00112e09

Change-Id: Ie24ba4a5336a3a8537b43fa2996e53b0dbd85d74

5 years agoMerge "Remove secontext.h, secontext.cpp, hash.h"
Treehugger Robot [Wed, 30 Jan 2019 16:29:26 +0000 (16:29 +0000)]
Merge "Remove secontext.h, secontext.cpp, hash.h"

5 years agoRemove secontext.h, secontext.cpp, hash.h
LongPing Wei [Wed, 30 Jan 2019 08:03:14 +0000 (16:03 +0800)]
Remove secontext.h, secontext.cpp, hash.h

cryptfs.cpp and MetadataCrypt.cpp can use android::vold::sFsckContext directly.
hash.h is unuseful.

Test: make
Change-Id: I7acdac97d6ed1c9b2a5dc367fcea8aa2942192e8

5 years agoMerge "cryptfs: improve logging of dm-crypt device creation" am: f028d279ae am: 26aaa...
Eric Biggers [Tue, 29 Jan 2019 21:16:03 +0000 (13:16 -0800)]
Merge "cryptfs: improve logging of dm-crypt device creation" am: f028d279ae am: 26aaaeaf10
am: 71c2640ac0

Change-Id: Ifed1e1242cd0e5e6fec7cbd710a8a9cb1dcb67a6

5 years agoMerge "cryptfs: improve logging of dm-crypt device creation" am: f028d279ae
Eric Biggers [Tue, 29 Jan 2019 21:12:23 +0000 (13:12 -0800)]
Merge "cryptfs: improve logging of dm-crypt device creation" am: f028d279ae
am: 26aaaeaf10

Change-Id: I214cc397a8a20eb3cce0c3f41b069fb4fc4fe3c2

5 years agoMerge "cryptfs: improve logging of dm-crypt device creation"
Eric Biggers [Tue, 29 Jan 2019 21:08:12 +0000 (13:08 -0800)]
Merge "cryptfs: improve logging of dm-crypt device creation"
am: f028d279ae

Change-Id: I348e4a6ac62cdd8575e1cdd0602a73442459d0de

5 years agoMerge "cryptfs: improve logging of dm-crypt device creation"
Eric Biggers [Tue, 29 Jan 2019 20:58:29 +0000 (20:58 +0000)]
Merge "cryptfs: improve logging of dm-crypt device creation"

5 years agoMerge "cryptfs: round down dm-crypt device size to crypto sector boundary" am: e7205e...
Eric Biggers [Tue, 29 Jan 2019 18:51:32 +0000 (10:51 -0800)]
Merge "cryptfs: round down dm-crypt device size to crypto sector boundary" am: e7205eaa44 am: b45636cd35
am: 4b42da8e1a

Change-Id: I350a4a6cc8ed052ec5ac2208add168f6a0b5ba92

5 years agoMerge "cryptfs: round down dm-crypt device size to crypto sector boundary" am: e7205eaa44
Eric Biggers [Tue, 29 Jan 2019 18:47:27 +0000 (10:47 -0800)]
Merge "cryptfs: round down dm-crypt device size to crypto sector boundary" am: e7205eaa44
am: b45636cd35

Change-Id: I8361f350fdc16079e9cff61d161af5f0641865d1

5 years agoMerge "cryptfs: round down dm-crypt device size to crypto sector boundary"
Eric Biggers [Tue, 29 Jan 2019 18:42:28 +0000 (10:42 -0800)]
Merge "cryptfs: round down dm-crypt device size to crypto sector boundary"
am: e7205eaa44

Change-Id: I4e1a75d8c34388c1b75ce4d9797f21530d01d1ac

5 years agoMerge "cryptfs: round down dm-crypt device size to crypto sector boundary"
Eric Biggers [Tue, 29 Jan 2019 18:30:55 +0000 (18:30 +0000)]
Merge "cryptfs: round down dm-crypt device size to crypto sector boundary"

5 years agocryptfs: improve logging of dm-crypt device creation
Eric Biggers [Fri, 25 Jan 2019 20:11:25 +0000 (12:11 -0800)]
cryptfs: improve logging of dm-crypt device creation

Log the main configuration of the dm-crypt device -- the name, the
cipher, the keysize, the real device, and the length -- in addition to
the extra parameters which we were already logging.

(We can't simply log the actual string passed to the kernel, of course,
 because that includes the key.  So we choose the fields individually.)

Test: booted device configured to use FDE and checked the log message
Change-Id: Ia95de807c4fad68d93b7e7e73508a01e5139dc76

5 years agocryptfs: round down dm-crypt device size to crypto sector boundary
Eric Biggers [Fri, 25 Jan 2019 18:47:55 +0000 (10:47 -0800)]
cryptfs: round down dm-crypt device size to crypto sector boundary

This is needed to make adoptable storage volumes work with a 4K crypto
sector size when the block device size is not a multiple of 4K.

It is fine to do this because the filesystem ends on a 4K boundary
anyway and doesn't use any partial block at the end.

Bug: 123375298
Test: booted device configured to use FDE with sector size 4k, ran
      'sm set-virtual-disk true' and formatted the virtual SD card as
      adoptable storage.  Then did the same but with a temporary patch
      that changed kSizeVirtualDisk to be misaligned
Change-Id: I95ee6d7dcaaa8989c674aea9988c09116e830b0c

5 years agoMerge "Preserve options on remount in commitChanges" am: aaac873faf am: b6c1c24f86
Daniel Rosenberg [Fri, 25 Jan 2019 04:47:52 +0000 (20:47 -0800)]
Merge "Preserve options on remount in commitChanges" am: aaac873faf am: b6c1c24f86
am: a20b92c0b0

Change-Id: Ifcef103b42a92614db1a5d77951f6bf027b92478