Changed /system to f2fs, cannot change back to ext4 - Xperia SP Q&A, Help & Troubleshooting

I changed /system partition to f2fs for using temasek. Now I want to change it back to ext4. I converted all the other partitions to ext4 successfully. But when I try to change /system to ext4, it appears to go successfully. However, when I reboot, it still shows f2fs in the TWRP recovery.
I am using latest TWRP recovery (2.8.7.0_7 I believe).
Can anyone help me on this?

if u want to make sure ...just format the sys and if u see the line formatting system ex4_ then it's ext4 and if it's not then flash the latest twrp 2.8.7.0_8 and re-convert sys to ext4

Changed file system to ext4 and then wiped /system partition, now it is successful

Related

/data on SDcard

Hello,
I'm quite new in android development, so sorry for dumb question.
I have new GT-S6102 (because of dualsim setup) and I'd be quite happy with the stock firmware (S6102XXMA2) if it wasn't of the 160M memory. What I'm trying to do is to modify init.rc in bootimage to mount /data on 4G second partition of my SDCard instead of 160M /dev/stl11.
I'm using a Ubuntu 12.04 machine for my experiments.
I've copied /dev/block/bml7 from my phone using ADB, extracted it using abootimg.
First (and I hope that main) trouble is that when I try to update the boot.img (abootimg -u boot.img -r initrd.img), even without modifying the ramdisk, the resulting image has few different bytes near the beginning of the file. Anyway when I flashed it back to phone, it booted normally.
Then I unpacked the ramdisk (using steps from here) and modified init.rc:
Code:
mount ext4 /dev/block/mmcblk0p2 /data nosuid nodev crypt check=no
# mount rfs /dev/stl11 /data nosuid nodev crypt check=no
I have a 32G uSD card with 28G FAT and 4G EXT4 primary partitions.
Then I've repacked it, made new boot.img, flashed with ODIN and it made a nice bootloop with Samsung bootanimation without usual sound.
What am I doing wrong?
Is this modification even possible?
Thanks for advice
P.S.
I've tried to extract the boot.img from S6102XXMA3_S6102DBTMA1_S6102XXMA2_HOME.tar.md5, but 7zip on Windows and TAR on linux complain that it isn't valid archive.
jelinek.01 said:
Hello,
I'm quite new in android development, so sorry for dumb question.
I have new GT-S6102 (because of dualsim setup) and I'd be quite happy with the stock firmware (S6102XXMA2) if it wasn't of the 160M memory. What I'm trying to do is to modify init.rc in bootimage to mount /data on 4G second partition of my SDCard instead of 160M /dev/stl11.
I'm using a Ubuntu 12.04 machine for my experiments.
I've copied /dev/block/bml7 from my phone using ADB, extracted it using abootimg.
First (and I hope that main) trouble is that when I try to update the boot.img (abootimg -u boot.img -r initrd.img), even without modifying the ramdisk, the resulting image has few different bytes near the beginning of the file. Anyway when I flashed it back to phone, it booted normally.
Then I unpacked the ramdisk (using steps from here) and modified init.rc:
Code:
mount ext4 /dev/block/mmcblk0p2 /data nosuid nodev crypt check=no
# mount rfs /dev/stl11 /data nosuid nodev crypt check=no
I have a 32G uSD card with 28G FAT and 4G EXT4 primary partitions.
Then I've repacked it, made new boot.img, flashed with ODIN and it made a nice bootloop with Samsung bootanimation without usual sound.
What am I doing wrong?
Is this modification even possible?
Thanks for advice
P.S.
I've tried to extract the boot.img from S6102XXMA3_S6102DBTMA1_S6102XXMA2_HOME.tar.md5, but 7zip on Windows and TAR on linux complain that it isn't valid archive.
Click to expand...
Click to collapse
OK, so it seems that I´ve managed to work it out at last.
The unpacking and repacking of bootimage was all right, trouble was in updating only the init.rc and probably using ext4. What I have done:
I replaced all mentions of mounting /dev/stl11 on /data by mounting /dev/block/mmcblk0p2 (that was in files fota.rc, init.rc, init.charge.rc, res/recovery.fstab). In res/recovery.fstab I also changed formatting type from rfs16 to rfs32 so it supports my 4.5G partition.
Then I flashed the bootimg in my phone and formatted the data partition in recovery (that was the only way to make it rfs I've found).
Maybe it would all work with changing the format and mount type to ext4, but I hoped for as little modification as possible.
Now it reports 4.25GB free space after all my apps are installed, hurray .
I have just to remember to never boot it up without SDcard inserted. Maybe it would work as a possibility to borrow the phone to somebody with another card.
The boot.img came from S6102XXMA3_S6102DBTMA1_S6102XXMA2_HOME.tar.md5, if someone wants to try it, it is here . It probably wouldn't touch the original /data partition, so it might be possible to try it and undo it by flashing original boot.img. It just requires to have a second primary partition on SDcard and formatting it in recovery before first boot.
i didnt know to do that boot "compiling" like u did, quite good for you, im using cronmod int2ext , i have 850mb internal. i use 'pimp my rom' to get init.d support.

[MOD][RECOVERY] All-F2FS for GT-I9190|GT-I9192|GT-I9195 [TWRP 2.8.6.0 & Philz Touch]

[MOD][RECOVERY] All-F2FS for GT-I9190|GT-I9192|GT-I9195 [TWRP 2.8.6.0 & Philz Touch]
Hi!
Here I'll try to explain how to use F2FS partitions on your Galaxy S4 Mini.
This is for "All-F2FS" that mean that /system, /cache, /data and /external SD are formatted with F2FS, keep in mind that this can work only with a compatible kernel and ROM.
About F2FS
F2FS (Flash-Friendly File System) is a flash file system created by Kim Jaegeuk (Hangul: 김재극) 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.
Samsung chose a log-structured file system approach, which it adapted to newer forms of storage. F2FS also remedies some known issues of the older log structured file systems, such as the snowball effect of wandering trees and high cleaning overhead. Because 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), Samsung also added various parameters not only for configuring on-disk layout, but also for selecting allocation and cleaning algorithms.
Warning
* You agree to use this MOD/Guide on you own risk and I don't take any responsability if you encounter any issue or if your personal data is lost
Requirements
Your S4 Mini, GT-I9190 or GT-I9195 or GT-I9192 (serrano3g, serranolte, serranods)
An external MicroSD card or a PC (for backup/restore)
Preinstalling Steps
Backup of your personal data to an external SD card or PC (photo, music, ringtones, etc).
Make a full nandroid (just in case that you want to rollback to EXT4) and copy to your PC.
Download and copy to your External SD Card TWRP or Philz Touch with full F2FS support. (Downloads on Second Post)
Download and copy to your External SD Card latest version of f4ktion kernel or use one with All-F2FS support.
Download and copy to your External SD Card CarbonROM with F2FS support, or you can test on your favorite ROM, take in mind that using F2FS on External SD Cards will require F2FS support on your ROM of minivold for vold managed volumes. (Downloads on Second Post)
How can you test your favorite ROM?
I'll include this time CarbonROM with support for F2FS, on upcoming builds you'll need to edit manually the updater-script.
You need to edit updater-script on the zip file, you need to change the following:
Look for:
Code:
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system");
And change it for:
Code:
run_program("/sbin/busybox", "mount", "/system");
Look for:
Code:
format("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "0", "/system");
And change it for:
Code:
run_program("/sbin/mkfs.f2fs", "/dev/block/platform/msm_sdcc.1/by-name/system");
Installation Steps (Clean Install)
1) Install your favorite recovery and reboot to recovery.
For TWRP
1.1) Go to Settings and select "Force data and cache wipe functions to use F2FS" and if you want F2FS support on /System partition, select "Include system partition"
1.2) Now go to Wipe menu and select Format Data and type "yes" (Warning this will format Data partition and your Internal Storage, so please don't forget to make a backup of your personal data)
1.3) Optional, select Advanced Wipe menu and check System and Cache partitions to convert to F2FS respectively.
For Philz Touch
1.1) Go to Mounts and Storage and select "toggle f2fs <-> ext4 migration"
1.2) Select format /data and confirm, now select format /data and /data/media (/sd, confirm, choose f2fs option and confirm again.
1.3) Optional, you can select format /system and format /cache to convert to F2FS respectively.
2) Install your ROM as usual, then flash your GApps and f4ktion kernel in this order.
3) Restore your personal data to your internal SD Card.
If you don't want to make a clean install, you can convert /data partition to F2FS using and restoring a /data nandroid backup.
Installation Steps (Restoring /Data partition)
1) Install your favorite recovery and reboot to recovery.
For TWRP
1.1) Make a nandroid of /data partition.
1.2) Go to Settings and select "Force data and cache wipe functions to use F2FS" and if you want F2FS support on /System partition, select "Include system partition"
1.3) Now go to Wipe menu and select Advanced Wipe menu and check Data, swipe to confirm wipe.
1.4) You can restore your /data nandroid now.
1.5) Optional, you can select format /system and format /cache to convert to F2FS respectively and install a new ROM.
For Philz Touch
1.1) Make a custom nandroid of /data partition.
1.2) Go to Mounts and Storage and select "toggle f2fs <-> ext4 migration"
1.3) Select format /data and confirm, now select format /data and /data/media (/sd, confirm, choose f2fs option and confirm again.
1.4) You can restore your /data nandroid now.
1.5) Optional, you can select format /system and format /cache to convert to F2FS respectively and install a new ROM.
How to check if you have correctly formatted partitions to F2FS?
Through terminal do:
Code:
su
mount | grep f2fs
Through adb do:
Code:
adb shell
su
mount | grep f2fs
Also you can check F2FS's status by doing:
Code:
cat /sys/kernel/debug/f2fs/status
Or just install DiskInfo app
Credits
@Dees_Troy for TWRP
@ktoonsez for F2FS mod
@Phil3759 for Philz Touch
TWRP 2.8.1.0 F2FS MOD
GT-I9190
GT-I9192
GT-I9195
Philz Touch F2FS
GT-I9190
GT-I9192
GT-I9195
F4k said:
Look for:
Code:
format("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "0", "/system");
And change it for:
Code:
run_program("/sbin/mkfs.f2fs", "/dev/block/platform/msm_sdcc.1/by-name/system");
Click to expand...
Click to collapse
Do I need to do this part if I want to keep my system partition as Ext4 but wanted my data and cache partition as F2fs?
Thanks in advance
Envoyé de mon unknown en utilisant Tapatalk
Darktitor said:
Do I need to do this part if I want to keep my system partition as Ext4 but wanted my data and cache partition as F2fs?
Thanks in advance
Envoyé de mon unknown en utilisant Tapatalk
Click to expand...
Click to collapse
This step is if you want /system partition as f2fs, you can use f2fs on whatever you want.
If you don't edit updater-script, your /system partition will be formatted as ext4
Just a quick question, is this Carbon in this post the same as the latest build you have just released? Or is this one with an altered updater-script?
Phenom2122 said:
Just a quick question, is this Carbon in this post the same as the latest build you have just released? Or is this one with an altered updater-script?
Click to expand...
Click to collapse
It's the same but with modified updater-script, this version will format /system partition as f2fs, the one on Carbon's thread as ext4.
All formatted f2fs and everything flashed and running smoothly thanks f4k
Sent from my GT-I9195 using XDA Premium 4 mobile app
From now on we should unzip the rom file and change tha script to have f2fs?
Hope random reboots to stop..
Everything fine with clean install.. One bug tha colors in recent calls with tha black theme
Στάλθηκε από το GT-I9195 μου χρησιμοποιώντας Tapatalk
@F4k nice splash screen you have in your twrp recovery, also glad you added the "force wipe to use f2fs option " this way I can use the twrp themes without the need for additional changes to it.
Sent from my GT-I9195 using Tapatalk
Since doing a format of /data and /data/media Philz works correctly the first time with settings in mnt/shell/emulated/0/clockworkmod. After doing a reboot into recovery later, suddenly it has created a mnt/shell/emulated/0/0/clockworkmod and it seems to be randomly reading settings from either location ie. sometimes it will correctly launch Aroma, sometimes it wont. This is a very strange error because I went back to one of the older Philz versions and the same problem persists.
Will try out TWRP now.
can I format /system with f2fs and then just make a restore? or I have to install a new rom?
chacox said:
can I format /system with f2fs and then just make a restore? or I have to install a new rom?
Click to expand...
Click to collapse
You can try it, I tested several combinations restoring nandroid backups and they worked fine.
But I suggest you to made a full nandroid just un case.
Sent from my GT-I9190
F4k said:
You can try it, I tested several combinations restoring nandroid backups and they worked fine.
But I suggest you to made a full nandroid just un case.
Sent from my GT-I9190
Click to expand...
Click to collapse
ok, I will try right now! and Ill let you know if it works in that way, thanks for your great job!
update: yeah it worked in that way! I have f2fs in every partition! thanks
Does FSFS support symlinks?
If so, how to access FSFS formatted sdcards on /storage/sdcardX directly w/o fuse layer on top?
aguaz said:
Does FSFS support symlinks?
If so, how to access FSFS formatted sdcards on /storage/sdcardX directly w/o fuse layer on top?
Click to expand...
Click to collapse
To use F2FS on external sd cards, ROM needs to have F2FS support on minivold for vold managed volumes, my CarbonROM builds support it.
External storages are vold managed volumes, this is my external sd card formatted as F2FS:
Code:
/dev/block/vold/179:33 on /mnt/media_rw/sdcard1 type f2fs (rw,dirsync,context=u:object_r:sdcard_external:s0,nosuid,nodev,noexec,noatime,background_gc=off,user_xattr,inline_xattr,acl,active_logs=2
F4k said:
External storages are vold managed volumes, this is my external sd card formatted as F2FS:
Code:
/dev/block/vold/179:33 on /mnt/media_rw/sdcard1 type f2fs (rw,dirsync,context=u:object_r:sdcard_external:s0,nosuid,nodev,noexec,noatime,background_gc=off,user_xattr,inline_xattr,acl,active_logs=2
Click to expand...
Click to collapse
My understanding is that the mount point on /mnt/media_rw/sdcard1 is for internal use only. Apps however use the additional mount point on /storage/scdard1 . This mount point has a fuse layer on top, which prevents the use of symlinks on eg ext4 formatted cards. (see here: http://forum.xda-developers.com/showthread.php?t=1442729)
So I'm wondering if F2FS can be accessed by apps natively w/o fuse layer in order to use symlinks. That is of course assuming F2FS supports symlinks itself.
Recovery doesn't seem to support encrypted partitions properly (acts like they don't exist), also some weird input glitches... Doing more testing...
After using TWRP for a while I decided to go back to Philz, this time without reformatting or restoring any old settings. Everything is working perfectly now, something crazy must have happened with my old settings, I suspect with 'Sd Card Target'.
Thank you very much for this F4k. Besides the addition of F2fs support, previously the latest version available to us was 6.41.6, very nice to have such an up to date version now I seriously would donate if I had the means to, and as soon as I actually have some money in my bank account for a change I definitely will be doing so
dulemars said:
Recovery doesn't seem to support encrypted partitions properly (acts like they don't exist), also some weird input glitches... Doing more testing...
Click to expand...
Click to collapse
I don't added crypto support yet to TWRP
i've a problem with system partition.
i use twrp recovery. i've do a clean install format data, i've cheked in Advanced Wipe System and Cache partitions to convert to F2FS, wiped system and cache, i've install last cyanogen nightly and... in diskinfo data is f2fs, cache is f2fs but system is ext4.... why? what's wrong?
thanks

Converting partition from F2FS to ext4 using CM recovery script(TWRP doesn't work)

Hi,
I have installed custom ROM and apparently it converted my userdata partition to F2FS, because when I try to install any other ROM it fails after checking userdata filesystem type. TWRP doesn't boot as well, I only have CM recovery working. I'm looking for someone who can help me write updater script to format the partition back to ext4 using mkfs.ext4 which is included in recovery. Please help.
Installing custom TWRP with f2fs support from here helped.

format /cache as f2fs, went back to ext4 on system boot.

Hello guys,..
i tried to change my /cache to f2fs, via TWRP ( 3.0.4-1 ), but whenever i'm back in the system and check,
it was mounted back to ext4.
I have my /data mounted as f2fs already, so i assume my stock 4.1.3 can handle f2fs, right ?
Where did i do wrong ?

F2FS in MIUI

Hi, wouldn't it be sufficient to switch to a custom kernel with f2fs driver to be able to run MIUI with a f2fs file system? It is even possible? With LineageOS you still cannot use f2fs on the /system partition (maybe in the initial ramdisk there is no f2fs driver ?) but at least /data and /cache partition, also on MIUI. Is there a way to do that?
I'm trying without success, installed a custom kernel which claims to have f2fs support, formatted the cache partition in f2fs to do some testing, typed the 'df' command in the linux shell but no cache partition is displayed.
Using f2fs on the /system isn't a good idea to begin with, the /system is a read only partition so you wouldn't benefit from anything that f2fs gives.

Categories

Resources