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
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
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
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
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
* commit '2fdea0aa78cefce50c6f51be97084977f2a6ae69':
Native library loading needs to read directory
Only set permissions on dirs or files
Fix truncation of ASEC ids
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
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
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
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
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
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
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
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
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