OSDN Git Service

android-x86/system-vold.git
3 years agovold3: fix SDCARD=xxx function for nvme pie-x86
youling257 [Mon, 14 Dec 2020 04:57:49 +0000 (12:57 +0800)]
vold3: fix SDCARD=xxx function for nvme

3 years agovold: Add nvme disk support
Dmitry Shmidt [Sat, 12 May 2018 00:22:42 +0000 (17:22 -0700)]
vold: Add nvme disk support

Bug: 77482940
Test: Manual

Change-Id: Id0e7b3a0aa2083276109b0b2c9d1bcb81852582f
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
3 years agoAllow mounting a read-only exFAT file system
Chih-Wei Huang [Mon, 1 Jun 2020 11:30:29 +0000 (19:30 +0800)]
Allow mounting a read-only exFAT file system

If exfat::Check() fails, re-check the file system in read-only mode.
The logic is similar to exfat::Mount().

4 years agoSupport mounting exfat via fuse
Chih-Wei Huang [Mon, 4 May 2020 16:49:35 +0000 (00:49 +0800)]
Support mounting exfat via fuse

4 years agoMerge tag 'android-9.0.0_r48' into pie-x86 android-x86-9.0-r1 android-x86-9.0-r2
Chih-Wei Huang [Fri, 20 Sep 2019 06:12:58 +0000 (14:12 +0800)]
Merge tag 'android-9.0.0_r48' into pie-x86

Android 9.0.0 release 48

5 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

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

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

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

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

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

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

5 years agoMerge tag 'android-9.0.0_r34' into pie-x86
Chih-Wei Huang [Wed, 20 Mar 2019 06:39:41 +0000 (14:39 +0800)]
Merge tag 'android-9.0.0_r34' into pie-x86

Android 9.0.0 Release 34 (PQ2A.190305.002)

5 years agoMerge tag 'android-9.0.0_r21' into lineage-16.0-android-9.0.0_r21
Luca Stefani [Tue, 4 Dec 2018 14:26:26 +0000 (15:26 +0100)]
Merge tag 'android-9.0.0_r21' into lineage-16.0-android-9.0.0_r21

Android 9.0.0 release 21

* tag 'android-9.0.0_r21':
  [DO NOT MERGE] Fix signedness mismatch and integer underflow

Change-Id: I6fd3008afbf848d3e4df1396201a061f0bc3087a

5 years agoMerge tag 'android-9.0.0_r16' into lineage-16.0
Luca Stefani [Tue, 13 Nov 2018 20:52:18 +0000 (21:52 +0100)]
Merge tag 'android-9.0.0_r16' into lineage-16.0

Android 9.0.0 Release 16 (PQ1A.181105.017.A1)

* tag 'android-9.0.0_r16':
  cryptfs: Remove Speck support
  vold: meta encryption: fix /dev/block/by-name/userdata to dm-3

Change-Id: I991c4f73a2c7f890fb7444aa9d7eaacefc983f64

5 years agoSwitch pattern/PIN constants to match values in cryptfs.h
Paul Crowley [Tue, 3 Jul 2018 18:49:00 +0000 (11:49 -0700)]
Switch pattern/PIN constants to match values in cryptfs.h

Bug: 111051602
Test: Steps to reproduce in b/111051602
Change-Id: I21955f41d2594917d5baa1bc4d61da0106cd9170

