OSDN Git Service

android-x86/system-vold.git
6 years agoMerge "vold: remove unnecessary dependency on libbatteryservice."
Treehugger Robot [Thu, 28 Sep 2017 18:14:42 +0000 (18:14 +0000)]
Merge "vold: remove unnecessary dependency on libbatteryservice."

6 years agovold: remove unnecessary dependency on libbatteryservice.
Yifan Hong [Tue, 26 Sep 2017 21:27:24 +0000 (14:27 -0700)]
vold: remove unnecessary dependency on libbatteryservice.

Battery check could be replaced by hwbinder calls into
android.hardware.health@2.0 instead, but because
of b/16868177, this is actually not needed.

Bug: 62229583
Test: pass
Change-Id: Ieb03e6ee2f648d9c1d85dbbdc10626726f5fe39b

6 years agoMerge "Revert "Add support for gid derivation on private volumes""
Treehugger Robot [Fri, 22 Sep 2017 17:21:55 +0000 (17:21 +0000)]
Merge "Revert "Add support for gid derivation on private volumes""

6 years agoRevert "Add support for gid derivation on private volumes"
Richard Uhler [Thu, 14 Sep 2017 14:51:04 +0000 (14:51 +0000)]
Revert "Add support for gid derivation on private volumes"

This reverts commit 1b38e330035833971663eeb5bccfa16e4ffc1e72.

Causes a boot loop on bullhead.

(cherry picked from commit a3a60b372efb48a672848c7797efd57a4ec92303)

Bug: 63245673
Bug: 65660058
Test: m
Merged-In: I9c8afd3ba22547aff5aff06b71cb8ff3b8a07350
Change-Id: I9c8afd3ba22547aff5aff06b71cb8ff3b8a07350

6 years agoMerge "Add support for gid derivation on private volumes"
Treehugger Robot [Thu, 21 Sep 2017 00:57:48 +0000 (00:57 +0000)]
Merge "Add support for gid derivation on private volumes"

6 years agoAdd support for gid derivation on private volumes
Daniel Rosenberg [Wed, 6 Sep 2017 22:25:40 +0000 (15:25 -0700)]
Add support for gid derivation on private volumes

This sdcardfs feature was moved under a mount option
and is only needed on private volumes

Test: Private emulated volume should attempt to mount with
      derive_gid option.
Bug: 63245673
Change-Id: I40a8b15c298c815a4643007b9eca8269379fd2ac

6 years agoMerge "Invert the order of SO_RCVBUFFORCE and SO_RCVBUFF"
Treehugger Robot [Wed, 6 Sep 2017 19:32:03 +0000 (19:32 +0000)]
Merge "Invert the order of SO_RCVBUFFORCE and SO_RCVBUFF"

6 years agoMerge "Switch RebootType to an enum class."
Treehugger Robot [Tue, 29 Aug 2017 21:26:39 +0000 (21:26 +0000)]
Merge "Switch RebootType to an enum class."

6 years agoInvert the order of SO_RCVBUFFORCE and SO_RCVBUFF
Luis Hector Chavez [Tue, 29 Aug 2017 17:29:48 +0000 (10:29 -0700)]
Invert the order of SO_RCVBUFFORCE and SO_RCVBUFF

This change swaps the order of SO_RCVBUFFORCE and SO_RCVBUFF, because
the latter is silently capped to sysctl_rmem_max. So, just try
SO_RCVBUFF if the former failed.

Bug: 62417946
Test: Run android in a new user and network namespace, vold does not
      abort here.

Change-Id: Iac2ddae6fbb80ba84afe5414eade978cd795ef3c

6 years agoSwitch RebootType to an enum class.
Josh Gao [Mon, 28 Aug 2017 20:22:55 +0000 (13:22 -0700)]
Switch RebootType to an enum class.

RebootType's shutdown enumerator collides with the shutdown socket
function, which causes problems when <sys/socket.h> gets included
transitively. Switch RebootType into an enum class, to namespace its
enumerators.

Test: treehugger
Change-Id: Ib5e8667df363acb28771430fd43000d381dc8620

6 years agoMerge "mInternalEmulated could be used after shutdown() called"
Keun-young Park [Thu, 17 Aug 2017 22:13:40 +0000 (22:13 +0000)]
Merge "mInternalEmulated could be used after shutdown() called"
am: 9b4a443bd6

Change-Id: Ia1007988297c39f391b35ad51645556ceeaf0cc6

6 years agoMerge "mInternalEmulated could be used after shutdown() called"
Keun-young Park [Thu, 17 Aug 2017 22:10:24 +0000 (22:10 +0000)]
Merge "mInternalEmulated could be used after shutdown() called"

6 years agomInternalEmulated could be used after shutdown() called
Gao Xiang [Mon, 14 Aug 2017 03:32:13 +0000 (11:32 +0800)]
mInternalEmulated could be used after shutdown() called

It fixes the findvolume() / reset() use-after-free issue after
shutdown called to avoid vold crash.

