Find Your Device:
Or Continue to Thread: [RECOVERY][ROMs] Recovery and …
21st April 2014, 01:11 PM |#136  
fr3quency's Avatar
Senior Member
Flag Kalamata/Patra
Thanks Meter: 663
Guys, I will write an analytical post flashing F2FS ROMs, other than the one provided in the OP(CM11 version is at the end of the post):

This works for most AOSP-based ROMs(ParanoidAndroid, PSX, Velocity etc have worked for me so far)

1) Download the Modified Recovery PROVIDED IN THE OP

2) Download the PROVIDED IN THE OP

3) If your ROM is AOSP-based then download the SlimKat ROM PROVIDED IN THE OP (We need its boot.img file).

4) Download your favourite ROM(be it ParanoidAndroid, Velocity, PSX etc)

5) Open your favourite ROM with WinRar/whatever you use and navigate to META-INF\com\google\android\updater-script

6) Open updater-script with Notepad/whatever you use and replace these 2 lines(RESPECTIVELY):

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

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

Note: Notepad on Windows has a replace functionality. It's on Edit---->Replace. So you can paste the stock code and the one you want it to be replaced with.

7) Now replace the boot.img inside your FAVOURITE ROM(you can find it when you open the ROM .zip file) with either the one in the MODIFIED SLIMKAT PROVIDED IN THE OP(if it's AOSP-based) or the other one( @WiwiPouPou's one) if it's CM11.

8) Copy which you downloaded to your Phone

9) Reboot to fastboot mode and flash the MODIFIED RECOVERY which you downloaded. The code to do so is:

fastboot flash recovery the_name_of_the_modified_recovery.img
10) Reboot to Recovery

11) Flash with new Recovery

12) Reboot recovery

13) Flash your FAVOURITE ROM(which you modified some minutes ago)

14) Flash your favourite Gapps(I installed @BaNkS's Gapps)

15) I don't recommend flashing a custom kernel NOW, because when I did, the WiFi wasn't working. You can flash a kernel later.

16) Go to Wipe Menu and press Format Data (The Big BUTTON!) (You will LOSE all your Data! Music, Pictures, Movies etc!!)

17) Reboot to Android

18) You can now reboot to Recovery and flash your custom Kernel. Be careful though because you need a kernel that supports F2FS. I recommend ak's xGenesis kernel. It works like a charm without any problems.

I followed these steps for converting ParanoidAndroid to F2FS and it worked like a charm.

CM11 time

F2FS-based TWRP won't change the partitions to f2fs for me. So you have to do the following:


1)Go into recovery

adb shell
mkfs.f2fs /dev/block/mmcblk0p21 (System)
mkfs.f2fs /dev/block/mmcblk0p22 (Cache)
mkfs.f2fs /dev/block/mmcblk0p23 (Data) (Be careful this will delete everything you have)
3) Via using adb push, push the CM11 file, gapps etc into /sdcard. To do that simply type:
adb push /sdcard (NOTE: the must be in the same folder that adb.exe is)
4)Wipe /system, /data, /cache & dalvik-cache.

5)Install CM11 etc.

6)Install @jolinnard 's kernel: (NOTE: I used the ak and it worked, I don't know about the other kernels but I believe they should work as well.)

7)Reboot and have fun with all-f2fs

Note: if it didn't work, just change the 2 lines in the updater-script. You can clearly see the 2 lines that MIGHT need to be replaced at the top of this post. Have fun!

NOTE: If you have successfully converted your partitions to F2FS, you don't need to flash file & Wipe your Data over and over again. Simply wipe /system, /data & /cache and flash the F2FS ROM you just converted like you would do with any other ROM in the past.

Thanks Nabendu1 for the F2FS code above. Original post of his can be found here:

Latest F2FS Adreno binaries updated on are here:

Last edited by fr3quency; 12th July 2014 at 01:54 PM.
The Following 22 Users Say Thank You to fr3quency For This Useful Post: [ View ]