Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,737,124 Members 42,889 Now Online
XDA Developers Android and Mobile Development Forum

[RECOVERY][All-F2FS] TWRP-2.7.0.0 with All-F2FS support [10/05/14]

Tip us?
 
legolas93
Old
(Last edited by legolas93; 21st May 2014 at 08:37 PM.)
#1  
legolas93's Avatar
Senior Member - OP
Thanks Meter 1159
Posts: 634
Join Date: Jul 2010

 
DONATE TO ME
Default [RECOVERY][All-F2FS] TWRP-2.7.0.0 with All-F2FS support [10/05/14]

TWRP-2.7.0.0 with "All-F2FS" support


NOTE: I don't have a Nexus 5 to test this. It should work.
Please report back.

I have modified the standard TWRP recovery to work with F2FS partitions.
This is for "All-F2FS" that mean that /system, /cache and /data are formatted with F2FS.
Keep in mind that this can work only with a compatible kernel and ROM.

What is F2FS?

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.

Download:
  • FormatPartitions.zip: Here (It is named mako but work on N5 too)
  • TWRP-recovery img: Here

Chagelogs:

- 10/05/14: Fix TWRP
- 08/05/14: Initial release

Here are some explanations. Read them

Recovery has the usual red back key to remember you that you are using a F2FS-recovery.
If wiping /system and /cache and making a factory reset from Wipe menu doesn't work, use FormatPartitions.zip. (<- READ THIS)
Instead wiping /data is fine within the wipe menu.

To switch your /system, /cache and /data partitions to F2FS follow instructions:
Keep in mind that you will lose all the files on the memory of your N5.

