New: XDA launches forum for app developers. Discuss coding, tools, marketing, and more.
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
husq510
Old
(Last edited by husq510; 14th August 2010 at 12:22 PM.)
#1  
Member - OP
Thanks Meter 3
Posts: 70
Join Date: Jul 2010
Default ext4 module 2.6.29 (enclair 2.1) without reflash (raw lag fix)

I compiled ext4 module to work with enclair 2.1 kernel 2.6.29, tested with XXJF5 stock firmware. Need root access, tune2fs and mke2fs static binary (e2fsprog-bin.tgz.zip)

mkdir -p /system/lib/modules/2.6.29/

#copy module.tar.gz in /system/lib/modules/2.6.29/

cd /system/lib/modules/2.6.29/

tar zxvf module.tar.gz

insmod /system/lib/modules/2.6.29/kernel/fs/jbd2/jbd2.ko
insmod /system/lib/modules/2.6.29/kernel/lib/crc16.ko
insmod /system/lib/modules/2.6.29/kernel/fs/ext4/ext4.ko

if=/dev/zero of=/sdcard/sd/filesystem.ext4 bs=1048576 count=2048

losetup /dev/block/loop1 /sdcard/sd/filesystem.ext4
mke2fs -t ex4 /dev/block/loop1
tune2fs -c 0 -i 0 -m 0 /dev/block/loop1

mkdir /sdcard/sddata
mount -t ext4 /dev/block/loop1 /sdcard/sddata

cp -rp /data/data /sdcard/sddata
cp -rp /data/system /sdcard/sddata
cp -rp /data/dalvik-cache /sdcard/sddata
cp -rp /data/app /sdcard/sddata
cp -rp /data/app-private /sdcard/sddata

mount -t ext4 -o bind /sdcard/sddata/data /data/data
mount -t ext4 -o bind /sdcard/sddata/system /data/system
mount -t ext4 -o bind /sdcard/sddata/dalvik-cache /data/dalvik-cache
mount -t ext4 -o bind /sdcard/sddata/app /data/app
mount -t ext4 -o bind /sdcard/sddata/app-private /data/app-private


run your quadrant test, i got 1793. enjoy.

ps: if you want make it permanent look at RyanZA playlogos1 trick. Also make sure your ext4 filesystem is available at boot time instead /sdcard/sddata


Note:

- due its nature ext4 keep data in RAM much more than ext3 before writing on disk, therefore if a powerloss happens before data got written this may results in lost of data. (see delayed allocation). On the other hand a temporary file wont be written to disk, but kept on RAM avoiding read/write cycles. Inode reservation can increase performance as well.
- barrier can be disabled but this may result in a corrupt journal
Attached Files
File Type: zip module.tar.gz.zip - [Click for QR Code] (138.0 KB, 138 views)
File Type: zip e2fsprog-bin.tgz.zip - [Click for QR Code] (477.9 KB, 122 views)
 
dark_sith
Old
#2  
Senior Member
Thanks Meter 5
Posts: 164
Join Date: Jun 2009
explain please
 
husq510
Old
(Last edited by husq510; 14th August 2010 at 10:18 PM.)
#3  
Member - OP
Thanks Meter 3
Posts: 70
Join Date: Jul 2010
you may want to use ext4 without reflash, and at the same time keep your /data untouchable, just in case you need a recovery backup. eg: if /sdcard got corrupt, system will mount your original /data. (desynced)

I had to disable vold, and mv /etc/vold.conf /etc/vold.old, otherwise it coundnt find /sdcard/filesystem.ext4 so I mount it just before everything.

userinit.sh
--
/system/bin/mount -t vfat -o errors=remount-ro /dev/block/mmcblk1p1 /sdcard
insmod /system/lib/modules/2.6.29/kernel/fs/jbd2/jbd2.ko
insmod /system/lib/modules/2.6.29/kernel/lib/crc16.ko
insmod /system/lib/modules/2.6.29/kernel/fs/ext4/ext4.ko
/data/local/bin/losetup /dev/block/loop1 /sdcard/filesystem.ext4
/system/xbin/e2fsck -p /dev/block/loop1
/system/bin/mount -t ext4 /dev/block/loop1 /sdcard/sddata
/system/bin/mount -t ext4 -o bind /sdcard/sddata/data /data/data
/system/bin/mount -t ext4 -o bind /sdcard/sddata/system /data/system
/system/bin/mount -t ext4 -o bind /sdcard/sddata/dalvik-cache /data/dalvik-cache
/system/bin/mount -t ext4 -o bind /sdcard/sddata/app /data/app
/system/bin/mount -t ext4 -o bind /sdcard/sddata/app-private /data/app-private
--

