| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* 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 and Q
Change-Id: Ie5dd27f26a4a7129dd9efe6a7ad0a589928282a0
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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 and Q
Change-Id: Id7ec3ea409b5c96e691730604e4b1e9cc3aa9d33
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
| |\
| |
| |
| |
| |
| |
| |
| | |
8b90acafcd
am: 1f4307e51e
Change-Id: If3e65d967a99e3f757a1ab978067e61a3faeae66
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When running a live GSI, userdata is a logical partition. If we don't
fix up the fstab we'll derive the underlying block device instead of
the device-mapper node for userdat_gsi, resulting in a corrupt data
partition for both images.
Bug: 123906417
Test: manual test
Change-Id: Ic0101f30504de26e725442da2da3888008c31b63
|
| |\|
| |
| |
| |
| |
| | |
am: f61f61a6a0
Change-Id: I90f0f0e1161463cef8542a586b53274ec5a2f5ee
|
| | |
| |
| |
| |
| | |
Test: build and boot
Change-Id: Id3850c9c133f6644073a2439368501253a2a94a9
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Also update vold to create sandboxes for secondary storage devices.
- Since bind mounts are created in the process specific namespaces, we
don't need /mnt/storage anymore which we were using it to prevent
some bind mounts from propagating onto /mnt/runtime/write.
- Create bind mounts for {media,obb} dirs similar to data dir in
per process namespace.
- Also fix a bug where we are not passing correct packages to vold when
a new user starts.
Bug: 111890351
Test: manual
Change-Id: I7849efc4fbf3c654606fa30de7ab2de0236d766f
|
| |
|
|
|
|
|
|
|
|
| |
This will allow adding lots of verbose logs which can be enabled
only during local testing/debugging. Update the existing verbose
level logs to debug level since we want those to be logged by
default.
Test: manual
Change-Id: Ib05e2b6efa71308458d49affb6ed81d3975b28ab
|
| |
|
|
|
| |
Test: Format-only changes; treehugger suffices.
Change-Id: I23cde3f0bbcac13bef555d13514e922c79d5ad48
|
| |
|
|
|
|
|
|
| |
to runDevGc(). This fixes a Treble violation.
Bug: 111655771
Test: manual
Change-Id: I53d6db6ffa99e43e281f8086442151692c1826ca
|
| |
|
|
|
|
|
|
|
| |
Don't use the FDE flow to support metadata encryption; just provide a
vold service which directly mounts the volume and use that.
Bug: 63927601
Test: Boot Taimen to SUW with and without metadata encryption.
Change-Id: Ifc6a012c02c0ea66893020ed1d0da4cba6914aed
|
| |
|
|
|
|
|
|
|
| |
This is how we tell CTS if the device has reserved blocks set aside
for system critical services.
Test: builds, boots
Bug: 62024591
Change-Id: I7c8ec2294b246eed54668b5717df00e72f13887a
|
| |
|
|
|
|
|
|
|
| |
Make the main thread do something useful instead of sitting around
twiddling its thumbs.
Test: builds, boots
Bug: 67041047
Change-Id: I88f7f4fe151ae2b81f80aa575530c12b56ba4d75
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Moves away from crufty char* operations to std::string utility
methods, including android::base methods for splitting/parsing.
Rewrite of how Process handles scanning procfs for filesystem
references; now uses fts(3) for more sane traversal.
Replace sscanf() with new FindValue() method, also has unit tests.
Remove some unused methods. Switch almost everyone over to using
modern logging library.
Test: cts-tradefed run commandAndExit cts-dev -m CtsOsTestCases -t android.os.storage.cts.StorageManagerTest
Test: cts-tradefed run commandAndExit cts-dev --abi armeabi-v7a -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.AdoptableHostTest
Bug: 67041047
Change-Id: I70dc512f21459d1e25b187f24289002b2c7bc7af
|
| |
|
|
|
|
|
| |
Bug: 66739076
Bug: 65737446
Test: reboot-cycle.sh doesn't show a problem.
Change-Id: Ia0699cca7e07475d4df266b482a3b2c96519ed3b
|
| |
|
|
|
|
| |
Test: Ensure device still boots.
Bug: 65737446
Change-Id: Ie466db9f5d8c77656cc525c0d49fe6a3cce154f1
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Instead of blindly looping across 4096 possible devices, use
readdir() to only look at valid devices. This speeds up destroyAll()
from 40ms to 0.7ms.
Add tracing information in several places.
Test: external/chromium-trace/systrace.py -b 128768 sched freq am pm ss core_services binder_driver -a system_server,installd,vold
Bug: 65634729, 65737446
Change-Id: If581de47fb55850c0fcd6e25bf33ed246e1b079d
|
| |
|
|
|
|
|
|
| |
Long live Binder.
Test: yes
Bug: 13758960
Change-Id: If6be379b5a873f1b0c66dd1522b87413ad10fc46
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This moves fstrim, obb and appfuse commands over to the new Binder
interface. This change also separates creating/destroying and
mounting/unmounting of OBB volumes, which means they finally flow
nicely into the modern VolumeInfo/VolumeBase design.
We now generate unique identifiers for all OBB volumes, instead of
using a shady MD5 hash.
Change all "loop" and "dm" devices to tag the kernel resources with
a vold-specific prefix so that we can clean them up if vold crashes;
there are new destroyAll() methods that handle this cleanup.
Move appfuse mounting/unmounting into VolumeManager so it can be
shared. Move various model objects into a separate directory to
tidy things up.
Test: cts-tradefed run commandAndExit cts-dev -m CtsOsTestCases -t android.os.storage.cts.StorageManagerTest
Bug: 13758960
Change-Id: I7294e32b3fb6efe07cb3b77bd20166e70b66958f
|
| |
|
|
|
|
|
|
|
|
| |
This change is the bare minimum needed to publish a new vold
Binder service and move the simple "reset" call over to go through
the new interface.
Test: builds, boots
Bug: 13758960
Change-Id: I5b70976653c69f92e1efc8d1f432b2038eb618a4
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
| |
Also remove some unnecessary SELinux logic when creating image files
for loop devices.
Test: builds, boots, common operations work
Bug: 34903607
Change-Id: I68dfa022ecc39f56c175e786694e0de35b954ca0
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
| |
coldboot is now taken care by ueventd, so removing the duplicate
logic to save boottime.
This CL also fixes a missing lock.
Bug: 33786699
Test: manual
Change-Id: I71270252f3153abc815d142b5da7a9cb85b94dac
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
By setting property after listeners are initialized
we avoid deadlock between vold and init where
vold is waiting on property_service while init is blocked
(and therefore is not able to accept connections) on vdc
which is attempting to communicate with vold.
(This also speeds up boot by 250ms)
Test: Boot a device, check locks and make sure there is no timeout
on property_set(.)
Test: Successfully boot a device with new property service protocol.
Bug: http://b/34278978
Change-Id: I9547d2f19cb35aa452bf01fbff0eb4b32a4824a4
|
| |
|
|
| |
Change-Id: I4d6156332cfc847e25e7c8863fd6a50fa325fb87
|
| |
|
|
|
|
|
|
|
|
| |
Major rework and refactor of FBE code to load the keys at the right
time and in a natural way. The old code was aimed at our goals for M,
with patches on top, and didn't quite work.
Bug: 22358539
Change-Id: I9bf7a0a86ee3f2abf0edbd5966f93efac2474c2c
|
| |
|
|
|
|
|
| |
Add the serial parameter to prepare_user_storage to avoid
confusion when parsing parameters and passing them around.
Change-Id: Id5516c248401ad50585aa8f6e8b1545a6cded549
|
| |
|
|
|
|
| |
BUG: 24883058
Change-Id: I77d4757f87214166e7c41c7eb0d06b1cd5f06b20
|
| |\
| |
| |
| | |
Change-Id: I0c5211a00d92d0ee796bb9c77d2e13675a2a3e8d
|
| | |
| |
| |
| | |
Change-Id: I3096cfa50afa395d8e9a8043ab69c1e390f86ccb
|
| |/
|
|
|
|
|
| |
Also prepare CE/DE storage directories for owner user at boot.
Bug: 22358539
Change-Id: I76228952c990ebed83360c69ef36321b99114196
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Refactor fstrim code to be encapsulated in unique task object, and
give it option of benchmarking when finished. Trimming now includes
both storage from fstab and adopted private volumes. Cleaner timing
stats are logged for each unique volume.
Add wakelock during ongoing async move tasks. Push disk sysfs path
to framework so it can parse any SD card registers as desired.
Bug: 21831325
Change-Id: I76577685f5cae4929c251ad314ffdaeb5eb1c8bf
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
When formatting volumes, pass along fsType string which can be "auto"
to let the volume select the best choice. For now, private volumes
assume that MMC devices (like SD cards) are best off using f2fs when
both kernel support and tools are present, otherwise fall back to
ext4. Use blkid when mounting to pick the right set of tools.
Move filesystem utility methods into namespaces and place in separate
directory to be more organized.
Bug: 20275581
Change-Id: Id5f82d8672dda2e9f68c35b075f28232b0b55ed4
|
| |
|
|
|
|
|
|
|
|
|
| |
In order to prevent this bug from happening, we must allow vold cryptfs
commands to complete while a long running mount is underway.
While waiting for vold to be changed to a binder interface, we will simply
create two listeners, one for cryptfs and one for everything else.
Bug: 19197175
Change-Id: If74142aa81abd58f718a9de6c9e387f6ea442754
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Useful for transforming a secondary SD card slot into a primary SD
card slot without doing a completely different lunch target.
$ adb shell stop
$ adb shell setprop vold.debug.default_primary 1
$ adb shell setprop ro.vold.primary_physical 1
$ adb shell setprop ctl.restart vold
$ adb shell start
Bug: 21017105
Change-Id: I45aac7ab3bb4c5ac3e0140572844883823fc3e4f
|
| |
|
|
|
| |
Bug: 19993667
Change-Id: I3c3dddab157a11038f7160d24d53e728bde2194f
|
| |
|
|
|
| |
Bug: 19993667
Change-Id: Ie226e06edcb426caca2dbc97d2d5d60ae948c85e
|
| |
|
|
|
|
|
|
|
|
| |
We eventually should move back to per-disk locks, but use a giant
lock to keep development rolling forward. Also move force adoptable
flag to framework since, since encrypted devices don't have persisted
properties loaded early during boot.
Bug: 19993667
Change-Id: Ifa3016ef41b038f8f71fc30bc81596cfd21dcd2a
|
| |
|
|
|
|
|
|
| |
Use system log for more durable log history. Also accept persistable
version of flag to force adoptability.
Bug: 19993667
Change-Id: Icdf36799e26038e9a8e2bdaca276d97b22ba3941
|
| |
|
|
|
| |
Bug: 19993667
Change-Id: Ib15e79a94a185843dace35fea7daaea866120f87
|
| |
|
|
|
| |
Bug: 19993667
Change-Id: I1f6519655c5a366eca25e2329e1bf95d81b3bf8c
|
| |
|
|
|
| |
Bug: 19993667
Change-Id: If8c0b346820f30c6a7dac495f935be17d677ffcc
|
| |
|
|
|
|
|
|
|
|
|
|
| |
vold works with two broad classes of block devices: untrusted devices
that come in from the wild, and trusted devices like PrivateVolume
which are encrypted.
When running blkid and fsck, we pick which SELinux execution domain
to use based on which class the device belongs to.
Bug: 19993667
Change-Id: I2695f028710a4863f0c3b2ed6da437f466401272
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Wire up new Disk and VolumeBase objects and events to start replacing
older DirectVolume code. Use filesystem UUID as visible PublicVolume
name to be more deterministic.
When starting, create DiskSource instances based on fstab, and watch
for kernel devices to appear. Turn matching devices into Disk
objects, scan for partitions, and create any relevant VolumeBase
objects. Broadcast all of these events towards userspace so the
framework can decide what to mount.
Keep track of the primary VolumeBase, and update the new per-user
/storage/self/primary symlink for all started users.
Provide a reset command that framework uses to start from a known
state when runtime is restarted. When vold is unexpectedly killed,
try recovering by unmounting everything under /mnt and /storage
before moving forward.
Remove UMS sharing support for now, since no current devices support
it; MTP is the recommended solution going forward because it offers
better multi-user support.
Switch killProcessesWithOpenFiles() to directly take signal. Fix
one SOCK_CLOEXEC bug, but SELinux says there are more lurking.
Bug: 19993667
Change-Id: I2dad1303aa4667ec14c52f774e2a28b3c1c1ff6d
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Extend vold to look up and set SELinux contexts on the
device nodes it creates for extra loop devices and for volumes.
Prior to this change, these device nodes simply inherited the type
of their parent directory /dev/block, i.e. block_device, and vold
therefore required create_file perms to block_device:blk_file.
With this change we can scope vold down to accessing specific
block device types.
This depends on change Id3bea28f5958086716cd3db055bea309b3b5fa5a
to allow vold to use setfscreatecon().
Change-Id: Ib9e8294abb1da94d92503947603ec12e802ff08c
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
|
| |
|
|
|
|
|
|
|
| |
We now run an sdcard fuse daemon on top of a physical SD card.
Add support for that.
Bug: 10330128
Change-Id: I6a291f861ccb0f2911c07cc8f659e2cec4e6d76c
|
| |
|
|
|
|
|
|
|
| |
When mounting an encrypted filesystem vold calls fs_mgr, which
will call e2fsck on the fielsystem if it's configured to, and
fs_mgr will attempt to log the output the kernel log. However,
if won't log anything unless the klog level is set to 6, aka INFO.
Change-Id: I8ac34941330262ea3414681b872fbbeb75391461
|