[UNOFFICIAL] [07/19] TWRP 3.1.1 with F2FS support

Search This thread

trimeistr

Member
Apr 30, 2015
33
4
Yes. Because to my knowledge there are no kernels that support f2fs and force encryption. The main kernels I know of that support it are no-force encrypt.

Is is the kernel that has to support it? Would be amazing if someone could add it to their kernel. Not running encrypted will have to do for now though. Snappier phone effects my daily, while not being encrypted might maybe affect me once if I'm unlucky.
 

nathanchance

Senior Recognized Developer / Contributor
Jul 22, 2015
13,760
50,106
29
Mesa, AZ
nathanchance.dev

xSilas43

Senior Member
Jun 25, 2013
1,705
1,224
Is is the kernel that has to support it? Would be amazing if someone could add it to their kernel. Not running encrypted will have to do for now though. Snappier phone effects my daily, while not being encrypted might maybe affect me once if I'm unlucky.
You can encrypt your phone at any time on any kernel, these kernels just don't FORCE you to be encrypted.
 

xSilas43

Senior Member
Jun 25, 2013
1,705
1,224
Version 3.1.1-8 now available!

Image: http://nchancellor.net/Downloads/TWRP/angler/twrp-3.1.1-8-angler-f2fs-20170512.img
MD5: http://nchancellor.net/Downloads/TWRP/angler/twrp-3.1.1-8-angler-f2fs-20170512.img.md5sum

Changelog:
Code:
805a5dfe 3.1.1
0afc1fdc Fix reboot when no OS is present
84d61ce3 Update TWRP to AOSP 7.1.2
6355b56c Adopted Storage: backup keys but do not wipe them
b5ecaad2 ADB Backup: fix adb restore issues

I still seem to be having issues restoring an adb backup I made with this latest version just recently. It says that it restored System in 0-1 second and just hangs there.
 

Attachments

  • recovery.log
    22.9 KB · Views: 14
Last edited:

Az Biker

Sr. Mod / RC-RT Committees / Shred'r of MTBs
Staff member

Grassinator

Senior Member
Jan 24, 2012
119
57
Long Island, NY
5/12 TWRP Recovery Issues

Grand Masta Flash...
1st and foremost I want to thank you for all of your support and AMAZING work you've done for this wonderful device... You have truly made our experience far superior to what it could have been (AKA STOCK)
I have been running your divine Flash kernel (5/1) on Chevy's latest Cortex ROM which has recently integrated F2FS support. Was, without a doubt, the BEST performance and configuration this device has ever seen. I just noticed today that you have updated your kernel and am attempting to clean format and flash this masterpiece but unfortunately have received a 2 day ticket to bootloop city! :rolleyes:
I have attached my TWRP logs and would greatly appreciate any assistance you could provide. Thank you again for all you do!
~Giuseppe
 

Attachments

  • recovery.log
    20 KB · Views: 4
  • dmesg.log
    60.8 KB · Views: 4