Fixes: a5bbb5e3c13d ("make shutdown safe for double calls.")
Change-Id: I50f216141b20da08549080291091dc5690c00ffe
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
7 years agoMerge "Move off deprecated readdir_r."
Elliott Hughes [Wed, 2 Aug 2017 17:19:01 +0000 (17:19 +0000)]
Merge "Move off deprecated readdir_r."
am: 1647759651

Change-Id: I4f5a6422eaef6be21d29f5ddc2b98ee53376e6a0

7 years agoMerge "Move off deprecated readdir_r."
Elliott Hughes [Wed, 2 Aug 2017 17:12:21 +0000 (17:12 +0000)]
Merge "Move off deprecated readdir_r."

7 years agoMove off deprecated readdir_r.
Elliott Hughes [Wed, 2 Aug 2017 00:39:44 +0000 (17:39 -0700)]
Move off deprecated readdir_r.

Bug: http://b/32678321
Test: builds
Change-Id: I2d6e995d5eed3e72e12ce8b8f82a10143a256cd4

7 years agoMerge "Try SO_RCVBUF before SO_RCVBUFFORCE."
Junichi Uekawa [Thu, 13 Jul 2017 20:32:18 +0000 (20:32 +0000)]
Merge "Try SO_RCVBUF before SO_RCVBUFFORCE."
am: 3f8fa0c215

Change-Id: I5df611cfaa1c4451f4d0cd576f3b82f2fefbea6b

7 years agoMerge "Try SO_RCVBUF before SO_RCVBUFFORCE."
Treehugger Robot [Thu, 13 Jul 2017 20:21:49 +0000 (20:21 +0000)]
Merge "Try SO_RCVBUF before SO_RCVBUFFORCE."

7 years agoTry SO_RCVBUF before SO_RCVBUFFORCE.
Junichi Uekawa [Wed, 4 Nov 2015 21:05:54 +0000 (06:05 +0900)]
Try SO_RCVBUF before SO_RCVBUFFORCE.

When running in a container, the process might be in a user/net
namespace, which would cause setting the SO_RCVBUFFORCE socket option to
fail with EPERM. But rmem_max is set to a high enough value which allows
SO_RCVBUF to succeed.

Bug: 62417946
Test: Run android in a new user and network namespace, vold does not
      abort here.

Change-Id: I2b678ddd886a406a3394d9fdd33f9c8800ef78a3
Signed-off-by: Junichi Uekawa <uekawa@google.com>
(cherry picked from commit b41155d4af0e00fc6f65d7d67b80e7b866f847d6)

7 years agoMerge "add vold to "shutdown critical""
Keun-young Park [Thu, 6 Jul 2017 00:46:34 +0000 (00:46 +0000)]
Merge "add vold to "shutdown critical""
am: da85cb71b3

Change-Id: Ib0e4977590a94d7934001c223677cff45e59cd0a

7 years agoMerge "add vold to "shutdown critical""
Treehugger Robot [Thu, 6 Jul 2017 00:40:55 +0000 (00:40 +0000)]
Merge "add vold to "shutdown critical""

7 years agoadd vold to "shutdown critical"
Keun-young Park [Wed, 5 Jul 2017 18:58:32 +0000 (11:58 -0700)]
add vold to "shutdown critical"

bug: 37626581
Test: reboot and check last kmsg
Change-Id: I2c186c20a4afc342eaae420175013c80219a5ee5

7 years agoresolve merge conflicts of 4ad7784 to stage-aosp-master
Paul Crowley [Tue, 27 Jun 2017 16:33:39 +0000 (09:33 -0700)]
resolve merge conflicts of 4ad7784 to stage-aosp-master

Test: Build seems to be unrelatedly broken
Change-Id: I2df307aa1c7134f217c558495e1438412480f324
Merged-In: I6ccfe0894551ba068de9bf5e23fe4fd1e10e36b1

7 years agoMerge "Label keys with all the possible FBE prefixes that might apply"
Treehugger Robot [Tue, 27 Jun 2017 16:17:20 +0000 (16:17 +0000)]
Merge "Label keys with all the possible FBE prefixes that might apply"

7 years agoLabel keys with all the possible FBE prefixes that might apply
Paul Crowley [Mon, 19 Jun 2017 23:05:55 +0000 (16:05 -0700)]
Label keys with all the possible FBE prefixes that might apply

We don't know which FS and kernel version is going to want these keys,
so put them in the kernel three times with all three possible prefixes.

Bug: 62900873
Test: Marlin set up before this change successfully boots after it.
Change-Id: I6ccfe0894551ba068de9bf5e23fe4fd1e10e36b1

7 years agoMerge "Use WaitForProperty() to wait for restorecon" am: 963a205a1b
Tom Cherry [Fri, 16 Jun 2017 05:57:12 +0000 (05:57 +0000)]
Merge "Use WaitForProperty() to wait for restorecon" am: 963a205a1b
am: 80ce34d6cb

Change-Id: I4687810672b51db024f11ad7976562d510de9b81

7 years agoMerge "Use WaitForProperty() to wait for restorecon"
Tom Cherry [Fri, 16 Jun 2017 05:53:12 +0000 (05:53 +0000)]
Merge "Use WaitForProperty() to wait for restorecon"
am: 963a205a1b

