F2FS for amami - Xperia Z1 Compact Original Android Development

This is a simple .zip file you can flash on any amami, which uses a ramdisk like the combinedrootfs from Cyanogenmod 11. Your device needs to have a f2fs-compatible kernel, for example this one.
This zip is only modifying your current ramdisk. It will delete the normal fstab and add a binary, which detects if your system, data and cache partition are formatted with f2fs and create a new fstab every boot. It will also flash a twrp recovery, which is modified to work with f2fs.
Ok but... what is f2fs?
It is a new file system, which is especially designed for flash-based storages, like our phones. It will give you much better reading and writing speed.
Installation:
1. Be sure, that you have a f2fs-compatible kernel and your ramdisk's structure is similar to Cyanogenmod's one. If you are on any aosp-based rom, the ramdisk will be compatible anyway.
2. Flash the .zip file from a custom recovery
3. Reboot recovery
4. Now go to advanced wipe and you can change the file systems of system, data and cache to f2fs.
Some more information:
If you convert cache to f2fs:
->No data will be lost
If you convert data to f2fs:
->Your whole internal storage will be wiped. backup your data before you decide to do that!
If you convert system to f2fs
->You need to flash your rom again. You need to modify the updater script of your rom before that like this
OK. I formatted data with f2fs, but want to flash a new rom. What to do?
You need to flash a kernel with f2fs and this zip, no need for any wipes
Download:
http://www.androidfilehost.com/?fid=23578570567713678
For Developers:
You can include this in your rom like this: https://gist.github.com/CoolDevelopment/54ede52a1e075da48151
XDA:DevDB Information
F2FS for amami, Tool/Utility for the Sony Xperia Z1 Compact
Contributors
CoolDevelopment, NovaFusion
Version Information
Status: Testing
Current Beta Version: 2.0
Beta Release Date: 2014-07-16
Created 2014-07-16
Last Updated 2014-07-16

@CoolDevelopment
So, if I corectly understand this zip will erase all data including internal storage? Am I right? But about if I use nightlies? Will I neen to flash it every time after update?

da900 said:
this zip will erase all data including internal storage?
Click to expand...
Click to collapse
It won´t erase your internal storage , I flashed and everthing is there !

pvillasuso said:
It won´t erase your internal storage , I flashed and everthing is there !
Click to expand...
Click to collapse
OK. Thanx. But will erase all data, so I need to install all apps again?

da900 said:
OK. Thanx. But will erase all data, so I need to install all apps again?
Click to expand...
Click to collapse
Nope , it won´t erase any data, files, apps, etc from your internal o external storage
from the OP :
This zip is only modifying your current ramdisk. It will delete the normal fstab and add a binary, which detects if your data and cache partition are formatted with f2fs and create a new fstab every boot. It will also flash a twrp recovery, which is modified to work with f2fs.

It does not erase anything. It makes your current ramdisk compatible with f2fs. If you just flash this notjing changes. But you can convert you cache and data partition to f2fs after flashing the zip with the recovery. If you do that, all your data is lost.
If you have converted your partitions to f2fs and flash a new rom, you need to flash a f2fs-compatible kernel and this again.

CoolDevelopment said:
It does not erase anything. It makes your current ramdisk compatible with f2fs. If you just flash this notjing changes. But you can convert you cache and data partition to f2fs after flashing the zip with the recovery. If you do that, all your data is lost.
If you have converted your partitions to f2fs and flash a new rom, you need to flash a f2fs-compatible kernel and this again.
Click to expand...
Click to collapse
OK. Thanx. I will try. But if I will update the ROM (for example, when using CM nighlies), when there is no need to wipe all data, will I still need to perform all these steps to convert data partion to f2fs? I mean will I need every time restore all data again?

da900 said:
OK. Thanx. I will try. But if I will update the ROM (for example, when using CM nighlies), when there is no need to wipe all data, will I still need to perform all these steps to convert data partion to f2fs? I mean will I need every time restore all data again?
Click to expand...
Click to collapse
You need to flash a f2fs compatiblr kernel and this zip, no wipes
But if you don't do that your rom will bootloop
Sent from my Xperia Z1 Compact using XDA Premium 4 mobile app

