commit | 4879b37b5db3b06eb17a4a0deda5fc08fef51c41 | [log] [tgz] |
---|---|---|
author | dianlujitao <dianlujitao@lineageos.org> | Mon Dec 03 18:45:47 2018 +0800 |
committer | Ethan Yonker <dees_troy@teamw.in> | Thu Mar 21 16:15:52 2019 -0500 |
tree | af8ad951ba6b34091461debb35c755c1531b2ead | |
parent | 64e0a6525f6f82a67649602de3fe1ad62c837c27 [diff] |
Fix the long broken format function * For EXT2/3: * Align mke2fs options with Android 9.0 fs_mgr_format.cpp. * For EXT4: * Note that make_ext4fs is still in use on Android 8.1 to workaround a FDE encryption bug even though mke2fs has become the default choice. The bug is fixed in Android 9.0+. * For F2FS: * Drop the broken "-r" option, it's never ported to O, explicitly pass number of sectors instead. * Keep all options aligned with Pie fs_mgr. * Check existence before start wiping, as Wipe_EXT4 does. * For all: * Calculate block size at runtime, and reserve the space specified via negative "length" option from fstab. Note that positive length will be ignored. * If the partition has crypto footer, and "length" is not specified in fstab, automatically reverse CRYPT_FOOTER_OFFSET (16384). * Remove the default crypto key location: footer, this is a bad assumption since most partitions don't use encryption! We need to know the real situation to decide whether to reserve crypto footer on format. * If the current action is "wipe" or "change filesystem", wipe crypto footer or block device after mkfs if the partition is unencrypted or undecrypted (e.g., wrong password). * If the current action is "format data", unconditionally wipe crypto footer or block device. Change-Id: I7304a8ee703131ea4a08ab7c60334af28cac28b3
Team Win Recovery Project (TWRP)
You can find a compiling guide here.