Change-Id: I4a11f21c0849922cda49e3f771a0b0dcfc5a3177

7 years agoMerge "Use WaitForProperty() to wait for restorecon"
Treehugger Robot [Fri, 16 Jun 2017 05:47:51 +0000 (05:47 +0000)]
Merge "Use WaitForProperty() to wait for restorecon"

7 years agoUse WaitForProperty() to wait for restorecon
Tom Cherry [Fri, 16 Jun 2017 00:13:56 +0000 (17:13 -0700)]
Use WaitForProperty() to wait for restorecon

We have android::base::WaitForProperty() that uses futexes to
efficiently wait for property value changes, so use that instead
polling.

Test: Boot bullhead
Change-Id: Id964eddbdbfd9b5ceac5ed83a8ed66b9e60008ca

7 years agoMerge "Add OWNERS in system/vold" am: f18a5aad56
Chih-Hung Hsieh [Fri, 9 Jun 2017 23:44:39 +0000 (23:44 +0000)]
Merge "Add OWNERS in system/vold" am: f18a5aad56
am: db09dbafdd

Change-Id: I78c4e90025a9b2785fff5955a5ece7bc5e866bd0

7 years agoMerge "Add OWNERS in system/vold"
Chih-Hung Hsieh [Fri, 9 Jun 2017 23:42:34 +0000 (23:42 +0000)]
Merge "Add OWNERS in system/vold"
am: f18a5aad56

Change-Id: I75b04fc9a4e8d2e5de49833893ba74a375130929

7 years agoMerge "Add OWNERS in system/vold"
Treehugger Robot [Fri, 9 Jun 2017 23:38:00 +0000 (23:38 +0000)]
Merge "Add OWNERS in system/vold"

7 years agoAdd OWNERS in system/vold
Chih-Hung Hsieh [Fri, 9 Jun 2017 21:55:46 +0000 (14:55 -0700)]
Add OWNERS in system/vold

* Owners are selected from top CL approvals or owners.
  They will be suggested to review/approve future CLs.
* OWNERS files are recognized by the new find-owners plugin, see .md files in
  https://gerrit.googlesource.com/plugins/find-owners/+/master/src/main/resources/Documentation/

Test: build/make/tools/checkowners.py -c -v OWNERS
Change-Id: I4d0431105b55e88be258800a7fd45a42deb9bb60

7 years agoMerge "vold should #include <sys/sysmacros.h>" am: 398c0e8274 am: 208b464f72
Elliott Hughes [Fri, 19 May 2017 18:38:38 +0000 (18:38 +0000)]
Merge "vold should #include <sys/sysmacros.h>" am: 398c0e8274 am: 208b464f72
am: fb3e85cf99

Change-Id: I32ed2a66bb60ba1042737b4bbb0a2195a3fe8e6f

7 years agoMerge "vold should #include <sys/sysmacros.h>" am: 398c0e8274
Elliott Hughes [Fri, 19 May 2017 18:36:39 +0000 (18:36 +0000)]
Merge "vold should #include <sys/sysmacros.h>" am: 398c0e8274
am: 208b464f72

Change-Id: I8d4a8069958bc4af67766fde101c322b2f189049

7 years agoMerge "vold should #include <sys/sysmacros.h>"
Elliott Hughes [Fri, 19 May 2017 18:34:45 +0000 (18:34 +0000)]
Merge "vold should #include <sys/sysmacros.h>"
am: 398c0e8274

Change-Id: Id72168cac260fedc3123e28402f737ee8be3f625

7 years agoMerge "vold should #include <sys/sysmacros.h>"
Treehugger Robot [Fri, 19 May 2017 18:30:44 +0000 (18:30 +0000)]
Merge "vold should #include <sys/sysmacros.h>"

7 years agovold should #include <sys/sysmacros.h>
Elliott Hughes [Thu, 18 May 2017 16:08:24 +0000 (09:08 -0700)]
vold should #include <sys/sysmacros.h>

Bug: https://github.com/android-ndk/ndk/issues/398
Test: builds
Change-Id: I7a1ca1701099886fb493cc5288d6ee867d5f520a

7 years agoAdd secdiscard command for secure deletion of files
Rubin Xu [Tue, 16 May 2017 16:35:19 +0000 (16:35 +0000)]
Add secdiscard command for secure deletion of files
am: f8d604caf3

Change-Id: Ib9d71507b880ee8dc66880536c800212f523332d

7 years agoAdd secdiscard command for secure deletion of files
Rubin Xu [Thu, 27 Apr 2017 19:43:10 +0000 (20:43 +0100)]
Add secdiscard command for secure deletion of files

This is used by LockSettingsService to delete sensitive credential files.

Bug: 34600579
Test: manual - change device lock under synthetic password, verify
      old data on disk is erased.

Change-Id: I5e11b559ad8818bd2ad2b321d67d21477aab7555
Merged-In: I5e11b559ad8818bd2ad2b321d67d21477aab7555

