[ONE Android Development] phermey:
Easy guide for converting 'f2fs ready' rom to 2p f2fs using Windows

I will be using the guide zaphodbeeb posted on page sixteen of this thread. picking out the parts that are used for 2P-primary only. It is really simple and straight forward. Just copy and paste. This is a five minute process to convert the rom and transfer it over to your phone using airdroid.

Things you will need:

Android Image Kitchen. Scroll down to the bottom of the first post and grab the aik2.0 file. if i remember all you do is extract it and rename it to boot-tools. then place the folder wherever you want. i have mine on my desktop.

notepad++. You will need this to copy and paste. as notepad/wordpad will not work. you will use this to right click on file in rom and 'edit with notepad++'. <-- option when installing.

zip program. i use winrar. but you don't have to.

1. open the boot-tools folder. you will have some files. we will be using the unpackimg repackimg and cleanup scripts.

2. double click on your rom zip file and open it.

3. drag the boot.img file over to your boot-tools.

4. drag the boot.img on top of unpackimg and drop it. once done unpacking. hit enter.

5. open the ram-disk folder. right click on fstab.bacon and 'edit with notepad++.

6. replace all of the code in fstab with this.

# Android fstab file.
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK

/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,barrier=1 wait
/dev/block/platform/msm_sdcc.1/by-name/userdata /data f2fs noatime,nosuid,nodev,discard,nodiratime,inline_xattr,errors=recover wait,nonremovable,encryptable=/dev/block/platform/msm_sdcc.1/by-name/reserve4
/dev/block/platform/msm_sdcc.1/by-name/cache /cache f2fs noatime,nosuid,nodev,discard,nodiratime,inline_xattr,errors=recover wait
/dev/block/platform/msm_sdcc.1/by-name/persist /persist ext4 nosuid,nodev,barrier=1,data=ordered,nodelalloc,nomblk_io_submit,errors=panic wait,check
/dev/block/platform/msm_sdcc.1/by-name/boot /boot emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/recovery /recovery emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/misc /misc emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/modem /firmware vfat ro,shortname=lower,uid=1000,gid=1000,dmask=227,fmask=337,context=u:object_r:firmware_file:s0 wait

/devices/platform/xhci-hcd auto vfat defaults voldmanaged=usbdisk:auto

7. save the file.

8. double click on repackimg

9. you will see a new file called new-boot-whatever. delete the old boot.img. rename the new file to boot.img. make sure this step is done before cleaning up

10. double click cleanup.

11. drag the new boot.img over to the rom zip and drop it. then click ok to replace the file.

12. now in the rom, navigate to >meta-inf >com >google >android and drag the updater script over into your boot-tools.

13. right click and 'edit with notepad++

14. find this line. it is about 2/3 down

mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/userdata", "/data", "");

15. replace it with this line

run_program("/sbin/busybox", "mount", "/data");

16. two lines down you will see this line

unmount("/data");

17. replace it with this.

run_program("/sbin/busybox", "unmount", "/data");

18. save the file

19. drag the file back over to your zip and replace.

20. transfer the rom to your phone.

21. PROFIT

this should work with any f2fs ready rom. it 100% for sure works on [MENTION=3814731]katinatez[/MENTION] 's temasek rom. but should work on slim sabre and anything else that is f2fs ready.

a huge thanks to [MENTION=3874152]zaphodbeeb[/MENTION] for posting the 'ubuntu way' , and a huge thanks to [MENTION=4877142]tobitege[/MENTION] for posting the android kithchen link.