Post Reply

[KERNEL][RECOVERY][F2FS][EXP][4.4] LegoKernel [28/02/14]

27th February 2014, 08:24 PM   |  #1  
legolas93's Avatar
OP Senior Member
Thanks Meter: 1,188
 
635 posts
Join Date:Joined: Jul 2010
Donate to Me
LegoKernel - With F2FS

NOTE This kernel version doesn't support "All-F2FS"

This is a Kernel for Android 4.4. I made this for SlimKat so i don't know if this will work with other roms.
Some users reported working also on:
  • Cyanogenmod (Reported by: buggatti)
  • Carbon (Reported by: Nosterius)
  • OmniROM (Reported by: SkOrPn)

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.

The idea was of ss2man44. F2FS helps Nexus 7 2012 where he needs: IO Speed and slowdown after long period (months?) of use. This Filesystem is used in others phone too like Moto X where he shows good performance.

I tested this myself for some weeks without problems and i'm happy.

I started from the stock Slim kernel.
There are also others features by me:
  • Ported sl[aou]b from Linux 3.4
  • Ported timer and workqueue from Linux 3.4
  • Ported random from Linux 3.13-rc4
  • Ported rwsem from Linux 3.11
  • Kernel NEON Mode
  • Etc..Etc..
  • Added GPU OC (Franco way..)
  • Added Toggle for FSYNC
  • Revert CPU OC things (We don't need it and it was a bit dirty..)

Instructions:

I already said that i did this for SlimKat so my advice is to start this procedure with a working SlimKat rom or another rom that is reported to work good. (See the start of this post)

F2FS is a Filesystem so we have to Format our memory in this mode. How can we do this? We need a "special" TWRP and LegoKernel

I said "FORMAT" so it's obvious that you will lose all your data (even Movies..Music..all!). Backup them on PC to restore easily at the end.
Now..
  • Reboot in Recovery (To know that you are on "special" TWRP note that the BackKey is Red at the bottom-right)
  • Go to Wipe menu
  • Format Data (Not the simple Wipe!)
  • Reboot

Enjoy. (Now you may want to restore your backup)

Report back how do you feel your tablet now. I have a very positive opinion about this thing!!

Changelogs:
- 28/02/13: Add Kexec Support

Some thing you have to know:
  • After the switch to F2FS you can use only kernel with F2FS Support
  • Backup made with standard TWRP may not work with "special" TWRP and reverse.

How come back?
  • Flash a standard TWRP
  • Format Data
  • Flash your previous ROM/Kernel
  • Reboot

Github
Last edited by legolas93; 12th March 2014 at 06:32 PM.
The Following 56 Users Say Thank You to legolas93 For This Useful Post: [ View ]
27th February 2014, 08:31 PM   |  #2  
Erovia's Avatar
Senior Member
Thanks Meter: 247
 
788 posts
Join Date:Joined: Sep 2012
More
It's great that someone else beside sgt.meow (Oxydo kernel) picked up ss2man44's idea.
28th February 2014, 06:27 AM   |  #3  
buggatti's Avatar
Senior Member
Thanks Meter: 11
 
133 posts
Join Date:Joined: Aug 2011
working great with cm 11


and Thank a lot for adding fsync off.. NOW THE NEXUS 7 FLIES
The Following User Says Thank You to buggatti For This Useful Post: [ View ]
28th February 2014, 11:56 AM   |  #4  
legolas93's Avatar
OP Senior Member
Thanks Meter: 1,188
 
635 posts
Join Date:Joined: Jul 2010
Donate to Me
MultiROM v22a - With F2FS

I have adapted Tassadar MultiRom to work with F2FS. (All credits to him)

You need:
  • Its Multirom zip. Here
  • Kernel with F2FS Support and Kexec Support
    (As now LegoKernel-F2FS-140228 is the only LegoKernel that work with MultiROM)
  • TWRP with F2FS Support and MultiROM. Here (For Grouper)
  • TWRP with F2FS Support and MultiROM. Here (For Tilapia)

If you already switched to F2FS:
  • Move Multirom zip and Kernel to your tablet
  • Flash TWRP with F2FS Support and MultiROM with Fastboot or Flashify
  • Reboot in Recovery
  • Flash Kernel
  • Flash MultiROM zip
  • Reboot

If you didn't switch to F2FS and want to do it now:
  • Copy Kernel to your tablet
  • Flash Kernel with your current Recovery
  • Flash TWRP with F2FS Support and MultiROM with Fastboot
  • Reboot in Recovery
  • Format Data in Wipe menu (you will lose all your files!!) Not the simple Wipe!
  • Reboot
  • Copy MultiROM zip to your tablet
  • Reboot in Recovery
  • Flash MultiROM zip
  • Reboot

Some things you have to know: (READ THEM)
  • All your ROMs must support F2FS so if you want to use "normal" ROMs you have to "share kernel"

I have tested this with SlimKat as Primary and CM11 as other ROM
Last edited by legolas93; 11th March 2014 at 09:39 AM.
The Following 12 Users Say Thank You to legolas93 For This Useful Post: [ View ]
28th February 2014, 12:23 PM   |  #5  
legolas93's Avatar
OP Senior Member
Thanks Meter: 1,188
 
635 posts
Join Date:Joined: Jul 2010
Donate to Me
I think i did some errors writing all the procedures. Hope they are right now.
The Following User Says Thank You to legolas93 For This Useful Post: [ View ]
28th February 2014, 06:38 PM   |  #6  
Senior Member
Thanks Meter: 112
 
138 posts
Join Date:Joined: Jan 2012
Hi,
this mod works well for me on my Nexus 7 3G running CyanogenMod 11. I've been running this just for a few hours, but the filesystem performance seems much better, my N7 no longer lags when installing apps, which it did before.
The only problem, or rather inconvenience, I had is that the recovery is not made for the N7 3G, so it won't install ROMs and stuff made for tilapia, as it expects them made for grouper. It would be cool to have a tilapia version of the recovery, or some instructions in the OP on how to use it there.

If you want to use this mod on tilapia, you have to:
  1. Install the special recovery by legolas93 from the first post.
  2. Format /data from within the recovery (format, not just wipe).
  3. Install back a recovery made for tilapia and DO NOT FORMAT /DATA!
  4. Install your ROM/gapps/hippo/etc.
  5. Flash the modified kernel from the firts post.
Anyway, big thanks to legolas93 for doing this. Have you also considered making /system and /cache as f2fs? Do you think it would have any significant benefits?
The Following 2 Users Say Thank You to frantisek.nesveda For This Useful Post: [ View ]
28th February 2014, 07:42 PM   |  #7  
SkOrPn's Avatar
Senior Member
Flag Albuquerque, NM
Thanks Meter: 474
 
1,821 posts
Join Date:Joined: Jun 2007
Donate to Me
More
Hmm, well I decided to try this as well, however after flashing the kernel I sat it down for a few minutes so I could fire up my laptop (it has Fastboot on it) and when I came back to the tablet it was turned off. I turned it on and now out of the blue its asking for a password to decrypt the storage?

I have ran CM11 for the past year on it and purchased it brand new from Google last January. However, after trying my Google email password it is still asking for a password.

Anyway, I decided to do a full wipe, installed CM11 2/28, LegoKernel and Gapps. And upon rebooting its still taking me to a screen asking for a password. Anyone know why it would spontaneously ask for a password? is there a default password I am supposed to use with this kernel by chance? lol, I am at a loss and I usually have everything under control grr haha

EDIT:
CM11 2/28 is installed
Latest LegoKernel
Latest PA_Gapps
And I have not been able to flash the latest TWRP on it yet. But I do have the latest TWRP (MultiROM version) on it.

EDIT: #2, Ok I managed to use Fastboot on my laptop and I flashed the special TWRP. I went a head and re-wiped factory-reset and also re-flashed the CM11 rom and the latest LegoKernel, but after a reboot its still asking for some unknown password. Why would it need a password all of a sudden?
Last edited by SkOrPn; 28th February 2014 at 08:11 PM.
28th February 2014, 08:04 PM   |  #8  
Senior Member
Thanks Meter: 112
 
138 posts
Join Date:Joined: Jan 2012
Quote:
Originally Posted by SkOrPn

Hmm, well I decided to try this as well, however after flashing the kernel I sat it down for a few minutes so I could fire up my laptop (it has Fastboot on it) and when I came back to the tablet it was turned off. I turned it on and now out of the blue its asking for a password to decrypt the storage?

I have ran CM11 for the past year on it and purchased it brand new from Google last January. However, after trying my Google email password it is still asking for a password.

Anyway, I decided to do a full wipe, installed CM11 2/28, LegoKernel and Gapps. And upon rebooting its still taking me to a screen asking for a password. Anyone know why it would spontaneously ask for a password? is there a default password I am supposed to use with this kernel by chance? lol, I am at a loss and I usually have everything under control grr haha

Did you format the /data partition with the modified recovery? This happens when Android can't access the /data partition, in this case very probably because there is a mismatch between the filesystem on /data (ext4) and the filesystem the kernel expects (f2fs). You have to first format the /data partition so it would have f2fs.
28th February 2014, 09:29 PM   |  #9  
SkOrPn's Avatar
Senior Member
Flag Albuquerque, NM
Thanks Meter: 474
 
1,821 posts
Join Date:Joined: Jun 2007
Donate to Me
More
Quote:
Originally Posted by frantisek.nesveda

Did you format the /data partition with the modified recovery? This happens when Android can't access the /data partition, in this case very probably because there is a mismatch between the filesystem on /data (ext4) and the filesystem the kernel expects (f2fs). You have to first format the /data partition so it would have f2fs.

I cant remember now if I did or didn't format /data. I remember formatting everything except for OTG I think, lol.

Anyway, I used NRT and put the device back to stock, then I installed the modified F2FS TWRP recovery. Now I have the modified Recovery installed, and a fresh stock rom rooted with usb debug enabled. I just finished downloading the latest CM11 Rom and the LegoKernel and put it into my freshly formatted sdcard. I am sitting in TWRP at this moment but worried about flashing the kernel again. haha

Going to try again. Will report back. But first, let me make sure I have this right since I am trying to flash a ROM at the same time now.

1st. Flash the CM11 ROM
2nd. Flash the LegoKernel
3rd. Format /data???
4th. Flash Gapps?

I am almost certain I did this before, that's why I am asking.
28th February 2014, 09:34 PM   |  #10  
Senior Member
Thanks Meter: 112
 
138 posts
Join Date:Joined: Jan 2012
Quote:
Originally Posted by SkOrPn

1st. Flash the CM11 ROM
2nd. Flash the LegoKernel
3rd. Format /data???
4th. Flash Gapps?

That should do it. Remember, you have to format /data, just wiping is not enough. And you'll have to flash gapps via sideload, because formatting /data also removes everything on /sdcard.
Personally, I'd format /data first, just to be sure you don't delete a part of the CM11 ROM after installing, but I think CM11 recovery zip doesn't flash anything into /data anyway, so it doesn't matter.
Last edited by frantisek.nesveda; 28th February 2014 at 09:37 PM.

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Top Threads in Nexus 7 Original Development by ThreadRank