[TouchPad General] HP_TOUCHPAD:
Format /data /cache using f2fs

The ROMs that supports f2fs format are:

Pie, Oreo, Nougat and Lollipop

Kitkat does NOT support f2fs

By default /data and /cache are set to ext4, it can be change in TWRP Recovery.

I have created a flash file with script that will format /data and /cache to f2fs.

This is only for information and does not need to be done to flash the file.

To find out the type of file system, this command can be use in adb shell or in TWRP Terminal.

~ # mount | grep "^/dev"
/dev/mapper/store-cm--cache on /cache type ext4 (rw,seclabel,relatime,data=ordered)
/dev/mapper/store-cm--data on /data type ext4 (rw,seclabel,relatime,data=ordered)
/dev/mapper/store-cm--data on /sdcard type ext4 (rw,seclabel,relatime,data=ordered)
/dev/mapper/store-media on /external_sd type vfat (rw,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)

To manually format to f2fs:

data and cache needs to be unmounted first

umount /dev/mapper/store-cm--data
umount /dev/mapper/store-cm--cache

Format cache:

~ # mkfs.f2fs -l cache -f -m /dev/mapper/store-cm--cache

F2FS-tools: mkfs.f2fs Ver: 1.8.0 (2017-02-03)

Info: Disable heap-based policy
Info: Debug level = 0
Info: Label = cache
Info: Trim is enabled
Info: Segments per section = 1
Info: Sections per zone = 1
Info: sector size = 512
Info: total sectors = 409600 (200 MB)
Info: zone aligned segment0 blkaddr: 512
Info: format version with
"Linux version 3.4.113-tenderloin+ (flintman@flintman-server) (gcc version 4.8 (GCC) ) #1 SMP PREEMPT Thu Mar 15 10:23:45 EDT 2018"
Info: Overprovision ratio = 15.000%
Info: Overprovision segments = 31 (GC reserved = 21)
Info: format successful

Format data:

~ # mkfs.f2fs -l data -f -m /dev/mapper/store-cm--data

F2FS-tools: mkfs.f2fs Ver: 1.8.0 (2017-02-03)

Info: Disable heap-based policy
Info: Debug level = 0
Info: Label = data
Info: Trim is enabled
Info: Segments per section = 1
Info: Sections per zone = 1
Info: sector size = 512
Info: total sectors = 51773440 (25280 MB)
Info: zone aligned segment0 blkaddr: 512
Info: format version with
"Linux version 3.4.113-tenderloin+ (flintman@flintman-server) (gcc version 4.8 (GCC) ) #1 SMP PREEMPT Thu Mar 15 10:23:45 EDT 2018"
Info: Overprovision ratio = 1.260%
Info: Overprovision segments = 322 (GC reserved = 166)
Info: format successful

Mount data and cache before getting info:

~ # mount | grep "^/dev"
/dev/mapper/store-media on /external_sd type vfat (rw,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/mapper/store-cm--data on /data type f2fs (rw,seclabel,relatime,background_gc=on,discard,user_xattr,acl,inline_data,flush_merge,extent_cache,mode=lfs,active_logs=6)
/dev/mapper/store-cm--cache on /cache type f2fs (rw,seclabel,relatime,background_gc=on,discard,user_xattr,acl,inline_data,flush_merge,extent_cache,mode=lfs,active_logs=6)

The Tablet must reboot to flash the listed ROMs.

Important:

In TWRP Recovery ---->>> Settings check

Use rm -rf instead of formatting

By default TWRP when formats /data it will be ext4

Click HERE to Download Format_Data_Cache_To_f2fs