7 years agoMerge "Switch to libkeyutils." am: 612eea6b4f am: 7a7df78819
Elliott Hughes [Sat, 13 May 2017 00:44:18 +0000 (00:44 +0000)]
Merge "Switch to libkeyutils." am: 612eea6b4f am: 7a7df78819
am: f727d05b83

Change-Id: I1b3e4e932e54b33dd582a849135822ace61c11d7

7 years agoMerge "Switch to libkeyutils." am: 612eea6b4f
Elliott Hughes [Sat, 13 May 2017 00:34:10 +0000 (00:34 +0000)]
Merge "Switch to libkeyutils." am: 612eea6b4f
am: 7a7df78819

Change-Id: I05f95589668e93b36d5d5eed2c4ac21aff6f7e41

7 years agoMerge "Switch to libkeyutils."
Elliott Hughes [Sat, 13 May 2017 00:32:13 +0000 (00:32 +0000)]
Merge "Switch to libkeyutils."
am: 612eea6b4f

Change-Id: Icb86bc1c341ec9366f382985522b6ec70e11b8ea

7 years agoMerge "Switch to libkeyutils."
Elliott Hughes [Sat, 13 May 2017 00:28:25 +0000 (00:28 +0000)]
Merge "Switch to libkeyutils."

7 years agoSwitch to libkeyutils.
Elliott Hughes [Wed, 10 May 2017 00:01:04 +0000 (17:01 -0700)]
Switch to libkeyutils.

Bug: http://b/37991155
Test: builds+boots
Change-Id: I33a3ba0d59ffd504093dc94517815c1196e95e2b

7 years agoMerge "BuildDataUserCePath always use dir instead of symbolic link" am: fed8ab1d76...
Tom Cherry [Wed, 3 May 2017 23:54:25 +0000 (23:54 +0000)]
Merge "BuildDataUserCePath always use dir instead of symbolic link" am: fed8ab1d76 am: 7dc93304c8
am: 10211d2207

Change-Id: I8ab5875455abaaa84cc777a96be23cbad314d3f7

7 years agoMerge "BuildDataUserCePath always use dir instead of symbolic link" am: fed8ab1d76
Tom Cherry [Wed, 3 May 2017 23:51:53 +0000 (23:51 +0000)]
Merge "BuildDataUserCePath always use dir instead of symbolic link" am: fed8ab1d76
am: 7dc93304c8

Change-Id: I025e83bc54bcda6e1a947301479bdd79d5a17e7b

7 years agoMerge "BuildDataUserCePath always use dir instead of symbolic link"
Tom Cherry [Wed, 3 May 2017 23:46:52 +0000 (23:46 +0000)]
Merge "BuildDataUserCePath always use dir instead of symbolic link"
am: fed8ab1d76

Change-Id: I98b7b11905f94c6576c268cfe950ed092b5e74d8

7 years agoMerge "BuildDataUserCePath always use dir instead of symbolic link"
Tom Cherry [Wed, 3 May 2017 23:42:58 +0000 (23:42 +0000)]
Merge "BuildDataUserCePath always use dir instead of symbolic link"

7 years agoKeymaster: IWYU
Steven Moreland [Mon, 1 May 2017 19:45:32 +0000 (12:45 -0700)]
Keymaster: IWYU

Was depending on this transitively from MQDescriptor.h

Test: links
Bug: 37791060
Change-Id: I9b52bbe9ac6c3a54fdb6e352e90eba50914633d4
(cherry picked from commit 25e8b4b4f67f62a98c440f8323eaeb956d99f0cd)

7 years agoMerge "Revert "Revert "Stop dropping caches now we have kernel fix""" into oc-dev
Daniel Rosenberg [Sun, 30 Apr 2017 11:58:06 +0000 (11:58 +0000)]
Merge "Revert "Revert "Stop dropping caches now we have kernel fix""" into oc-dev
am: c40996e719

Change-Id: If30418cbb9af2e9d81b944474483c8040845c12d

7 years agoMerge "Revert "Revert "Stop dropping caches now we have kernel fix""" into oc-dev
TreeHugger Robot [Sun, 30 Apr 2017 11:53:22 +0000 (11:53 +0000)]
Merge "Revert "Revert "Stop dropping caches now we have kernel fix""" into oc-dev

7 years agoRevert "Revert "Stop dropping caches now we have kernel fix""
Daniel Rosenberg [Fri, 28 Apr 2017 01:11:35 +0000 (01:11 +0000)]
Revert "Revert "Stop dropping caches now we have kernel fix""

This reverts commit 8ad0bef7b5b1b6e1ba3afe441d2dcc9a06e782a7.

Bug: 37231161
Test: Boot device with FBE enabled. ls /storage/emulated/0/Android
Unlock device. ls /storage/emulated/0/Android
1st will not be found. Second should be found.

Change-Id: I92c7ad0adaa7bd357e10661a47cc667ac0ff84b4
Merged-In: I92c7ad0adaa7bd357e10661a47cc667ac0ff84b4

7 years agoFix keyname generation issue
Yong Yao [Wed, 26 Apr 2017 21:05:18 +0000 (21:05 +0000)]
Fix keyname generation issue
am: 392c4dbdc1

