Commit graph

5727 commits

Author SHA1 Message Date
Jean-Baptiste Queru
b843601a9d am 77acfc4d: (-s ours) am 3c73fdaa: (-s ours) Reconcile with jb-mr1-release - do not merge
* commit '77acfc4d6dc30f0b46ade8c6e12445065a2520eb':
2013-03-11 12:47:14 -07:00
Jean-Baptiste Queru
77acfc4d6d am 3c73fdaa: (-s ours) Reconcile with jb-mr1-release - do not merge
* commit '3c73fdaad106c2bd5e9d9349aae13f07ec40a547':
2013-03-11 12:28:04 -07:00
Jean-Baptiste Queru
3c73fdaad1 Reconcile with jb-mr1-release - do not merge 2013-03-11 12:23:40 -07:00
Kenny Root
286374f166 am bacdfc0e: Merge "Fix compiling warnings"
* commit 'bacdfc0ed9a0882ee3e9ee889a8fd4cabb9a71f3':
  Fix compiling warnings
2013-02-27 17:59:01 +00:00
Kenny Root
bacdfc0ed9 Merge "Fix compiling warnings" 2013-02-27 16:57:15 +00:00
Ken Sumrall
56ad03cae1 vold: use unified fstab format
Change vold to use the unified fstab.  This includes both
support for sdcards, and changes to the crypto code to work
with some changes to the fs_mgr library api.

Change-Id: Id5a8aa5b699afe151db6e31aa0d76105f9c95a80
2013-02-15 18:21:56 -08:00
Chih-Wei Huang
7929deb206 Fix compiling warnings
The patch removes the following warnings:

system/vold/vdc.c: In function 'do_cmd':
system/vold/vdc.c:71:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
[...]

In file included from system/vold/Fat.cpp:34:0:
bionic/libc/kernel/common/linux/fs.h:109:0: warning: "MS_RMT_MASK" redefined [enabled by default]
In file included from system/vold/Fat.cpp:31:0:
bionic/libc/include/sys/mount.h:64:0: note: this is the location of the previous definition
[...]

Change-Id: I1e950dcec87f8bae0cec61a1611126b3abc0c90e
2013-02-10 23:34:36 +08:00
Ken Sumrall
db5e026058 Enable allow_discards if dm-crypt supports it
dm-crypt version 1.11.0 and later supports the allow_discards option
when setting up a crypto device.  This passes discard requests from
the filesytem to the underlying block device.  This helps make flash
based storage faster.  So query the dm-crypt version, and pass the
option if the version is 1.11.0 or greater.

Change-Id: If30e9db5a2dbd6ea0281d91344e5b2c35e75131e
2013-02-07 15:05:54 -08:00
Rom Lemarchand
2ba45aafc2 Replace custom logwrapper implementation with liblogwrap
Use liblogwrap to provide logwrapper functionality instead of
using vold's own implementation.

Change-Id: I76aac5aa72a1fdca043a63b86c6a9b54e7abec16
2013-01-30 12:15:47 -08:00
Rom Lemarchand
5593c856f4 Fix calls to logwrap
Make sure all the calls to logwrap are consistent with the function's
semantics.

Change-Id: Ib0e2ad5c283cc4bb06c0ef5d6a9a52a5840b3dd2
2013-01-03 18:08:53 -08:00
Rom Lemarchand
b9dcde7845 Ensure vold doesn't hang when a child process dies
Add a monitoring thread that notifies the main parent thread when the child
process terminates. The return code from the child is then propagated back up
to the parent.

Change-Id: Idf46e100e8dee2e8f1aaa331317f3c4955632183
2013-01-02 13:17:49 -08:00
Rom Lemarchand
e90c1749b0 Make sure to exit with _exit from child
Exiting the child process with _exit after forking but before exec.

Change-Id: I5df34242c5444b6de6a559735074737d370a6a2e
2012-12-21 11:35:43 -08:00
Dianne Hackborn
d67870ee8c am 16a32502: am 3fd60b42: Fix issue #7503920: Log spew from vold
* commit '16a32502bf98b4b0fc15a82a36242fada29baf5b':
  Fix issue #7503920: Log spew from vold
2012-11-28 11:20:19 -08:00
Dianne Hackborn
16a32502bf am 3fd60b42: Fix issue #7503920: Log spew from vold
* commit '3fd60b428202a0f5f324fccc67c0c0402b9131ba':
  Fix issue #7503920: Log spew from vold
2012-11-28 11:18:10 -08:00
Dianne Hackborn
3fd60b4282 Fix issue #7503920: Log spew from vold
Change-Id: Ibfa5b979014f433085b94aab0d3d81bf9269d4b5
2012-11-27 16:00:04 -08:00
The Android Open Source Project
9ffb1ac318 am b1596afa: (-s ours) am b7afc4e1: Reconcile with jb-mr1-factory-release jb-mr1-release - do not merge
* commit 'b1596afa59c7108cc6ce23bab54a1bc41961806a':
2012-11-06 12:31:15 -08:00
The Android Open Source Project
b1596afa59 am b7afc4e1: Reconcile with jb-mr1-factory-release jb-mr1-release - do not merge
* commit 'b7afc4e15b29d933477328d1944c3201337808c6':
2012-11-06 12:27:10 -08:00
The Android Open Source Project
b7afc4e15b Reconcile with jb-mr1-factory-release jb-mr1-release - do not merge
Change-Id: I8de173f6b24b2f82b20e568e577878d8539e5148
2012-11-06 12:19:27 -08:00
The Android Open Source Project
cda1948e61 am 10b8e684: (-s ours) Reconcile with jb-mr1-release - do not merge
* commit '10b8e684e1945edfb60ec4391ac4c7f3d8bf4172':
2012-10-31 09:23:14 -07:00
The Android Open Source Project
10b8e684e1 Reconcile with jb-mr1-release - do not merge
Change-Id: Ic3c4a57147bc3a4154c140beeeed27b5e3be9ece
2012-10-31 09:19:05 -07:00
Elliott Hughes
bb7afa4989 am 29e55ef8: am edf4e179: Merge "Fix vold\'s use of readdir_r(3)."
* commit '29e55ef83def8eaf6aa01201c6344a8037b2f780':
  Fix vold's use of readdir_r(3).
2012-10-30 10:11:34 -07:00
Elliott Hughes
29e55ef83d am edf4e179: Merge "Fix vold\'s use of readdir_r(3)."
* commit 'edf4e17940c6d3887e9009b23ffca5be8116fbe9':
  Fix vold's use of readdir_r(3).
2012-10-29 17:15:00 -07:00
Elliott Hughes
edf4e17940 Merge "Fix vold's use of readdir_r(3)." 2012-10-26 17:25:46 -07:00
Elliott Hughes
8c480f73ee Fix vold's use of readdir_r(3).
Change-Id: I805a1799755429dd1f6f3bdc2e6a02f483587b35
2012-10-26 16:57:19 -07:00
Nick Kralevich
2da54373ed am 2e0d70f9: am 678d556f: Merge "Add snprintf truncation and output error checks."
* commit '2e0d70f98d10089f0cc3b88848d203cb4694fb98':
  Add snprintf truncation and output error checks.
2012-10-19 11:12:44 -07:00
Nick Kralevich
2e0d70f98d am 678d556f: Merge "Add snprintf truncation and output error checks."
* commit '678d556f439cae504c343c15d77e9ec020a9385c':
  Add snprintf truncation and output error checks.
2012-10-19 11:09:59 -07:00
Nick Kralevich
678d556f43 Merge "Add snprintf truncation and output error checks." 2012-10-19 10:49:24 -07:00
rpcraig
d1c226fce3 Add snprintf truncation and output error checks.
Change-Id: If7fc9bba4b6cd4b01d2c19e967105ffc57169e97
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
2012-10-19 05:56:00 -04:00
The Android Automerger
1cbe0ce40c merge in jb-mr1-release history after reset to jb-mr1-dev 2012-10-18 07:00:15 -07:00
Ken Sumrall
e959ac9b99 am 05753f53: am 92736efa: Another fix for encryption
* commit '05753f5380e4bc678ae9bf11b8b6adb6c56f33bf':
  Another fix for encryption
2012-10-17 21:24:13 -07:00
Ken Sumrall
05753f5380 am 92736efa: Another fix for encryption
* commit '92736efab068bdbfeb1177544907b84511fb04e0':
  Another fix for encryption
2012-10-17 21:21:11 -07:00
Ken Sumrall
92736efab0 Another fix for encryption
The previous problem of the framework not properly restarting after accepting
the password to decrypt the storage is also a problem when restarting the
framework to display the encryption progress screen.  So like the previous
hacky fix, add a sleep to wait a few moments before proceeding.  Also,
increase the sleep of the previous fix from 1 second to 2, as the problem
was seen once more in testing.  A proper fix has been designed and hopefully
will work and be checked-in RSN.

Change-Id: Icc2c072ce7f7ebcdea22cd7ff8cb2b87a627c578
2012-10-17 20:57:14 -07:00
Kenny Root
88d275c683 am bb67b67c: am fd5b29be: Merge "Extend vold support for creating ext4 images."
* commit 'bb67b67cc760e4eab8a144d1ce1df9ad2dcdc8c2':
  Extend vold support for creating ext4 images.
2012-10-17 13:01:59 -07:00
Kenny Root
bb67b67cc7 am fd5b29be: Merge "Extend vold support for creating ext4 images."
* commit 'fd5b29be8c572058ed9ab0198f5603e96c585d3c':
  Extend vold support for creating ext4 images.
2012-10-17 12:58:57 -07:00
Kenny Root
fd5b29be8c Merge "Extend vold support for creating ext4 images." 2012-10-17 11:53:41 -07:00
The Android Open Source Project
5806aedff0 am 4fdf09c3: (-s ours) Reconcile with jb-mr1-factory-release jb-mr1-release - do not merge
* commit '4fdf09c3103074770675b40c9fb5e47c04617c61':
  Fix encryption on certain devices
2012-10-10 09:48:04 -07:00
The Android Open Source Project
4fdf09c310 Reconcile with jb-mr1-factory-release jb-mr1-release - do not merge
Change-Id: Ifffd0bab9123c37df7c9abdbf166e32ca9850835
2012-10-10 09:46:07 -07:00
Ken Sumrall
f1a6123f9a Fix encryption on certain devices
There is a race in the encryption code that after it accepts the
decryption password, it tells init to kill all the processes in
class "main", then it mounts the decrypted filesystem, preps it,
and restarts the framework.  For an unknown reason on some devices,
the new framework sometimes starts up before init has killed and
reaped all the old processes.  The proper fix is to make the killing
of the old framework synchronous, so vold waits till all the
processes have died.  But with factory rom a few days away, the
much more pragmatic solution of adding a sleep of 1 second after
telling init to kill the old framework will suffice.

Bug: 7271212
Change-Id: Ie971cd04abbc6f3f6500b4acd79d3b3b26d9561c
2012-10-09 16:20:51 -07:00
Ken Sumrall
1f5205e5d2 am 06dbc228: am 9dedfd47: Fix encryption on certain devices
* commit '06dbc22839ff8e411405f6b9c0635cdd0fd8b4d5':
  Fix encryption on certain devices
2012-10-09 15:12:57 -07:00
Ken Sumrall
06dbc22839 am 9dedfd47: Fix encryption on certain devices
* commit '9dedfd473dc59e0277004e5b917e4eced02c8af5':
  Fix encryption on certain devices
2012-10-09 15:11:18 -07:00
Ken Sumrall
9dedfd473d Fix encryption on certain devices
There is a race in the encryption code that after it accepts the
decryption password, it tells init to kill all the processes in
class "main", then it mounts the decrypted filesystem, preps it,
and restarts the framework.  For an unknown reason on some devices,
the new framework sometimes starts up before init has killed and
reaped all the old processes.  The proper fix is to make the killing
of the old framework synchronous, so vold waits till all the
processes have died.  But with factory rom a few days away, the
much more pragmatic solution of adding a sleep of 1 second after
telling init to kill the old framework will suffice.

Bug: 7271212
Change-Id: Ie971cd04abbc6f3f6500b4acd79d3b3b26d9561c
2012-10-09 14:30:00 -07:00
The Android Open Source Project
14a26131c7 am f1e72279: (-s ours) Reconcile with jb-mr1-release - do not merge
* commit 'f1e72279ffbff47ef404e8f7d8c9bd7306f8382d':
2012-10-09 07:35:36 -07:00
The Android Open Source Project
f1e72279ff Reconcile with jb-mr1-release - do not merge
Change-Id: Iac520484dec44e5f54fe0aca54010520aa8fd7e2
2012-10-09 07:31:11 -07:00
The Android Automerger
2a012c02b4 merge in jb-mr1-release history after reset to jb-mr1-dev 2012-10-07 07:00:08 -07:00
Jeff Sharkey
4bbe7f69f4 am 762f7268: am 7a3c3d46: Unmount in-place instead of using MS_MOVE.
* commit '762f7268255f13e1c875977ce5429ced8bfaead7':
  Unmount in-place instead of using MS_MOVE.
2012-10-05 15:32:27 -07:00
Jeff Sharkey
762f726825 am 7a3c3d46: Unmount in-place instead of using MS_MOVE.
* commit '7a3c3d462ebd58bda0ceaba9c00c385d44c13d08':
  Unmount in-place instead of using MS_MOVE.
2012-10-05 15:30:28 -07:00
Jeff Sharkey
7a3c3d462e Unmount in-place instead of using MS_MOVE.
To support multi-user emulated storage, we mount rootfs as MS_SHARED,
which means we can't MS_MOVE existing mount points rooted in the
shared subtree.  Initial staging is still able to MS_MOVE, since it's
rooted in a MS_PRIVATE tmpfs rooted at /mnt/secure.

This change fixes unmounting by operating in-place instead of trying
(and failing) to MS_MOVE back to staging.

Bug: 7127564
Change-Id: I4783db4319b61c0915da39361cbc7e8f4943d094
2012-10-04 16:50:17 -07:00
The Android Open Source Project
59810a03ef am 3aeec65f: (-s ours) Reconcile with jb-mr1-release - do not merge
* commit '3aeec65f6398183ea8dd086f4d33cbc32cbce8c7':
  Update environment variable for multi-user.
2012-10-02 09:24:42 -07:00
The Android Open Source Project
3aeec65f63 Reconcile with jb-mr1-release - do not merge
Change-Id: I4024b1fab0705f6b943ef6b0633ad9e29beacb73
2012-10-02 09:21:07 -07:00
Jeff Sharkey
13f393d699 Update environment variable for multi-user.
Bug: 7260040
Change-Id: I96d821e11a3f0be32bfe92a4151f00f2b15d100e
2012-10-01 16:23:36 -07:00