Top Liked Posts

  • There are no posts matching your filters.
  • 67
    Introduction

    Hello all, this is my version of TWRP for the Nexus 6P, which includes the ability to convert your /data and /cache partitions to F2FS. This will stay inline with TWRP's changes for the most part, the changes will be listed below.

    What in the world is F2FS?

    From Wikipedia:

    F2FS (Flash-Friendly File System) is a flash file system initially developed by Samsung Electronics for the Linux 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.

    F2FS was designed on a basis of a log-structured file system approach, which it adapted to newer forms of storage. Jaegeuk Kim, the principal F2FS author, has stated that it remedies some known issues of the older log-structured file systems, such as the snowball effect of wandering trees and high cleaning overhead. In addition, since a NAND-based storage device shows different characteristics according to its internal geometry or flash memory management scheme (such as the Flash Translation Layer or FTL), it supports various parameters not only for configuring on-disk layout, but also for selecting allocation and cleaning algorithms.
    Before diving into this, I would recommend reading the official F2FS documentation to understand why this may be good for you. This is potentially unstable, F2FS is a file system that is very much in active development. There is a reason that most OEMs go with ext4 out of the box. But I digress, I am NOT here to sell you on F2FS; it makes zero difference to me if you use it or not, I am merely providing you with a tool to do so.


    Changelog + differences

    Differences:
    • f2fs-tools bumped to 1.7.0 (Omni's 6.0 branch is on 1.4.0)
    • TWRP app installation offer disabled by default


    Conversion procedure

    1. Download TWRP from the link above
    2. Grab a kernel that supports F2FS (I use my own as I know it works)
    3. Back up any important data as this will wipe your entire internal storage
    4. Boot into the bootloader and flash the recovery
    5. Boot into TWRP and go into Wipe > Advanced Wipe
    6. Select Data and then hit "Change or Repair File System"
    7. Hit Change File System
    8. Choose F2FS and slide to confirm
    9. Repeat the previous three steps for cache
    10. Reboot and move all of your files back over (if restoring through TWRP, make sure to check the option to use rm -rf instead of formatting)
    If you have any issues with this, you may need to ask your ROM developer to merge the two commits below.

    Bug reports

    You are NOT in ANY circumstance to report ANY bugs to the TWRP team.

    • If you have an issue with flashing something in TWRP, copy the recovery log to your sdcard and post it here.
    • If swapping to F2FS does not stick, try formatting your data with TWRP (Wipe > Format Data) or fastboot format userdata first.
    • If your phone does not boot after swapping to F2FS, either your kernel or ROM does not have proper support; post in their thread.
    Additionally, check out some of these helpful posts:


    Adding support to ROM

    In order to properly support the initial conversion to F2FS, please add these two commits to your source:
    https://github.com/omnirom/android_system_core/commit/1c6700a8fb31c6e314df4f031fa23fa9178c7ca7
    https://github.com/omnirom/android_system_vold/commit/c879edb2fecae709f404c2d71c1d47ceac3a325e

    The reason some people have issues converting is fs_mgr will try to read the block device as ext4 and destroy the f2fs block. This commit skips that check, allowing F2FS to pass through.

    Sources

    TWRP is licensed under GPLv3, meaning my changes must be disclosed. I also inline a custom kernel so that source is included as well. I also add in the other repos I modify.

    33
    Version 3.1.1-8 now available!

    Image: http://nchancellor.net/Downloads/TWRP/angler/twrp-3.1.1-8-angler-f2fs-20170512.img
    MD5: http://nchancellor.net/Downloads/TWRP/angler/twrp-3.1.1-8-angler-f2fs-20170512.img.md5sum

    Changelog:
    Code:
    805a5dfe 3.1.1
    0afc1fdc Fix reboot when no OS is present
    84d61ce3 Update TWRP to AOSP 7.1.2
    6355b56c Adopted Storage: backup keys but do not wipe them
    b5ecaad2 ADB Backup: fix adb restore issues
    26
    Update!

    Bumped to version 10, with the following changelog:
    • Updated to the latest Flash Kernel, which has several f2fs, ext4, and dm block commits
    • Update decryption libs to latest N image
    • Removed SuperSU from recovery ramdisk
    • Fixed backlight dimming issue

    Downloads

    Image: http://nchancellor.net/Downloads/TWRP/angler/twrp-3.1.1-10-angler-f2fs-20170527.img
    Checksum: http://nchancellor.net/Downloads/TWRP/angler/twrp-3.1.1-10-angler-f2fs-20170527.img.md5sum
    26
    Alright guys, new build is up. This should be much more stable than it was since it's built off of Omni's 6.0 branch (thank you so much to @jcadduono for pointing me in the right direction). Here's what's been tested and verified working:
    • F2FS tools (1.7.0, both make.f2fs (log) and fsck.f2fs (log) work fine for me)
    • The Nethunter kernel zip @t83wood had issues with flashing (log)
    • ElementalX zip (log, boot fine for me on Pure Nexus)
    • Encryption (decrypts with or without the security enabled on boot option)

    Everything should be 100% good now, though if it isn't, I NEED a recovery.log (Advanced > Copy Log). Hope you all enjoy!

    @chevycam94, change the zips back to the previous way they were, we now have working Busybox :p
    20
    Update!

    Standard update, upstream fixes and such. The primary reason for this post is to notify you that your custom themes may or may not work, given the TWRP theme version has been bumped from 2 to 3. I know for a fact @z31s1g has some test themes for this here. Other than that, everything works perfect. Enjoy!