You need:
- Two files you can download above (img and FormatPartitions.zip)
- A ROM with "All-F2FS" support
(One way to make your ROM is with Convert To F2FS)
- GApps (i think you want PlayStore.) Usual GApps. Slim AiO work well.
  • Copy a ROM with "All-F2FS" support to your N5
  • Copy GApps to your N5
  • Copy FormatPartitions.zip to your N5
  • Reboot in bootloader
  • Flash this recovery with Fastboot (Maybe Flashify works too)
  • Reboot in new recovery
  • Flash FormatPartitions.zip
  • Reboot recovery (It's needed for some reasons..)
  • Flash ROM
  • Flash GApps
  • Go to Wipe Menu and Format Data (Not a simple wipe)
  • Reboot
  • Done.

It's easier than it seems



To restore partitions to stock:
 


- Download a standard TWRP
- Download RestorePartitions.zip (It is named mako but work on N5 too)


Enjoy.


Thanks for:
- dennes544 (All-F2FS Recovery is based on his Recovery)


(Required Commit)
(Source Here)
If you want to support me, buy me a beer Here Thank you!

Convert Standard ROM to All-F2FS ROM with Convert To F2FS

NEXUS 7


NEXUS 4


NEXUS S
The Following 15 Users Say Thank You to legolas93 For This Useful Post: [ Click to Expand ]
 
RoyJ
Old
#2  
RoyJ's Avatar
Senior Member
Thanks Meter 1213
Posts: 2,344
Join Date: Apr 2012
Location: 203
Looks interesting. I'll give it a shot this weekend. Thanks for this!
*Click for device info
 

ROM: All of them at least once
KERNEL: Bricked Stable
RECOVERY: TWRP 2.3.6.4
Other Devices: Galaxy Nexus
 
Laurentyu1995
Old
#3  
Laurentyu1995's Avatar
Senior Member
Thanks Meter 476
Posts: 1,133
Join Date: Apr 2012
Location: Oradea
I'm glad to see this. Thanks man!!

Sent from my Nexus 5 using XDA Free mobile app
LG Nexus 5 16GB ( D821 )

ROM:Android L Preview LPV79
KERNEL:Stock
Recovery:Stock
Baseband:M8974A-2.0.50.2.08
H/W rev 11; PVS 2

Samsung Galaxy S Plus ( GT-I9001 )

ROM:CM11 ION Release 8 by ADC Team
KERNEL:K^Kernel v2.4 OC/ExUV
Recovery: TWRP 2.7.1.0 by ADC Team
Governor and I/O scheduler:SmartAssV2 and SIO (368-1824 MHz)
Baseband:BUKP4
H/W Revision 0x06
 
fitz420
Old
#4  
fitz420's Avatar
Senior Member
Thanks Meter 296
Posts: 959
Join Date: May 2011
Location: Pittsburgh
Are there any compatible roms+kernels yet for this device? I've used the nodded slimkat on my 2012 nexus 7
 
Kristoffer55
Old
#5  
Junior Member
Thanks Meter 5
Posts: 26
Join Date: Feb 2014
Location: Odense
This looks like a great thing! Thank you for taking your time to make this
Nexus 5. Done.
 
ishaqs60
Old
#6  
ishaqs60's Avatar
Senior Member
Thanks Meter 59
Posts: 148
Join Date: Oct 2010
Location: Al Ain

 
DONATE TO ME
Hi... First of all thank you been waiting for this mod

I have followed all the steps but no luck... Even got new convert to f2fs app and converted a rom but it fails to flash giving error with updater script.. And normal Roms kill recovery and have to restock
 
legolas93
Old
#7  
legolas93's Avatar
Senior Member - OP
Thanks Meter 1159
Posts: 634
Join Date: Jul 2010

 
DONATE TO ME
Quote:
Originally Posted by ishaqs60 View Post
Hi... First of all thank you been waiting for this mod

I have followed all the steps but no luck... Even got new convert to f2fs app and converted a rom but it fails to flash giving error with updater script.. And normal Roms kill recovery and have to restock
As stated i don't have the Nexus 5. But i think that if you give me the recovery.log after the failed flash i can solve the problem.
If you have some time can you retry and after the failed flash go to Advanced -> Recovery log. And then send it to me? Thank you.
If you want to support me, buy me a beer Here Thank you!

Convert Standard ROM to All-F2FS ROM with Convert To F2FS

NEXUS 7


NEXUS 4


NEXUS S
 
yooouuri
Old
#8  
Senior Member
Thanks Meter 241
Posts: 726
Join Date: Sep 2012
Location: Eindhoven
Can i use it with ParanoidAndroid?
Nexus 5 (16GB)
Paranoid android + franco

HTC one S
Galaxy S Advance
Galaxy Gio
Nokia N900
Vofaone branded android phone
 
RoyJ
Old
#9  
RoyJ's Avatar
Senior Member
Thanks Meter 1213
Posts: 2,344
Join Date: Apr 2012
Location: 203
@legolas93 can this be done without the play store app? I can't afford to buy it, but I am comfortable grabbing recovery logs. I just haven't messed with this F2FS stuff yet. Not sure what ROMs, if any, are F2FS compatible already.
*Click for device info
 

ROM: All of them at least once
KERNEL: Bricked Stable
RECOVERY: TWRP 2.3.6.4
Other Devices: Galaxy Nexus
 
kdh2834
Old
#10  
kdh2834's Avatar
Senior Member
Thanks Meter 107
Posts: 139
Join Date: Jul 2012
Location: Pune
Quote:
Originally Posted by RoyJ View Post
@legolas93 can this be done without the play store app? I can't afford to buy it, but I am comfortable grabbing recovery logs. I just haven't messed with this F2FS stuff yet. Not sure what ROMs, if any, are F2FS compatible already.
There r no Roms which r f2fs-all compatible yet. But u can edit them urself to make them compatible.

Without the playstore app also its simple u just hv to change the updater-script of the rom in the META-INF folder


find for lines as below:
HTML Code:
format("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "0", "/system");
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system");
and replace them with this:
HTML Code:
run_program("/sbin/mkfs.f2fs", "/dev/block/platform/msm_sdcc.1/by-name/system");
run_program("/sbin/busybox", "mount", "/system");
and sometimes u can see this line isolated
HTML Code:
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system");
so do the same thing and change it to this
HTML Code:
run_program("/sbin/busybox", "mount", "/system");
and u need f2fs-all compatible kernels aswell..

The Following 6 Users Say Thank You to kdh2834 For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes