OSDN Git Service

android-x86/system-vold.git
11 years agoAnother fix for encryption
Ken Sumrall [Thu, 18 Oct 2012 03:57:14 +0000 (20:57 -0700)]
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

11 years agoFix encryption on certain devices
Ken Sumrall [Tue, 9 Oct 2012 21:16:59 +0000 (14:16 -0700)]
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

11 years agoUnmount in-place instead of using MS_MOVE.
Jeff Sharkey [Thu, 4 Oct 2012 23:49:22 +0000 (16:49 -0700)]
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

11 years agoUpdate environment variable for multi-user.
Jeff Sharkey [Mon, 1 Oct 2012 21:36:26 +0000 (14:36 -0700)]
Update environment variable for multi-user.

Bug: 7260040
Change-Id: I96d821e11a3f0be32bfe92a4151f00f2b15d100e

11 years agoWorkaround a kernel race when loading dmcrypt table
Ken Sumrall [Sun, 30 Sep 2012 00:07:41 +0000 (17:07 -0700)]
Workaround a kernel race when loading dmcrypt table

The kernel seems to return from umount(2) sometimes before it has
released the underlying block device.  So until the kernel is fixed,
try up to 10 times to load the crypto mapping table, waiting 500 ms
between tries.

bug: 7220345

Change-Id: Iad3bbef37cbe2e01613bb8a8c4886babdecb8328

11 years agoHandle multi-user mountObb() requests.
Jeff Sharkey [Tue, 25 Sep 2012 23:14:57 +0000 (16:14 -0700)]
Handle multi-user mountObb() requests.

Mount OBB containers using shared app GID, so that an app can read
the mount point across users.

Bug: 7212801
Change-Id: Ia1be52df9854c259b20728111f3a2c9facf4beaa

11 years agoUnmount external storage on multi-user devices.
Jeff Sharkey [Thu, 23 Aug 2012 21:08:59 +0000 (14:08 -0700)]
Unmount external storage on multi-user devices.

Bug: 7044670
Change-Id: If1f99968b0392cae9420d067c75bfc18d1067b2c

11 years agoam 7c5109be: (-s ours) Reconcile with jb-mr0-release - do not merge
The Android Open Source Project [Fri, 17 Aug 2012 01:59:13 +0000 (18:59 -0700)]
am 7c5109be: (-s ours) Reconcile with jb-mr0-release - do not merge

* commit '7c5109bef8c1f8b857b043bf9c1d26c2f0556e8f':

11 years agoReconcile with jb-mr0-release - do not merge
The Android Open Source Project [Fri, 17 Aug 2012 01:57:10 +0000 (18:57 -0700)]
Reconcile with jb-mr0-release - do not merge

Change-Id: I3ec7be5d1d08566f120f18b68d2f691f92f006c8

11 years agomerge in jb-mr0-release history after reset to jb-dev
The Android Automerger [Fri, 17 Aug 2012 00:57:55 +0000 (17:57 -0700)]
merge in jb-mr0-release history after reset to jb-dev

11 years agoam 62224a32: (-s ours) am eacf7e03: Only cleanup ASECs in external storage DO NOT...
Kenny Root [Mon, 13 Aug 2012 18:45:38 +0000 (11:45 -0700)]
am 62224a32: (-s ours) am eacf7e03: Only cleanup ASECs in external storage DO NOT MERGE

* commit '62224a32f00c344c8ba6edab2107c833700e26a8':
  Only cleanup ASECs in external storage DO NOT MERGE

11 years agoam eacf7e03: Only cleanup ASECs in external storage DO NOT MERGE
Kenny Root [Mon, 13 Aug 2012 18:42:56 +0000 (11:42 -0700)]
am eacf7e03: Only cleanup ASECs in external storage DO NOT MERGE

* commit 'eacf7e03d60a2b33ac6cdaa0e01bd6a6fdd9455a':
  Only cleanup ASECs in external storage DO NOT MERGE

11 years agoOnly cleanup ASECs in external storage DO NOT MERGE
Kenny Root [Thu, 9 Aug 2012 18:28:37 +0000 (11:28 -0700)]
Only cleanup ASECs in external storage DO NOT MERGE

Any ASEC or OBB files were unmounted when USB storage was set to UMS
mode. This changes it so only ASEC files on external storage and OBB
files mounted from external storage are unmounted.

(Cherry-pick of 93ecb38daded7583a4a61f4f22519bb7a8a8c154)

Bug: 6948035
Change-Id: Ib60727bd360caa32173797ff5b4e1e21fcf20054

11 years agoOnly cleanup ASECs in external storage
Kenny Root [Thu, 9 Aug 2012 18:28:37 +0000 (11:28 -0700)]
Only cleanup ASECs in external storage

Any ASEC or OBB files were unmounted when USB storage was set to UMS
mode. This changes it so only ASEC files on external storage and OBB
files mounted from external storage are unmounted.

Bug: 6948035
Change-Id: I91bc09ee5b792970b0eef895f6886f3ffad00e8f

12 years agoMerge "Fix a typo in cryptfs.c"
Ken Sumrall [Fri, 29 Jun 2012 00:58:50 +0000 (17:58 -0700)]
Merge "Fix a typo in cryptfs.c"

12 years agoFix a typo in cryptfs.c
Ken Sumrall [Wed, 27 Jun 2012 23:30:18 +0000 (16:30 -0700)]
Fix a typo in cryptfs.c

Change-Id: If629fa996b135e432bc89da7518b0c1f02750b45

12 years agoAdd mode when open(O_CREAT) is used.
Nick Kralevich [Tue, 26 Jun 2012 22:07:03 +0000 (15:07 -0700)]
Add mode when open(O_CREAT) is used.

When creating a new file using open(..., O_CREAT), it is an error
to fail to specify a creation mode. If a mode is not specified, a
random stack provided value is used as the "mode".

This will become a compile error in a future Android change.

Change-Id: I761708c001247d7a2faac2e286288b45bfecc6f7

12 years agoam 9ee8a315: Reconcile with jb-release
The Android Open Source Project [Tue, 19 Jun 2012 13:20:12 +0000 (06:20 -0700)]
am 9ee8a315: Reconcile with jb-release

* commit '9ee8a315eefde7e6ad1bc07bc9d50528f548e8e8':
  Unmount all asec apps before encrypting

12 years agoReconcile with jb-release
The Android Open Source Project [Tue, 19 Jun 2012 13:13:59 +0000 (06:13 -0700)]
Reconcile with jb-release

Change-Id: I60294fb5c41ef34eccc322889168497d9449c6ea

12 years agoam a7926050: am 425524db: Unmount all asec apps before encrypting
Ken Sumrall [Mon, 18 Jun 2012 17:52:20 +0000 (10:52 -0700)]
am a7926050: am 425524db: Unmount all asec apps before encrypting

* commit 'a79260500a869f867118a6e5289c6e5a0353558f':
  Unmount all asec apps before encrypting

12 years agoam 425524db: Unmount all asec apps before encrypting
Ken Sumrall [Mon, 18 Jun 2012 17:32:48 +0000 (10:32 -0700)]
am 425524db: Unmount all asec apps before encrypting

* commit '425524dba1552ab3d2ad39e205e65d0a2af997f2':
  Unmount all asec apps before encrypting

12 years agoUnmount all asec apps before encrypting
Ken Sumrall [Fri, 15 Jun 2012 03:55:28 +0000 (20:55 -0700)]
Unmount all asec apps before encrypting

Now that forward locked apps are stored on /data as asec image files
that are mounted, they need to be unmounted before /data can be unmounted
so it can be encrypted.

Change-Id: I7c87deb52aaed21c8ad8ce8aceb7c15c2338620a

12 years agoUnmount all asec apps before encrypting
Ken Sumrall [Fri, 15 Jun 2012 03:55:28 +0000 (20:55 -0700)]
Unmount all asec apps before encrypting

Now that forward locked apps are stored on /data as asec image files
that are mounted, they need to be unmounted before /data can be unmounted
so it can be encrypted.

Change-Id: I7c87deb52aaed21c8ad8ce8aceb7c15c2338620a

12 years agoam e925ff66: am bac5eb96: Merge "Delay disk inserted broadcast until disk is ready"
Jean-Baptiste Queru [Tue, 22 May 2012 14:46:42 +0000 (07:46 -0700)]
am e925ff66: am bac5eb96: Merge "Delay disk inserted broadcast until disk is ready"

* commit 'e925ff6670bb9cef9118ddceb2e3bff81833bd09':
  Delay disk inserted broadcast until disk is ready

12 years agoam bac5eb96: Merge "Delay disk inserted broadcast until disk is ready"
Jean-Baptiste Queru [Tue, 22 May 2012 14:44:54 +0000 (07:44 -0700)]
am bac5eb96: Merge "Delay disk inserted broadcast until disk is ready"

* commit 'bac5eb966c5c3aa9abe83cdb5187326f422741ab':
  Delay disk inserted broadcast until disk is ready

12 years agoMerge "Delay disk inserted broadcast until disk is ready"
Jean-Baptiste Queru [Tue, 22 May 2012 14:25:51 +0000 (07:25 -0700)]
Merge "Delay disk inserted broadcast until disk is ready"

12 years agoam 2fdea0aa: Reconcile with jb-release nakasi-factoryrom-release
The Android Open Source Project [Wed, 16 May 2012 15:46:29 +0000 (08:46 -0700)]
am 2fdea0aa: Reconcile with jb-release nakasi-factoryrom-release

* commit '2fdea0aa78cefce50c6f51be97084977f2a6ae69':
  Native library loading needs to read directory
  Only set permissions on dirs or files
  Fix truncation of ASEC ids

12 years agoReconcile with jb-release nakasi-factoryrom-release
The Android Open Source Project [Wed, 16 May 2012 15:41:18 +0000 (08:41 -0700)]
Reconcile with jb-release nakasi-factoryrom-release

Change-Id: I2bc2763dc285edb9aa8bd9bedd068ee4483a3ce5

12 years agomerge in jb-release history after reset to jb-dev
The Android Automerger [Mon, 14 May 2012 14:06:23 +0000 (07:06 -0700)]
merge in jb-release history after reset to jb-dev

12 years agoam 760cec44: am 41836711: Merge "Sleep to wait for dm to create node" into jb-dev
Kenny Root [Fri, 11 May 2012 06:36:13 +0000 (23:36 -0700)]
am 760cec44: am 41836711: Merge "Sleep to wait for dm to create node" into jb-dev

* commit '760cec444b0f3c8a243d100cd5f5520af7531d17':
  Sleep to wait for dm to create node

12 years agoam 41836711: Merge "Sleep to wait for dm to create node" into jb-dev
Kenny Root [Fri, 11 May 2012 06:32:27 +0000 (23:32 -0700)]
am 41836711: Merge "Sleep to wait for dm to create node" into jb-dev

* commit '418367112c96f6ce45aa142d613a575046b7f65f':
  Sleep to wait for dm to create node

12 years agoMerge "Sleep to wait for dm to create node" into jb-dev
Kenny Root [Fri, 11 May 2012 06:30:35 +0000 (23:30 -0700)]
Merge "Sleep to wait for dm to create node" into jb-dev

12 years agoNative library loading needs to read directory
Kenny Root [Thu, 10 May 2012 23:45:29 +0000 (16:45 -0700)]
Native library loading needs to read directory

When calling System.loadLibrary(), it needs to be able to read the
directory to load the file. We could probably fix that, but changing
permissions here is faster.

Bug: 6478606
Change-Id: I296b0805839da5a19950157f9a16755a4d258ca8

12 years agoOnly set permissions on dirs or files
Kenny Root [Thu, 10 May 2012 22:39:53 +0000 (15:39 -0700)]
Only set permissions on dirs or files

Traversal would mark directories with the correct permissions, but
they're visited again in post-order which is a different fts_info flag.
Then it would set that to regular file permissions.

Explicitly check to make sure we're looking at a file instead.

Bug: 6478606
Change-Id: I13cab3e69f451da6a994fa974d575ef366f82025

12 years agoSleep to wait for dm to create node
Kenny Root [Thu, 3 May 2012 20:49:46 +0000 (13:49 -0700)]
Sleep to wait for dm to create node

There appears to be a race condition from when the device mapper is
asked to create a device and when it actually appears. When we moved
ASECs to use Ext4, mount started winning the race more often.

Just insert a sleep-retry loop here to counter-act this race. We should
ideally look at the uevent replies, but it takes a bit more effort to
separate them out.

Change-Id: Ie8a5b36b1c9a26f2320a178d37312059d03a1281

12 years agoam 9688165c: am 1a673c86: Native library loading needs to read directory
Kenny Root [Thu, 10 May 2012 23:59:18 +0000 (16:59 -0700)]
am 9688165c: am 1a673c86: Native library loading needs to read directory

* commit '9688165c81a1ab4c2ce08fc831030eebcf2ecc6f':
  Native library loading needs to read directory

12 years agoam 1a673c86: Native library loading needs to read directory
Kenny Root [Thu, 10 May 2012 23:56:35 +0000 (16:56 -0700)]
am 1a673c86: Native library loading needs to read directory

* commit '1a673c868c2d2d81fcaeab34b4a7c75d4a978584':
  Native library loading needs to read directory

12 years agoam 457197c5: am 348c8aba: Only set permissions on dirs or files
Kenny Root [Thu, 10 May 2012 23:48:16 +0000 (16:48 -0700)]
am 457197c5: am 348c8aba: Only set permissions on dirs or files

* commit '457197c50056216c1552e020998274a3bb249dd9':
  Only set permissions on dirs or files

12 years agoNative library loading needs to read directory
Kenny Root [Thu, 10 May 2012 23:45:29 +0000 (16:45 -0700)]
Native library loading needs to read directory

When calling System.loadLibrary(), it needs to be able to read the
directory to load the file. We could probably fix that, but changing
permissions here is faster.

Bug: 6478606
Change-Id: I296b0805839da5a19950157f9a16755a4d258ca8

12 years agoam 348c8aba: Only set permissions on dirs or files
Kenny Root [Thu, 10 May 2012 23:46:37 +0000 (16:46 -0700)]
am 348c8aba: Only set permissions on dirs or files

* commit '348c8aba0d2df2996e0fe57900ef518c6aeb4b29':
  Only set permissions on dirs or files

12 years agoOnly set permissions on dirs or files
Kenny Root [Thu, 10 May 2012 22:39:53 +0000 (15:39 -0700)]
Only set permissions on dirs or files

Traversal would mark directories with the correct permissions, but
they're visited again in post-order which is a different fts_info flag.
Then it would set that to regular file permissions.

Explicitly check to make sure we're looking at a file instead.

Bug: 6478606
Change-Id: I13cab3e69f451da6a994fa974d575ef366f82025

12 years agoam 0e110bb5: am 5cf6325c: Merge "Unshare ums when SD card is removed"
Jean-Baptiste Queru [Tue, 8 May 2012 22:13:22 +0000 (15:13 -0700)]
am 0e110bb5: am 5cf6325c: Merge "Unshare ums when SD card is removed"

* commit '0e110bb5a2559b60003effa0e0bf460993e634a6':
  Unshare ums when SD card is removed

12 years agoam 5cf6325c: Merge "Unshare ums when SD card is removed"
Jean-Baptiste Queru [Tue, 8 May 2012 20:39:20 +0000 (13:39 -0700)]
am 5cf6325c: Merge "Unshare ums when SD card is removed"

* commit '5cf6325c91792dbb1bb08fa1958c1fc8a5b9c45d':
  Unshare ums when SD card is removed

12 years agoMerge "Unshare ums when SD card is removed"
Jean-Baptiste Queru [Tue, 8 May 2012 16:55:55 +0000 (09:55 -0700)]
Merge "Unshare ums when SD card is removed"

12 years agoDelay disk inserted broadcast until disk is ready
Magnus Malmborn [Wed, 19 Jan 2011 11:26:52 +0000 (12:26 +0100)]
Delay disk inserted broadcast until disk is ready

Delay sending of "VolumeDiskInserted" broadcast until the disk is
ready (ie until all the partitions have been received from
kernel). This solves a race with MountService, otherwise there is a
risk that MountService tries to mount the SD-card before the
partition(s) have been received and the card will fail to mount.

Change-Id: Ie2a28227ae9a7d6fe9106fb6875f469a0e899014

12 years agoUnshare ums when SD card is removed
Lars Svensson [Thu, 7 Apr 2011 13:17:43 +0000 (15:17 +0200)]
Unshare ums when SD card is removed

If SD card is removed without unmounting when in USB mass storage mode
the ums share is not properly closed and the device files 179:0 and 179:1
are left in use. This causes erratic behaviour on subsequent operations on
the card, i.e. mounting and formatting will fail.

Change-Id: I757703c6282f4b76e2d8b027f4644920737309b6

12 years agomerge in jb-release history after reset to jb-dev
The Android Automerger [Wed, 2 May 2012 14:14:05 +0000 (07:14 -0700)]
merge in jb-release history after reset to jb-dev

12 years agoam e5032c42: Changes to encryption to work with the new filesystem manager
Ken Sumrall [Tue, 1 May 2012 21:04:56 +0000 (14:04 -0700)]
am e5032c42: Changes to encryption to work with the new filesystem manager

* commit 'e5032c42da3c33a854df0a24a7968b4ab54190b9':
  Changes to encryption to work with the new filesystem manager

12 years agoChanges to encryption to work with the new filesystem manager
Ken Sumrall [Mon, 2 Apr 2012 06:58:44 +0000 (23:58 -0700)]
Changes to encryption to work with the new filesystem manager

The new filesystem manager is in charge of mounting the block devices now,
removing much of the knowledge from init.<device>.rc.  This also let us
clean up some init code dealing with encryption, so this change updates
vold to work with that.  More cleanup is possible, but the main goal of the
filesystem manager was to enable e2fsck, not a full cleanup of encryption.

Change-Id: I00ea80a923d14770ed8fdd190e8840be195f8514

12 years agoChanges to encryption to work with the new filesystem manager
Ken Sumrall [Mon, 2 Apr 2012 06:58:44 +0000 (23:58 -0700)]
Changes to encryption to work with the new filesystem manager

The new filesystem manager is in charge of mounting the block devices now,
removing much of the knowledge from init.<device>.rc.  This also let us
clean up some init code dealing with encryption, so this change updates
vold to work with that.  More cleanup is possible, but the main goal of the
filesystem manager was to enable e2fsck, not a full cleanup of encryption.

Change-Id: I00ea80a923d14770ed8fdd190e8840be195f8514

12 years agoFix truncation of ASEC ids
Kenny Root [Fri, 27 Apr 2012 22:33:58 +0000 (15:33 -0700)]
Fix truncation of ASEC ids

Change-Id: I1e6bfcc6b0a5be47e6fd19922fc81669f61b5dba

12 years agoFix truncation of ASEC ids
Kenny Root [Fri, 27 Apr 2012 22:33:58 +0000 (15:33 -0700)]
Fix truncation of ASEC ids

Change-Id: I1e6bfcc6b0a5be47e6fd19922fc81669f61b5dba

12 years agoAdd in ext4 support for ASEC containers
Kenny Root [Wed, 4 Apr 2012 00:23:01 +0000 (17:23 -0700)]
Add in ext4 support for ASEC containers

Now forward locked applications will be in ASEC containers both internal
to the system and externally.

This change adds support for putting applications in ext4-based ASECs.

Change-Id: I8d6765b72dd2606e429c067b47a2dbcaa8bef37d

12 years agoMerge remote-tracking branch 'goog/ics-aah-exp'
Mike Lockwood [Wed, 21 Mar 2012 22:45:48 +0000 (15:45 -0700)]
Merge remote-tracking branch 'goog/ics-aah-exp'

12 years agoMerge commit '43b80c229bdee7f32654e2ec561078c5c94c8851'
Mike Lockwood [Wed, 21 Mar 2012 22:44:48 +0000 (15:44 -0700)]
Merge commit '43b80c229bdee7f32654e2ec561078c5c94c8851'

empty merge with -s ours

Change-Id: I4c7d6fb13e175af819cab784704e08e9189f6739

12 years agoMerge "Fix vdc to add sequence number for NativeConectorDaemon"
Ken Sumrall [Sat, 10 Mar 2012 01:02:58 +0000 (17:02 -0800)]
Merge "Fix vdc to add sequence number for NativeConectorDaemon"

12 years agoMerge "Fix to not return a bogus decryption error when a device is not encrypted."
Ken Sumrall [Sat, 10 Mar 2012 01:02:44 +0000 (17:02 -0800)]
Merge "Fix to not return a bogus decryption error when a device is not encrypted."

12 years agoFix vdc to add sequence number for NativeConectorDaemon
Ken Sumrall [Sat, 10 Mar 2012 00:48:48 +0000 (16:48 -0800)]
Fix vdc to add sequence number for NativeConectorDaemon

NativeConnectorDaemon was changed to use an optional sequence number,
and most services were changed to require it.  Now that vold requires
a sequence number, vdc must provide one.

Change-Id: Ibdff9878faf19eae25525221c80bcb5e5f87cfea

12 years agoMerge "Use sched_policy to avoid hard-coded cpuctl path"
Glenn Kasten [Wed, 7 Mar 2012 15:15:48 +0000 (07:15 -0800)]
Merge "Use sched_policy to avoid hard-coded cpuctl path"

12 years agoUse sched_policy to avoid hard-coded cpuctl path
Glenn Kasten [Mon, 5 Mar 2012 23:14:33 +0000 (15:14 -0800)]
Use sched_policy to avoid hard-coded cpuctl path

Change-Id: I8f62287d1b60d8eef72d1dfc64be5c3d56e9f498

12 years agoUse the new command numbering scheme.
Robert Greenwalt [Thu, 16 Feb 2012 22:43:03 +0000 (14:43 -0800)]
Use the new command numbering scheme.

Support multiple commands on a single socket via command numbers.
NativeDaemonConnector has been changed, so we need to use it here
too.

bug:5864209
Change-Id: Ie06e966d50057d122a958377731c0385ea367b69

12 years agovold: add -Werror=format
Nick Kralevich [Thu, 23 Feb 2012 21:20:30 +0000 (13:20 -0800)]
vold: add -Werror=format

Stop format string bugs from creeping into root level processes.

Change-Id: Ifa19ac0cacba76392040ab16cebe557b5b016706

12 years agoAdd support for wiping data immediately if crypt fails
Mike Lockwood [Wed, 15 Feb 2012 21:43:28 +0000 (13:43 -0800)]
Add support for wiping data immediately if crypt fails

Needed for headless devices that need to recover with no user intervention

Bug: 5556856

Change-Id: I0f85591df513a6893324fb057bde114ac1df044b
Signed-off-by: Mike Lockwood <lockwood@google.com>
12 years agoAdd support for wiping data immediately if crypt fails
Mike Lockwood [Wed, 15 Feb 2012 21:43:28 +0000 (13:43 -0800)]
Add support for wiping data immediately if crypt fails

Needed for headless devices that need to recover with no user intervention

Bug: 5556856

Change-Id: Iabe5d68599259b14626bfcf45e6697d81b866101
Signed-off-by: Mike Lockwood <lockwood@google.com>
12 years agoFix to not return a bogus decryption error when a device is not encrypted.
Ken Sumrall [Thu, 15 Dec 2011 05:24:27 +0000 (21:24 -0800)]
Fix to not return a bogus decryption error when a device is not encrypted.

If there is filesystem damage on a non-encrypted device, and /data is not
mountable, and if the device stores the keys in a file on a different
partition (like on Crespo) then, vold would return an error which caused
the crypto UI to present an option to the user to wipe the device because
it assumed encryption had failed.  This fixes it to not do that.

Change-Id: Ibff6299787b45768416dbc4052de7db3b140b808

12 years agokeep previous history after reset to mr1 plus aah changes (ics-aah-wip)
Ed Heyl [Fri, 28 Oct 2011 19:06:01 +0000 (19:06 +0000)]
keep previous history after reset to mr1 plus aah changes (ics-aah-wip)

12 years agoundo reset to ics-mr1 until we have a better method
Ed Heyl [Wed, 26 Oct 2011 21:53:28 +0000 (21:53 +0000)]
undo reset to ics-mr1 until we have a better method

12 years agoreset to ics-mr1, but keep history
Ed Heyl [Wed, 26 Oct 2011 18:50:28 +0000 (18:50 +0000)]
reset to ics-mr1, but keep history

12 years agoam 8c487331: (-s ours) Rename LOG() to ALOG() DO NOT MERGE
Steve Block [Tue, 25 Oct 2011 17:59:51 +0000 (10:59 -0700)]
am 8c487331: (-s ours) Rename LOG() to ALOG()  DO NOT MERGE

* commit '8c4873319a77c54cc198a4e5f4429099ff9da4f7':
  Rename LOG() to ALOG()  DO NOT MERGE

12 years agoRename LOG() to ALOG() DO NOT MERGE
Steve Block [Wed, 12 Oct 2011 16:28:59 +0000 (17:28 +0100)]
Rename LOG() to ALOG()  DO NOT MERGE

See https://android-git.corp.google.com/g/#/c/141576

Bug: 5449033
Change-Id: Icc1c76abe506d53c07c7c3db526c6fa05f73988b

12 years agoAdd the new verifypw command to vold/cryptfs
Ken Sumrall [Wed, 5 Oct 2011 03:38:29 +0000 (20:38 -0700)]
Add the new verifypw command to vold/cryptfs

This vold command returns 0 if the given password matches the password
used to decrypt the device on boot.  It returns 1 if they don't match,
and it returns -1 on an internal error, and -2 if the device is not encrypted.

Also check the uid of the sender of the command and only allow the root and
system users to issue cryptfs commands.

Change-Id: I5e5ae3b72a2d7814ae68c2d49aa9deb90fb1dac5

12 years agoFix cryptfs to work with a raw block device for key storage
Ken Sumrall [Wed, 14 Sep 2011 23:53:46 +0000 (16:53 -0700)]
Fix cryptfs to work with a raw block device for key storage

If a raw block is specified for key storage, do not try to force the size
of the file to 16 Kbytes when writing the keys, and do not complain if
the size is not 16 Kbytes when reading the keys.  Only do them if the
keyfile is a regular file.

Change-Id: I4de1cb7c3614479d93289d4f2767ca6ce1bbbc73

12 years agoAdd the ability to revert a crypto mapping when unmounting a volume
Ken Sumrall [Wed, 31 Aug 2011 23:14:23 +0000 (16:14 -0700)]
Add the ability to revert a crypto mapping when unmounting a volume

Add the force_and_revert option to the unmount command which will force
the unmount, and revert a crypto mapping.  This is used during factory
reset so that when the internal sdcard volume is formatted, it formats
the raw device, not the encrypted mapping.

Change-Id: I36b6ff9bb54863b121de635472a303bf4a2334a9

12 years agoReconcile with gingerbread-release
The Android Open Source Project [Mon, 18 Jul 2011 15:10:23 +0000 (08:10 -0700)]
Reconcile with gingerbread-release

Change-Id: Ia9383258bc25f7a82628a1c7238140b810e2f3d3

12 years agoam 6c190fd3: am 137858b4: resolved conflicts for merge of 5284bcff to gingerbread...
David 'Digit' Turner [Thu, 14 Jul 2011 17:56:08 +0000 (10:56 -0700)]
am 6c190fd3: am 137858b4: resolved conflicts for merge of 5284bcff to gingerbread-plus-aosp

* commit '6c190fd326099d8315e194b0ad0a173e21146e14':
  Avoid array overrun. We can now mount the /sdcard partition on our boot sdcards

12 years agoam 137858b4: resolved conflicts for merge of 5284bcff to gingerbread-plus-aosp
David 'Digit' Turner [Thu, 14 Jul 2011 16:18:29 +0000 (09:18 -0700)]
am 137858b4: resolved conflicts for merge of 5284bcff to gingerbread-plus-aosp

* commit '137858b43b7e0ed46fb8ebce9230eb40f0a62432':
  Avoid array overrun. We can now mount the /sdcard partition on our boot sdcards

12 years agoresolved conflicts for merge of 5284bcff to gingerbread-plus-aosp
David 'Digit' Turner [Thu, 14 Jul 2011 05:35:14 +0000 (07:35 +0200)]
resolved conflicts for merge of 5284bcff to gingerbread-plus-aosp

Change-Id: I108a0c32efb5add1fec41bfe76f041971801d48d

12 years agoMerge "Remove the simulator target from all makefiles. Bug: 5010576"
Jeff Brown [Tue, 12 Jul 2011 19:17:00 +0000 (12:17 -0700)]
Merge "Remove the simulator target from all makefiles. Bug: 5010576"

12 years agoRemove the simulator target from all makefiles.
Jeff Brown [Tue, 12 Jul 2011 05:12:37 +0000 (22:12 -0700)]
Remove the simulator target from all makefiles.
Bug: 5010576

Change-Id: I7e531101ae057fb059d7d56c99433c4d66e866dc

12 years agoMerge "Prevent sharing or formatting of a vold managed volumes during encryption."
Ken Sumrall [Mon, 11 Jul 2011 22:51:09 +0000 (15:51 -0700)]
Merge "Prevent sharing or formatting of a vold managed volumes during encryption."

12 years agoPrevent sharing or formatting of a vold managed volumes during encryption.
Ken Sumrall [Mon, 11 Jul 2011 22:38:57 +0000 (15:38 -0700)]
Prevent sharing or formatting of a vold managed volumes during encryption.

Mounting was already not allowed, but also unshare before starting
encryption, and don't allow sharing or formatting to be initiated
during encrytion.

Change-Id: Ida188d81f025739ba4dd90492b3e66088735991e

12 years agoMerge "Fix to display the proper percentage complete during encryption."
Ken Sumrall [Mon, 11 Jul 2011 22:37:05 +0000 (15:37 -0700)]
Merge "Fix to display the proper percentage complete during encryption."

12 years agoFix to display the proper percentage complete during encryption.
Ken Sumrall [Wed, 29 Jun 2011 01:45:14 +0000 (18:45 -0700)]
Fix to display the proper percentage complete during encryption.

Forgot to include the size of the userdata partition when computing
the total size of vold managed volumes to encrypt.

Change-Id: I237548439d4380b4225ffbc603fa972c3b1c5bae

12 years agoreset, and keep history
android-merger [Fri, 8 Jul 2011 19:29:24 +0000 (12:29 -0700)]
reset, and keep history

12 years agomerge intel x86 patches into gingerbread branch
David 'Digit' Turner [Fri, 8 Jul 2011 16:19:06 +0000 (18:19 +0200)]
merge intel x86 patches into gingerbread branch

12 years agoReconcile with gingerbread-release
The Android Open Source Project [Thu, 7 Jul 2011 22:22:42 +0000 (15:22 -0700)]
Reconcile with gingerbread-release

Change-Id: I3cb3d915837ebe59c2d7007d71ef3a1f334e9b8b

12 years agoRevert "add bounds checking for mPartMinors[]"
android-merger [Thu, 7 Jul 2011 21:54:24 +0000 (14:54 -0700)]
Revert "add bounds checking for mPartMinors[]"

This reverts commit f3d3ce5e53ab7928f4c292c183c417a1bd051151.

