OSDN Git Service

android-x86/system-vold.git
4 years agoMerge tag 'android-8.1.0_r69' into oreo-x86 android-x86-8.1-r3 android-x86-8.1-r4 android-x86-8.1-r5
Chih-Wei Huang [Thu, 24 Oct 2019 04:00:56 +0000 (12:00 +0800)]
Merge tag 'android-8.1.0_r69' into oreo-x86

Android 8.1.0 Release 69 (5794017)

5 years agoMerge tag 'android-8.1.0_r53' into oreo-x86 android-x86-8.1-r1 android-x86-8.1-r2
Chih-Wei Huang [Fri, 21 Dec 2018 09:20:40 +0000 (17:20 +0800)]
Merge tag 'android-8.1.0_r53' into oreo-x86

Android 8.1.0 release 53

5 years agoMerge cherrypicks of [5313290, 5313323, 5313343, 5313415, 5313291, 5313441, 5313557...
android-build-team Robot [Fri, 19 Oct 2018 16:33:39 +0000 (16:33 +0000)]
Merge cherrypicks of [53132905313323531334353134155313291531344153135575313344531338353133845313324531332553133265313294531329553132965313498] into oc-m8-release

Change-Id: I3eee7260340d3931be48acb455d8a96179a56b99

5 years ago[DO NOT MERGE] Fix signedness mismatch and integer underflow
Rubin Xu [Tue, 9 Oct 2018 15:13:38 +0000 (16:13 +0100)]
[DO NOT MERGE] Fix signedness mismatch and integer underflow

persist_get_max_entries() is supposed to return an unsigned integer as the
maximum number of entries but it also wrongly returns "-1" as an error
condition. Also fix an issue where an unsigned subtraction in this routine
could lead to integer underflow.

Bug: 112731440
Test: manual
Change-Id: I9672e39bef2c12156dda7806a08c52044962c178
(cherry picked from commit 19ef1ae99a0138197e43658e84d860d17912a4a0)

5 years ago[DO NOT MERGE] Fix signedness mismatch and integer underflow
Rubin Xu [Tue, 9 Oct 2018 15:13:38 +0000 (16:13 +0100)]
[DO NOT MERGE] Fix signedness mismatch and integer underflow

persist_get_max_entries() is supposed to return an unsigned integer as the
maximum number of entries but it also wrongly returns "-1" as an error
condition. Also fix an issue where an unsigned subtraction in this routine
could lead to integer underflow.

Bug: 112731440
Test: manual
Change-Id: I9672e39bef2c12156dda7806a08c52044962c178
(cherry picked from commit 19ef1ae99a0138197e43658e84d860d17912a4a0)

5 years agoMerge tag 'android-8.1.0_r48' into oreo-x86
Chih-Wei Huang [Tue, 9 Oct 2018 10:04:29 +0000 (18:04 +0800)]
Merge tag 'android-8.1.0_r48' into oreo-x86

Android 8.1.0 release 48

5 years agoMerge tag 'android-8.1.0_r46' into oreo-x86
Chih-Wei Huang [Mon, 10 Sep 2018 16:24:27 +0000 (00:24 +0800)]
Merge tag 'android-8.1.0_r46' into oreo-x86

Android 8.1.0 Release 46 (OPM6.171019.030.K1)

5 years agoMerge cherrypicks of [4741663, 4741664, 4741665, 4741666, 4743080, 4743081, 4743082...
android-build-team Robot [Fri, 10 Aug 2018 20:33:05 +0000 (20:33 +0000)]
Merge cherrypicks of [474166347416644741665474166647430804743081474308247430834741262474126347412644741265474126647416674743084474124247412434741741474174247417434741744474182247430854741668474133847430554743056474307047430734743075474307647430784743079474316147431624743164474316547431674743168474316947431704741681474168247416834741684474168547416864741687474168847416894741690474169147416924741693474169447416954741696474169747416984741699474324047432414743242474324347417454741823474182447418254741267474126847432444743280474328147432244743203474320447432054741746474174747432454741826474182747418284741829474174847417494741750474323347432824741244474124547412464741247474320647432074743208474320947432104743211474321247432134743214474321547432164743217474321847432194743360474336147433624743363474336447433654743366474336747433684743369474337047433714743372474337347433744743375474337647433774743283474328447418304742501474324647430864743087474337847433794741751] into sparse-4749909-L04200000199131547

Change-Id: I1bcd93a3c4d86953990bd72ca5d12b17d0e5d28d

5 years agoMerge commit '635193ab36302e5f65e99c7df2f256cfd37068c7' into am-b7f1a67b-2024-4274...
Jeff Sharkey [Fri, 1 Jun 2018 22:03:06 +0000 (16:03 -0600)]
Merge commit '635193ab36302e5f65e99c7df2f256cfd37068c7' into am-b7f1a67b-2024-4274-aa7d-e88e8cceb407

* commit '635193ab36302e5f65e99c7df2f256cfd37068c7':
  Require quotes when searching for blkid keys.

Bug: 80436257
Test: manual
Change-Id: I4cbae2d594edefa10e5e2c5236d17fe3d37818cd
(cherry picked from commit 9a35ab6a4f0cbc47ff389f0c632218a39bf49a45)

5 years agoMerge cherrypicks of [4691111, 4689862, 4690575, 4690576, 4690577, 4690578, 4689866...
android-build-team Robot [Fri, 3 Aug 2018 19:21:26 +0000 (19:21 +0000)]
Merge cherrypicks of [46911114689862469057546905764690577469057846898664689868468986946898704691132468945646899634691133469113446911564691157469115946911614690581468996446894604691112469058246905834691165469116646911674691168469116946911704691211469121246912134691214469121546912164691217469121846912194691232469123346912344691235469123646912374691238469123946912404691241469124346912454691247469124946912504691291469129246912934691294469129546912964691255468947646894774689478469122346912244691136468947946894804691137469122546912264691227469137146912284691328468996746911384691139469114046914334689968468996946913954691230469129746912984691299469130046913964691397469139846913994691400469140146914024691403469140446914054691406469140746914084691409469141046914714691472469147346914744691475469147646914774691478469147946914804691481469148246914834691484469148546914864691487469148846911434691144469151146911134689482469153346911454691146469114746911484691536] into sparse-4732991-L01200000196794104

Change-Id: I8fea860a300cbcbb1291d99460f7e8ff282aaa98

5 years agoMerge commit '635193ab36302e5f65e99c7df2f256cfd37068c7' into am-b7f1a67b-2024-4274...
Jeff Sharkey [Fri, 1 Jun 2018 22:03:06 +0000 (16:03 -0600)]
Merge commit '635193ab36302e5f65e99c7df2f256cfd37068c7' into am-b7f1a67b-2024-4274-aa7d-e88e8cceb407

* commit '635193ab36302e5f65e99c7df2f256cfd37068c7':
  Require quotes when searching for blkid keys.

Bug: 80436257
Test: manual
Change-Id: I4cbae2d594edefa10e5e2c5236d17fe3d37818cd
(cherry picked from commit 9a35ab6a4f0cbc47ff389f0c632218a39bf49a45)

5 years agoMerge commit '635193ab36302e5f65e99c7df2f256cfd37068c7' into am-b7f1a67b-2024-4274...
Jeff Sharkey [Fri, 1 Jun 2018 22:03:06 +0000 (16:03 -0600)]
Merge commit '635193ab36302e5f65e99c7df2f256cfd37068c7' into am-b7f1a67b-2024-4274-aa7d-e88e8cceb407

* commit '635193ab36302e5f65e99c7df2f256cfd37068c7':
  Require quotes when searching for blkid keys.

Bug: 80436257
Test: manual
Change-Id: I4cbae2d594edefa10e5e2c5236d17fe3d37818cd
(cherry picked from commit 9a35ab6a4f0cbc47ff389f0c632218a39bf49a45)

5 years agoMerge tag 'android-8.1.0_r29' into oreo-x86
Chih-Wei Huang [Fri, 25 May 2018 10:20:59 +0000 (18:20 +0800)]
Merge tag 'android-8.1.0_r29' into oreo-x86

Android 8.1.0 Release 29 (OPM4.171019.016.C1)

6 years agoSnap for 4657601 from 9a90d236fb1a2077bd1315f7ec0e41ffe520b3d5 to oc-m4-release
android-build-team Robot [Wed, 21 Mar 2018 21:26:30 +0000 (21:26 +0000)]
Snap for 4657601 from 9a90d236fb1a2077bd1315f7ec0e41ffe520b3d5 to oc-m4-release

Change-Id: I9c9a08aba6b9acae799061fc9150aa96098b539b

6 years agoMerge tag 'android-8.1.0_r18' into oreo-x86
Chih-Wei Huang [Wed, 7 Mar 2018 08:51:02 +0000 (16:51 +0800)]
Merge tag 'android-8.1.0_r18' into oreo-x86

Android 8.1.0 Release 18 (OPM5.171019.017)

6 years agoFix building errors on Android 8.1
Chih-Wei Huang [Tue, 12 Dec 2017 17:18:42 +0000 (01:18 +0800)]
Fix building errors on Android 8.1

Android 8.1 has deprecated the use of strcat.

6 years agoMerge tag 'android-8.1.0_r1' into oreo-x86
Chih-Wei Huang [Fri, 8 Dec 2017 09:18:59 +0000 (17:18 +0800)]
Merge tag 'android-8.1.0_r1' into oreo-x86

Android 8.1.0 Release 1 (OPM1.171019.011)

6 years agoFix ext4/f2fs can't be mounted issue
Chih-Wei Huang [Thu, 30 Nov 2017 07:51:28 +0000 (15:51 +0800)]
Fix ext4/f2fs can't be mounted issue

6 years agoSnap for 4448085 from 7ce9f66723ff5f2fd2704ee2fd37e56b72e19bea to oc-m3-release
android-build-team Robot [Tue, 28 Nov 2017 23:32:19 +0000 (23:32 +0000)]
Snap for 4448085 from 7ce9f66723ff5f2fd2704ee2fd37e56b72e19bea to oc-m3-release

Change-Id: I8870e695f59155fa1584a8fc0ae71d275227ed74

6 years agoSnap for 4448085 from 7ce9f66723ff5f2fd2704ee2fd37e56b72e19bea to oc-m4-release
android-build-team Robot [Mon, 13 Nov 2017 19:52:36 +0000 (19:52 +0000)]
Snap for 4448085 from 7ce9f66723ff5f2fd2704ee2fd37e56b72e19bea to oc-m4-release

Change-Id: I9d9ec9a8d00b85fed7efd999ccede1230cf25734

6 years agoSnap for 4442250 from 7ce9f66723ff5f2fd2704ee2fd37e56b72e19bea to oc-m2-release
android-build-team Robot [Thu, 9 Nov 2017 21:35:09 +0000 (21:35 +0000)]
Snap for 4442250 from 7ce9f66723ff5f2fd2704ee2fd37e56b72e19bea to oc-m2-release

Change-Id: I030f6bb3bc3acea74dd1457b8ed8222b40316f9d

6 years agoMerge cherrypicks of [3196053, 3195996, 3195997, 3195998, 3196073, 3196093, 3196113...
android-build-team Robot [Thu, 9 Nov 2017 05:44:29 +0000 (05:44 +0000)]
Merge cherrypicks of [319605331959963195997319599831960733196093319611331959343195999319607431961333196134319591431959153195916] into oc-mr1-release

Change-Id: I9a73a0e505eec758623136e9a5ee711b0c85c2a9

6 years agoVold: Add fsync in writeStringToFile()
Wei Wang [Tue, 7 Nov 2017 17:44:16 +0000 (09:44 -0800)]
Vold: Add fsync in writeStringToFile()

Test: Build, test with ag/3180275
Bug: 68901441
Change-Id: Ieca9e5227025e00184a67508d5e8fbbddd12f21e
(cherry picked from commit 701d05d32c8b415c6fbb2e8c9439185333870046)

6 years agorelease-request-a84b3435-75fa-41e8-bd3c-ca0f4cbd5cc5-for-git_oc-m2-release-4352002...
android-build-team Robot [Thu, 21 Sep 2017 21:52:21 +0000 (21:52 +0000)]
release-request-a84b3435-75fa-41e8-bd3c-ca0f4cbd5cc5-for-git_oc-m2-release-4352002 snap-temp-L88700000105039240

Change-Id: I0c58cf89aa32cf6fd70dd9f84594993e6c30a9ce

6 years agorelease-request-1f2fcfef-9736-44dc-8628-3ba96dac60db-for-git_oc-mr1-release-4343541...
android-build-team Robot [Sun, 17 Sep 2017 07:36:27 +0000 (07:36 +0000)]
release-request-1f2fcfef-9736-44dc-8628-3ba96dac60db-for-git_oc-mr1-release-4343541 snap-temp-L73700000103533431

Change-Id: I738447fb2ebc42eecc5eb2eae80b35d8fedebed7

6 years agoMerge "Revert "Revert "Add support for gid derivation on private volumes""" into...
TreeHugger Robot [Fri, 15 Sep 2017 21:59:32 +0000 (21:59 +0000)]
Merge "Revert "Revert "Add support for gid derivation on private volumes""" into oc-mr1-dev

6 years agoRevert "Revert "Add support for gid derivation on private volumes""
Rom Lemarchand [Fri, 15 Sep 2017 18:48:01 +0000 (18:48 +0000)]
Revert "Revert "Add support for gid derivation on private volumes""

This reverts commit a3a60b372efb48a672848c7797efd57a4ec92303.

Reason for revert: All kernel prebuilts merged

Bug: 65600849
Bug: 65573871
Change-Id: I75b0cb1d82213b875cbef8d39f4f1a8fb34b9795

6 years agoMerge cherrypicks of [2902972, 2901731, 2902830, 2902732, 2901894, 2902658] into...
android-build-team Robot [Thu, 14 Sep 2017 20:20:23 +0000 (20:20 +0000)]
Merge cherrypicks of [290297229017312902830290273229018942902658] into oc-mr1-release

Change-Id: Ifbebb0993f4eee5a48b40012af5b188fe1059d42

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.

Bug: 63245673
Bug: 65660058
Change-Id: I9c8afd3ba22547aff5aff06b71cb8ff3b8a07350
(cherry picked from commit a3a60b372efb48a672848c7797efd57a4ec92303)

6 years agoMerge "Revert "Add support for gid derivation on private volumes"" into oc-mr1-dev
Richard Uhler [Thu, 14 Sep 2017 14:55:32 +0000 (14:55 +0000)]
Merge "Revert "Add support for gid derivation on private volumes"" into oc-mr1-dev

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.

Bug: 63245673
Bug: 65660058
Change-Id: I9c8afd3ba22547aff5aff06b71cb8ff3b8a07350

6 years agorelease-request-f0fc1aa1-730c-4deb-b1ff-e8ebeeccc4b5-for-git_oc-mr1-release-4335659...
android-build-team Robot [Thu, 14 Sep 2017 07:27:16 +0000 (07:27 +0000)]
release-request-f0fc1aa1-730c-4deb-b1ff-e8ebeeccc4b5-for-git_oc-mr1-release-4335659 snap-temp-L85900000102427279

Change-Id: Ib5c3316c0173ebdad13c3ead4d4745cd7b598470

6 years agoMerge "Add support for gid derivation on private volumes" into oc-mr1-dev
TreeHugger Robot [Thu, 14 Sep 2017 01:37:01 +0000 (01:37 +0000)]
Merge "Add support for gid derivation on private volumes" into oc-mr1-dev

6 years agorelease-request-b613f8ce-05b5-465e-b783-c1b87f3c1e95-for-git_oc-mr1-release-4332123...
android-build-team Robot [Wed, 13 Sep 2017 07:34:09 +0000 (07:34 +0000)]
release-request-b613f8ce-05b5-465e-b783-c1b87f3c1e95-for-git_oc-mr1-release-4332123 snap-temp-L59300000101925107

Change-Id: If475710a03a07e6c93f6b6f37ee09b1539d67bbd

6 years agovold3: check supported filesystem modules
Chih-Wei Huang [Sat, 25 Mar 2017 16:47:42 +0000 (00:47 +0800)]
vold3: check supported filesystem modules

If there is a filesystem module of the requested type,
it should be considered supported.

Note the kernel will auto load the filesystem module
on mounting by modprobe.

6 years agovold3: support UDF (Universal Disk Format)
Chih-Wei Huang [Sat, 25 Mar 2017 16:46:42 +0000 (00:46 +0800)]
vold3: support UDF (Universal Disk Format)

Refer to https://en.wikipedia.org/wiki/Universal_Disk_Format.

6 years agovold3: auto mount CDROM
Chih-Wei Huang [Sat, 25 Mar 2017 16:45:41 +0000 (00:45 +0800)]
vold3: auto mount CDROM

Jide's ISO9660 support (commit 76b535f) is not complete. Still
need to handle block devices with major number of CDROM.

6 years agoMove kMajor* constants to a header file
Chih-Wei Huang [Fri, 24 Mar 2017 16:13:45 +0000 (00:13 +0800)]
Move kMajor* constants to a header file

Currently each cpp defines its own kMajor* that can't be shared.
Move the kMajor* to a header to avoid duplicate definitions.

Change isVirtioBlkDevice() to be a public static method of Disk
so that the logic could be shared as well.

6 years agovold: ISO9660 support
Luo Chunbo [Wed, 25 May 2016 08:16:48 +0000 (16:16 +0800)]
vold: ISO9660 support

Ref: T7691

Change-Id: Ifc602781e7d87aea9f3181263e09ffe143e9a231
Signed-off-by: Luo Chunbo <luochunbo@jidemail.com>
6 years agovold3: support the old SDCARD=xxx function
Chih-Wei Huang [Fri, 12 Aug 2016 17:58:29 +0000 (01:58 +0800)]
vold3: support the old SDCARD=xxx function

By specifying SDCARD=xxx in kernel cmdline, vold will try to mount
that disk or partition as a sdcard. This is an old function we've
added to vold 2.0. Now re-implement it in vold 3.0. Some people
still like and use it.

6 years agocryptfs: fix null pointer crashing
Chih-Wei Huang [Mon, 5 Sep 2016 04:21:22 +0000 (12:21 +0800)]
cryptfs: fix null pointer crashing

Since android-x86 usually doesn't have the data mount point defined
in the fstab, we will get a null pointer of fstab_rec. This causes
unable to open Settings Developer options.

6 years agoFix keyname generation issue
Chen, Luhai [Fri, 18 Aug 2017 06:49:45 +0000 (14:49 +0800)]
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: 65423023
Test: local build with boot test and device encryption status check.

Change-Id: I26482c98ac1858a63b9f5c3f84a8699fd6a21cd7
Signed-off-by: Ai, Ting A <ting.a.ai@intel.com>
Signed-off-by: Chen, Luhai <luhai.chen@intel.com>
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 agovold: Mount ext4/f2fs portable storage with sdcard_posix
Jani Lusikka [Fri, 15 Jan 2016 20:25:47 +0000 (22:25 +0200)]
vold: Mount ext4/f2fs portable storage with sdcard_posix

This commit is a forward port of following commits:

Author: Michael Stucki <mundaun@gmx.ch>
Change-Id: Ia34ad91444951e62f6d17374f480dcbdfa34cca3

Author: Tom Marshall <tdm@cyngn.com>
Change-Id: I05d9b57cc28ffd1f8deb8148d81c7f6fad0aa8db

Author: Pawit Pornkitprasan <p.pawit@gmail.com>
Change-Id: I1364f37018b25d79b1826c85849def64e868d72f

Author: Pawit Pornkitprasan <p.pawit@gmail.com>
Change-Id: I873af4dc2309d3d0942ce466b8acf8158abb85ae

Author: Jorge Ruesga <jorge@ruesga.com>
Change-Id: Ic0bb314b30e42489c45caec29d35d6896c9849eb

Signed-off-by: Michael Bestas <mikeioannina@cyanogenmod.org>
Change-Id: I9699643987c53d8e2538720f33da28de35230dfe

6 years agovold: Honor mount options for f2fs partitions
Michael Bestas [Wed, 20 Jan 2016 20:06:11 +0000 (22:06 +0200)]
vold: Honor mount options for f2fs partitions

* Based on 1436fc7ea3b349283a021e75fdd4f3478a2ca2e8

Change-Id: Id9491ada3bd34275a95ef9855167db6ae7a9b30f

6 years agovold: Honor mount options for ext4 partitions
Tom Marshall [Thu, 5 Nov 2015 19:20:54 +0000 (11:20 -0800)]
vold: Honor mount options for ext4 partitions

 * Save mount options and fstype for DiskPartition objects
 * Pass mount options and fstype to PublicVolume ctor
 * Pass mount options to Ext4::Mount
 * Use specified/default fstype if blkid fails

This is trivially extensible for other fs types.

Change-Id: Ie5dd27f26a4a7129dd9efe6a7ad0a589928282a0

6 years agovold: Support internal storage partitions
Tom Marshall [Wed, 4 Nov 2015 23:44:44 +0000 (15:44 -0800)]
vold: Support internal storage partitions

 * Support nonremovable disks and expose a nonremovable flag in the
   DiskCreated message.
 * New DiskPartition class to hold single partitions.  DiskPartition is
   used when the fs_mgr entry has a partnum (eg. when fs_mgr_flags
   contains voldmanaged=label:#).  Override disk partitioning methods
   to prevent destroying the emmc.

Change-Id: Id7ec3ea409b5c96e691730604e4b1e9cc3aa9d33

vold: Correct base header paths

These headers were moved to android-base

Change-Id: I3eaa8316006b9017c5f5e31cd1e91efc2862106d

DiskPartition.cpp: Add sysmacros.h dependency for major/minor

Change-Id: I22c267c8f12b40fb3e2295becd88f12b75907b69
Signed-off-by: Adrian DC <radian.dc@gmail.com>
Change-Id: Id7ec3ea409b5c96e691730604e4b1e9cc3aa9d33

6 years agovold: Fix fsck on public volumes
Michael Bestas [Sun, 6 Dec 2015 21:53:55 +0000 (23:53 +0200)]
vold: Fix fsck on public volumes

* Fsck was hitting a neverallow on public volumes not formatted in vfat
  because it was always using the trusted context
* Always run trusted fsck for private volumes and untrusted for public
* Exfat/ntfs are always untrusted, because they are not supported for
  private volumes, like vfat

Change-Id: I0a6ee9aea907bae9ed097b920df0559df7b45d7d

6 years agovold: add support for more filesystems for public storage
Dan Pasanen [Wed, 28 Oct 2015 03:52:37 +0000 (22:52 -0500)]
vold: add support for more filesystems for public storage

* Add exfat and ntfs support based off f2fs and ported to use
  fuse
* Add support for both along with f2fs and ext4 to PublicVolume
* Also attempt to mount any volume if it's been determined that
  the kernel supports it

Change-Id: I0a83761cefd97791e3ec84a18e199dfd27a5ed0b

vold: fs: Fix build errors

* Migrate from base to android-base
* Add missing , in Ext4 Mount function

[AdrianDC] Ignore unpatched ext4 arguments

Change-Id: I875b5763c472aa7da2976ec7c5db7cf28c913876

Change-Id: I0a83761cefd97791e3ec84a18e199dfd27a5ed0b

6 years agorelease-request-369362fc-cc6c-4cb1-95c0-90b5ac7c52cb-for-git_oc-mr1-release-4288633...
android-build-team Robot [Sun, 20 Aug 2017 07:32:01 +0000 (07:32 +0000)]
release-request-369362fc-cc6c-4cb1-95c0-90b5ac7c52cb-for-git_oc-mr1-release-4288633 snap-temp-L81700000095141745

Change-Id: I2b66a50873ab1232d02a72093f8ee3246f6d7dac

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.

bug: 64833901
Test: test reboot
Fixes: a5bbb5e3c13d ("make shutdown safe for double calls.")
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
(cherry picked from commit d263da88076f5299e6202f8b388eab79f6fdd495)

Change-Id: I636b28f30fb82e4672d88144cd04072d24ef3b85

6 years agorelease-request-e73a0a41-91c3-4249-808e-8d196d54a344-for-git_oc-mr1-release-4273744...
android-build-team Robot [Tue, 15 Aug 2017 07:31:44 +0000 (07:31 +0000)]
release-request-e73a0a41-91c3-4249-808e-8d196d54a344-for-git_oc-mr1-release-4273744 snap-temp-L04700000093069831

Change-Id: I458c60195c2afb009de27c48f4793b0b4e355ffc

6 years agoZero memory used for encryuption keys.
Pavel Grafov [Tue, 1 Aug 2017 16:15:53 +0000 (17:15 +0100)]
Zero memory used for encryuption keys.

std::vector with custom zeroing allocator is used instead of
std::string for data that can contain encryption keys.

Bug: 64201177
Test: manually created a managed profile, changed it's credentials
Test: manually upgraded a phone with profile from O to MR1.
Change-Id: Ic31877049f69eba9f8ea64fd99acaaca5a01d3dd

6 years agorelease-request-d642586e-3e25-49f4-8b4c-acad0e3f63d8-for-git_oc-mr1-release-4249777...
android-build-team Robot [Sun, 6 Aug 2017 07:28:46 +0000 (07:28 +0000)]
release-request-d642586e-3e25-49f4-8b4c-acad0e3f63d8-for-git_oc-mr1-release-4249777 snap-temp-L81500000089724408

Change-Id: Id337b6c2c8fc8f38b0aaae21216262c70a7f0bf0

6 years agoMerge "Add noatime to vfat and exfat" into oc-mr1-dev
TreeHugger Robot [Fri, 4 Aug 2017 04:24:57 +0000 (04:24 +0000)]
Merge "Add noatime to vfat and exfat" into oc-mr1-dev

6 years agodo not sleep if it is shutting down
Keun-young Park [Thu, 3 Aug 2017 18:24:04 +0000 (18:24 +0000)]
do not sleep if it is shutting down
am: 375ac25773

Change-Id: I576040b0068c27b9c7abd880e390841ce80f9906

6 years agodo not sleep if it is shutting down
Keun-young Park [Thu, 3 Aug 2017 00:45:48 +0000 (17:45 -0700)]
do not sleep if it is shutting down

- Various sleep(5) for vold shutdown can increase shutdown time a lot.
- If it is shutting down, do not sleep at all. init will take care of
  active partitions if not unmounted.

bug: 64143519
Test: reboot and check logs from vold, check if "ShutdownThread: Shutdown wait timed out" happens.
Change-Id: I7cb91427ad2205fe23a054d255caf7ffdfd9f6c3

6 years agoAdd noatime to vfat and exfat
Ravisankar Reddy [Mon, 3 Jul 2017 02:25:33 +0000 (11:25 +0900)]
Add noatime to vfat and exfat

testNoAtime is new cts testcase, which verifies all writable
block filesystems are mounted "noatime" toavoid unnecessary
flash churn. So add noatime for vfat.

Bug: 64137815
Test: run cts -m m CtsOsTestCases -t android.os.cts.EnvironmentTest#testNoAtime
Change-Id: I4f42b54ed0d66e09964351da26d0d3bf38d573d6

6 years agoDrop inode and page caches after evicting CE key.
Pavel Grafov [Thu, 27 Jul 2017 16:34:57 +0000 (17:34 +0100)]
Drop inode and page caches after evicting CE key.

Bug: 63257991
Test: Turning work profile off and attempting to read profile files.
Change-Id: I36f8ae9a8894f88950f50aed4a06645fab7e998b

6 years agorelease-request-e04bb055-13fc-41a1-8a9f-7fb10894ec3d-for-git_oc-mr1-release-4189380...
android-build-team Robot [Tue, 18 Jul 2017 07:34:49 +0000 (07:34 +0000)]
release-request-e04bb055-13fc-41a1-8a9f-7fb10894ec3d-for-git_oc-mr1-release-4189380 snap-temp-L90600000083186678

Change-Id: I0894100af445764e9b6872df862290ce6123b274

6 years agoOnly enable quotas when supported by device.
Jeff Sharkey [Mon, 17 Jul 2017 19:57:18 +0000 (13:57 -0600)]
Only enable quotas when supported by device.

Otherwise we might end up creating ext4 partitions that the device
can't mount.

Bug: 63763609
Test: builds, boots
Exempt-From-Owner-Approval: Bug 63673347
Change-Id: I5f6cf73f23a55bc0dea9480523f19049313c3dd1

6 years agorelease-request-05263112-375a-4b1f-a657-a14bb2a5c5a3-for-git_oc-mr1-release-4185249...
android-build-team Robot [Sun, 16 Jul 2017 07:30:17 +0000 (07:30 +0000)]
release-request-05263112-375a-4b1f-a657-a14bb2a5c5a3-for-git_oc-mr1-release-4185249 snap-temp-L63000000082739046

Change-Id: I52b62718c4ca52b2e19c198088c3e025d00e0098

6 years agoMerge "Check if sdcard daemon exited."
TreeHugger Robot [Thu, 13 Jul 2017 21:05:07 +0000 (21:05 +0000)]
Merge "Check if sdcard daemon exited."

6 years agoMerge "Try SO_RCVBUF before SO_RCVBUFFORCE." am: 3f8fa0c215 am: dfcc7dbad0 am: 602a2ce0e0
Junichi Uekawa [Thu, 13 Jul 2017 20:45:56 +0000 (20:45 +0000)]
Merge "Try SO_RCVBUF before SO_RCVBUFFORCE." am: 3f8fa0c215 am: dfcc7dbad0 am: 602a2ce0e0
am: 189527f13f

Change-Id: Ie4cdfd04c1acf48c802b233eb34b2417c859ae04

6 years agoMerge "Try SO_RCVBUF before SO_RCVBUFFORCE." am: 3f8fa0c215 am: dfcc7dbad0
Junichi Uekawa [Thu, 13 Jul 2017 20:37:17 +0000 (20:37 +0000)]
Merge "Try SO_RCVBUF before SO_RCVBUFFORCE." am: 3f8fa0c215 am: dfcc7dbad0
am: 602a2ce0e0

Change-Id: I4d4946552edb444f4a3a7ea333f272a7408ec260

6 years agoMerge "Try SO_RCVBUF before SO_RCVBUFFORCE." am: 3f8fa0c215
Junichi Uekawa [Thu, 13 Jul 2017 20:34:46 +0000 (20:34 +0000)]
Merge "Try SO_RCVBUF before SO_RCVBUFFORCE." am: 3f8fa0c215
am: dfcc7dbad0

Change-Id: I742ebc5174d809fa6f70324659f6e03798710679

6 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

6 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."

6 years agoCheck if sdcard daemon exited.
Daniel Rosenberg [Wed, 12 Jul 2017 00:59:55 +0000 (17:59 -0700)]
Check if sdcard daemon exited.

If the system is using sdcardfs, the sdcard daemon exits after mounting.
If it's using FUSE, the sdcard daemon runs until we go to unmount.

Bug: 37638548
Test: Run "adb shell ps | grep -w Z" with sdcardfs enabled.
      The sdcard daemon should not be listed.
      Run again with sdcardfs disabled. The daemon should be
      running, and vold should not be stuck waiting on it.
Change-Id: I930d22b35194ec99e7a6a4a022a04d36f4f39a34

6 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)

6 years agoadd vold to "shutdown critical" am: 85f412b4ee
Keun-young Park [Thu, 6 Jul 2017 17:24:53 +0000 (17:24 +0000)]
add vold to "shutdown critical" am: 85f412b4ee
am: 4f58be1b69

Change-Id: I05a8c1ddb479e4e7527ef5d593a75f6a5992a5ad

6 years agoadd vold to "shutdown critical"
Keun-young Park [Thu, 6 Jul 2017 17:22:35 +0000 (17:22 +0000)]
add vold to "shutdown critical"
am: 85f412b4ee

Change-Id: Ib346b39be455571656c4732d2ad63b3edbe1e0cd

6 years agorelease-request-60f1fc0d-1c6d-400a-8b4e-444f1452f036-for-git_oc-mr1-release-4157261...
android-build-team Robot [Thu, 6 Jul 2017 07:31:25 +0000 (07:31 +0000)]
release-request-60f1fc0d-1c6d-400a-8b4e-444f1452f036-for-git_oc-mr1-release-4157261 snap-temp-L11100000079944679

Change-Id: Ia965fb76d8ac6cb2577647c14fe26cbcc7cd6cdd

6 years agoMerge "Merge "Merge "add vold to "shutdown critical"" am: da85cb71b3 am: 228b95fa15...
Android Build Merger (Role) [Thu, 6 Jul 2017 01:40:02 +0000 (01:40 +0000)]
Merge "Merge "Merge "add vold to "shutdown critical"" am: da85cb71b3 am: 228b95fa15 am: 733fe09928" into oc-dr1-dev-plus-aosp am: f39281b68c"

6 years agoMerge "Merge "Merge "add vold to "shutdown critical"" am: da85cb71b3 am: 228b95fa15...
Android Build Merger (Role) [Thu, 6 Jul 2017 01:39:56 +0000 (01:39 +0000)]
Merge "Merge "Merge "add vold to "shutdown critical"" am: da85cb71b3 am: 228b95fa15 am: 733fe09928" into oc-dr1-dev-plus-aosp am: f39281b68c"

6 years agoMerge "Merge "add vold to "shutdown critical"" am: da85cb71b3 am: 228b95fa15 am:...
Keun-young Park [Thu, 6 Jul 2017 01:39:32 +0000 (01:39 +0000)]
Merge "Merge "add vold to "shutdown critical"" am: da85cb71b3 am: 228b95fa15 am: 733fe09928" into oc-dr1-dev-plus-aosp
am: f39281b68c

Change-Id: I142be6c019cd9a3f8f212a2bbc97842cd04cf6eb

6 years agoMerge "Merge "add vold to "shutdown critical"" am: da85cb71b3 am: 228b95fa15 am:...
Keun-young Park [Thu, 6 Jul 2017 01:39:27 +0000 (01:39 +0000)]
Merge "Merge "add vold to "shutdown critical"" am: da85cb71b3 am: 228b95fa15 am: 733fe09928" into oc-dr1-dev-plus-aosp
am: f39281b68c

Change-Id: If9b0ee31633ae73ad9257ee6035bdb1bd3c3d861

6 years agoMerge "Merge "add vold to "shutdown critical"" am: da85cb71b3 am: 228b95fa15 am:...
Android Build Merger (Role) [Thu, 6 Jul 2017 01:38:55 +0000 (01:38 +0000)]
Merge "Merge "add vold to "shutdown critical"" am: da85cb71b3 am: 228b95fa15 am: 733fe09928 am: 9045c86a32"

6 years agoMerge "add vold to "shutdown critical"" am: da85cb71b3 am: 228b95fa15 am: 733fe09928
Keun-young Park [Thu, 6 Jul 2017 01:38:24 +0000 (01:38 +0000)]
Merge "add vold to "shutdown critical"" am: da85cb71b3 am: 228b95fa15 am: 733fe09928
am: 9045c86a32

Change-Id: I5440cec7c057e5bc5e40886fcedd1a4814fd063a

6 years agoMerge "add vold to "shutdown critical"" am: da85cb71b3 am: 228b95fa15 am: 733fe09928
Keun-young Park [Thu, 6 Jul 2017 01:38:18 +0000 (01:38 +0000)]
Merge "add vold to "shutdown critical"" am: da85cb71b3 am: 228b95fa15 am: 733fe09928
am: 9045c86a32

Change-Id: Ifa4795f87e6de808cbbf4e238d8a0a938ad1f8b9

6 years agoMerge "Merge "add vold to "shutdown critical"" am: da85cb71b3 am: 228b95fa15 am:...
Android Build Merger (Role) [Thu, 6 Jul 2017 01:14:00 +0000 (01:14 +0000)]
Merge "Merge "add vold to "shutdown critical"" am: da85cb71b3 am: 228b95fa15 am: 733fe09928" into oc-dr1-dev-plus-aosp

6 years agoMerge "add vold to "shutdown critical"" am: da85cb71b3 am: 228b95fa15
Keun-young Park [Thu, 6 Jul 2017 01:13:30 +0000 (01:13 +0000)]
Merge "add vold to "shutdown critical"" am: da85cb71b3 am: 228b95fa15
am: 733fe09928

Change-Id: I123056823f31b7e8d0ad3a6ae7775867d3dd0edb

6 years agoMerge "add vold to "shutdown critical"" am: da85cb71b3 am: 228b95fa15
Keun-young Park [Thu, 6 Jul 2017 01:13:21 +0000 (01:13 +0000)]
Merge "add vold to "shutdown critical"" am: da85cb71b3 am: 228b95fa15
am: 733fe09928

Change-Id: I760a1278d3138ca7a24ab69613466c83615f067d

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

Change-Id: I0de967657d969f54dedddbb2b72ab07ed650e2e3

6 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

(cherry picked from commit 41156c5035efb4aa5212963ac028b7889feda3f8)

Change-Id: I363dbbe58d2cb46b521ebdcea85c507679f27206

6 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

6 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""

6 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

6 years agoresolve merge conflicts of 8e6f6a5 to oc-dr1-dev-plus-aosp
Paul Crowley [Thu, 29 Jun 2017 01:20:07 +0000 (01:20 +0000)]
resolve merge conflicts of 8e6f6a5 to oc-dr1-dev-plus-aosp
am: 071120776a

Change-Id: Ifaa55b09cf0251cf994b8870169cf69e430b91ba

6 years agoresolve merge conflicts of 8e6f6a5 to oc-dr1-dev-plus-aosp
Paul Crowley [Wed, 28 Jun 2017 23:08:04 +0000 (16:08 -0700)]
resolve merge conflicts of 8e6f6a5 to oc-dr1-dev-plus-aosp

Test: None
Change-Id: Icf7654b3200a4afd104f31aff8ce5b09867b7182

6 years agoresolve merge conflicts of 4ad7784 to stage-aosp-master
Paul Crowley [Wed, 28 Jun 2017 22:45:50 +0000 (22:45 +0000)]
resolve merge conflicts of 4ad7784 to stage-aosp-master
am: ddb542f574

Change-Id: Iedef223a14b8a0c8dc558440b429a33d6b23f948

6 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

6 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"

6 years agorelease-request-6db00e04-e62d-4e43-807a-a9cc1185dcbb-for-git_oc-mr1-release-4136929...
android-build-team Robot [Tue, 27 Jun 2017 07:32:05 +0000 (07:32 +0000)]
release-request-6db00e04-e62d-4e43-807a-a9cc1185dcbb-for-git_oc-mr1-release-4136929 snap-temp-L91700000077883673

Change-Id: Id235d31c0ce6e7ca1fbb0fddcbdf74b2e2201fb4

6 years agoMerge "Fully switch to mke2fs; set policies everywhere."
TreeHugger Robot [Tue, 27 Jun 2017 02:10:57 +0000 (02:10 +0000)]
Merge "Fully switch to mke2fs; set policies everywhere."

6 years agoMerge "Label keys with all the possible FBE prefixes that might apply"
TreeHugger Robot [Tue, 27 Jun 2017 00:50:30 +0000 (00:50 +0000)]
Merge "Label keys with all the possible FBE prefixes that might apply"

6 years agoFully switch to mke2fs; set policies everywhere.
Jeff Sharkey [Mon, 26 Jun 2017 22:09:11 +0000 (16:09 -0600)]
Fully switch to mke2fs; set policies everywhere.

Older make_ext4fs doesn't support enabling quotas, so switch everyone
over to using mke2fs for adoptable storage.

Remove UUID check so that we start setting ext4-crypto policies on
adoptable storage devices; a future change will handle the actual
key management.

Bug: 3023065536757864
Test: cts-tradefed run commandAndExit cts-dev --abi armeabi-v7a -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.AdoptableHostTest
Change-Id: I021f85b1be8431044c239521c37be96534682746

6 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

6 years agoProgress towards FBE and adoptable storage.
Jeff Sharkey [Wed, 21 Jun 2017 19:52:23 +0000 (13:52 -0600)]
Progress towards FBE and adoptable storage.

Offer to adopt storage devices on FBE devices, but keep it guarded
behind a system property for now, since we still need to work out key
storage details.

When migrating shared storage, leave user-specific /data/media
directories in place, since they already have the needed crypto
policies defined.

Enable journaling, quotas, and encrypt options when formatting
newly adopted devices.  installd already gracefully handles older
partitions without quota enabled.

Test: cts-tradefed run commandAndExit cts-dev --abi armeabi-v7a -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.AdoptableHostTest
Bug: 62290006367578642911706237395736
Bug: 29923055258617553023065537436961
Change-Id: Ibbeb6ec9db2394a279bbac221a2b20711d65494e

6 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.

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