summaryrefslogtreecommitdiffstats
path: root/DirectVolume.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'jb-mr1-release' of ↵Steve Kondik2012-11-181-7/+15
|\ | | | | | | | | | | | | | | | | https://android.googlesource.com/platform/system/vold into mr1 Conflicts: Volume.cpp Change-Id: I0b28a56ac2edf1807ee21d23058bcfc5b4bb7724
| * Merge "Delay disk inserted broadcast until disk is ready"Jean-Baptiste Queru2012-05-221-7/+10
| |\
| | * Delay disk inserted broadcast until disk is readyMagnus Malmborn2012-05-071-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | Unshare ums when SD card is removedLars Svensson2012-05-071-0/+5
| |/ | | | | | | | | | | | | | | | | 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
* | vold: fix handling of discs with multiple majors on ↵codeworkx2012-07-101-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DirectVolume::getShareDevice() The method DirectVolume::getShareDevice() returns an invalid device if the partition referenced by mPartIdx is bad. A bad partition is one where the major/minor numbers on disk don't match what is expected. The original major number is stored for bad partitions so the fix attempts to retrieve it and return it if applicable. This fix is one part of fixing ICS encryption on the i777 (and possibly other devices) where bad partitions may exist. Change-Id: Ic3b05dbf45315bde502c151f53928ca1891483f0
* | vold: fix an offset one bug that makes partition 4 unusableChih-Wei Huang2012-07-101-2/+2
| | | | | | | | Change-Id: Ic8e18e6191ad7ee33162e36060b57a6802cf0883
* | DirectVolume: handle discs with multiple major numberscodeworkx2012-07-101-1/+50
|/ | | | | | | | | | | | | | | | CFlag: BOARD_VOLD_DISC_HAS_MULTIPLE_MAJORS Allows Direct Volume to handle discs with multiple major numbers. Needed on Samsung Galaxy S II and variants. For example: mmcblk0p1 - 179:0 mmcblk0p2 - 179:1 mmcblk0p3 - 179:2 mmcblk0p4 - 256:0 mmcblk0p5 - 256:1 Change-Id: I633ac882a721cde25f0df779b4028efa6be15750
* Add the ability to revert a crypto mapping when unmounting a volumeKen Sumrall2011-08-311-1/+29
| | | | | | | | | 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
* am 6c190fd3: am 137858b4: resolved conflicts for merge of 5284bcff to ↵David 'Digit' Turner2011-07-141-2/+2
|\ | | | | | | | | | | | | gingerbread-plus-aosp * commit '6c190fd326099d8315e194b0ad0a173e21146e14': Avoid array overrun. We can now mount the /sdcard partition on our boot sdcards
| * resolved conflicts for merge of 5284bcff to gingerbread-plus-aospDavid 'Digit' Turner2011-07-141-2/+2
| |\ | | | | | | | | | Change-Id: I108a0c32efb5add1fec41bfe76f041971801d48d
| | * Avoid array overrun. We can now mount the /sdcard partition on our boot sdcardsBruce Beare2011-06-091-2/+6
| | | | | | | | | | | | | | | Orig-Change-Id: I6e9db8c55db49b4aa61dd40cd59495f55e5b3368 Signed-off-by: Bruce Beare <brucex.j.beare@intel.com>
* | | vold: retry mounting partitionJoseph Lehrer2011-07-061-0/+4
| | | | | | | | | | | | | | | | | | | | | Works around a race condition between the vold and MountService uevent handlers Change-Id: I71c92f2e9b92e1fefc192da166a91d81bc60e242 Signed-off-by: Mike Lockwood <lockwood@android.com>
* | | vold: allow to store key in a file on another partitionKen Sumrall2011-06-021-0/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for keeping the keys in a separate file on another partition, for devices with no space reserved for a footer after the userdata filesystem. Add support for encrypting the volumes managed by vold, if they meet certain criteria, namely being marked as nonremovable and encryptable in vold.fstab. A bit of trickiness is required to keep vold happy. Change-Id: Idf0611f74b56c1026c45742ca82e0c26e58828fe
* | | DirectVolume: don't continue on invalid PARTN valueNick Kralevich2011-04-291-2/+2
|/ / | | | | | | Change-Id: I1e434c5b47b40fabaf1e702d7f2e43a88c0497dc
* | am f3d3ce5e: add bounds checking for mPartMinors[]Nick Kralevich2011-04-181-0/+5
|\| | | | | | | | | * commit 'f3d3ce5e53ab7928f4c292c183c417a1bd051151': add bounds checking for mPartMinors[]
| * add bounds checking for mPartMinors[]Nick Kralevich2011-04-181-0/+5
| | | | | | | | Change-Id: I6d5b26756c8434d6396f3535252608ce61eabfd8
* | resolved conflicts for merge of 09f774b7 to gingerbread-plus-aospJean-Baptiste Queru2010-11-191-2/+2
|\ \ | | | | | | | | | Change-Id: I103db47198ad09783aa6539cde271df0fdb9c594
| * | vold: fix an offset one bug that makes partition 4 unusableChih-Wei Huang2010-11-171-2/+2
| | | | | | | | | | | | Change-Id: Ic8e18e6191ad7ee33162e36060b57a6802cf0883
* | | am 2dfe297e: Fixes for devices with internal FAT file system:Mike Lockwood2010-09-171-0/+8
|\ \ \ | |/ / |/| / | |/ | | | | | | Merge commit '2dfe297ec47559dbe2297a72bea71cf515c03797' into gingerbread-plus-aosp * commit '2dfe297ec47559dbe2297a72bea71cf515c03797': Fixes for devices with internal FAT file system:
| * Fixes for devices with internal FAT file system:Mike Lockwood2010-09-171-0/+8
| | | | | | | | | | | | | | | | | | | | Only share a single partition via UMS if a specific partition is specified in vold.fstab (rather than "auto") Do not fail to reformat if MBR cannot be found. Change-Id: I544ca2ee325c308af656ab9f4732c788a964c156 Signed-off-by: Mike Lockwood <lockwood@android.com>
* | VOLD - make volume daemon to handle state change from shared to no_mediaEthan2010-08-301-1/+16
| | | | | | | | | | | | | | | | When volume state changed from shared to no_media, volume is not properly unshared. Change-Id: I0117d67da95440d982275746a166ef6f4ac1c0e2 Signed-off-by: Ethan <ethan.too@gmail.com>
* | Avoid array overrun. We can now mount the /sdcard partition on our boot sdcardsBruce Beare2010-07-221-2/+6
|/ | | | | Change-Id: I6e9db8c55db49b4aa61dd40cd59495f55e5b3368 Signed-off-by: Bruce Beare <brucex.j.beare@intel.com>
* vold: Ensure we cleanup secure containers on card removal.San Mehat2010-04-151-0/+5
| | | | | | | | | | | Fixes bug: http://b/issue?id=2567572 Note: The framework will still likely restart since the system_server is holding references to assets on the card which are mmaped, but at least now storage will be available when a new card is re-inserted. Change-Id: I4e195c0c666426b93da47198fa826a6f58d855a9 Signed-off-by: San Mehat <san@google.com>
* vold: Switch from LOG -> SLOGSan Mehat2010-03-251-17/+17
| | | | | Change-Id: I48ee8bd90b47f5845f069cdf4d1b8ba6ecdb1b39 Signed-off-by: San Mehat <san@google.com>
* Revert "Prevent null pointer deref in DirectVolume"Kenny Root2010-03-241-33/+12
| | | | This reverts commit a9f423dd7e313854ce7c103e1bb4661b05efc9a4.
* Prevent null pointer deref in DirectVolumeKenny Root2010-03-241-12/+33
| | | | | | | | There's a possibility that if something were messed up a call to NetlinkEvent::findParam could return a NULL. Passing NULL as the argument into atoi() would cause a null pointer dereference. Change-Id: Ib071afbbe2adc341108c245ffa596cc8730bd8fd
* vold: Switch to using libdiskconfig for partition setup.San Mehat2010-03-101-6/+16
| | | | | | | Also handles an issue where NPARTS=0 on a disk change uevent Change-Id: I77c56f177dc65df91468bbd7d5fe1889db414d7a Signed-off-by: San Mehat <san@google.com>
* vold: Add 'force' option to anything that can cause an unmountSan Mehat2010-02-181-1/+1
| | | | Signed-off-by: San Mehat <san@google.com>
* vold2: Don't crap out if the kernel is missing the NPART/PARTN blkdev uevent ↵San Mehat2010-01-041-4/+28
| | | | | | patches Signed-off-by: San Mehat <san@google.com>
* vold2: Get mounting/unmounting/formatting/sharing workingSan Mehat2009-12-191-41/+161
| | | | Signed-off-by: San Mehat <san@google.com>
* vold2: Some more work on partitioning supportSan Mehat2009-10-211-3/+42
| | | | Signed-off-by: San Mehat <san@google.com>
* vold2: Wire up more of the mount functionSan Mehat2009-10-121-0/+5
| | | | Signed-off-by: San Mehat <san@android.com>
* vold2: Rename DeviceVolume -> DirectVolumeSan Mehat2009-10-121-0/+121
Signed-off-by: San Mehat <san@android.com>