Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,741,535 Members 40,033 Now Online
XDA Developers Android and Mobile Development Forum

[MOD][ANY][Mitsuyoshi EXT4 Mod][flo]

Tip us?
 
jubei_mitsuyoshi
Old
(Last edited by jubei_mitsuyoshi; 8th March 2014 at 04:28 PM.)
#1  
Member - OP
Thanks Meter 66
Posts: 50
Join Date: Mar 2013
Default [MOD][ANY][Mitsuyoshi EXT4 Mod][flo]

This is the flo version of my mod for the old nexus 7 here http://forum.xda-developers.com/show....php?t=2280496

Repeating the intro to save you guys going there

Background..

With any linux system i build first thing i do is remove the journal from all my EXT4 partitions, to make a long story short ( i wont bore you with details of just how journal writes totally slow disk i/o , google it ) this gave me on average a 25% increase in system speed ( obviously due to the increased i/o rate )

I usually did it with

Code:
Select Code
mke2fs.ext4 -O ^has_journal ...device...
before installing the distro, now i thought hey maybe this would work on android?

Now mke2fs is not well supported on arm but tune2fs is! in fact its included in TWRP 2.5 so


Code:
Select Code
run_program("/sbin/tune2fs", "-O", "^has_journal", "/dev/block/platform/msm_sdcc.1/by-name/system");
( for the system partition) should work right , and in fact yes it does !!!, tried it from TWRP command line and hey presto %^$%^$^%$ FAST system

This is the code for a recovery script version

Code:
Select Code
ui_print("jubei.....remove journals from all ext4 partitions");
ui_print("/dev/block/platform/msm_sdcc.1/by-name/boot       /boot       emmc");
ui_print("/dev/block/platform/msm_sdcc.1/by-name/recovery   /recovery   emmc");
ui_print("/dev/block/platform/msm_sdcc.1/by-name/misc       /misc       emmc");
ui_print("/dev/block/platform/msm_sdcc.1/by-name/system     /system     ext4");
ui_print("/dev/block/platform/msm_sdcc.1/by-name/userdata   /data       ext4");
ui_print("/dev/block/platform/msm_sdcc.1/by-name/cache      /cache      ext4");
ui_print("/dev/block/platform/msm_sdcc.1/by-name/sbl1       /sbl1       emmc");
ui_print("/dev/block/platform/msm_sdcc.1/by-name/sbl2       /sbl2       emmc");
ui_print("/dev/block/platform/msm_sdcc.1/by-name/sbl3       /sbl3       emmc");
ui_print("/dev/block/platform/msm_sdcc.1/by-name/tz         /tz         emmc");
ui_print("/dev/block/platform/msm_sdcc.1/by-name/rpm        /rpm        emmc");
ui_print("/dev/block/platform/msm_sdcc.1/by-name/aboot      /aboot      emmc");
ui_print("/dev/block/platform/msm_sdcc.1/by-name/sbl2b      /sbl2b      emmc");
ui_print("/dev/block/platform/msm_sdcc.1/by-name/sbl3b      /sbl3b      emmc");
ui_print("/dev/block/platform/msm_sdcc.1/by-name/tzb        /tzb        emmc");
ui_print("/dev/block/platform/msm_sdcc.1/by-name/rpmb       /rpmb       emmc");
ui_print("/dev/block/platform/msm_sdcc.1/by-name/abootb     /abootb     emmc");
ui_print("");
ui_print("");
ifelse(is_mounted("/system") == "/system", unmount("/system"));
ifelse(is_mounted("/cache") == "/cache", unmount("/cache"));
ifelse(is_mounted("/data") == "/data", unmount("/data"));
ui_print("converting partitions to ext4 minus journal");
ui_print(" ");
ui_print("e2fsck system partition");
ui_print(" ");
run_program("/sbin/e2fsck", "-p", "/dev/block/platform/msm_sdcc.1/by-name/system");
ui_print("e2fsck data partition");
ui_print(" ");
run_program("/sbin/e2fsck", "-p", "/dev/block/platform/msm_sdcc.1/by-name/userdata");
ui_print("e2fsck cache partition");
ui_print(" ");
run_program("/sbin/e2fsck", "-p", "/dev/block/platform/msm_sdcc.1/by-name/cache");
ui_print("now lets rub out those nasty journals");
ui_print(" ");
run_program("/sbin/tune2fs", "-O", "^has_journal", "/dev/block/platform/msm_sdcc.1/by-name/userdata");
run_program("/sbin/tune2fs", "-O", "^has_journal", "/dev/block/platform/msm_sdcc.1/by-name/system");
run_program("/sbin/tune2fs", "-O", "^has_journal", "/dev/block/platform/msm_sdcc.1/by-name/cache");
ui_print("and re-fsck to clean any set bits");
ui_print(" ");
ui_print("e2fsck system partition");
ui_print(" ");
run_program("/sbin/e2fsck", "-p", "/dev/block/platform/msm_sdcc.1/by-name/system");
ui_print("e2fsck cache partition");
ui_print(" ");
run_program("/sbin/e2fsck", "-p", "/dev/block/platform/msm_sdcc.1/by-name/userdata");
ui_print("e2fsck cache partition");
ui_print(" ");
run_program("/sbin/e2fsck", "-p", "/dev/block/platform/msm_sdcc.1/by-name/cache");
ui_print("end of jubei mod ");
And i include a zip for those who like to test

there are 2 scripts, one to remove the journal from your ext4 partitions, and one to re-instate the journal, this should allow people to test their setup with each without any wiping or reformatting

Instructions.......
( tested with TWRP 2.5+ only )
Flash the bugger
DO NOT WIPE ANYTHING, after flashing, doing so will only reformat the wiped partition with a journal

There will be one update that includes a test routine to ensure journals have been erased
I am now able to extend the mod to any device that uses twrp 2.5+ and ext4, plese ask for a particular device on this thread
Thank you
Edit Please note non flo versions are not tested by me.
Edit mako version added after request
Edit hammerhead version added after request
The Following 9 Users Say Thank You to jubei_mitsuyoshi For This Useful Post: [ Click to Expand ]
 
hacklana
Old
#2  
hacklana's Avatar
Senior Member
Thanks Meter 625
Posts: 593
Join Date: Sep 2010
Location: Maryland
great mod. will definitely try after school

sent from nowhere
http://forum.xda-developers.com/showthread.php?t=1605655
Please Click Thanks OR Donate to @asrock37 if i helped you
 
djdarkknight96
Old
#3  
djdarkknight96's Avatar
Recognized Themer
Thanks Meter 11807
Posts: 9,527
Join Date: Nov 2009
Location: Springfield

 
DONATE TO ME
I imagine this will still work on CWM? Or is there a reason it won't?

Sent from my Nexus 5 with the KlearKat tapatalk app!
NEXUS 5 Hammerhead:
ROM: CM11 With BlakKat goodness
NEXUS 7 Flo:
ROM: CM11 With KlearKat goodness
More from me:
Get some Black and Clear apps here: TeamBlackOutApps Updater


 
jubei_mitsuyoshi
Old
#4  
Member - OP
Thanks Meter 66
Posts: 50
Join Date: Mar 2013
Quote:
Originally Posted by djdarkknight96 View Post
I imagine this will still work on CWM? Or is there a reason it won't?

Sent from my Nexus 5 with the KlearKat tapatalk app!
to be honest no idea. im developing on twrp exclusively, as long as CWM has tune2fs and is EDIFY complient should be good to go
The Following User Says Thank You to jubei_mitsuyoshi For This Useful Post: [ Click to Expand ]
 
kcxda78
Old
#5  
kcxda78's Avatar
Member
Thanks Meter 9
Posts: 73
Join Date: Nov 2010
Nice speed up on flo.
How bout if i run this on mako....?

Sent from my Nexus 7 using xda app-developers app
 
jubei_mitsuyoshi
Old
#6  
Member - OP
Thanks Meter 66
Posts: 50
Join Date: Mar 2013
Quote:
Originally Posted by kcxda78 View Post
Nice speed up on flo.
How bout if i run this on mako....?

Sent from my Nexus 7 using xda app-developers app
not sure will have to check but doubt it

As said in the post though, can do a version for any device that uses ext4 and twrp , do you need a mako version ?
The Following User Says Thank You to jubei_mitsuyoshi For This Useful Post: [ Click to Expand ]
 
XsceneXhippieX
Old
#7  
Senior Member
Thanks Meter 121
Posts: 1,026
Join Date: Oct 2010
Quote:
Originally Posted by jubei_mitsuyoshi View Post
not sure will have to check but doubt it

As said in the post though, can do a version for any device that uses ext4 and twrp , do you need a mako version ?
i would personally appreciate a mako version as well if that is possible, it has a similar hardware set to this 2013 n7 too
use the thanks button if ive helped you

like skateboarding? check THIS out : )
http://www.facebook.com/TJ.Halbert.skateboarding

"life is too imporant to be taken seriously"
 
habylab
Old
#8  
habylab's Avatar
Senior Member
Thanks Meter 609
Posts: 4,280
Join Date: Dec 2010
Is this safe though?

Sent from my Nexus 7 (2014) using Tapatalk. My mobile is a CM11 run Galaxy S3.

Samsung Galaxy S3 - CM11 - Archi Kernel.
Nexus 7 - 4.4 Kang - Ak
 
kcxda78
Old
#9  
kcxda78's Avatar
Member
Thanks Meter 9
Posts: 73
Join Date: Nov 2010
Yes plz. Id like to try it on mako. :thumbup:

Sent from my Nexus 4 using xda app-developers app
 
xbs
Old
#10  
xbs's Avatar
Senior Member
Thanks Meter 152
Posts: 795
Join Date: May 2011
Location: Vinewood
I'll try on my n7.
Can you do a nexus s?
~ Nexus 7 2013 (Flo) [CM 11] ~ Transformer (TF101) [KatKiss-KitKat] ~ Nexus S (Crespo) [CM 11] ~
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes