[Zenfone 5 Android Development] X AnwarMov:
Build in CM-13.0 environment w/TWRP source forked : [MENTION=4258433]mdmower[/MENTION]

Fork of TWRP

This fork differs from the original in the following ways:

Designed to be built with CyanogenMod 13.0 only

Require fstab v2 syntax (see examples and supported flags below)

Use external repositories for pigz, exfat, fuse

Power key toggles screen on/off

Remove the need to specify either DEVICE_RESOLUTION or TW_THEME so long as TARGET_SCREEN_HEIGHT and TARGET_SCREEN_WIDTH are set

Other minor customizations (see change history)

Versioning

To help distinguish builds of recovery made from this fork, the minor version digit is replaced with M#. Minor version increments will be handled as needed, independent of TWRP. The major and semi-major version digits follow upstream to roughly indicate feature parity (as close as possible with a fork, anyways).

Convention:

3.0.M0-0 incorporates all major features from TWRP 3.0.0-0

3.0.M1-0 is the minor version increment after 3.0.M0-0 and is independent of any TWRP minor version increment(s)

3.1.M0-0 is the semi-major version increment after 3.0.M4-2 and is tied to a TWRP semi-major version increment

3.0.M0-1 is a device-specific fix to 3.0.M0-0; this device digit resets when any other version increments

maintained rework by : @artefvck

DOWNLOADS:

Fastboot Mode

Flashable Zip

source

Convert ext4 partition to F2FS partition without loosing data

Preface

F2FS (Flash-Friendly File System) is a flash file system created by Kim Jaegeuk at Samsung for the Linux operating system kernel.

The motive for F2FS was to build a file system that from the start takes into account the characteristics of NAND flash memory-based storage devices (such as solid-state disks, eMMC, and SD cards), which are widely used in computer systems ranging from mobile devices to servers.

Prerequisites

PC with ADB installed for SD backups

F2FS compatible ROM

F2FS compatible Kernel

F2FS compatible TWRP Recovery (this recovery has F2FS support, too)

sdcard Fix Permissions script (scroll down a little bit)

Procedure

Flash the F2FS compatible TWRP Recovery with fastboot or other recovery for example

Boot into Recovery

Backup > Data

Save your internal SD card with one of the following options

Either reboot to system and copy files to your PC via USB (MTP)

Or pull files via adb (adb pull /data/media sd_backup)

Copy the kernel and the sdcard fix script to your created backup folder

Wipe > Advanced Wipe > Data > Repair or Change File System > Change File System > F2FS

Wipe > Advanced Wipe > Cache > Repair or Change File System > Change File System > F2FS

Copy the saved SD card content back to your device with: adb push sd_backup /data/media/0/

Afterwards the folder structure should look like this: /data/media/0/…Folders like DCIM, Music, Downloads, …

You can check with: adb shell ls -R /data/media

Restore > Choose backup > Data (the warning about ext4 backup doesn’t matter)

Advanced > Fix Permissions

Flash the sdcard Fix Permissions script with: Install > Choose sdcard fix zip

Wipe > Advanced Wipe > Cache & Dalvik Cache

Flash a F2FS compatible kernel with: Install > Choose kernel zip

Reboot to system

Now your Android device should fly again ��

Note:

In my mind it doesn’t make much sense to format/system to F2FS because you would need a modified ROM to use it. Everytime you update your ROM you would have to modify it to use /system as F2FS. On top of that there shouldn’t be a real performance gain with a F2FS /system partition because it’s read-only. And reading operations are fast with ext4, too. The difference is non-existent or very low. In my humble opinion the so called All-F2FS is pretty useless.

You can format your /data and /cache partition to F2FS. Normally you’ll loose all data in this process and have to reinstall everything. But this small howto will show you how to recover your data so you can continue where you left off. Just like a “dirty” ROM flash.