[APP] Native EXT2 without custom kernel

Search This thread

RyanZA

Senior Member
Jan 21, 2006
2,023
784
JHB
Update! Much improved APP version is available here: http://xdaforums.com/showpost.php?p=8230964&postcount=143

Still not recommended for anybody without a fully working recovery mode. :)

------------

This is very much ALPHA! Don't try it unless you have something to prove! ;)
Does not work with the latest froyo builds
Start off with a clean firmware without any other lagfixes. It should work in other cases, but I've only tested it with a clean JM8. It should work fine in a clean JPC Froyo too. You're gonna need busybox (1.17.1) or similar tools.

Step 1: You need a 512byte MBR file. If you have a 8GB I9000 like me, you can use my attached file. Else, proceed to post #2 on how to create this file for your device.

Step 2: Copy all of the required files to the correct place.
Code:
adb push test.sh /sdcard/test.sh
adb push parted-static /sdcard/parted-static
adb push partprobe-static /sdcard/partprobe-static
adb push playlogos1 /sdcard/playlogos1

adb shell
su
busybox cp /sdcard/test.sh /system/bin/userinit.sh
busybox cp /sdcard/parted-static /dbdata/parted-static
busybox cp /sdcard/partprobe-static /dbdata/partprobe-static
busybox mv /system/bin/playlogos1 /system/bin/playlogosnow
busybox cp /sdcard/playlogos1 /system/bin/playlogos1

chmod 755 /system/bin/playlogos1
chmod 755 /system/bin/userinit.sh

Step 3: Put the MBR file in place. It must be a 512byte file, and it must be placed in /dbdata/test2 - Refer to 2nd post to create one, or use my included one in the zip.

EDIT: Missed a step. You need to move the binary '/system/bin/fsck_msdos' to '/system/bin/fsck_msdos.bak' or other name. You won't be able to unmount if the FAT32 check is running. It will have to be done manually after.

Step 4: This is the hard part! Reboot your phone. The boot logo will be 20 seconds delayed. This is because there is a 'sleep 20' command inside the boot script, as it seems to take 10+ seconds for mmcblk0p3 to show up in /dev/block. I don't know why, it should show up instantly. Anyway, it'll boot up after you see the messed up boot logo.

Step 5: Create the EXT2 partition
Code:
adb shell
su
busybox mkfs.ext2 -b 4096 -m 0 /dev/block/mmcblk0p3
mount -t ext2 -o noatime,nodiratime,errors=continue /dev/block/mmcblk0p3 /data/data2

Step 6: Copy your /data/data across, and whatever else you want too
Code:
mkdir /data/data2
busybox cp -rp /data/data /data/data2/
busybox mv /data/data /data/data.bak
busybox ln -s /data/data2/data /data/data
You can repeat the cp, mv, and ln for app, app-private, system, dalvik-cache

Step 7: Reboot. It'll have the messed up boot animation again.

Congratulations!

Quadrant scores are around 1900 (database writes take longer than EXT2 on RFS, as the buffer is smaller)
It runs very very smoothly though!

Good luck if you try this!
I'll have an app to do all of this later in the week / next week.

If anybody can tell me why I need the 'sleep 20' before /dev/block/mmcblk0p3 is created, I'd really like to know. :)

Updates / Known Issues

GPS breaks on boot. Fix it with 'kill pid', where pid is found with 'ps' and the process is called '/system/bin/gpsd/glgps_samsungJupiter'
20 second pause is too long, and some apps may start to load before hand! I changed the 20 sec sleep in test.sh to 10 sec, and it seems a lot better. :) Still need to find out why a pause is needed at all.
 

Attachments

  • tools.zip
    2.9 MB · Views: 411
Last edited:
  • Like
Reactions: ed10000 and fbousk

RyanZA

Senior Member
Jan 21, 2006
2,023
784
JHB
How to create your own MBR 512byte file:

First, make sure you have /dbdata/parted-static. See above post on how to copy it.

Then, you need to knock /sdcard/sd and /sdcard out of operation. This method is easiest:
Code:
busybox fuser -km /sdcard/sd
busybox fuser -km /sdcard
umount /sdcard/sd
umount /sdcard

Now you need to create the partition using parted-static. You could use sfdisk or busybox fdisk too, but I like parted!

Code:
/dbdata/parted-static /dev/block/mmcblk0

First, list the existing partitions with 'print'. You should get something like this:
Code:
Number  Start   End     Size    Type     File system  Flags
 1      32.8kB  6208MB  6208MB  primary  fat32        lba
 2      6208MB  8221MB  2013MB  primary               lba