5 years agoMerge cherrypicks of [5317808, 5317809, 5318498, 5317873, 5318338, 5318195, 5318499...
android-build-team Robot [Sat, 20 Oct 2018 00:21:03 +0000 (00:21 +0000)]
Merge cherrypicks of [531780853178095318498531787353183385318195531849953178745317875531787653182435318244531853753185385318539531854053185415318542531854353185445318545531854653152105317756531855753185585318559531856053185615318339531854753185485318549531856253185635318564531856553185665318172531817353181745318550531840153181965317889531817553181765318577531857853185795318580531858153185035318390531850553183415318551] into pi-qpr1-release

Change-Id: Ia6434abde93ea6328659f8f08c3d5dbe4e69291d

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 agoSnap for 5066295 from 74b92dc85f060d2bd88246c8e187ad3ae8e8b8d1 to pi-qpr2-release
android-build-team Robot [Fri, 12 Oct 2018 22:51:12 +0000 (22:51 +0000)]
Snap for 5066295 from 74b92dc85f060d2bd88246c8e187ad3ae8e8b8d1 to pi-qpr2-release

Change-Id: I4408d15c38595eb7903e4a7544da0a4586a743a9

5 years ago[automerger skipped] Merge "[DO NOT MERGE] Fix signedness mismatch and integer underf...
Rubin Xu [Thu, 11 Oct 2018 23:24:06 +0000 (16:24 -0700)]
[automerger skipped] Merge "[DO NOT MERGE] Fix signedness mismatch and integer underflow" into oc-dev am: 92e63e3f9b am: b1498d1d87
am: 89858102c2  -s ours

Change-Id: Idf0858840a8472059899bfd565e4182c2c210693

5 years ago[automerger skipped] [automerger] [DO NOT MERGE] Fix signedness mismatch and integer...
Rubin Xu [Thu, 11 Oct 2018 23:23:55 +0000 (16:23 -0700)]
[automerger skipped] [automerger] [DO NOT MERGE] Fix signedness mismatch and integer underflow am: ef35553d53 am: 08bd47e9a9 am: 279cc3d65e am: 972b5551f6 skipped: ded6cb5910 am: 0d2edbd6ab am: b078fd6b8c
am: 6460a0149b  -s ours

Change-Id: Ie581371ca539f2513758529dad38dca903b8dac9

5 years agoMerge "[DO NOT MERGE] Fix signedness mismatch and integer underflow" into oc-dev...
Rubin Xu [Thu, 11 Oct 2018 23:16:03 +0000 (16:16 -0700)]
Merge "[DO NOT MERGE] Fix signedness mismatch and integer underflow" into oc-dev am: 92e63e3f9b
am: b1498d1d87

Change-Id: Ic7ef94c42d54d4f29c92bad98001bd6e065f5013

5 years ago[automerger] [DO NOT MERGE] Fix signedness mismatch and integer underflow am: ef35553...
Rubin Xu [Thu, 11 Oct 2018 23:15:48 +0000 (16:15 -0700)]
[automerger] [DO NOT MERGE] Fix signedness mismatch and integer underflow am: ef35553d53 am: 08bd47e9a9 am: 279cc3d65e am: 972b5551f6 skipped: ded6cb5910 am: 0d2edbd6ab
am: b078fd6b8c

Change-Id: I163ea50aca6838abcf0c58e042a5fe386f661afe

5 years agoMerge "[DO NOT MERGE] Fix signedness mismatch and integer underflow" into oc-dev
Rubin Xu [Thu, 11 Oct 2018 23:10:57 +0000 (16:10 -0700)]
Merge "[DO NOT MERGE] Fix signedness mismatch and integer underflow" into oc-dev
am: 92e63e3f9b

Change-Id: Ia169a9fc152f100a9567f2c47ef5a2e46358aa52

5 years ago[automerger] [DO NOT MERGE] Fix signedness mismatch and integer underflow am: ef35553...
Rubin Xu [Thu, 11 Oct 2018 23:10:41 +0000 (16:10 -0700)]
[automerger] [DO NOT MERGE] Fix signedness mismatch and integer underflow am: ef35553d53 am: 08bd47e9a9 am: 279cc3d65e am: 972b5551f6 skipped: ded6cb5910
am: 0d2edbd6ab

Change-Id: I5f5e7425c927bdc6de7b401995fccc1f626355c7

5 years agoMerge "[DO NOT MERGE] Fix signedness mismatch and integer underflow" into oc-dev
TreeHugger Robot [Thu, 11 Oct 2018 23:01:50 +0000 (23:01 +0000)]
Merge "[DO NOT MERGE] Fix signedness mismatch and integer underflow" into oc-dev

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

5 years ago[automerger] [DO NOT MERGE] Fix signedness mismatch and integer underflow am: ef35553...
Android Build Merger (Role) [Wed, 10 Oct 2018 10:26:09 +0000 (10:26 +0000)]
[automerger] [DO NOT MERGE] Fix signedness mismatch and integer underflow am: ef35553d53 am: 08bd47e9a9 am: 279cc3d65e am: 972b5551f6 skipped: ded6cb5910

Change-Id: I4a1b7a1509d00fba8e35755d2fb198c47e9f3999

5 years ago[automerger] [DO NOT MERGE] Fix signedness mismatch and integer underflow am: ef35553...
Android Build Merger (Role) [Wed, 10 Oct 2018 10:26:07 +0000 (10:26 +0000)]
[automerger] [DO NOT MERGE] Fix signedness mismatch and integer underflow am: ef35553d53 am: 08bd47e9a9 am: 279cc3d65e am: 972b5551f6

Change-Id: I878947630e3cec949dbfa361a379637a30d67a1d

5 years ago[automerger] [DO NOT MERGE] Fix signedness mismatch and integer underflow am: ef35553...
Android Build Merger (Role) [Wed, 10 Oct 2018 10:26:06 +0000 (10:26 +0000)]
[automerger] [DO NOT MERGE] Fix signedness mismatch and integer underflow am: ef35553d53 am: 08bd47e9a9 am: 279cc3d65e

Change-Id: If379e03d3998c1267bc66f53b308ea28bcd4c128

5 years ago[automerger] [DO NOT MERGE] Fix signedness mismatch and integer underflow am: ef35553...
Android Build Merger (Role) [Wed, 10 Oct 2018 10:26:04 +0000 (10:26 +0000)]
[automerger] [DO NOT MERGE] Fix signedness mismatch and integer underflow am: ef35553d53 am: 08bd47e9a9

Change-Id: Ie536c5dd8c447cd3753725040edbec7ce478ea07

5 years ago[automerger] [DO NOT MERGE] Fix signedness mismatch and integer underflow am: ef35553d53
Android Build Merger (Role) [Wed, 10 Oct 2018 10:26:02 +0000 (10:26 +0000)]
[automerger] [DO NOT MERGE] Fix signedness mismatch and integer underflow am: ef35553d53

Change-Id: I094ac59296a118fbacc70b4ead1230b4d8683fa2

5 years ago[DO NOT MERGE] Fix signedness mismatch and integer underflow
Rubin Xu [Tue, 9 Oct 2018 15:05:39 +0000 (16:05 +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

5 years agoMerge tag 'android-9.0.0_r10' into lineage-16.0-android-9.0.0_r10
Luca Stefani [Sun, 7 Oct 2018 09:00:43 +0000 (11:00 +0200)]
Merge tag 'android-9.0.0_r10' into lineage-16.0-android-9.0.0_r10

Android 9.0.0 release 10

* tag 'android-9.0.0_r10':
  cryptfs: Remove Speck support

Change-Id: If063378db5ab807d80f51c726a2c45d663711055

5 years agosecdiscard: should pin_file to avoid moving blocks in F2FS
Jaegeuk Kim [Thu, 2 Aug 2018 19:41:45 +0000 (12:41 -0700)]
secdiscard: should pin_file to avoid moving blocks in F2FS

This file should avoid F2FS GC, since it directly access block device based
on fibmap.

Bug: 111659036
Change-Id: I15aef8175c23ba4029eb580e2dba59c77cca8227
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
5 years agovold: Also wait for dm device when mounting private volume
LuK1337 [Wed, 14 Mar 2018 13:16:08 +0000 (14:16 +0100)]
vold: Also wait for dm device when mounting private volume

* Fixes issue where sometimes adopted storage doesn't
  get mounted on certain devices.

Change-Id: I195bbdd4541bf1e8f373ab8ef18f5e7caefab3f5

5 years agovold: Make sure block device exists before formatting it
LuK1337 [Tue, 6 Mar 2018 10:31:14 +0000 (11:31 +0100)]
vold: Make sure block device exists before formatting it

* This fixes race condition where dm-1 doesn't exist
  when doFormat() is being executed on some devices
  while formatting them to use with adopted storage.

Change-Id: I1297025900a988141717b81b9d0fcca7197955bd

5 years agovold: Accept Linux GPT partitions on external SD cards
lambdadroid [Sat, 6 Jan 2018 13:48:44 +0000 (14:48 +0100)]
vold: Accept Linux GPT partitions on external SD cards

ext4/f2fs partitions are usually created using the Linux partition
type on GUID partition tables, which is not recognized by vold.

Add the Linux partition type GUID to vold so ext4/f2fs partitions
on external SD cards with GPT are detected correctly.

Change-Id: I5e3947bb6b086eec4e5aa8a4825aaa93b7e9d99d

5 years agovold: Allow reset after shutdown
Steve Kondik [Thu, 28 Jul 2016 01:12:04 +0000 (18:12 -0700)]
vold: Allow reset after shutdown

 * If we shutdown all volumes (during crypto), vold throws up an
   assert at us when reset() is called due to destroying an
   already destroyed volume. This is actually fine, just return
   an error instead of crashing.

Change-Id: I51f8561da83e27de8e80d74f3a600fb0139d3035

5 years agovold: skip first disk change when converting MBR to GPT
Scott Mertz [Thu, 31 Mar 2016 20:09:56 +0000 (13:09 -0700)]
vold: skip first disk change when converting MBR to GPT

When converting a public (MBR) partition to private (GPT) partition,
'sgdisk --zap-all <path>' triggers a disk change netlink event
when converting from MBR to GPT.  Then, 'sgdisk --new=....' triggers
another disk change netlink event.

vold informs clients a new volume is created after the first disk
change event occurs.  system server reacts by requesting to mount
the volume.  If this request is honored before the second disk change
event, the volume will be unmounted immediately after system server's
request to mount is honored.  The next time system server performs
an operation (createnewuser) on this volume, it will fail due to
the volume being unmounted.

This is reproduced by running the following commands in a loop:

adb shell sm partition <disk> private
adb shell sm partition <disk> public
adb shell sm forget all

OR

run cts -c com.android.cts.appsecurity.AdoptableHostTest -m testPackageInstaller

This change causes vold to delay notifying clients that the volume is
ready until after it's actually partitioned.

CYNGNOS-2283
Change-Id: I457cc1508573d73ef2be2f0cfdc5c2237bfabad7

5 years agoTreat removable UFS card as SD card
Subhash Jadavani [Thu, 6 Jul 2017 22:53:24 +0000 (15:53 -0700)]
Treat removable UFS card as SD card

Removable UFS cards are alternative to SD cards and they are detected as
SCSI block devices. Currently these cards shows up "USB disk" as we
consider anything other than SD card as USB disks. As both UFS cards
and USB disks are SCSI block devices, we can't differentiate between
USB disks and UFS cards by MAJOR number of block device. This change
looks for "ufs" string in DEVPATH parameter of uevent to detect if it
is UFS card or not and treat it as SD card.

Change-Id: I88534190d0610ced515c8c3e53aaae1a49480fbf

5 years agoFix the group permissions of the sdcard root.
Jani Lusikka [Fri, 25 Mar 2016 18:12:15 +0000 (20:12 +0200)]
Fix the group permissions of the sdcard root.

If the root is not writable, we cannot create new files or folders there.

Change-Id: I3edad81f105bbeabc9dcd1f5322acea6fbfc63bb

5 years agovold ext4/f2fs: do not use dirsync if we're mounting adopted storage
Sam Mortimer [Fri, 27 Nov 2015 23:27:03 +0000 (15:27 -0800)]
vold ext4/f2fs: do not use dirsync if we're mounting adopted storage

Change-Id: I6f8ca75385c2d4080b1430c0b6545b61e6632e2c

Fix mounting ext4 adopted storage

Change-Id: I36cb858b96968a949632017874addb278679b3a4

5 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

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

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

This is trivially extensible for other fs types.

[mikeioannina] Adapt for Pie

Change-Id: Ie5dd27f26a4a7129dd9efe6a7ad0a589928282a0

5 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>
[mikeioannina] Adapt for Pie

Change-Id: Id7ec3ea409b5c96e691730604e4b1e9cc3aa9d33

5 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

Change-Id: I0a6ee9aea907bae9ed097b920df0559df7b45d7d

5 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
[mikeioannina] Update for Pie native exfat

Change-Id: I875b5763c472aa7da2976ec7c5db7cf28c913876

vold: ntfs: Use strlcat

Clang now enforces length checking :/

Change-Id: I495b4cb2ee530e72b1084248f0549d63589523b0

Change-Id: I0a83761cefd97791e3ec84a18e199dfd27a5ed0b

5 years agoMerge changes from topic "from-pi-gsi" into pie-gsi
Treehugger Robot [Mon, 10 Sep 2018 11:15:01 +0000 (11:15 +0000)]
Merge changes from topic "from-pi-gsi" into pie-gsi

* changes:
  vold: Grant root group
  Do not unmount /mnt/product/* when vold starts

5 years agovold: Grant root group
Jaegeuk Kim [Tue, 7 Aug 2018 19:31:05 +0000 (12:31 -0700)]
vold: Grant root group

When using make_f2fs to format a filesystem with quota enabled, make_f2fs
will write quota record with group id equtal to make_f2fs's execution
group id.
Vold shall run as root group so that make_f2fs forked by vold will enherit
vold's root group. Make_f2fs can then write quota record with group id for
root group and therefore kernel quota driver can find quota record for
root group.

Bug: 111775499
Change-Id: I0c1fef760597d1695586d24365200b25e2cf07e6
Merged-In: I0c1fef760597d1695586d24365200b25e2cf07e6
Signed-off-by: Light Hsieh <light.hsieh@mediatek.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
(cherry picked from commit c0eea5736e40eb26a2f88014f73929d84ea7c6b6)

5 years agoDo not unmount /mnt/product/* when vold starts
Bowgo Tsai [Fri, 29 Jun 2018 02:31:07 +0000 (10:31 +0800)]
Do not unmount /mnt/product/* when vold starts

Bug: 110808288
Test: Boot a device and checks /mnt/product/foo mounted in early mount
      isn't unmounted.

Change-Id: Ide411cd78565505bc72ed57e79f3d31b6392b27c
Merged-In: Ide411cd78565505bc72ed57e79f3d31b6392b27c
(cherry picked from commit c0cd37be9dd66d5fe7448389a71ee21f60e876e1)

5 years agoMerge cherrypicks of [4793640, 4793602, 4793603, 4793660, 4793604, 4793680, 4793681...
android-build-team Robot [Thu, 16 Aug 2018 16:41:06 +0000 (16:41 +0000)]
Merge cherrypicks of [47936404793602479360347936604793604479368047936814793581479358247936254793626479362747936284793700479370147937024793703479370447937054793661479372047937214793722479372347937244793725479372647937274793728479358347937404793760479366247937804793729] into pi-release-2

Change-Id: I665794d270556b24de04163aad6fd27dc2fcc4a5

5 years agocryptfs: Remove Speck support
Greg Kaiser [Wed, 1 Aug 2018 20:15:19 +0000 (13:15 -0700)]
cryptfs: Remove Speck support

Remove the Speck encryption support. It was eventually
decided not to allow Speck in Android P, so this code
is no longer needed and wasn't used outside of testing.

Note we don't just "git revert" the original commit
(38723f23ff521e95ed295f500e6529c52a994c9f) because we want
to retain the infrastructure for allowing new types of
crypto algorithms in the future.

Bug: 112009351
Test: Attempted to setup a device with ro.crypto.fde_algorithm set to Speck, and Speck was rejected and the system defaulted to AES.
Change-Id: I69a8b4e8632f8d30b5b54783cb986ab42d4397d9
(cherry picked from commit 17059fe53b7f535886918d06fea58a90930862fc)

5 years agoSnap for 4939496 from 17059fe53b7f535886918d06fea58a90930862fc to pi-qpr1-release
android-build-team Robot [Wed, 8 Aug 2018 03:15:27 +0000 (03:15 +0000)]
Snap for 4939496 from 17059fe53b7f535886918d06fea58a90930862fc to pi-qpr1-release

Change-Id: Id8422a6cb43aa012ff53dd70a684b3b3c859ec51

5 years agocryptfs: Remove Speck support
Greg Kaiser [Wed, 1 Aug 2018 20:15:19 +0000 (13:15 -0700)]
cryptfs: Remove Speck support

Remove the Speck encryption support. It was eventually
decided not to allow Speck in Android P, so this code
is no longer needed and wasn't used outside of testing.

Note we don't just "git revert" the original commit
(38723f23ff521e95ed295f500e6529c52a994c9f) because we want
to retain the infrastructure for allowing new types of
crypto algorithms in the future.

Bug: 112009351
Test: Attempted to setup a device with ro.crypto.fde_algorithm set to Speck, and Speck was rejected and the system defaulted to AES.
Change-Id: I69a8b4e8632f8d30b5b54783cb986ab42d4397d9

5 years agoSnap for 4922203 from 31e962fe1970b12ec216cf3e376d126d082144a4 to pi-qpr1-release
android-build-team Robot [Tue, 31 Jul 2018 03:11:07 +0000 (03:11 +0000)]
Snap for 4922203 from 31e962fe1970b12ec216cf3e376d126d082144a4 to pi-qpr1-release

Change-Id: Ia64205e7135bcd0ced71c3e82fe59ffeb23d760a

5 years agovold: meta encryption: fix /dev/block/by-name/userdata to dm-3
Jaegeuk Kim [Sun, 29 Jul 2018 13:56:57 +0000 (06:56 -0700)]
vold: meta encryption: fix /dev/block/by-name/userdata to dm-3

This fixes F2FS GC failure in idle-maint.
07-28 18:25:54.838   603 11187 D vold    : idle maintenance started
07-28 18:25:54.846   603 11187 D vold    : Start GC on /sys/fs/f2fs/sda21
07-28 18:25:54.847   603 11187 W vold    : Set discard gralunarity failed on/sys/fs/f2fs/sda21: No such file or directory
07-28 18:25:54.847   603 11187 W vold    : Start GC failed on /sys/fs/f2fs/sda21: No such file or directory

Bug: 111953875
Change-Id: I1d10802121d5641cf9ba780fee249affd2cf6ffe
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
5 years agoSnap for 4818534 from 8e7c2624bb47ae3746f4bc82f1d591dd399cab06 to pi-release
android-build-team Robot [Sun, 3 Jun 2018 07:21:49 +0000 (07:21 +0000)]
Snap for 4818534 from 8e7c2624bb47ae3746f4bc82f1d591dd399cab06 to pi-release

Change-Id: Ide5bb29ab8692ee78e214908f62096c3e113af5f

5 years ago[automerger skipped] Merge commit '635193ab36302e5f65e99c7df2f256cfd37068c7' into...
Jeff Sharkey [Fri, 1 Jun 2018 22:57:36 +0000 (15:57 -0700)]
[automerger skipped] Merge commit '635193ab36302e5f65e99c7df2f256cfd37068c7' into am-b7f1a67b-2024-4274-aa7d-e88e8cceb407 am: 9a35ab6a4f am: f707f1bb88
am: 2b9a343319  -s ours

Change-Id: Ibdcc6722750cfe7cb394a52d21de8e73ecdfd650

5 years agoMerge commit '635193ab36302e5f65e99c7df2f256cfd37068c7' into am-b7f1a67b-2024-4274...
Jeff Sharkey [Fri, 1 Jun 2018 22:31:32 +0000 (15:31 -0700)]
Merge commit '635193ab36302e5f65e99c7df2f256cfd37068c7' into am-b7f1a67b-2024-4274-aa7d-e88e8cceb407 am: 9a35ab6a4f
am: f707f1bb88

Change-Id: I4d9e269f34cab043a7c437781187d9a47e0fa652

5 years agoMerge commit '635193ab36302e5f65e99c7df2f256cfd37068c7' into am-b7f1a67b-2024-4274...
Jeff Sharkey [Fri, 1 Jun 2018 22:19:33 +0000 (15:19 -0700)]
Merge commit '635193ab36302e5f65e99c7df2f256cfd37068c7' into am-b7f1a67b-2024-4274-aa7d-e88e8cceb407
am: 9a35ab6a4f

Change-Id: I273dc86e0b0580bef81e272a94043b269d7df402

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

5 years ago[automerger] Require quotes when searching for blkid keys. am: ee5c7318d7 am: 98bb129...
Android Build Merger (Role) [Fri, 1 Jun 2018 21:46:12 +0000 (21:46 +0000)]
[automerger] Require quotes when searching for blkid keys. am: ee5c7318d7 am: 98bb129cd3 am: 0c5a0d65c9 am: 7e51f8d0c4 am: 53fe89bbad am: 5716ee6d7a am: 4de0e883d0 am: a7946bf9c6

Change-Id: I831bc503b1fdcf5a6a0c31ac0ded46d301c410ef

5 years ago[automerger] Require quotes when searching for blkid keys. am: ee5c7318d7 am: 98bb129...
Android Build Merger (Role) [Fri, 1 Jun 2018 21:46:11 +0000 (21:46 +0000)]
[automerger] Require quotes when searching for blkid keys. am: ee5c7318d7 am: 98bb129cd3 am: 0c5a0d65c9 am: 7e51f8d0c4 am: 53fe89bbad am: 5716ee6d7a am: 4de0e883d0

Change-Id: I66ce047987d59d1344cd46e14e07ae0d3cb4bf9a

5 years ago[automerger] Require quotes when searching for blkid keys. am: ee5c7318d7 am: 98bb129...
Android Build Merger (Role) [Fri, 1 Jun 2018 21:46:09 +0000 (21:46 +0000)]
[automerger] Require quotes when searching for blkid keys. am: ee5c7318d7 am: 98bb129cd3 am: 0c5a0d65c9 am: 7e51f8d0c4 am: 53fe89bbad am: 5716ee6d7a

Change-Id: Icf5c0c0a0c4f4aec605182111dcedf16f5a4ab95

5 years ago[automerger] Require quotes when searching for blkid keys. am: ee5c7318d7 am: 98bb129...
Android Build Merger (Role) [Fri, 1 Jun 2018 21:46:08 +0000 (21:46 +0000)]
[automerger] Require quotes when searching for blkid keys. am: ee5c7318d7 am: 98bb129cd3 am: 0c5a0d65c9 am: 7e51f8d0c4 am: 53fe89bbad

Change-Id: I87042d7d1d7b2cf9baeb3f28fd9ab31e5f97f62a

5 years ago[automerger] Require quotes when searching for blkid keys. am: ee5c7318d7 am: 98bb129...
Android Build Merger (Role) [Fri, 1 Jun 2018 21:46:06 +0000 (21:46 +0000)]
[automerger] Require quotes when searching for blkid keys. am: ee5c7318d7 am: 98bb129cd3 am: 0c5a0d65c9 am: 7e51f8d0c4

Change-Id: I5f21e49be9c536e51dbaadde0bd53545dc8cbaae

5 years ago[automerger] Require quotes when searching for blkid keys. am: ee5c7318d7 am: 98bb129...
Android Build Merger (Role) [Fri, 1 Jun 2018 21:46:05 +0000 (21:46 +0000)]
[automerger] Require quotes when searching for blkid keys. am: ee5c7318d7 am: 98bb129cd3 am: 0c5a0d65c9

Change-Id: I585336447c06e09b499ad2656b731105f1ebc4c4

5 years ago[automerger] Require quotes when searching for blkid keys. am: ee5c7318d7 am: 98bb129cd3
Android Build Merger (Role) [Fri, 1 Jun 2018 21:46:04 +0000 (21:46 +0000)]
[automerger] Require quotes when searching for blkid keys. am: ee5c7318d7 am: 98bb129cd3

Change-Id: I91516dfd0a046aa2763df3c09ef6e8570d7f1b55

5 years ago[automerger] Require quotes when searching for blkid keys. am: ee5c7318d7
Android Build Merger (Role) [Fri, 1 Jun 2018 21:46:02 +0000 (21:46 +0000)]
[automerger] Require quotes when searching for blkid keys. am: ee5c7318d7

Change-Id: If8422cf170db4e05dbe4cf6c1ed4ebf8126b0c71

5 years agoRequire quotes when searching for blkid keys.
Jeff Sharkey [Fri, 1 Jun 2018 17:31:39 +0000 (11:31 -0600)]
Require quotes when searching for blkid keys.

In combination with a blkid change, this prevents the parsing logic
from getting confused by key names appearing inside values.  (The
blkid change suppresses any quotes that appear inside values.)

Bug: 80436257
Test: manual
Change-Id: I9480ef6eb78254b812c671950875d0b8918a27c6

5 years agoSnap for 4793185 from e763ed2aa3075a1fd699f09c06ba67dbfd946a6b to pi-release
android-build-team Robot [Sun, 20 May 2018 07:22:58 +0000 (07:22 +0000)]
Snap for 4793185 from e763ed2aa3075a1fd699f09c06ba67dbfd946a6b to pi-release

Change-Id: If756e11bbaf9d526a472fbbdf309520c3ef9695f

5 years agoExplain the rationale for not using StrongBox in vold.
Shawn Willden [Thu, 17 May 2018 21:24:56 +0000 (15:24 -0600)]
Explain the rationale for not using StrongBox in vold.

Bug: 77338527
Test:  Comment-only change.
Change-Id: I9f87e34854eabcc4c183553cf56a033970bb867e

5 years agoAdd rc file for wait_for_keymaster
Wei Wang [Tue, 15 May 2018 23:12:20 +0000 (16:12 -0700)]
Add rc file for wait_for_keymaster

Similar to update_verifier, define higher prio and use exec_start for
this binary.

Bug: 79492334
Test: Reboot test
Change-Id: I8d3133cabcc8d4cee8bdead310f2c18d8d07e9dd

5 years agoSnap for 4778776 from a229dac0e72d5e7296503137d4efcbdf37050df2 to pi-release
android-build-team Robot [Sun, 13 May 2018 07:25:09 +0000 (07:25 +0000)]
Snap for 4778776 from a229dac0e72d5e7296503137d4efcbdf37050df2 to pi-release

Change-Id: I343a17b8d7a69aace12031bc26c3888b21ae8356

5 years agoMerge "Do Keymaster HMAC key agreement in vold." into pi-dev
TreeHugger Robot [Fri, 11 May 2018 16:38:40 +0000 (16:38 +0000)]
Merge "Do Keymaster HMAC key agreement in vold." into pi-dev

5 years agoFix spurious error
Paul Crowley [Wed, 9 May 2018 20:01:16 +0000 (13:01 -0700)]
Fix spurious error

Bug: 79542247
Test: error no longer appears
Change-Id: I2cf91c8cd937b81041a47e4b64a882445a80eb0b

5 years agoMerge cherrypicks of [4036940, 4036941, 4036942, 4037115, 4037135] into pi-release
android-build-team Robot [Thu, 10 May 2018 14:53:46 +0000 (14:53 +0000)]
Merge cherrypicks of [40369404036941403694240371154037135] into pi-release

Change-Id: I78d051f65b582f6ca8e5a9eb565a1c2d7d4a6705

5 years agoadd wait_for_keymaster
Paul Crowley [Wed, 7 Feb 2018 22:41:26 +0000 (14:41 -0800)]
add wait_for_keymaster

Bug: 79228237
Test: boots with patch
Change-Id: I581bcd4c4dd92c5b7be70eb351ecba20225e1eee
(cherry picked from commit 8f82879901968d9793705eb1d06c9b32607ced13)

5 years agoDo Keymaster HMAC key agreement in vold.
Shawn Willden [Wed, 9 May 2018 14:12:10 +0000 (08:12 -0600)]
Do Keymaster HMAC key agreement in vold.

Bug: 79307225
Test: Boot
Change-Id: I6682e86076aa568907d94024ef175dbdede86557

5 years agoadd wait_for_keymaster
Paul Crowley [Wed, 7 Feb 2018 22:41:26 +0000 (14:41 -0800)]
add wait_for_keymaster

Bug: 79228237
Test: boots with patch
Change-Id: I581bcd4c4dd92c5b7be70eb351ecba20225e1eee

6 years agoSnap for 4736748 from 4a04cad4ec65dc9e069809e1756242e63ab18ff5 to pi-release
android-build-team Robot [Sun, 22 Apr 2018 07:22:02 +0000 (07:22 +0000)]
Snap for 4736748 from 4a04cad4ec65dc9e069809e1756242e63ab18ff5 to pi-release

Change-Id: Ifd2de532a5565bea18d42e5add7bb571dfe3a675

6 years agoMerge "vold: Idle-maint calls device GC" into pi-dev
TreeHugger Robot [Fri, 20 Apr 2018 23:42:04 +0000 (23:42 +0000)]
Merge "vold: Idle-maint calls device GC" into pi-dev

6 years agoSnap for 4728508 from b244714eeae9521c59804b4e90aff425baf9777f to pi-release
android-build-team Robot [Wed, 18 Apr 2018 07:26:47 +0000 (07:26 +0000)]
Snap for 4728508 from b244714eeae9521c59804b4e90aff425baf9777f to pi-release

Change-Id: Ic923ff3934623757175b584211e25d5c1985ee43

6 years agoMerge "Exclude /mnt/vendor from vold's ownership." into pi-dev
TreeHugger Robot [Tue, 17 Apr 2018 19:16:55 +0000 (19:16 +0000)]
Merge "Exclude /mnt/vendor from vold's ownership." into pi-dev

6 years agoExclude /mnt/vendor from vold's ownership.
Tri Vo [Mon, 16 Apr 2018 21:27:10 +0000 (14:27 -0700)]
Exclude /mnt/vendor from vold's ownership.

Addresses this selinux denial:
avc: denied { search } for name="vendor" dev="tmpfs" ino=11069
scontext=u:r:vold:s0 tcontext=u:object_r:mnt_vendor_file:s0 tclass=dir
permissive=0

Bug: 64905218
Test: fixes above denial.
Change-Id: I670b2148e65c7e0fcabd1e11f5bace0c4f4e18bd

6 years agovold: Idle-maint calls device GC
Jaegeuk Kim [Tue, 13 Feb 2018 05:57:04 +0000 (21:57 -0800)]
vold: Idle-maint calls device GC

This activates device GCs in idle time.

F2FS GC = 7 mins
Trim = 1 mins
Dev GC = 2 mins

Bug: 63264275
Bug: 68721792
Change-Id: I843a742ef192ebe00d77c47a216d4200bc9ccb9d
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
6 years agoSnap for 4713750 from 7db02ab5d122501e8303cbde0ac868f02e9b1b86 to pi-release
android-build-team Robot [Wed, 11 Apr 2018 07:23:23 +0000 (07:23 +0000)]
Snap for 4713750 from 7db02ab5d122501e8303cbde0ac868f02e9b1b86 to pi-release

Change-Id: I97cc3c029a776bbf27001558ec62416f4fe65c0b

6 years agovold: set f2fs feature bit
Jaegeuk Kim [Fri, 6 Apr 2018 05:43:25 +0000 (22:43 -0700)]
vold: set f2fs feature bit

Bug: 74604441
Bug: 67380979
Change-Id: Ifcb43fb4f8fbdf79e70cfa208af73073d815e254
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
6 years agoSnap for 4696032 from c1903ad3d65a04fab97268db3a2782697b0bbfc4 to pi-release
android-build-team Robot [Tue, 3 Apr 2018 07:25:57 +0000 (07:25 +0000)]
Snap for 4696032 from c1903ad3d65a04fab97268db3a2782697b0bbfc4 to pi-release

Change-Id: I600cc54993ca03fa247b8727706e30050784d2ee

6 years agoSnap for 4693621 from 385cb8c4d6766b36c52c3bf89128f5a16c88c395 to pi-release
android-build-team Robot [Sun, 1 Apr 2018 07:25:50 +0000 (07:25 +0000)]
Snap for 4693621 from 385cb8c4d6766b36c52c3bf89128f5a16c88c395 to pi-release

Change-Id: I15432bbe0009155670576f0d71e5fc30ce46845a

6 years agoDisable use of StrongBox for encryption
Shawn Willden [Fri, 30 Mar 2018 23:06:14 +0000 (17:06 -0600)]
Disable use of StrongBox for encryption

Until VerificationTokens are wired up, StrongBox can't work.  Also,
this will reduce complications for early StrongBox testing.

Bug: 77338527
Test: Boot the device
Change-Id: I44a1577c388703aeecb2886e7db52084c17e2afd

6 years agoGate use of allow_encrypt_override behind ro.crypto property
Paul Crowley [Thu, 29 Mar 2018 20:27:23 +0000 (13:27 -0700)]
Gate use of allow_encrypt_override behind ro.crypto property

Test: use adb set-virtual-disk to create a virtual partition
Bug: 25861755
Change-Id: I6a227a083c82321c8d4d2d9188091a6f7f0451f0

6 years agoSnap for 4638586 from eb850f93ab056c05cd949ada794c4dab42027a3c to pi-release
android-build-team Robot [Wed, 7 Mar 2018 08:26:00 +0000 (08:26 +0000)]
Snap for 4638586 from eb850f93ab056c05cd949ada794c4dab42027a3c to pi-release

Change-Id: I274cd3a5ea9cfd7961216f690798d7b34d9a6300

6 years agoRemove secdiscard IPC call
Rubin Xu [Thu, 1 Mar 2018 16:48:27 +0000 (16:48 +0000)]
Remove secdiscard IPC call

No longer used by the framework, hence removing.

Bug: 62140539
Test: builds
Change-Id: I17b9818ea6121d84223a502949186cf679a83a90

6 years agoSnap for 4632767 from de787a847a45cb202ed1f9cfc666c336af6569a1 to pi-release
android-build-team Robot [Sun, 4 Mar 2018 08:23:11 +0000 (08:23 +0000)]
Snap for 4632767 from de787a847a45cb202ed1f9cfc666c336af6569a1 to pi-release

Change-Id: I93bc46c2703d4146eaa6363750ceb8af3df29d76

6 years agoRemove libarcmounter dependency in Vold
Risan [Thu, 1 Mar 2018 02:19:51 +0000 (11:19 +0900)]
Remove libarcmounter dependency in Vold

Due to rerouting ArcBridge call through System Server, Vold doesn't need
to depend on ArcBridge-related C++ library anymore.

Bug: 64500663
Test: Compiled.
Change-Id: Ic93cbc8cec8496784960d5093fb7b12d43574ced

6 years agoSnap for 4620899 from e283f998c6dd4b3bc8f281951f286fbe46642aa6 to pi-release
android-build-team Robot [Sun, 25 Feb 2018 08:21:23 +0000 (08:21 +0000)]
Snap for 4620899 from e283f998c6dd4b3bc8f281951f286fbe46642aa6 to pi-release

Change-Id: I608dbf55e50bc2e2c3bf3342904f8e8a5ef38a07