2

Recently I've been trying to install a f2fs compatible rom to my old and slow nexus7. I got as far as flashing a new recovery image and reformatting the device partitions to the new file system, but after trying to install a couple of supposedly compatible ROMs (cm11 and slimkat) and having the tablet stuck at boot I had to revert to the stock image I was running. After some googling it seems I missed a step: "converting" the ROM image to f2fs. There are tools to do that, so I was wondering how do they work actually?

1

Looking at the tool described in this howto it seems that it's a simple matter of replacing the boot.img with somethink compatible with f2fs and doing a bit of text search and replace on the unzipped image, replacing the strings

format("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "0", "/system") 
format("ext4", "EMMC", "/dev/block/platform/sdhci-tegra.3/by-name/APP", "0", "/system")
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system") 
mount("ext4", "EMMC", "/dev/block/platform/sdhci-tegra.3/by-name/APP", "/system")
mount("ext4", "EMMC", "/dev/block/platform/sdhci-tegra.3/by-name/APP", "/system")

with

run_program("/sbin/mkfs.f2fs", "/dev/block/platform/msm_sdcc.1/by-name/system")
run_program("/sbin/mkfs.f2fs", "/dev/block/platform/sdhci-tegra.3/by-name/APP")
run_program("/sbin/busybox", "mount", "/system")
run_program("/sbin/busybox", "mount", "/system")
run_program("/sbin/busybox", "mount", "/system")

respectively. (The strings may vary for different devices).

I've tried unzipping a cm-11 and a Slimkat image and the source strings are actually there so the above should work, but I had no such luck for a lollipop factory image, which after unzipping has only .img binary files.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.