[Sony Xperia S, Acro S, Ion] kabychow:
Flashing Procedure:​

PLEASE READ CAREFULLY. This is not a complex procedure but you have to repartition the device if not yet done and to backup your data prior.

Backup

We will format /data and /sdcard so you need to take backup and put it outside of the phone.

Use your current TWRP to backup your ROM (system/boot/data) into /sdcard

Once done, backup on your computer the /sdcard content (use a file browser with mtp or adb pull)

Recovery/TWRP

Extract recovery.img from the Zip file

Enter the device into fastboot mode

flash the recovery.img into boot partition like a boot image (fastboot flash boot recovery.img)

restart the device (fastboot reboot)

You should be on the recovery (it can be a little bit long to start the first time)

Repartitionning

Go to Mount on TWRP gui (uncheck system, data, cache)

Connect on the recovery with "adb shell"

fdisk -l /dev/block/mmcblk0

Copy the output of the command to a file with your backup. It will permit you to revert if needed and to help you if you have an issue (read carefully and you will not have)

Interesting parts are those in bold :

/dev/block/mmcblk0p14 42945 261695 7000024 83 Linux

/dev/block/mmcblk0p15 261696 954240 22161424 83 Linux

It can be not exactly the same values for you depending the size of your /data (p14) and /sdcard (p15)

so here we go (don't forget the section backup. this procedure will erase your data)

fdisk /dev/block/mmcblk0

Command (m for help): p

Command (m for help): d

Partition number (1-15): 15

Command (m for help): d

Partition number (1-14): 14

Command (m for help): n

First cylinder (769-954240, default 769): 42945

Last cylinder or +size or +sizeM or +sizeK (42945-954240, default 954240): (just press enter if the default value is the good one)

Using default value 954240

Command (m for help): t

Partition number (1-14): 14

Hex code (type L to list codes): 83

Command (m for help): w

The partition table has been altered.

Calling ioctl() to re-read partition table

Once repartitioning done, do NOT do anything else and just reboot the device (to be sure that the partition table is take into account by the kernel)

Now we will convert /data and /cache to F2FS.

Ext4 is not supported anymore on nAOSProm. You don't need to take care about the 16384 byte to reserve for encryption. TWRP will do it for you.

Into TWRP

Wipe

Advanced Wipe

select Data

Repair or Change File system

Change File System

F2FS

Swipe to Change

Press Home and do the same procedure to convert Cache partition to F2FS

Once done, again, do NOT do anything else and just reboot the device (required by TWRP)

Congratulation, if everything is fine you should be able to mount /cache and /data and to see a big /data volume arround 28 GiB.

FOTA recovery

Now it is time to put the new recovery into the FOTA partition

Upload the recovery.img into your phone (adb push recovery.img /sdcard/). Yes /sdcard is a symlink somewhere to /data/media

Flash the recovery.img to the fota partition as usual (dd if=/sdcard/recovery.img of=/dev/block/mmcblk0p11)

Upload the ROM/Gapps

Upload the ROM/Gapps and every zip that you want to flash into /sdcard (/data/media/). Use "adb push" for example.

Flash the ROM and GApps

You can now flash the ROM as usual

If you want GApps, please flash Gapps just after the ROM and once done, don't flash anything else and restart the phone. You should be able to configure Gapps without force close. The first boot can be a little bit longer due to application compilation as usual.

Once everything is working fine, just reboot into the recovery and flash what else you need

Restore your own data

You can restore your /sdcard data (Pictures, Music, ...) if you want.

Do not restore TWRP folder because previous TWRP backup are not compatible with the new partition layout.

Congratulation

That's it

...more to come

credits: mickybart