12 years agoRevert "vold: Enable the SO_PASSCRED socket option"
android-merger [Thu, 7 Jul 2011 21:54:01 +0000 (14:54 -0700)]
Revert "vold: Enable the SO_PASSCRED socket option"

This reverts commit c51920c82463b240e2be0430849837d6fdc5352e.

12 years agovold: retry mounting partition
Joseph Lehrer [Mon, 11 Apr 2011 22:02:50 +0000 (15:02 -0700)]
vold: retry mounting partition

Works around a race condition between the vold and MountService uevent handlers

Change-Id: I71c92f2e9b92e1fefc192da166a91d81bc60e242
Signed-off-by: Mike Lockwood <lockwood@android.com>
13 years agoam 273d3549: am 2c9d8de7: Merge "Prevent buffer overflows."
Mike Lockwood [Wed, 29 Jun 2011 13:46:53 +0000 (06:46 -0700)]
am 273d3549: am 2c9d8de7: Merge "Prevent buffer overflows."

* commit '273d3549198d144331f3e502eeb1215417d72b16':
  Prevent buffer overflows.

13 years agoam 2c9d8de7: Merge "Prevent buffer overflows."
Mike Lockwood [Wed, 29 Jun 2011 13:42:33 +0000 (06:42 -0700)]
am 2c9d8de7: Merge "Prevent buffer overflows."

* commit '2c9d8de79a0dd7f894c65777a197c86486aff96c':
  Prevent buffer overflows.

13 years agoMerge "Prevent buffer overflows."
Mike Lockwood [Wed, 29 Jun 2011 13:30:38 +0000 (06:30 -0700)]
Merge "Prevent buffer overflows."

13 years agoAdd new vold call to get the path to an asec fs.
Dianne Hackborn [Mon, 27 Jun 2011 20:37:07 +0000 (13:37 -0700)]
Add new vold call to get the path to an asec fs.

Change-Id: Ife15628ed6e2493c9e85a2ade6d59a194fdddde5

13 years agoPrevent buffer overflows.
Peter Bohm [Fri, 1 Apr 2011 10:35:25 +0000 (12:35 +0200)]
Prevent buffer overflows.

To eliminate possible buffer overflows some strcpy,
sprintf and strcat have been changed to strlcpy,
snprintf and strlcat.

Change-Id: Ieb9d4b600c894946a6492f8629ff39f2fcc106d3
Signed-off-by: Oskar Andero <oskar.andero@sonyericsson.com>
13 years agoUpdate path for seting USB mass storage backing store
Mike Lockwood [Tue, 7 Jun 2011 17:51:38 +0000 (10:51 -0700)]
Update path for seting USB mass storage backing store

Change-Id: I0e5fab1624e5ef5d2f55e2584d8adc1b6bab91b0
Signed-off-by: Mike Lockwood <lockwood@android.com>
13 years agoMerge "Remove obsolete code for monitoring USB status"
Mike Lockwood [Sat, 18 Jun 2011 03:55:07 +0000 (20:55 -0700)]
Merge "Remove obsolete code for monitoring USB status"

13 years agoMerge "Don't abort the encryption process if an internal volume is present but unmoun...
Ken Sumrall [Tue, 14 Jun 2011 22:30:36 +0000 (15:30 -0700)]
Merge "Don't abort the encryption process if an internal volume is present but unmounted."

13 years agoDon't abort the encryption process if an internal volume is present but unmounted.
Ken Sumrall [Tue, 14 Jun 2011 21:01:55 +0000 (14:01 -0700)]
Don't abort the encryption process if an internal volume is present but unmounted.

It is not a failure if the SD card is not mounted.

Change-Id: If954f77c55ac124b9b7b39c89ffbafb4e5ea9e98

13 years agoam 598e833d: am b20d54b2: Merge "fix double closing file descriptors"
Nick Kralevich [Thu, 9 Jun 2011 18:27:38 +0000 (11:27 -0700)]
am 598e833d: am b20d54b2: Merge "fix double closing file descriptors"

* commit '598e833d42a687259bc3c9a5a39ad9ba8b105cbb':
  fix double closing file descriptors

13 years agoAvoid array overrun. We can now mount the /sdcard partition on our boot sdcards
Bruce Beare [Thu, 22 Jul 2010 20:23:33 +0000 (13:23 -0700)]
Avoid array overrun. We can now mount the /sdcard partition on our boot sdcards

Orig-Change-Id: I6e9db8c55db49b4aa61dd40cd59495f55e5b3368
Signed-off-by: Bruce Beare <brucex.j.beare@intel.com>