From d0b854b31daeda7f0bdce24a4171821a4fa82707 Mon Sep 17 00:00:00 2001 From: GarfieldHan <2652609017@qq.com> Date: Sun, 21 Nov 2021 23:46:20 +0800 Subject: [PATCH] Add EROFS to file system check list This commit will add EROFS Filesystem mount support Since Huawei announced the new file system EROFS and successfully merged into mainline. More and more OEMs switch the ext4 filesystem to EROFS filesystem for system/vendor/odm/product partitions like Oplus (OPPO / Realme / OnePlus). Test: Import the latest fstab from system, build and boot. EROFS-based partions like system and vendor partitions were sucessfully mounted. Notes: Although I tried to change 'ext4' to 'erofs' for correct partition in twrp.flags, but it was still recognized as 'ext4'. So you can just copy the line related erofs partitions from recovery.fstab and TWRP will failed to recognize the line in twrp.flags, and then skip this line, so the issue was solved. Signed-off-by: GarfieldHan <2652609017@qq.com> Change-Id: I49a04e4465f1d92eb589ad6d86b6db9b58d720eb --- partition.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/partition.cpp b/partition.cpp index ecd5be59..cc8fb07d 100755 --- a/partition.cpp +++ b/partition.cpp @@ -1112,6 +1112,7 @@ bool TWPartition::Is_File_System(string File_System) { File_System == "yaffs2" || File_System == "exfat" || File_System == "f2fs" || + File_System == "erofs" || File_System == "squashfs" || File_System == "auto") return true;