Commit graph

347 commits

Author SHA1 Message Date
Kenny Root
62224a32f0 am eacf7e03: Only cleanup ASECs in external storage DO NOT MERGE
* commit 'eacf7e03d60a2b33ac6cdaa0e01bd6a6fdd9455a':
  Only cleanup ASECs in external storage DO NOT MERGE
2012-08-13 11:42:56 -07:00
Kenny Root
eacf7e03d6 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 93ecb38dad)

Bug: 6948035
Change-Id: Ib60727bd360caa32173797ff5b4e1e21fcf20054
2012-08-13 09:49:55 -07:00
Kenny Root
93ecb38dad 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
2012-08-09 15:50:58 -07:00
Ken Sumrall
912d0b0755 Merge "Fix a typo in cryptfs.c" 2012-06-28 17:58:50 -07:00
Ken Sumrall
319369ac11 Fix a typo in cryptfs.c
Change-Id: If629fa996b135e432bc89da7518b0c1f02750b45
2012-06-27 16:30:18 -07:00
Nick Kralevich
4684e58a8d 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
2012-06-26 15:07:03 -07:00
The Android Open Source Project
b405f36760 am 9ee8a315: Reconcile with jb-release
* commit '9ee8a315eefde7e6ad1bc07bc9d50528f548e8e8':
  Unmount all asec apps before encrypting
2012-06-19 06:20:12 -07:00
The Android Open Source Project
9ee8a315ee Reconcile with jb-release
Change-Id: I60294fb5c41ef34eccc322889168497d9449c6ea
2012-06-19 06:13:59 -07:00
Ken Sumrall
51d1ae176e am a7926050: am 425524db: Unmount all asec apps before encrypting
* commit 'a79260500a869f867118a6e5289c6e5a0353558f':
  Unmount all asec apps before encrypting
2012-06-18 10:52:20 -07:00
Ken Sumrall
a79260500a am 425524db: Unmount all asec apps before encrypting
* commit '425524dba1552ab3d2ad39e205e65d0a2af997f2':
  Unmount all asec apps before encrypting
2012-06-18 10:32:48 -07:00
Ken Sumrall
4053aaef6f 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
2012-06-15 16:17:07 -07:00
Ken Sumrall
425524dba1 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
2012-06-15 14:46:53 -07:00
Jean-Baptiste Queru
fc676b69bd am e925ff66: am bac5eb96: Merge "Delay disk inserted broadcast until disk is ready"
* commit 'e925ff6670bb9cef9118ddceb2e3bff81833bd09':
  Delay disk inserted broadcast until disk is ready
2012-05-22 07:46:42 -07:00
Jean-Baptiste Queru
e925ff6670 am bac5eb96: Merge "Delay disk inserted broadcast until disk is ready"
* commit 'bac5eb966c5c3aa9abe83cdb5187326f422741ab':
  Delay disk inserted broadcast until disk is ready
2012-05-22 07:44:54 -07:00
Jean-Baptiste Queru
bac5eb966c Merge "Delay disk inserted broadcast until disk is ready" 2012-05-22 07:25:52 -07:00
The Android Open Source Project
ac3d1eac00 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
2012-05-16 08:46:29 -07:00
The Android Open Source Project
2fdea0aa78 Reconcile with jb-release nakasi-factoryrom-release
Change-Id: I2bc2763dc285edb9aa8bd9bedd068ee4483a3ce5
2012-05-16 08:41:18 -07:00
The Android Automerger
bfc7db4772 merge in jb-release history after reset to jb-dev 2012-05-14 07:06:23 -07:00
Kenny Root
b1dd92ca9f 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
2012-05-10 23:36:13 -07:00
Kenny Root
760cec444b am 41836711: Merge "Sleep to wait for dm to create node" into jb-dev
* commit '418367112c96f6ce45aa142d613a575046b7f65f':
  Sleep to wait for dm to create node
2012-05-10 23:32:27 -07:00
Kenny Root
418367112c Merge "Sleep to wait for dm to create node" into jb-dev 2012-05-10 23:30:35 -07:00
Kenny Root
4817b30fb3 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
2012-05-10 18:09:40 -07:00
Kenny Root
59f31de0d4 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
2012-05-10 18:09:40 -07:00
Kenny Root
cdc2a1c835 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
2012-05-10 17:27:30 -07:00
Kenny Root
e80077f183 am 9688165c: am 1a673c86: Native library loading needs to read directory
* commit '9688165c81a1ab4c2ce08fc831030eebcf2ecc6f':
  Native library loading needs to read directory
2012-05-10 16:59:18 -07:00
Kenny Root
9688165c81 am 1a673c86: Native library loading needs to read directory
* commit '1a673c868c2d2d81fcaeab34b4a7c75d4a978584':
  Native library loading needs to read directory
2012-05-10 16:56:35 -07:00
Kenny Root
dc452c399d am 457197c5: am 348c8aba: Only set permissions on dirs or files
* commit '457197c50056216c1552e020998274a3bb249dd9':
  Only set permissions on dirs or files
2012-05-10 16:48:16 -07:00
Kenny Root
1a673c868c 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
2012-05-10 16:47:24 -07:00
Kenny Root
457197c500 am 348c8aba: Only set permissions on dirs or files
* commit '348c8aba0d2df2996e0fe57900ef518c6aeb4b29':
  Only set permissions on dirs or files
2012-05-10 16:46:37 -07:00
Kenny Root
348c8aba0d 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
2012-05-10 15:41:16 -07:00
Jean-Baptiste Queru
7bffd4486d am 0e110bb5: am 5cf6325c: Merge "Unshare ums when SD card is removed"
* commit '0e110bb5a2559b60003effa0e0bf460993e634a6':
  Unshare ums when SD card is removed
2012-05-08 15:13:22 -07:00
Jean-Baptiste Queru
0e110bb5a2 am 5cf6325c: Merge "Unshare ums when SD card is removed"
* commit '5cf6325c91792dbb1bb08fa1958c1fc8a5b9c45d':
  Unshare ums when SD card is removed
2012-05-08 13:39:20 -07:00
Jean-Baptiste Queru
5cf6325c91 Merge "Unshare ums when SD card is removed" 2012-05-08 09:55:56 -07:00
Magnus Malmborn
3dafc26e4f 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
2012-05-07 17:23:15 -07:00
Lars Svensson
6273661968 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
2012-05-07 15:16:23 -07:00
The Android Automerger
e9435395d0 merge in jb-release history after reset to jb-dev 2012-05-02 07:14:05 -07:00
Ken Sumrall
af05ec0e5e am e5032c42: Changes to encryption to work with the new filesystem manager
* commit 'e5032c42da3c33a854df0a24a7968b4ab54190b9':
  Changes to encryption to work with the new filesystem manager
2012-05-01 14:04:56 -07:00
Ken Sumrall
e5032c42da 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
2012-05-01 13:14:55 -07:00
Ken Sumrall
f0679f0da4 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
2012-04-27 16:44:22 -07:00
Kenny Root
5dcf48a2c5 Fix truncation of ASEC ids
Change-Id: I1e6bfcc6b0a5be47e6fd19922fc81669f61b5dba
2012-04-27 15:50:44 -07:00
Kenny Root
7b0bc85714 Fix truncation of ASEC ids
Change-Id: I1e6bfcc6b0a5be47e6fd19922fc81669f61b5dba
2012-04-27 15:33:58 -07:00
Kenny Root
344ca10856 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
2012-04-25 14:15:15 -07:00
Mike Lockwood
8cd47b4c3b Merge remote-tracking branch 'goog/ics-aah-exp' 2012-03-21 15:45:48 -07:00
Mike Lockwood
781bbab8dd Merge commit '43b80c229bdee7f32654e2ec561078c5c94c8851'
empty merge with -s ours

Change-Id: I4c7d6fb13e175af819cab784704e08e9189f6739
2012-03-21 15:45:26 -07:00
Ken Sumrall
b018fe74c2 Merge "Fix vdc to add sequence number for NativeConectorDaemon" 2012-03-09 17:02:58 -08:00
Ken Sumrall
d02a47239c Merge "Fix to not return a bogus decryption error when a device is not encrypted." 2012-03-09 17:02:44 -08:00
Ken Sumrall
d4b3661cae 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
2012-03-09 16:48:48 -08:00
Glenn Kasten
c7ad326381 Merge "Use sched_policy to avoid hard-coded cpuctl path" 2012-03-07 07:15:48 -08:00
Glenn Kasten
1b4807b19a Use sched_policy to avoid hard-coded cpuctl path
Change-Id: I8f62287d1b60d8eef72d1dfc64be5c3d56e9f498
2012-03-05 15:14:33 -08:00
Robert Greenwalt
149aa3eb65 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
2012-02-29 16:51:44 -08:00