Now, resize your /sdcard partition. It's the big one (6208MB in my case):
Code:
resize 1 32.8kB 5208MB
And then, you need to create a new partition using the remaining space:
Code:
mkpart
logical
5208MB
6208MB
And now list the partitions again with print. You should have something like this:
Code:
Number  Start   End     Size    Type     File system  Flags
 1      32.8kB  5208MB  5208MB  primary  fat32        lba
 3      5208MB  6208MB  999MB   primary  ext2
 2      6208MB  8221MB  2013MB  primary               lba

All done! Exit parted with 'quit'

Now, you need to create the 512byte file. Really easy:
Code:
dd if=/dev/block/mmcblk0 of=/dbdata/test2 bs=1 count=512

And now you have your own MBR file sitting in /dbdata/test2, all ready for use by the reboot script. :)
 
Last edited:

RyanZA

Senior Member
Jan 21, 2006
2,023
784
JHB
Thanks for your work ryan

i Guess you need root :(

Hahah, you very much need root! :) If root is a problem for you, you really shouldn't try this out! It's fairly complicated. Difficulty Level: Advanced! :D

That said, this will be hopefully end up in OCLF as a one click option (well, it might have to be 2 clicks). I'm not sure how much testing this is going to need. I guess the more people who help test it out, the sooner I can move it up. I'm sure there are a lot of bugs. :)
 

bratfink

Senior Member
Feb 8, 2010
505
21
London
MBR file

Would be willing to give it a try if you could pre-bake a MBR file that is compatible with the 16gb version :D!
 

RyanZA

Senior Member
Jan 21, 2006
2,023
784
JHB
Would be willing to give it a try if you could pre-bake a MBR file that is compatible with the 16gb version :D!

It's really easy, just follow the steps in post 2. Shouldn't take more than 5 mins. :D

You just resize the big partition (look for the one with the biggest size) and then enter the start as the same as the current start, and the end as end-1000MB or whatever. :)
 

RyanZA

Senior Member
Jan 21, 2006
2,023
784
JHB
The 20 sec wait seems to be too long though. It is possible to lose apps if they try to load up too soon. :(

Shows up after doing a few reboots. Should be fixable. :D
 

Meister_Li

Senior Member
Jun 26, 2010
298
37
Cork
That looks promising. But do I understand it correctly that the system is still running off of rfs? Thumbs up in any case, this looks like it could finally fix the lagging on my JPC :p
 

RyanZA

Senior Member
Jan 21, 2006
2,023
784
JHB
That looks promising. But do I understand it correctly that the system is still running off of rfs? Thumbs up in any case, this looks like it could finally fix the lagging on my JPC :p

Nope, the system runs completely off EXT2. It's very fast. :D



Bug found: The fix breaks the GPS deamon for some reason! Interesting, I wonder why. :)

Anyway, workaround is easy: just kill the gps deamon and it will automatically restart, and work fine. GPS deamon is called /system/bin/gpsd/glgps_samsungJupiter - It can be found with 'ps' and killed with 'kill pid'

Gotta make notes of all of this stuff.. :D
 

RyanZA

Senior Member
Jan 21, 2006
2,023
784
JHB
Ok RyanZA, I finally understood what you meant :)

Woooooooohoooooooooo!! :D
You see? It works after all! Got some bugs and stuff still, but with a bit of work it is definitely possible to make this bulletproof. I think, anyway. :)

Do you know why it takes ~5-10 seconds for /dev/block to update? Looking at the log, it seems to wait for vold to do it. I guess I need to find a way to force vold to re-check it quicker?
 

RyanZA

Senior Member
Jan 21, 2006
2,023
784
JHB
I'm quite liking this fix so far. Makes JPC a LOT nicer. :D

Anyway, I'll use this for a day and report back on any issues tomorrow night. If anybody else could give it a try, that would be awesome! :)
 

anilkuj

Senior Member
Jul 25, 2007
563
32
jersey city
Hi ryan

Thanks for your great work as ever

2 questions

Do I have to do this every time I flash a new rom

And how do I undo this



Sent from my SAMSUNG-SGH-I897 using XDA App
 

OlegZh

Senior Member
Jul 22, 2010
75
9
Thank you, RyanZA, for your work! It's very appreciated.

Sent from my GT-I9000 using XDA App
 

NeoXTC

Senior Member
Dec 13, 2007
682
40
Brisbane
wow first voodoo now this :) These lag fixes can only get better. Will try this on the weekend when my phone have some "downtime" :)