New version!
I uploaded a new version with /system support and a few fixes.
I also updated the op.
Have fun!

I would guess that if you have f2fs you should flash the appropriate kernel only if switch ROMs or if the nightly build brings kernel changes.
If you install kernel with f2fs support and your partition is f2fs formatted, I think your data should be safe even between ROM changes.
Somebody please confirm my assumptions.
I hope oshmoun will have the time to build PAC ROM with oms kernel, built in [emoji12]

idimitro said:
I would guess that if you have f2fs you should flash the appropriate kernel only if switch ROMs or if the nightly build brings kernel changes.
If you install kernel with f2fs support and your partition is f2fs formatted, I think your data should be safe even between ROM changes.
Somebody please confirm my assumptions.
I hope oshmoun will have the time to build PAC ROM with oms kernel, built in [emoji12]
Click to expand...
Click to collapse
Every rom flashes a boot.img. This boot.img contains a zImage and a ramdisk(on sony devices it is a bit more complicated but that's enough for now).
Using f2fs needs:
1. A zImage(kernel) with f2fs support
2. A ramdisk with f2fs support
This zip modifies the ramdisk for compatibility with f2fs.
You need to flash a f2fs kernel manually.(for example my moshkernel)
And everytime you flash a new rom, you have to modify the contents of the boot.img again
And why don't I just let you flash a modified boot.img? It is only one file.
It would only be compatible with one rom. This is compatible with any rom and boot.img, which uses the ramdisk architecture like cyanogenmod(combinedrootfs).
I hope I could explain it well

If i want to format my system to f2fs, i just need to do step 6 as in your link and then zip back the rom?
So when ever i decide to do full wipe everything, will my system, data, cache format still in f2fs format?
Sent from my Candy Amami using Tapatalk

najar360 said:
If i want to format my system to f2fs, i just need to do step 6 as in your link and then zip back the rom?
So when ever i decide to do full wipe everything, will my system, data, cache format still in f2fs format?
Sent from my Candy Amami using Tapatalk
Click to expand...
Click to collapse
If you use TWRP yes
But if you want to revert back go to advanced wipe->change or repair filesystem/change filesystem-> ext4

CoolDevelopment said:
If you use TWRP yes
But if you want to revert back go to advanced wipe->change or repair filesystem/change filesystem-> ext4
Click to expand...
Click to collapse
i try to change data to f2fs format then flash new rom, mosh kernel, and this patch and then reboot system. i got bootloop. i didnt do step 6 yet.

najar360 said:
i try to change data to f2fs format then flash new rom, mosh kernel, and this patch and then reboot system. i got bootloop. i didnt do step 6 yet.
Click to expand...
Click to collapse
Can you tell me which rom?
I tried it with slimkat and it worked well
And what kind of bootloop? Do you see the sony or rom bootlogo?
And please use MoshKernel 0.1.2

CoolDevelopment said:
Can you tell me which rom?
I tried it with slimkat and it worked well
And what kind of bootloop? Do you see the sony or rom bootlogo?
And please use MoshKernel 0.1.2
Click to expand...
Click to collapse
i'm using candykat
my step, flash f2fs patcher, reboot recovery, change cache and data to f2fs format. reboot recovery again, wipe everything. checking cache and data still in f2fs. flash candykat, mosh kernel, f2fs patcher. reboot system. sony bootlogo appear, rom bootanimation appear. stuck for 10 minutes.
anything wrong with my step?

najar360 said:
i'm using candykat
my step, flash f2fs patcher, reboot recovery, change cache and data to f2fs format. reboot recovery again, wipe everything. checking cache and data still in f2fs. flash candykat, mosh kernel, f2fs patcher. reboot system. sony bootlogo appear, rom bootanimation appear. stuck for 10 minutes.
anything wrong with my step?
Click to expand...
Click to collapse
Did you use the latest MoshKernel?(0.1.2)
The new f2fs-patcher zip is not compatible with the old MoshKernel

CoolDevelopment said:
Did you use the latest MoshKernel?(0.1.2)
The new f2fs-patcher zip is not compatible with the old MoshKernel
Click to expand...
Click to collapse
yeaps. i'm using 0.1.2 version.

najar360 said:
yeaps. i'm using 0.1.2 version.
Click to expand...
Click to collapse
That's strange. I tried it with slimrom, which is the base for candycat as far as i know, and it worked perfectly.

CoolDevelopment said:
That's strange. I tried it with slimrom, which is the base for candycat as far as i know, and it worked perfectly.
Click to expand...
Click to collapse
is my step correct?
edit : try slimkat and it work.

Related

[Tool][23 Sept 2015][Aroma][v1.2]:Mega Wipe:Super Wipe:Factory Reset:Simple Wipe

This is a tool originally developed by Zoot1 a developer on xda-developers.com.
All I have done, with his permission, is to modify it for the Samsung Galaxy Note 3.
I wish to thank him very much for allowing me to do this. You can visit his original development link at Zoot1 Wipe Scripts for Flashaholics.
USE THIS AT YOUR RISK. I AM NOT RESPONSIBLE FOR AN DAMAGE TO YOUR PHONE, ANY ARGUMENTS BETWEEN YOU AND YOUR SPOUSE, LOST BANK ACCOUNTS, NEW REVOLUTIONS OR ACTS OF GOD.
You MUST have the following installed in order to use this tool:
1. CWM or TWRP Recovery installed
2. Busybox installed
What the tool does:
1. Megawipe: Use this to completely format your phone. It will delete everything on your phone and will bring it to bare bones. After using it, install any ROM for a fresh experience without any conflicts with in the framework.It deletes the Data (except data/media), Cache, System and Preload partitions of your phone. So Beware!
2. SuperWipe: This is a simple factory reset and you can use it to move from one ROM to another without bothering about framework conflicts. It deletes the Dalvik Cache, Preload, System and Cache partitions of your phone. Does NOT delete your data files.
3. Factory Reset: Use it to do a Factory Reset, which wipes your Data partition (except data/media), Cache Partition and Dalvik Cache.
4. SimpleWipe: A simple wipe is as the name suggests. A Simple Cache and Dalvik cache wipe. You can use it to clear the said partitions before updating to a newer version of your ROM. Also, You can use it before you have to flash a new ROM.
Updated Sept. 23, 2015 - v1.2 for N900/N9005 - Note: I only have an N900.
Changes: Sept. 23, 2015
- modified wiping of data partition to skip data/media (your internal SDCard)
- expanded text for the different wipes to give more information about the wipe choices
- NOTE: the only difference between the 2 scripts is the partition numbers for the N900 and the N9005
Download Link:
so is it safe to wipe now? even with cwm? there was an issue with wipe which caused boot loop?! isnt it?
mR.fR34ky said:
so is it safe to wipe now? even with cwm? there was an issue with wipe which caused boot loop?! isnt it?
Click to expand...
Click to collapse
Haven't had any problems with CWM wipe.
mR.fR34ky said:
so is it safe to wipe now? even with cwm? there was an issue with wipe which caused boot loop?! isnt it?
Click to expand...
Click to collapse
the bootloops were cased by restroing nandroids.. AFAIK there were no issues with wipes...
gcrutchr said:
Haven't had any problems with CWM wipe.
Click to expand...
Click to collapse
so the mega wipe wipes interal sdcard as well? is there anyway to edit that so the script only wipes data/system/cache/dalvik, and leaves sdcard intact?
Khizar said:
the bootloops were cased by restroing nandroids.. AFAIK there were no issues with wipes...
so the mega wipe wipes interal sdcard as well? is there anyway to edit that so the script only wipes data/system/cache/dalvik, and leaves sdcard intact?
Click to expand...
Click to collapse
The MegaWipe DOES NOT wipe internal sdcard. Having looked at the original script, it never did.
gcrutchr said:
The MegaWipe DOES NOT wipe internal sdcard. Having looked at the original script, it never did.
Click to expand...
Click to collapse
Mega Wipe does not delete your internal partition? Because in Samsung Galaxy S 3 i remember this script "reformat" your preload internal partition! the word "reformat" i put it in quotes because i don`t know exactly how to say it in english! Anyway i must thank you for your hard work!
Nice. If I understand this correctly this is like the Darkside wipes (and now Infamous wipes) for GSII. I used those all the time on my phone. Easiest way to wipe without worry. Thanks. I was hoping for this for the Note 3.
does not work for my n9005
Theblack_jack said:
does not work for my n9005
Click to expand...
Click to collapse
Thanks for your feedback!
no problem
gcrutchr said:
The MegaWipe DOES NOT wipe internal sdcard. Having looked at the original script, it never did.
Click to expand...
Click to collapse
Did you test it on your Note 3 this tool that you port?
good question
the dev of this mod will not again zip for megawipe, such as the not working?
anyone?
Theblack_jack said:
anyone?
Click to expand...
Click to collapse
I will post a working update on Sunday.
ah yes! thank you
Theblack_jack said:
ah yes! thank you
Click to expand...
Click to collapse
Scripts should be working now. Updated, tested and used for a new ROM I installed.
well does not work on n9005
Theblack_jack said:
well does not work on n9005
Click to expand...
Click to collapse
Can you send the partition layout for the N9005 so I can check the partition numbers?
If you do not know what they are, there is a free partition layout app on the PlayStore you can install.
It is called Partition Table by Lakshman.
I need the following:
/data
/preload
/system
/cache
Also, what do you mean it is not working? what happens when you run it?
can you give me the name of the application? and when I flash the zip it's still about 10%
so if I have the full menu. superwipe, megawipe .... with cwm 6.0.4.4

How Do I Convert EXT4 To F2FS?

convert ext4 to f2fs
hello , can someone give me instruction on how to convert ext4 to f2fs .
I've tried 2 times with TWRP latest versions and failed to install temasek rom.
After many hours i've ended up with latest stock rom in ext4 ... so i want to know too
Tatsuya_ said:
hello , can someone give me instruction on how to convert ext4 to f2fs .
Click to expand...
Click to collapse
Google is your friend.
check this out
http://forum.xda-developers.com/oneplus-one/general/howto-f2fs-filesystem-t2857139
I hope you find it useful
Kuoi said:
I've tried 2 times with TWRP latest versions and failed to install temasek rom.
After many hours i've ended up with latest stock rom in ext4 ... so i want to know too
Click to expand...
Click to collapse
Go to
TWRP >WIPE >ADVANCE WIPE >SLECECT partation u want to change (data and cache) >click on repair / change file system > select repair file system >click f2fs
Maybe the rom couldn't install because i've changed 'system' partition to f2fs ?
thanks guys

Convert a TWRP Backup Ext to a F2FS compatible Format (Android 5.1.1) ?

Hi,
I use a Stock 5.1.1 Android Rom on my S6 Edge LDU with some selfmade modifications (Debloat, Kernel Upgrades etc.).
Flashed a new Kernel (F2FS compatible) but my Rom seem's to be not compatible with F2FS because it get's always stuck on Boot Loop.
I tryed the following way:
Create a Flashable Zip -> http://forum.xda-developers.com/showthread.php?t=2746044
And converted it to F2FS -> http://forum.xda-developers.com/galaxy-s2-plus/development/linux-ext-to-f2fs-rom-converter-t2840303/page2
...but i always get the Device not Compatible error...
Is there anyway to Convert my TWRP Backup to a F2FS compatible format ?
Thanks
http://forum.xda-developers.com/showthread.php?p=55476692
Sent from my SM-G920W8 using Tapatalk
As far as I know, probably not. F2fs is a type of flash file system, you can format partitions with this type of file system which would be specific to that partition. Because when you back up from twrp, the backup isn't in a particular flash file system format, it's not a partition to be able to convert it plus going from one flash file system to another completely wipes the that partition.
Sent from my SM-G920F using XDA-Developers mobile app
Yeah, I wasn't really sure what the point was. The backup's an archive of files, and making it a flashable zip doesn't make it a ROM. Files will restore to whichever FS is on the device.
Sent from my SM-G920W8 using Tapatalk

/data Filesystem change GUIDE from Ext4 to F2FS WITH Restoring ROM Data

//////////// USE IT AT YOUR OWN RISK AND I AM NOT RESPONSIBLE FOR ANY FAILURE OR BRICKED DEVICES /////////////////
THIS IS NOT a PUBLICITY for Any ROM or KERNEL
They are Simply just what i use
I have successfully changed my data partition to F2FS and using arter kernel as well
Also I have managed to get the Data back in place so after the whole operation all my ROM data are intact
NOTE THAT YOUR ROM & KERNEL MUST SUPPORT F2FS TO BE ABLE TO BOOT
Note that changing any partition filesystem from a type to another will require formatting that partition
From what i understood converting /system and /cache to f2fs is useless hence I converted /data only as it the main partition that you write on
First of all your internal storage is in /data/media/0 path and hence it will be wiped
I used the official TWRP to be sure of no issues
Take care of the 12th step as if it was missed you will start from scratch >> CRITICAL
Note that Fstab file already contains DFE so if you are unecrypted like my case flashing Fstab keeps me unencrypted without flashing DFE
Now let's start the operation of converstion of/data from ext4 to f2fs in a step by step guide
1- BOOT TO RECOVERY
2- TAKE A FULL NANDROID BACKUP ( MOST IMPORTANT IS THE DATA PARTITION )
3- TAKE A FULL CLONE OF YOUR INTERNAL STORAGE while you are in TWRP( To PC either via MTP or adb command and i prefer the adb method as it ensure that all your files are copied including hidden files )
4- WIPE > Format Data > Yes ( it is a factory reset and all your internal storage will be wiped )
5- Reboot to recovery again
6- Wipe > Advanced Wipe > Check Dalvik , cache , system and Data > Wipe and DONOT reboot to recovery
7- Connect cable again and copy the FSTAB Tools ZIP file only
9- Flash the FSTAB TOOLS File
9- Wipe > Advanced Wipe > Check Data ONLY > Repair or Change file system > F2FS > Change File system
10-Copy via cable whatever you need from your internal storage or the whole of it as your wish
11-Ensure that the TWRP Backup you took in step 2 is copied to internal storage again
12-GO TO TWRP SETTINGS and Tick the 3rd option in the first TAB ( it is called use rm -rf instead of formatting )
13-The above step ensured that when you restore Data partition TWRP won't format it again to ext4 and leave it as f2fs
14-Restore > Choose your fresh Backup > RESTORE DATA PARTITION ONLY ( you will see a message that you are restoring a backup taken of ext4 filesystem , donot worry it worked in my case )
15-Flash the following in order : Vendor > ROM > Fstab File ( NOT the tools one ) > Gapps > Arter97 kernel > Reboot
16-You should boot to the OS with all your data ( settings ) like they were intacted and now the /data partition is f2fs
17-Restore your internal storage if you still didnot do it in step # 10
18-Reboot to recovery and Flash Magisk ( optional )
Notes :
- I though that 4th step was useless however it is mandatory as it erases Vendor or something similar
- I though that 6th step is duplicate to 4th step and was useless however without it TWRP didnot change filesystem to F2FS
- The FSTAB must be flashed after every vendor update ( it can be before or after ROM in the sequence , the most important that it is after every Vendor BEFORE YOU BOOT )
- I didnot flash magisk in step # 15 as crCroid recommends that you boot to system one time before you flash magisk
- crDroid default kernel doesnot support f2fs and if i didnot flash arter97 i wouldnot be able to boot
- By this setup i cannot go back to crDroid default kernel anymore unless f2fs is supported by it
- If ROM doesnot support f2fs the system wouldnot Boot as it would not be able to understand the /data partition filesystem
- Ofcourse any Kernel and ROM combo that supports F2FS should be valid to apply this guide
Finally thanks for all the Devs for thier hard work and dedication , You all made our POCO a lovely BEAST
I think this thread is belong to guides&news and discussion forum
thanhnvt194 said:
I think this thread is belong to guides&news and discussion forum
Click to expand...
Click to collapse
Yes i you are right but do not know how to move thread from a forum to the other
Thanks @shouk_1987, good guide. Any chance you can provide a link to the FStab files mentioned in your post?
Is this arter kernel specific? I used shadow kernel and the fstab changes are flashed with the kernel
dgrasley said:
Thanks @shouk_1987, good guide. Any chance you can provide a link to the FStab files mentioned in your post?
Click to expand...
Click to collapse
They are in arter kernel thread in the OP
Thread moved to the correct section.
LTT
So, does this work with crDroid? I ask because both rom and kernel must apparently support f2fs and @gwolfu has indicated crDroid does not.
piet8stevens said:
So, does this work with crDroid? I ask because both rom and kernel must apparently support f2fs and @gwolfu has indicated crDroid does not.
Click to expand...
Click to collapse
crDroid Kernel doesnot for now
While the ROM does
What about my apps and its data, can I restore it back?
Edikuun said:
What about my apps and its data, can I restore it back?
Click to expand...
Click to collapse
Read the guide carefully
You will br able to restore everything but the most part that needs patience is restoring internal storage
works on miui ?
RubenPCA said:
works on miui ?
Click to expand...
Click to collapse
Didnot try but saw other users says it works
Which kernels/ROMs are supported?
Shished said:
Which kernels/ROMs are supported?
Click to expand...
Click to collapse
Read in the OP of the ROM / Kernel you want
A lot aupport f2fs now
a great guide . Any way to do the same(restore data) if ee wanna go back from f2fs to ext4? just in case.
Debraj903 said:
a great guide . Any way to do the same(restore data) if ee wanna go back from f2fs to ext4? just in case.
Click to expand...
Click to collapse
Didnot try but I believe it is the same concept
My internal storage went from 30GB free to 15GB free
Edikuun said:
My internal storage went from 30GB free to 15GB free
Click to expand...
Click to collapse
I am the opposite I have 2 gb increase
Least version for Poco is 64 gb , which version do u have ?
shouk_1987 said:
I am the opposite I have 2 gb increase
Least version for Poco is 64 gb , which version do u have ?
Click to expand...
Click to collapse
It's okay now, I forgot to delete my twrp backup and titanium backup. Anyways, nice guide! Successfully converted to f2fs

HELP ! WHILE FLASHING LINEAGE 18.1 it's say E001: FAILED TO UPDATE SYSTEM IMAGE HELP PLZ :

Help me with this situation
Why can not flash?
Do you Reverted partition to stock partitioning?
Is your recovery an up to date recovery like TWRP 3.2.x,3.5.1, OrangeFox ,SHRP?
sys1admin said:
Help me with this situation
Click to expand...
Click to collapse
That happened to me once when using the reparticioner I had to install the rom 8.1 to my factory phone with odin after the first start I installed the twrp and from there my cell phone started working fine again
sys1admin said:
Help me with this situation
Click to expand...
Click to collapse
First thing is few lineage OS not work on Vendor partition. To over come this use below steps:
Note: Use orange fox recovery for smooth flow
1. Run revert vendor practitioner for exynos 7870.
2. Then reboot to recovery.
3. Goto format option perform format ( This will erase your internal storage data before action this step take a backup)
4. Then navigate to wipe option then wipe Dalivk cache, cache, system, data, internal storage
5. Then install lineage os zip. reboot and enjoy
If you want to install any treble rom in feature better use Universal script. This script make 4096MB system partition, 512MB vendor partition & 57 cache partition

Categories

Resources