summaryrefslogtreecommitdiffstats
path: root/fs_mgr
Commit message (Collapse)AuthorAgeFilesLines
* am f2bd3fdd: Merge "Provide a way to select force encryption from vendor ↵Leo Wang2015-01-091-1/+12
|\ | | | | | | | | | | | | partition" into lmp-mr1-dev * commit 'f2bd3fdd190fc1234913febfe254f8bcc4e675da': Provide a way to select force encryption from vendor partition
| * Provide a way to select force encryption from vendor partitionPaul Lawrence2015-01-071-1/+12
| | | | | | | | | | | | | | | | | | | | This allows a vendor to force encryption on devices via a vendor partition flag: ro.vold.forceencryption 1 Bug: 18764230 Change-Id: Id0049ce64e34e4f6f96e593aadd70c277ac131c8
* | am a97c1075: Merge "Fix Nick\'s nits"Elliott Hughes2014-12-101-4/+4
|\ \ | | | | | | | | | | | | * commit 'a97c10755442e3800c0b1011d986d554ce2096db': Fix Nick's nits
| * | Fix Nick's nitsPaul Lawrence2014-12-091-4/+4
| | | | | | | | | | | | | | | | | | (cherry-pick of 97e487311b1cb780dfd3b0994917c72047d6188f.) Change-Id: Ide7925e7ad328f0343d444d63ff72f1a26206d4c
* | | am 294e610f: Merge "Fix verity on system partitions larger than 2G"Elliott Hughes2014-12-101-3/+4
|\ \ \ | |/ / | | | | | | | | | * commit '294e610f886eeb839d16172bb5b98559a6a7434d': Fix verity on system partitions larger than 2G
| * | Fix verity on system partitions larger than 2GSami Tolvanen2014-12-091-22/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the system partition is larger than 2G, the device fails to read verity metadata, because fseek accepts only a 32-bit signed offset. Switch from fseek to lseek64 to allow seeking using a 64-bit offset, which solves the problem. At the same time, move away from stdio in the function. (cherry-pick of 4cafe2ff89b49329e0e880900195d8e061bd3750.) Bug: 17705619 Change-Id: I226320498dcb750ec6cde84411c7fe0774c9cab7
* | | resolved conflicts for merge of b471f524 to lmp-mr1-dev-plus-aospElliott Hughes2014-12-091-11/+8
|\ \ \ | |/ / | | | | | | Change-Id: I6efd0d4a0ece0b065d02796916355ad5ae8b4eea
| * | Revert "Revert "Enable verity on userdebug, and add disable-verity to adb""Paul Lawrence2014-12-096-29/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 152d2d4234ba89e0c20c4af13e291b6049a7bc33. Fixed build error, and also fixed memory leak spotted from warning. (cherry-pick of bbb36319119edde9377fb80015235893c30d2bc9.) Bug: 17691572 Change-Id: I23b5ba537f7b557432041d4338b38b9be434e981
| * | am af191cd1: am 6b66025f: Merge "fs_mgr: fix build breakage"Mark Salyzyn2014-10-091-0/+1
| |\ \ | | | | | | | | | | | | | | | | * commit 'af191cd157f076ee5d99890711e2881a60d7770a': fs_mgr: fix build breakage
* | \ \ am 72f0d92c: DO NOT MERGE: Do not mount devices with invalid verity metadataSami Tolvanen2014-11-141-1/+3
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | * commit '72f0d92c722447e0c87cfe765516a7352db3d51a': DO NOT MERGE: Do not mount devices with invalid verity metadata
| * | | DO NOT MERGE: Do not mount devices with invalid verity metadataSami Tolvanen2014-11-131-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The return value of read_verity_metadata is propagated to caller even if the verity metadata is invalid, provided that it can be read from the device. This results in devices with invalid verity metadata signatures to be mounted normally, which is not desirable. This change fixes the bug by changing the return value in case of verification failure to FS_MGR_SETUP_VERITY_FAIL. Bug: 15984840 Bug: 18120110 Change-Id: Ic29f37a23cb417c2538d60fb05de9dd310d50f4a (cherry picked from commit c95e9da39660f278ace4b14d688dc6818d1a38bf)
* | | | am 9573a13b: DO NOT MERGE: Switch fs_mgr to use SHA-256 instead of SHA-1Sami Tolvanen2014-11-141-3/+3
|\ \ \ \ | |/ / / | | | | | | | | | | | | * commit '9573a13bbc015c555adff1e4e0fbef2a18963111': DO NOT MERGE: Switch fs_mgr to use SHA-256 instead of SHA-1
| * | | DO NOT MERGE: Switch fs_mgr to use SHA-256 instead of SHA-1Sami Tolvanen2014-11-131-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Verity metadata signatures will be switched to SHA-256. Switch fs_mgr signature verification to use the correct algorithm. Needs matching changes from https://googleplex-android-review.git.corp.google.com/#/c/579905/ https://googleplex-android-review.git.corp.google.com/#/c/583213/ https://googleplex-android-review.git.corp.google.com/#/c/583214/ https://googleplex-android-review.git.corp.google.com/#/c/583233/ Bug: 15984840 Bug: 18120110 Bug: 17917515 Change-Id: I8f90519bffa105a0eb7abeaad3aea1ffceb851e2 (cherry picked from commit a3465e250cfc3c00931735711e11ad61cf84d8b2)
* | | | fs_mgr: let fsck.f2fs actually attempt a fixJP Abgrall2014-11-121-1/+2
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | automerge: eb6036a * commit 'eb6036ac6be82dcc6e110de22574972631c8f83e': fs_mgr: let fsck.f2fs actually attempt a fix
| * | | fs_mgr: let fsck.f2fs actually attempt a fixJP Abgrall2014-11-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The newer fsck.f2fs (1.4.0++) has better fix support, so invoke it. Requires http://ag/583949 f2fs-tools update. Bug: 17640053 Bug: 18292088 Change-Id: I42370d92b232e0bdbf28cccf7035a15dbffeb268 Signed-off-by: JP Abgrall <jpa@google.com>
* | | | am 4cafe2ff: Fix verity on system partitions larger than 2GSami Tolvanen2014-10-311-22/+26
|\ \ \ \ | |/ / / | | | | | | | | | | | | * commit '4cafe2ff89b49329e0e880900195d8e061bd3750': Fix verity on system partitions larger than 2G
| * | | Fix verity on system partitions larger than 2GSami Tolvanen2014-10-291-22/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the system partition is larger than 2G, the device fails to read verity metadata, because fseek accepts only a 32-bit signed offset. Switch from fseek to lseek64 to allow seeking using a 64-bit offset, which solves the problem. At the same time, move away from stdio in the function. Bug: 17705619 Change-Id: I226320498dcb750ec6cde84411c7fe0774c9cab7
* | | | am 97e48731: Fix Nick\'s nitsPaul Lawrence2014-10-101-4/+4
|\ \ \ \ | |/ / / | | | | | | | | | | | | * commit '97e487311b1cb780dfd3b0994917c72047d6188f': Fix Nick's nits
| * | | Fix Nick's nitsPaul Lawrence2014-10-091-4/+4
| | | | | | | | | | | | | | | | Change-Id: Ide7925e7ad328f0343d444d63ff72f1a26206d4c
* | | | resolved conflicts for merge of bbb36319 to lmp-mr1-dev-plus-aospPaul Lawrence2014-10-106-28/+87
|\ \ \ \ | |/ / / | | | | | | | | Change-Id: I6b62347c3acfda7c2c954e719547021009d20c01
| * | | Revert "Revert "Enable verity on userdebug, and add disable-verity to adb""Paul Lawrence2014-10-096-28/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 152d2d4234ba89e0c20c4af13e291b6049a7bc33. Fixed build error, and also fixed memory leak spotted from warning. Bug: 17691572 Change-Id: I23b5ba537f7b557432041d4338b38b9be434e981
* | | | resolved conflicts for merge of a49bfc0d to lmp-mr1-dev-plus-aospPaul Lawrence2014-10-096-67/+20
|\ \ \ \ | |/ / / | | | | | | | | Change-Id: I9ff777a6309aab2b5b18323dd4ee7617cb1c3180
| * | | Revert "Enable verity on userdebug, and add disable-verity to adb"Nick Kralevich2014-10-086-67/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Build is broken. system/core/fs_mgr/fs_mgr_verity.c: In function 'fs_mgr_setup_verity': system/core/fs_mgr/fs_mgr_verity.c:103:20: error: 'verity_table_signature' may be used uninitialized in this function [-Werror=maybe-uninitialized] if (!RSA_verify(key, ^ system/core/fs_mgr/fs_mgr_verity.c:374:11: note: 'verity_table_signature' was declared here char *verity_table_signature; ^ cc1: all warnings being treated as errors make: *** [out/target/product/minnow/obj/STATIC_LIBRARIES/libfs_mgr_intermediates/fs_mgr_verity.o] Error 1 make: *** Waiting for unfinished jobs.... This reverts commit d4cea0bc16d1ad96cc6d6177232d7b339785460c. Change-Id: I6862cc79ef9d944a2472b6fb2e46dae514cea8ce
* | | | resolved conflicts for merge of ae413a71 to lmp-mr1-dev-plus-aospPaul Lawrence2014-10-096-21/+67
|\ \ \ \ | |/ / / | | | | | | | | Change-Id: Icdc9306b460c116441aad21bfcf3ab549224a141
| * | | Enable verity on userdebug, and add disable-verity to adbPaul Lawrence2014-10-086-20/+67
| | | | | | | | | | | | | | | | | | | | | | | | Bug: 17691572 Change-Id: I58f588f318e7952d06a41325337d946d7c007e31
* | | | am af191cd1: am 6b66025f: Merge "fs_mgr: fix build breakage"Mark Salyzyn2014-10-091-0/+1
|\ \ \ \ | |_|/ / |/| | / | | |/ | |/| * commit 'af191cd157f076ee5d99890711e2881a60d7770a': fs_mgr: fix build breakage
| * | fs_mgr: fix build breakageMark Salyzyn2014-10-081-0/+1
| | | | | | | | | | | | | | | | | | Some compilers are not as smart as other compilers Change-Id: I9d93c73bdbd2dca37373d8a42a2ed510d0559274
* | | am cf234dc7: Preserve errno from fsmgr_do_mountPaul Lawrence2014-09-122-2/+9
|\ \ \ | | |/ | |/| | | | | | | * commit 'cf234dc7e081ac4063c3c5ddcdd4da40c82d51cb': Preserve errno from fsmgr_do_mount
| * | Preserve errno from fsmgr_do_mountPaul Lawrence2014-09-112-2/+9
| | | | | | | | | | | | | | | Bug: 17358530 Change-Id: I4cd7403c0b7c4f878d6afa5199f998e6f614adb9
* | | am 04929638: am da3510b2: Merge "Avoid partial initialization warning."Chih-Hung Hsieh2014-09-101-1/+3
|\ \ \ | |/ / |/| / | |/ | | * commit '049296382d3604868378c957e999ae63cf3a1f5f': Avoid partial initialization warning.
| * Avoid partial initialization warning.Chih-Hung Hsieh2014-09-081-1/+3
| | | | | | | | | | | | | | | | Clang compiler is picky about partial initialization and here we only need to initialize the 'len' field. BUG: 17410010 Change-Id: I718582cef96d5f4076b5ff1c7b8162327e7809b6
* | [HACK]fs_mgr+init: Format via recovery if encryptable /data is wipedJP Abgrall2014-07-022-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | If the encryptable partition is wiped (4KB worth of 0 or 0xff), then reboot into recovery to format /data+/cache This is while waiting for the Mac OS support to format f2fs. The flashstation running on Mac OS will currently just erase userdata and not format it with f2fs. Bug: 15720406 Bug: 15747366 Change-Id: Ib7cca3e1701483a09573457a835750f34da71ee0
* | fs_mrg: clean up multi-type mount_allJP Abgrall2014-07-022-60/+95
| | | | | | | | | | | | | | | | | | | | | | Move the code that attempts to mount alternative fstab entries into its own function. Clarify return codes. Suggest wipe via recovery in error messages. Bug: 15747366 Change-Id: I3634477cd4d1d73f974f3e906c53285f0d9e0eac Signed-off-by: JP Abgrall <jpa@google.com>
* | Merge "fs_mgr: fix crash on "noemulatedsd" in fstab"Todd Poynor2014-07-011-6/+2
|\ \
| * | fs_mgr: fix crash on "noemulatedsd" in fstabTodd Poynor2014-07-011-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MF_FORCECRYPT claimed same flag value as existing MF_NOEMULATEDSD. MF_FORCECRYPT also crashes if no "=" in the option. Modify MF_NOEMULATEDSD flag value to unique, and reformat comment to keep the definition near the other defines. Change-Id: Iec86f40ff43eea14b791d3d19c0ae11fd4b5f784
* | | fs_msg: fix bad tmpfs detection (fix /persist mount errors)JP Abgrall2014-06-301-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | Without this, the wrong mount point is flagged as being mounted. Which leads to: <6>[ 3.278040] fs_mgr: __mount(source=/dev/block/platform/msm_sdcc.1/by-name/userdata,target=/data,type=ext4)=-1 <7>[ 3.278834] SELinux: initialized (dev tmpfs, type tmpfs), uses transition SIDs <6>[ 3.278925] fs_mgr: fs_mgr_mount_all(): skipping fstab dup mountpoint=/persist rec[3].fs_type=ext4 already mounted. Bug: 15925030 Bug: 15976144 Change-Id: I0bc617f11dfc97c32bb2d0e52b94ec19282568eb
* | fs_mgr: increase tmpfs size to accommodate bigger dex2oat dataJP Abgrall2014-06-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | During encryption and decryption, art is pumping out data via dex2oat into the /data that is actually a tmpfs. It currently needs ~195MB. So we increase the tmpfs from 128MB to 256MB. Bug: 15909689 Change-Id: I5d518a87d7b4eccf32fcd77f61980646ee8a3d35 Signed-off-by: JP Abgrall <jpa@google.com>
* | Moved symlink back up.Daniel Rosenberg2014-06-261-1/+8
| | | | | | | | | | | | | | | | Moving the vendor symlink down was causing issues with some devices. Moved it back up, and adjusted mount to remove symlinks if necessary. Change-Id: I77126d77cfbef32250012bea3960c99b55db4cbb Signed-off-by: Daniel Rosenberg <drosen@google.com>
* | fs_mgr: fix double mounting of partitionJP Abgrall2014-06-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | When looking for partitions to encrypt, it would setup a tmpfs onto the mount point. But with multi-type mount points it would repeat the mount. This would lead to having and extra tmpfs mounted on /data, as only one would get removed. Change-Id: I28f2c2c4955906f1172342ea07e0795d6880986b Signed-off-by: JP Abgrall <jpa@google.com>
* | Added support for vendor partition and imageDaniel Rosenberg2014-06-241-1/+2
| | | | | | | | | | | | | | | | Modified fastboot to flash vendor.img as well. Moved symlink for /vendor to occur after mounting partitions. Changed mount to also create the mount point. Change-Id: I78e1ba24e6bb8b4af96a67ee0569af579439e682 Signed-off-by: Daniel Rosenberg <drosen@google.com>
* | [HACK]fs_mgr: force recovery+wipe if data looks wipedJP Abgrall2014-06-191-11/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We do the recovery+wipe if - the mount fails and - the partition is forceencrypt - the partition seems wiped (== the 1st 4KB are all 0x00 or 0xFF). This is a hack until we get the flashstation up and running with f2fs. Bug: 15731906 The alternative would be for the user to manually enter recovery and wipe his device. Bug: 15747366 Change-Id: Ic8f3ef59f3d7d01d5d93d8e4c01502080f422157 Signed-off-by: JP Abgrall <jpa@google.com>
* | fsmgr: support multiple fs-types/mountpointJP Abgrall2014-06-183-36/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previous attempt was broken. It would incorrectly be affected by mount failures. This changes allows an fstab to contain multiple lines for a given mount point. The lines sharing a mount MUST be after each other. The 1st matching line is the primary when it comes to mounting and look ups for wiping. Mounting based on a mount_point will attempt each dup in turn until one succeeds. The reported error will be that of the last failed attempt. This is to allow quick experimentation between different FSes. Bug: 15702546 Change-Id: I378d68ad13eb0098ec1ccb8dcf108b82acbe9ebb Signed-off-by: JP Abgrall <jpa@google.com>
* | fsmgr: revert multiple fs-types/mountpoint (fix N5 boot)JP Abgrall2014-06-183-78/+26
| | | | | | | | | | | | | | | | | | This is apparently breaking N5, so reverting for now. This reverts commit a794f86522f9125f2547c94ebc7c74d1e7ace013. Bug: 15709256 Change-Id: I37a5160eead17e153e2c83fa94632ffa5d8553c2
* | fsmgr: allow for a multiple fs-types for a mount point.JP Abgrall2014-06-173-26/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes allows an fstab to contain multiple lines for a given mount point. The lines sharing a mount MUST be after each other. The 1st matching line is the primary when it comes to mounting and look ups for wiping. Mounting based on a mount_point will attempt each dup in turn until one succeeds. This is to allow quick experimentations between different FSes. It does not deal with checkfs yet, because the underlying invocation of fs-type appropriate fsck does not handle the error code. Only the primary FS (1st in the dups) is checked. Change-Id: I8329737454b53e2681436fe85cd00a9bc522676b Signed-off-by: JP Abgrall <jpa@google.com>
* | F2FS support for fastboot format and fsmgrJP Abgrall2014-06-171-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | - Enables fsck.f2fs for partitions with type F2FS. - Adds support for f2fs as format fs-type. - f2fs is optional and support is dlopen()d when needed. Needs changes in system/extras/f2fs_utils external/f2fs-tools Change-Id: I8d141a0d4d14df9fe84d3b131484e9696fcd8870 Signed-off-by: JP Abgrall <jpa@google.com>
* | am af0df46d: am e6246ca6: am 01ef52e1: Merge "fs_mgr: turn on -Werror"Mark Salyzyn2014-05-083-3/+3
|\ \ | |/ | | | | | | * commit 'af0df46d74368bb98edaadb3c09ddbc7252d3110': fs_mgr: turn on -Werror
| * fs_mgr: turn on -WerrorMark Salyzyn2014-05-073-3/+3
| | | | | | | | | | | | - deal with some -Wunused-variable issues Change-Id: Ie0140d4777ddf862e4bbed76142a1dbb8320c1b0
* | am 43cb7ae6: am 4f362e43: am 835526fd: Merge "Cleanup: warning fixit."Sasha Levitskiy2014-04-123-6/+6
|\ \ | |/ | | | | | | * commit '43cb7ae6c31ced8cd518eab59dfea31ab1ade812': Cleanup: warning fixit.
| * Cleanup: warning fixit.Sasha Levitskiy2014-04-113-6/+6
| | | | | | | | | | | | | | bootable/recovery has a dependent commit: I9adb470b04e4301989d128c9c3097b21b4dea431 Change-Id: Icf23e659265d71d5226d527c2b40cfbc132320ee Signed-off-by: Sasha Levitskiy <sanek@google.com>
* | Add force_encrypt flag to fstab to force encryption on appropriate devicesPaul Lawrence2014-04-043-31/+12
| | | | | | | | | | | | | | | | | | forceencrypt= will encrypt the drive at boot if it is not encrypted. This change will not have an impact until we set this flag in appropirate fstabs. Bug: 11985952 Change-Id: I6c65eda7f109e4936aa160da50f871703aefb351