Change-Id: Iea048673c82dea1d5d9a13a10e1f70376955ca4b

7 years agoFix keyname generation issue
Yong Yao [Wed, 5 Apr 2017 09:52:48 +0000 (05:52 -0400)]
Fix keyname generation issue

The keyname binded to keyring return a wrong string when there are binary char larger than 127,
the sign extension will introduce unexpect FFFFFF string to the keyname.

Bug: 36975893
Test: local build

Change-Id: Iba2f6ef95aeacd08c8d6c72b71e7b92e956ec3fc
Signed-off-by: Ai, Ting A <ting.a.ai@intel.com>
7 years agoRevert "Stop dropping caches now we have kernel fix"
Daniel Rosenberg [Thu, 20 Apr 2017 22:39:16 +0000 (22:39 +0000)]
Revert "Stop dropping caches now we have kernel fix"
am: 8ad0bef7b5

Change-Id: I318b956c38175abada5a2423b8d920b299883030

7 years agoRevert "Stop dropping caches now we have kernel fix"
Daniel Rosenberg [Thu, 20 Apr 2017 19:29:37 +0000 (12:29 -0700)]
Revert "Stop dropping caches now we have kernel fix"

This reverts commit 6abe6831b59a56145cdd28445cd46fa3c79ecb92.

Bringing this back temporarily for the same issue on sdcardfs.
Will remove once the kernel issue is resolved.

Change-Id: Ia29ea4fddb7777012a2eea9259f9ac856773fe01
Bug: 37231161
Test: Boot device with FBE enabled. ls /storage/emulated/0/Android
Unlock device. ls /storage/emulated/0/Android
1st will not be found. Second should be found.

7 years agoBuildDataUserCePath always use dir instead of symbolic link
cjbao [Tue, 11 Apr 2017 16:09:00 +0000 (00:09 +0800)]
BuildDataUserCePath always use dir instead of symbolic link

Select whichever is real dir instead of symbolic link from either /data/data
or /data/user/0. This is to minimize path walking overhead in kernel.

This works together with Change 369787

Test: Manual test
Change-Id: I338518673fc22ccbfed6ddd6be196931fce18525
Signed-off-by: cjbao <cathy.bao@intel.com>
7 years agovold: unlink ext4 encryption keys rather than revoking them
Eric Biggers [Wed, 5 Apr 2017 00:31:49 +0000 (00:31 +0000)]
vold: unlink ext4 encryption keys rather than revoking them
am: fa4039b162

Change-Id: I118ef8b85620f721370e5d26be2d3ef3c2679a8d

7 years agoMerge "Prepare necessary data directory before loading persistent properties." am...
Seigo Nonaka [Wed, 5 Apr 2017 00:00:05 +0000 (00:00 +0000)]
Merge "Prepare necessary data directory before loading persistent properties." am: 399bd0866c am: e1f216cc4d
am: cbe1f6b1e4

Change-Id: I864e4151a0b7e1551892d9199883e8783941f7a8

7 years agoMerge "Prepare necessary data directory before loading persistent properties." am...
Seigo Nonaka [Tue, 4 Apr 2017 23:52:12 +0000 (23:52 +0000)]
Merge "Prepare necessary data directory before loading persistent properties." am: 399bd0866c
am: e1f216cc4d

Change-Id: I69153c12ca16fcb8381972c70ac7e3e25c050d42

7 years agoMerge "Prepare necessary data directory before loading persistent properties."
Seigo Nonaka [Tue, 4 Apr 2017 23:46:15 +0000 (23:46 +0000)]
Merge "Prepare necessary data directory before loading persistent properties."
am: 399bd0866c

Change-Id: I4a675722c79bc74bcfc106365a1f056c9b338cc4

7 years agoMerge "Prepare necessary data directory before loading persistent properties."
Treehugger Robot [Tue, 4 Apr 2017 23:34:23 +0000 (23:34 +0000)]
Merge "Prepare necessary data directory before loading persistent properties."

7 years agovold: unlink ext4 encryption keys rather than revoking them
Eric Biggers [Mon, 3 Apr 2017 22:48:09 +0000 (15:48 -0700)]
vold: unlink ext4 encryption keys rather than revoking them

Unlinking keys rather than revoking them avoids bugs in certain kernel
versions without having to hack around the problem with an arbitrary 20
second delay, which is not guaranteed to be sufficient and has caused
full device hangs like in b/35988361.

Furthermore, in the context of filesystem encryption, unlinking is not
currently supposed to be any less secure than revoking.  There was a
case where revoking (but not unlinking) keys will cause the filesystem
to deny access to files that were previously opened with that key.
However, this was a means of _access control_, which encryption is not
intended to be used for.  Instead, file permissions and/or SELinux
should be used to enforce access control, while filesystem encryption
should be used to protect data at rest independently from access
control.  This misfeature has also been removed upstream (and backported
to 4.4-stable and 4.9-stable) because it caused CVE-2017-7374.