Maybe even go back to JPC as well lol Only reason I'm using JM cos of lagfixes lol
 

fane1

Senior Member
Dec 8, 2008
315
36
Thank you both for you work Curio and Ryan.Im very happy with the voodoo so far but if u are going to make an app like one click i probably wanna try it.Afterall maybe we can get froyo and lagfix next week hein?? :D
 

stuclark

Senior Member
May 15, 2006
593
150
London, UK
Ryan, I'm lazy mate... have you got this into any sort of package yet, or do I need to read the destructions carefully? (Running JPC with your 1.6x lagfix)
 

Stefanauss

Senior Member
Aug 15, 2010
235
13

MomijiTMO

Senior Member
Jan 14, 2009
118
0
I mean com'on. Look at when he created this thread. Look at the text in bright red to get an idea of where this is at.

;)
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    Update! Much improved APP version is available here: http://xdaforums.com/showpost.php?p=8230964&postcount=143

    Still not recommended for anybody without a fully working recovery mode. :)

    ------------

    This is very much ALPHA! Don't try it unless you have something to prove! ;)
    Does not work with the latest froyo builds
    Start off with a clean firmware without any other lagfixes. It should work in other cases, but I've only tested it with a clean JM8. It should work fine in a clean JPC Froyo too. You're gonna need busybox (1.17.1) or similar tools.

    Step 1: You need a 512byte MBR file. If you have a 8GB I9000 like me, you can use my attached file. Else, proceed to post #2 on how to create this file for your device.

    Step 2: Copy all of the required files to the correct place.
    Code:
    adb push test.sh /sdcard/test.sh
    adb push parted-static /sdcard/parted-static
    adb push partprobe-static /sdcard/partprobe-static
    adb push playlogos1 /sdcard/playlogos1
    
    adb shell
    su
    busybox cp /sdcard/test.sh /system/bin/userinit.sh
    busybox cp /sdcard/parted-static /dbdata/parted-static
    busybox cp /sdcard/partprobe-static /dbdata/partprobe-static
    busybox mv /system/bin/playlogos1 /system/bin/playlogosnow
    busybox cp /sdcard/playlogos1 /system/bin/playlogos1
    
    chmod 755 /system/bin/playlogos1
    chmod 755 /system/bin/userinit.sh

    Step 3: Put the MBR file in place. It must be a 512byte file, and it must be placed in /dbdata/test2 - Refer to 2nd post to create one, or use my included one in the zip.

    EDIT: Missed a step. You need to move the binary '/system/bin/fsck_msdos' to '/system/bin/fsck_msdos.bak' or other name. You won't be able to unmount if the FAT32 check is running. It will have to be done manually after.

    Step 4: This is the hard part! Reboot your phone. The boot logo will be 20 seconds delayed. This is because there is a 'sleep 20' command inside the boot script, as it seems to take 10+ seconds for mmcblk0p3 to show up in /dev/block. I don't know why, it should show up instantly. Anyway, it'll boot up after you see the messed up boot logo.

    Step 5: Create the EXT2 partition
    Code:
    adb shell
    su
    busybox mkfs.ext2 -b 4096 -m 0 /dev/block/mmcblk0p3
    mount -t ext2 -o noatime,nodiratime,errors=continue /dev/block/mmcblk0p3 /data/data2

    Step 6: Copy your /data/data across, and whatever else you want too
    Code:
    mkdir /data/data2
    busybox cp -rp /data/data /data/data2/
    busybox mv /data/data /data/data.bak
    busybox ln -s /data/data2/data /data/data
    You can repeat the cp, mv, and ln for app, app-private, system, dalvik-cache

    Step 7: Reboot. It'll have the messed up boot animation again.

    Congratulations!

    Quadrant scores are around 1900 (database writes take longer than EXT2 on RFS, as the buffer is smaller)
    It runs very very smoothly though!

    Good luck if you try this!
    I'll have an app to do all of this later in the week / next week.

    If anybody can tell me why I need the 'sleep 20' before /dev/block/mmcblk0p3 is created, I'd really like to know. :)

    Updates / Known Issues

    GPS breaks on boot. Fix it with 'kill pid', where pid is found with 'ps' and the process is called '/system/bin/gpsd/glgps_samsungJupiter'
    20 second pause is too long, and some apps may start to load before hand! I changed the 20 sec sleep in test.sh to 10 sec, and it seems a lot better. :) Still need to find out why a pause is needed at all.