mv /system/bin/playlogos1 /system/bin/playlogosnow

Do not forget to create /system/bin/playlogos1 as follow:

#!/system/bin/sh
sh /system/bin/userinit.sh
/system/bin/playlogosnow

I got 1858


this is just proof do not use on your device if you dont know what you doing. Since vold does not mount partition some application may not recognize /sdcard mounted that way.

id like to find a way to start vold before playlogos1 and resolve this issue, buts vold seems check argv[0] before start.
 
Chainfire
Old
(Last edited by Chainfire; 14th August 2010 at 05:21 PM.)
#4  
Chainfire's Avatar
Senior Moderator / Elite Recognized Developer
Thanks Meter 33082
Posts: 8,101
Join Date: Oct 2007

 
DONATE TO ME
e2fsprogs recompiled as well ? In other words, will the e2fsprogs from cynogen work on ext4? These do use libs, btw.

I might build support for this into CFLagFix if I can freely use the files
BLOG - G+(Chainfire) - G+(Personal) - TWITTER - IRC - DONATE

Android
HTC G1, Hero, One
Samsung i5800, i9000*2, P1000*2, P7100, i9100*2, N7000, P6800, i9300, N7100, i9505
Sony T LT30p, Z C6603
Nexus Galaxy*2, N7, N10

SuperSU, Mobile ODIN, TriangleAway, DSLR Controller, CF-Root, USB Host Diagnostics, ExynosAbuseAPK, Live dmesg+logcat, NoMoarPowah!, CF-Bench, Chainfire3D, CF.lumen, SGS2 SIM Unlocker, GingerBreakAPK, SuperPower, and more!

Windows Mobile 5/6
E-Mobile EM-ONE
HTC Wizard*2, Kaiser, Touch, Diamond, Pro, HD*2, Diamond 2, Pro 2*2, HD2*2
Samsung i780, i900*2, i8000*2, b7300, b7320, b7330, b7620*2, b6520

WMWifiRouter, KaiserTweak, FPUEnabler, WMLongLife, WMRegOptimizer, CFC+GUI, TF3D+v2 ports, Kaiser+Omnia2+Snapdragon 3D drivers, GfxBoost, and more!

Windows Phone 7
LG GW910

NOTICE: I do not respond to tech support questions through PM.
 
husq510
Old
#5  
Member - OP
Thanks Meter 3
Posts: 70
Join Date: Jul 2010
yeah static bin.
 
Tayutama
Old
#6  
Senior Member
Thanks Meter 20
Posts: 1,309
Join Date: May 2010
Location: Helsinge
Quote:
Originally Posted by husq510 View Post
yeah static bin.
Just want to ask if it's ok to implament this in my lagfix zips

Ofc ill credit you
 
husq510
Old
#7  
Member - OP
Thanks Meter 3
Posts: 70
Join Date: Jul 2010
sure you can.
 
bub181
Old
#8  
Senior Member
Thanks Meter 7
Posts: 241
Join Date: Jul 2007
Thanks for the statically linked e2fsck
 
Tayutama
Old
(Last edited by Tayutama; 15th August 2010 at 12:32 AM.)
#9  
Senior Member
Thanks Meter 20
Posts: 1,309
Join Date: May 2010
Location: Helsinge
Nvm got it working on captivate also


XDA PORTAL POSTS

Forum Added for the Samsung Galaxy Mega

What do you do when the Galaxy Note line is simply not big enough? You get theSamsung Galaxy Mega. … more

Voice Control Your Phone with Tasker and AutoVoice – XDA Developer TV

XDA Developer TV Producer Kevin set up his phone to respond to … more

Guide to Take Better Control of Your Volume Levels

Would you like to know one of the things that really annoys me on a daily basis? Tough, … more

Get the Android 4.2.2 Status Bar on Your Gingerbread-Based Samsung

There are still quite a few of folks who run Gingerbread on their … more