Eventually we'd really like to make the kernel support proper revocation
of filesystem encryption keys, i.e. fully clearing all key material and
plaintext and safely waiting for any affected filesystem operations or
writeback to complete.  But for now this functionality does not exist.
('sync && echo 3 > /proc/sys/vm/drop_caches' can be useful, but it's not
good enough.)

Bug: 35988361
Change-Id: Ib44effe5368cdce380ae129dc4e6c6fde6cb2719
(cherry picked from commit fd7ba5e4c61691d8a45bc729b7659940a984bab0)

7 years agoPrepare necessary data directory before loading persistent properties.
Seigo Nonaka [Mon, 20 Jun 2016 08:05:40 +0000 (17:05 +0900)]
Prepare necessary data directory before loading persistent properties.

init reads files in /data/property/ but it is not ready to read when
trigger_load_persist_props is triggered by vold.decrypt.

Bug: 29332975
Change-Id: I14beac8714ff2f722d8b11f666bc7ca693ccd46e
(cherry picked from commit e2ef0c0da454a5b9224d340260e9ad5be46092fe)

7 years agoMerge "Abort migration early when not enough space." into oc-dev
Jeff Sharkey [Tue, 4 Apr 2017 01:58:25 +0000 (01:58 +0000)]
Merge "Abort migration early when not enough space." into oc-dev
am: e6c142174c

Change-Id: I193b962b1288be22fb343c802ac3d2b464748f17

7 years agoMerge "Abort migration early when not enough space." into oc-dev
TreeHugger Robot [Tue, 4 Apr 2017 01:45:42 +0000 (01:45 +0000)]
Merge "Abort migration early when not enough space." into oc-dev

7 years agoAbort migration early when not enough space.
Jeff Sharkey [Mon, 3 Apr 2017 23:11:45 +0000 (17:11 -0600)]
Abort migration early when not enough space.

Otherwise we potentially waste minutes of the users time copying
data that will never fit.

Also fix bug around storage calculation.  It's confusing, but f_bsize
is not the value you're looking for; the real block size is f_frsize.

Test: builds, boots
Bug: 2759098636840579
Change-Id: I77c63e259356824cc75a3adcf3f4af567efdc7aa

7 years agovdc: use libbase logging and log directly to kmsg on boot
Tom Cherry [Mon, 3 Apr 2017 22:06:06 +0000 (22:06 +0000)]
vdc: use libbase logging and log directly to kmsg on boot
am: c61581e7d2

Change-Id: I1a77a6f8f3c3325abf4d74d0feef1a6187c3f6b6

7 years agovdc: use libbase logging and log directly to kmsg on boot
Tom Cherry [Wed, 29 Mar 2017 23:50:28 +0000 (16:50 -0700)]
vdc: use libbase logging and log directly to kmsg on boot

Init is no longer calling vdc with logwrapper, so it must take care of
logging to kmsg directly.

Bug: 36278706
Test: observe logging in kmsg on boot and stderr on normal usage

(cherry picked from commit f71511ac4199f273744b8e0adf266c6e911918aa)

Change-Id: Ieb643918f11bdde4f99ec7f3ec083efbb326e809

7 years agoMerge "vdc: use libbase logging and log directly to kmsg on boot" am: 4f6c1ee19f...
Tom Cherry [Fri, 31 Mar 2017 16:47:44 +0000 (16:47 +0000)]
Merge "vdc: use libbase logging and log directly to kmsg on boot" am: 4f6c1ee19f am: e3a8a60024
am: 83f1551ecb

Change-Id: Ib6c575bbfd010e71cac509bee343a7be563e730a

7 years agoMerge "vdc: use libbase logging and log directly to kmsg on boot" am: 4f6c1ee19f
Tom Cherry [Fri, 31 Mar 2017 16:45:11 +0000 (16:45 +0000)]
Merge "vdc: use libbase logging and log directly to kmsg on boot" am: 4f6c1ee19f
am: e3a8a60024

Change-Id: Ifae6798ca5d352c05cd78dce59087bf3a29eede8

7 years agoMerge "vdc: use libbase logging and log directly to kmsg on boot"
Tom Cherry [Fri, 31 Mar 2017 16:43:12 +0000 (16:43 +0000)]
Merge "vdc: use libbase logging and log directly to kmsg on boot"
am: 4f6c1ee19f

Change-Id: Ib5c11abb027f5c91f448e0322a11ed93c4ce29e2

7 years agoMerge "vdc: use libbase logging and log directly to kmsg on boot"
Tom Cherry [Fri, 31 Mar 2017 16:41:00 +0000 (16:41 +0000)]
Merge "vdc: use libbase logging and log directly to kmsg on boot"

7 years agovdc: use libbase logging and log directly to kmsg on boot
Tom Cherry [Wed, 29 Mar 2017 23:50:28 +0000 (16:50 -0700)]
vdc: use libbase logging and log directly to kmsg on boot

Init is no longer calling vdc with logwrapper, so it must take care of
logging to kmsg directly.

Test: observe logging in kmsg on boot and stderr on normal usage
Change-Id: Ie3e59da433bd154f121ce103dea0c59eb0bab069

7 years agoSpread around some O_CLOEXEC love.
Jeff Sharkey [Mon, 27 Mar 2017 16:49:21 +0000 (10:49 -0600)]
Spread around some O_CLOEXEC love.

Also remove some unnecessary SELinux logic when creating image files
for loop devices.

Test: builds, boots, common operations work
Bug: 34903607
Change-Id: I68dfa022ecc39f56c175e786694e0de35b954ca0

7 years agoMerge "Add a new "virtual disk" feature."
Jeff Sharkey [Mon, 27 Mar 2017 15:22:47 +0000 (15:22 +0000)]
Merge "Add a new "virtual disk" feature."

7 years agoAdd a new "virtual disk" feature.
Jeff Sharkey [Sun, 26 Mar 2017 04:49:13 +0000 (22:49 -0600)]
Add a new "virtual disk" feature.

It's extremely difficult to test storage related logic on devices
that don't have physical SD card slots.  So to support better
debugging and testing, add a new "virtual disk" feature which mounts
a 512MB file through loop device.

It relies on the kernel having the "loop.max_part" value set to
something other than 0 via the boot command line, since that allows
all the existing partition logic to fall into place.

Bug: 34903607
Test: builds, boots, virtual disk works
Change-Id: I04c5b33e37319d867542985a56b7999a9b7cf35d

7 years agoAdd digest support and implementation name to getHardwareFeatures.
Shawn Willden [Wed, 1 Mar 2017 13:44:15 +0000 (06:44 -0700)]
Add digest support and implementation name to getHardwareFeatures.

Test: Manual
Change-Id: I910dea4fab671436fe5eb2ab35a6ffaa86179b35

7 years agoMerge "make shutdown safe for double calls." am: 71fa1068de am: 2f93c657f4
Keun-young Park [Wed, 15 Mar 2017 02:56:40 +0000 (02:56 +0000)]
Merge "make shutdown safe for double calls." am: 71fa1068de am: 2f93c657f4
am: 2a8605b9d1

Change-Id: Id1cd83d307e7791359bc6dfd96368f1138ff21d2

7 years agoMerge "make shutdown safe for double calls." am: 71fa1068de
Keun-young Park [Wed, 15 Mar 2017 02:52:10 +0000 (02:52 +0000)]
Merge "make shutdown safe for double calls." am: 71fa1068de
am: 2f93c657f4

Change-Id: I78962b7272ef0c39a133db042f36684fc1324018

7 years agoMerge "make shutdown safe for double calls."
Keun-young Park [Wed, 15 Mar 2017 02:47:09 +0000 (02:47 +0000)]
Merge "make shutdown safe for double calls."
am: 71fa1068de

Change-Id: I161c96dc5a44890fffe8fcdf9e0f8fc874df29c0

7 years agoMerge "make shutdown safe for double calls."
Treehugger Robot [Wed, 15 Mar 2017 02:39:50 +0000 (02:39 +0000)]
Merge "make shutdown safe for double calls."

7 years agomake shutdown safe for double calls.
Keun-young Park [Tue, 14 Mar 2017 01:02:50 +0000 (18:02 -0700)]
make shutdown safe for double calls.

- In new shutdown sequence, volume shutdown is requested in two places:
  system_server and init.
- Make VolumeManager.shutdown safe for double calls.
  It crashed before this change.

bug: 36004738
Test: reboot and check last_kmsg for crash / vdc timeout
Change-Id: I296913959b2647b65d66553073f2032545beba57

7 years agoMerge "vold: replacing fs_mgr_read_fstab() with fs_mgr_read_fstab_default()" am:...
Bowgo Tsai [Fri, 10 Mar 2017 03:17:52 +0000 (03:17 +0000)]
Merge "vold: replacing fs_mgr_read_fstab() with fs_mgr_read_fstab_default()" am: 92f21f5294 am: f53cc1b04a
am: b169603d95

Change-Id: Ic3ac2ccb853b43d9051d3703f19590cf97b3e689

7 years agoMerge "vold: replacing fs_mgr_read_fstab() with fs_mgr_read_fstab_default()" am:...
Bowgo Tsai [Fri, 10 Mar 2017 02:15:05 +0000 (02:15 +0000)]
Merge "vold: replacing fs_mgr_read_fstab() with fs_mgr_read_fstab_default()" am: 92f21f5294
am: f53cc1b04a

Change-Id: I05095049ec6f478c3b9b31bccd6c828cf52b7d7c

7 years agoMerge "vold: replacing fs_mgr_read_fstab() with fs_mgr_read_fstab_default()"
Bowgo Tsai [Fri, 10 Mar 2017 02:12:40 +0000 (02:12 +0000)]
Merge "vold: replacing fs_mgr_read_fstab() with fs_mgr_read_fstab_default()"
am: 92f21f5294

Change-Id: I830cc6be023737b9befc112fdf9b010996314ec9

7 years agoMerge "vold: replacing fs_mgr_read_fstab() with fs_mgr_read_fstab_default()"
Treehugger Robot [Fri, 10 Mar 2017 02:07:34 +0000 (02:07 +0000)]
Merge "vold: replacing fs_mgr_read_fstab() with fs_mgr_read_fstab_default()"

