San Mehat
fcf24fe62f
vold: Add a versioned superblock to secure containers.
...
Add an un-encrypted superblock to the end of a secure container to
help identify the crypto cipher used. This is required in order to
provide some semblence of versioning, in case we have cause to
change the crypto type on an update - say for example switching
from software to hardware encryption, or from 128 -> a zillion
bit keys.
NOTE: This format is incompatible with previous secure containers.
After this change they will no longer be mountable.
Signed-off-by: San Mehat <san@google.com>
15 years ago
San Mehat
2350c44ff3
vold: Add support for xwarp
...
Signed-off-by: San Mehat <san@google.com>
15 years ago
San Mehat
f1b07fb5e3
vold: Don't bail out on init failure & bump version number
...
Signed-off-by: San Mehat <san@google.com>
15 years ago
San Mehat
a1091cb0c4
vold: Allow creation of a container with no filesystem
...
Signed-off-by: San Mehat <san@google.com>
15 years ago
San Mehat
55013f7131
vold: Fix uninitialized mountpoint bug
...
Signed-off-by: San Mehat <san@google.com>
15 years ago
San Mehat
12f4b89046
vold: Retry rmdir of asec mount point
...
Signed-off-by: San Mehat <san@google.com>
15 years ago
San Mehat
96956ed0e2
vold: Prohibit container rename when dst container is mounted
...
Signed-off-by: San Mehat <san@google.com>
15 years ago
San Mehat
0e382532f3
vold: fix infinite loop when failing to unmount a busy container in unmountVolume()
...
Signed-off-by: San Mehat <san@google.com>
15 years ago
San Mehat
52c2ccb6d2
vold: Make asec sdcard dir a hidden dir
...
Signed-off-by: San Mehat <san@google.com>
15 years ago
San Mehat
3bb6020e46
vold: Stage the mounting of media to hide the ASEC imagefile directory
...
In order to protect the '/android_secure' directory on VFAT removable media
from being mucked with by 3rd party applications on the device, we hide the
directory with a read-only, zero-sized tmpfs mounted on-top. A reference to the
hidden directory is kept by a bind-mount which is mounted at a location which
only root can access.
Staging consists of:
1. Mount checked media at a secure location (/mnt/secure/staging)
2. Ensure /android_secure exists on the media, (creating if it doesnt)
3. Bind-mount /mnt/secure/staging/android_secure -> /mnt/secure/asec
(where only root can access it)
4. Mount an RDONLY zero-sized tmpfs over /mnt/secure/staging/android_secure
5. Atomically move /mnt/secure/staging to the publicly accessable storage
directory (/mnt/sdcard)
Signed-off-by: San Mehat <san@google.com>
15 years ago
San Mehat
8f2875b297
vold: Clean up asec command response and add support for 'StorageBusy'
...
Signed-off-by: San Mehat <san@google.com>
15 years ago
San Mehat
4ba8948dc1
vold: Add 'force' option to anything that can cause an unmount
...
Signed-off-by: San Mehat <san@google.com>
15 years ago
San Mehat
d31e380bd9
vold2: Don't allow containers < 1mb, and clean up some logging
...
Signed-off-by: San Mehat <san@google.com>
15 years ago
Kenny Root
b3b4318ab8
Check length of filenames before strcat
...
Just in case someone tries to set up a series of links to trick us, do a
quick sanity check on the total length of the strings we're about to
concatenate.
Change-Id: Iba9617008dbc1e93e1907393052caf1e52fbe312
15 years ago
San Mehat
586536c60b
vold: Refactor Processkiller and add command to return users of a mount point
...
Signed-off-by: San Mehat <san@google.com>
15 years ago
San Mehat
8c940ef7db
vold: Fix devmapper/ptmx fd leak, and give asec unmount more time
...
Signed-off-by: San Mehat <san@google.com>
15 years ago
Jean-Baptiste Queru
c6fc646af4
am 4468682c: Merge from open-source master
...
Merge commit '4468682c7035d431c6154ab298c5ce0f9e2350f8'
* commit '4468682c7035d431c6154ab298c5ce0f9e2350f8':
new project, first commit
15 years ago
Jean-Baptiste Queru
4468682c70
Merge from open-source master
15 years ago
San Mehat
3b9b8e8308
vold: Fix format argument bug
...
Signed-off-by: San Mehat <san@google.com>
15 years ago
San Mehat
62e5dd245b
vold: Reduce logspam and add 250ms delay before first unmount attempt
...
Signed-off-by: San Mehat <san@google.com>
15 years ago
San Mehat
b9aed74b14
vold: Fix a few bugs
...
- share command was taking wrong arguments
- shared command was returning two termination codes
- Force FAT32 cluster size to 4k when formatting
Signed-off-by: San Mehat <san@google.com>
15 years ago
San Mehat
f5c6198096
vold: Silly rabbit, don't use unlink() when you mean't rmdir()
...
Signed-off-by: San Mehat <san@google.com>
15 years ago
San Mehat
2b22552f9a
vold: Fix share status argument off by one
...
Signed-off-by: San Mehat <san@google.com>
15 years ago
San Mehat
fbe33b4a40
vold2: Don't print error on unknown Netlink event
...
Signed-off-by: San Mehat <san@google.com>
15 years ago
San Mehat
eba65e9d43
vold: Bloat reduction
...
Signed-off-by: San Mehat <san@google.com>
15 years ago
San Mehat
048b0801fc
vold: Add support for renaming secure containers
...
Signed-off-by: San Mehat <san@google.com>
15 years ago
San Mehat
68f8ebdb24
vold2: update some debugging
...
Signed-off-by: San Mehat <san@google.com>
15 years ago
San Mehat
a4dc3b15b7
vold: Don't fail to return path if volume isn't mounted
...
Signed-off-by: San Mehat <san@google.com>
15 years ago
San Mehat
5817821cf1
vold: Add command to unmount secure containers
...
Signed-off-by: San Mehat <san@google.com>
15 years ago
San Mehat
88705166ab
vold: Unmount secure containers when the underlying media is removed.
...
Signed-off-by: San Mehat <san@google.com>
15 years ago
San Mehat
0586d54053
vold2: Fix issue with destroying / unmounting asec
...
Signed-off-by: San Mehat <san@google.com>
15 years ago
San Mehat
dfe79492a4
vold2: Fix a mb -> sector conversion refactor bug
...
Signed-off-by: San Mehat <san@google.com>
15 years ago
San Mehat
c66770f4c0
vold: Rename the C in ASEC to Container
...
Signed-off-by: San Mehat <san@google.com>
15 years ago
San Mehat
8b8f71b1d7
vold: Internally use sector counts for asec lengths
...
Signed-off-by: San Mehat <san@google.com>
15 years ago
San Mehat
b78a32c1d5
vold: Add encrypted ASEC support via devmapper
...
- Supports up to 4096 containers
- Keys are now implemented - specifying a key of 'none' means no encryption.
Otherwise, the key must be a string of 32 characters
Signed-off-by: San Mehat <san@google.com>
15 years ago
San Mehat
8da6bcb006
vold: Increase max supported loop devices to 255
...
Signed-off-by: San Mehat <san@google.com>
15 years ago
San Mehat
8d934caeae
vold: Always format FAT32
...
Signed-off-by: San Mehat <san@google.com>
15 years ago
San Mehat
23969931fa
vold: Use process-killer when unmounting asec containers
...
Signed-off-by: San Mehat <san@google.com>
15 years ago
San Mehat
cff5ec3d36
vold: Temporarily disable asec mountpoint permissions
...
Signed-off-by: San Mehat <san@google.com>
15 years ago
Doug Kwan
1bc9558895
Add missing library used by the main executable in linker options. Currently
...
the library is implicit added via inter-library dependency.
15 years ago
San Mehat
eb13a90bb9
vold: Don't freak out if an asec mountpoint already exists
...
Signed-off-by: San Mehat <san@google.com>
15 years ago
San Mehat
fff0b47998
vold2: Enable support for custom mount perm masks and wire to asec
...
Signed-off-by: San Mehat <san@google.com>
15 years ago
San Mehat
a19b250bd2
vold2: Initial support for Android Secure External Caches
...
Signed-off-by: San Mehat <san@google.com>
15 years ago
San Mehat
7b8f2db4b0
vold2: Don't crap out if the kernel is missing the NPART/PARTN blkdev uevent patches
...
Signed-off-by: San Mehat <san@google.com>
15 years ago
San Mehat
bf04185c88
vold2: Refactor FAT support into a separate class
...
Signed-off-by: San Mehat <san@google.com>
15 years ago
San Mehat
79e31bedca
vold2: Don't bail out if the UMS switch isn't there
...
Signed-off-by: San Mehat <san@google.com>
15 years ago
San Mehat
11f78c181e
vold2: Don't build for simulator
...
Signed-off-by: San Mehat <san@google.com>
15 years ago
San Mehat
0cde53ce7b
vold2: Manually bootstrap the ums switch since switch kernel uevents are broken
...
Signed-off-by: San Mehat <san@google.com>
15 years ago
San Mehat
a1c2ca1c70
vold2: Enable in build
...
Signed-off-by: San Mehat <san@google.com>
15 years ago
San Mehat
a2677e4ad0
vold2: Get mounting/unmounting/formatting/sharing working
...
Signed-off-by: San Mehat <san@google.com>
15 years ago