7 years agovold: replacing fs_mgr_read_fstab() with fs_mgr_read_fstab_default()
Bowgo Tsai [Thu, 9 Mar 2017 15:11:33 +0000 (23:11 +0800)]
vold: replacing fs_mgr_read_fstab() with fs_mgr_read_fstab_default()

The original default /fstab.{ro.hardware} might be moved to /vendor/etc/.
or /odm/etc/. Use the new API to get the default fstab instead of using
the hard-coded /fstab.{ro.hardware}.

Bug: 35811655
Test: boot marlin with /vendor/etc/fstab.marlin
Change-Id: I92d6aefe6ff3433b7d1a671358d990bb7b1f2150

7 years agoFix missing error handling in keymaster comatibility check
Janis Danisevskis [Wed, 8 Mar 2017 19:02:30 +0000 (11:02 -0800)]
Fix missing error handling in keymaster comatibility check

The compatibility check assumes that the keymaster session was created
successfully which is a faulty assumption.

This patch adds propper error handling to the check.

Bug: 35576166
Change-Id: I0c70a0e53f488f8bd3164898722f490cd0573ce3

7 years agoMerge "vold: add coldboot back and make sure it won't block booting" am: b3715cf3af...
Wei Wang [Tue, 7 Mar 2017 20:30:10 +0000 (20:30 +0000)]
Merge "vold: add coldboot back and make sure it won't block booting" am: b3715cf3af am: 5457b47f9e
am: 660006e7a4

Change-Id: I21e4ba746c99bd8c372d802f11f0bb3f36376553

7 years agoMerge "vold: add coldboot back and make sure it won't block booting" am: b3715cf3af
Wei Wang [Tue, 7 Mar 2017 20:29:11 +0000 (20:29 +0000)]
Merge "vold: add coldboot back and make sure it won't block booting" am: b3715cf3af
am: 5457b47f9e

Change-Id: If63bbecc52fec415b38b86ddc32706a3742fcad3

7 years agoMerge "vold: add coldboot back and make sure it won't block booting"
Wei Wang [Tue, 7 Mar 2017 20:25:40 +0000 (20:25 +0000)]
Merge "vold: add coldboot back and make sure it won't block booting"
am: b3715cf3af

Change-Id: I725dc07d0bd3afa73081affb56a24e6a216ec9d2

7 years agoMerge "vold: add coldboot back and make sure it won't block booting"
Treehugger Robot [Tue, 7 Mar 2017 20:24:00 +0000 (20:24 +0000)]
Merge "vold: add coldboot back and make sure it won't block booting"

7 years agoMerge "Vold: Clean up code related to foreign dex use" am: 61a7d1a815 am: aaa95fbdfe
Calin Juravle [Tue, 7 Mar 2017 19:10:47 +0000 (19:10 +0000)]
Merge "Vold: Clean up code related to foreign dex use" am: 61a7d1a815 am: aaa95fbdfe
am: 0a8d4511c8

Change-Id: I3a84eca8a285bed3ec42c8744db8974e0109fb65

7 years agoMerge "Vold: Clean up code related to foreign dex use" am: 61a7d1a815
Calin Juravle [Tue, 7 Mar 2017 19:08:15 +0000 (19:08 +0000)]
Merge "Vold: Clean up code related to foreign dex use" am: 61a7d1a815
am: aaa95fbdfe

Change-Id: I71276a5d18d6c81c97b6c31086a7d9eef47fece4

7 years agoMerge "Vold: Clean up code related to foreign dex use"
Calin Juravle [Tue, 7 Mar 2017 19:06:15 +0000 (19:06 +0000)]
Merge "Vold: Clean up code related to foreign dex use"
am: 61a7d1a815

Change-Id: I296f71434198c41c9ba340891efaf472e3d69dd6

7 years agoMerge "Vold: Clean up code related to foreign dex use"
Calin Juravle [Tue, 7 Mar 2017 19:00:18 +0000 (19:00 +0000)]
Merge "Vold: Clean up code related to foreign dex use"

7 years agovold: add coldboot back and make sure it won't block booting
Wei Wang [Tue, 7 Mar 2017 01:27:05 +0000 (17:27 -0800)]
vold: add coldboot back and make sure it won't block booting

coldboot is needed when device rebooted with USB device attched
so Vold netlink won't miss the information.
This CL added back coldboot and moved down so that it won't block
vold cl and ccl threads.

Bug: 36007238
Test: reboot marlin with flash drive attached and flash drive is recognized
Change-Id: Ie39f348e97a8500515e394e386541289a91b2425

7 years agoVold: Clean up code related to foreign dex use
Calin Juravle [Sat, 4 Mar 2017 01:51:35 +0000 (17:51 -0800)]
Vold: Clean up code related to foreign dex use

We simplified the way we track whether or not a dex file is used by
other apps. DexManger in the framework keeps track of the data and we
no longer need file markers on disk.

Test: device boots, foreign dex markers are not created anymore

Bug: 32871170
Change-Id: Id0360205b019be92049f36eab4339f4736e974f4