yashsingh1/xdaforums huggingface dataset:
[Galaxy S I9000 Android Development] Phandroid:
It sounds great so far plus given the fact that your original OCLF works so well I'm sure it will work nicely, too. But it sure is a bummer to be losing 2 gigs of memory, specially when you have the 8 GB version...
[Galaxy S I9000 Android Development] RyanZA:
Just think of it as a full on device backup (I'll make an option so you can set the backup at any time, and restore it too) and then it isn't so bad. ;)

It's actually also possible to bind mount a folder in /data into the sdcard, so you could store stuff in there. Could even use it as a privacy thing, with a special keycode to enable and disable the special hidden storage. Spy style. ;)
[Galaxy S I9000 Android Development] RyanZA:
Okay, so I've got it running nicely on JPH now.

Quadrant score is 1750, and the phone is very nice and snappy. Basically, a complete success and I'm really happy with it. :D

Still got some stuff left to do though:

1. I did the partitioning manually - need to do it with parted scripting.

2. I'm using a 2sec delay instead of a script to check for completion. It works, but it would be nicer with a script.

3. Asking the kernel to reload the MBR takes 10 seconds. This means I have to delay boot for 10 seconds. I don't like this, someone please find out why! The 10 second delay happens when using partprobe or hdparm -z for the reload.

Other than that, froyo seems to run a whole lot better now. :D

I can release the app if anybody wants to play with it, but it is very very rough and you'll have to know what you're doing. ;)
[Galaxy S I9000 Android Development] imagoX86:
I wouldn't mind to play with it, what You were using to create ext2 partition on a internal storage(gparted on linux box will do??)
[Galaxy S I9000 Android Development] RyanZA:
Nope, check out the 2nd post in the thread.
[Galaxy S I9000 Android Development] Phandroid:
Now that sounds interesting. Could you also set it up as the App2SD folder?
[Galaxy S I9000 Android Development] RyanZA:
Hahaha, while funny, I don't really see the point. :D

I'm not sure how you'd do that either. If someone knows how to hijack the APPS2SD...? :)
[Galaxy S I9000 Android Development] tommy1971:
I want to try that! I flashed JM7 from JP3 to test the Voodoo and I have flashed the JPH for your lagfix but found out it's not compatible :(

I missed the lag-free 2.1, please let me try
[Galaxy S I9000 Android Development] imagoX86:
So any chance to get the app and start to play with it??? (Running JPH atm)
[Galaxy S I9000 Android Development] RyanZA:
I'm trying to make it work nicely. ;)

Progress update:

I made the scripts to check if the boot was complete. Works nicely, so anything can be done while it boots up, no matter how long. Including some resizing work.. :)

I got the parted scripting working, and it now makes resized /sdcard down 1GB, and gives that 1GB to a new EXT2 partition, which it then mounts up and copies across data to.

As a nice bonus, I've made the script check for /dbdata/lagfix_installed on bootup. If that file is missing (cause you used 'format data' or similar) then the script will remove all of the custom scripting, leaving your phone as stock to boot up into RFS.

So it's coming along nicely. :)

Stuff left to do:

Clean it up, so that it installs parted for you and a few other things.

'Appropriate' the robot voice from voodoo, so that you know what it's doing. ;) (I'll probably leave this for now, and just warn you not to pull the battery!)

Maybe test it a bit! (I might skip this step! :D )

The app also checks that you only have 2 partitions, and that your first partition is fat32. If it isn't, it'll refuse to install for your safety! I believe all stock SGS variants should work fine though. But who knows, if it won't work, it'll tell you. :)

Release ETA: Later tonight, or tomorrow

Oh, this version is 2.2 only! I haven't tested it on 2.1, but I believe some of the startup scripts are different. In which case it will need slight modifications to run on 2.1. :)

EDIT: Can anybody post me an /init.rc for 2.1? It'll save me having to flash over and check it. :)
[Galaxy S I9000 Android Development] imagoX86:
That's great, I haven't been so exited since the phone came out....thank You for all your amazing work!
[Galaxy S I9000 Android Development] MZWiZard:
OMG!!! Subscribed!:cool::D:D
[Galaxy S I9000 Android Development] RyanZA:
Thanks, that's perfect! :D

Well, I hope it will work, anyway. This release will be super alpha. ;)

I get the feeling it'll take some cleaning up to get it perfect across the multitude of SGS devices. :)
[Galaxy S I9000 Android Development] RyanZA:
Okay, so here it is! This is very much alpha, and use at your own risk! :D

It is only tested on an 8GB Froyo JPH device.

It will resize your /sdcard and reduce it by 1GB. Backup everything on your /sdcard before you try this, just in case. Also make sure you have 1GB free space on your /sdcard

How to install:

Root your phone.

Copy the APK to your phone.

Run the APK.

Select 'Install EXT2 Tools'

Select 'TestWrapper'

EDIT: Wait a long time at the I9000 splash screen. Depending on sdcard size, the resize could take aaaaaggess. If you want to check progress, you can 'adb shell' and then 'cat /dbdata/log'

It could possibly take as long as 15 minutes for people with tons of data!

How to uninstall:

Option A: Go into recovery console, and wipe device. (All data lost)

Option B: In the app, select the undo option. (Revert to before you installed lagfix)

Good luck to any who are testing! Remember to backup! :)
[Galaxy S I9000 Android Development] Ibanez33:
Great Stuff! I'll have to be a guinea pig!!
[Galaxy S I9000 Android Development] RyanZA:
If you decide to give this a test, could you please post feedback in the following form? It'll help a lot! :)

SGS Variant (8gb/16/vibrant/whatever)

Firmware version (froyo jpc, etc)

Approximate time to run on first boot

Any bugs you saw/stuff that should be fixed or changed

Comments

Thanks! :)
[Galaxy S I9000 Android Development] Ibanez33:
One quick question while its copying the data what should be on the screen?

Mine only paused briefly at the startup logo, and is currently on the lock screen with black behind it...

8GB i9000

JPH (Froyo)
[Galaxy S I9000 Android Development] imhassan:
Can't wait for this to be available as a simple tap option in One Click Lag Fix!

Keep up the good work Ryan
[Galaxy S I9000 Android Development] RyanZA:
That doesn't sound good....

Any chance you could do the following?

adb shell
cat /dbdata/log

and post the result?

It sounds like it failed somehow.
[Galaxy S I9000 Android Development] Ibanez33:
Yup seems ok although should it have said something after test 2?

test 1

lagfix is installed

/data unmounted

lagfix is setup already

test 2

I left it and it rebooted and definitely feels alot faster. And got 1673 in Quadrant where it was getting around 900's before..

It all seems ok apart from all my data on the internal sd has gone walkabout but I did back it up so that not an issue..
[Galaxy S I9000 Android Development] RyanZA:
Nope, test 2 actually means it completed successfully. It booted quickly because your... lagfix was already setup?!

That must have been the 2nd boot then. :D

Anyway, looks like it worked properly. Awesome. :)

Like I said, it needs some kind of interaction to tell you what it's doing.

So I'll put you down as the first successful tester. :D

Pity about the data on /sdcard. I can't really understand why that would happen though - parted has pretty good FAT32 resizing. :(

I'll have to do more tests on that. Maybe someone knows something?

It is a straight 'resize 1 [start] [end-1GB]'
[Galaxy S I9000 Android Development] imagoX86:
8GB i9000 running JPH, all ok after running the app, quadrant is 1688 but most importantly phone is running so smooth now a lot of smother then on oclf2.
[Galaxy S I9000 Android Development] fane1:
Tested on jm8 with 8gb mc and i also get this error "mv /data/nexus" no such file or directory
[Galaxy S I9000 Android Development] xiadz:
Gallaxy GT-I9000 8 GB

running Froyo JPH with [ROM]Rombie v2a

no problems with setting it up

it took aprox. 4 min. from hitting wrapper button to boot up and be fully functional

(so after media scan to finish it`s job)

RyanZa :) Thanks for your input in our galaxy life:)

Quick test involving Astro file manager shows NO lost data from memory, all pictures and music are present and there for browsing

Google maps loads and works fast and right (outside of jumping location) so no probs hire also!!!

I don`t do Quadrant but usability is much better now with everything just flashy pops up open :)

Once again Thanks RyanZa :)

quadrant score 1717 ......nothing to ad :):)
[Galaxy S I9000 Android Development] :
Would be a native ext4 or nilfs2 better?
[Galaxy S I9000 Android Development] ed10000:
Finally! :D I would have tried it out, but can't risk a bad flash right now, have college in an hour. Will give it a shot when I get back. Hope there are success stories with 16GB models by then :)

P.S. - I've never seen Paypal Donate buttons in your posts. You really should have one ;)
[Galaxy S I9000 Android Development] RyanZA:
Ah.. over 10GB and it must convert from MB to GB. Pretty easy fix.

Looks like 2.1 isn't working because of the nexus thing. Weird, it's there in the init.rc. Also an easy fix, I think.

Native ext4 or nilfs2 are only possible in 2.1, since I don't have the modules for 2.2.

I'll try get an ext4/nilfs2/whatever else option in there for 2.1 though. :D

I've got a donate button in the APK threads, I think.

It's not a 'bad flash' since it does no flashing, though! Just moves data around.
[Galaxy S I9000 Android Development] RyanZA:
Was this /data/nexus or /system/bin/nexus?

I don't know where a /data/nexus error could be coming from...

EDIT: Meh, I'll flash 2.1 and find out myself! ;)
[Galaxy S I9000 Android Development] tommy1971:
Same problem with Galaxy S JPH/16GB, will wait for your next release.
[Galaxy S I9000 Android Development] RyanZA:
Okay, here is the next release!

This version has tested and working support for Android 2.1!

DOES NOT WORK ON 16GB DEVICES. Fix will be up this evening.

If you used the previous version and got the error, it had a pretty nasty bug in that it didn't clean up properly.

Run the following in adb shell to fix your phone back up:

adb shell
su
mv /system/bin/app_process.replace /system/bin/app_process
mv /system/bin/debuggerd.replace /system/bin/debuggerd
mv /system/bin/drexe.replace /system/bin/drexe
mv /system/bin/mediaserver.replace /system/bin/mediaserver
mv /system/bin/npsmobex.replace /system/bin/npsmobex
mv /system/bin/pvrsrvinit.replace /system/bin/pvrsrvinit
mv /system/bin/rild.replace /system/bin/rild
mv /system/bin/servicemanager.replace /system/bin/servicemanager
mv /system/bin/vold.replace /system/bin/vold
[Galaxy S I9000 Android Development] hacksome:
Fantastic work. Let me go try this!
[Galaxy S I9000 Android Development] tommy1971:
Tried the 2.0.2 with my JPH/16GB, same error: unable to parse '14.4' as integer

Mon Sep 20 15:12:56 GMT+08:00 2010: Model: MMC MAG8DD (sd/mmc)

Disk /dev/block/mmcblk0: 16.4GB

Sector size (logical/physical): 512B/512B

Partition Table: msdos

Number Start End Size Type File system Flags

1 32.8kB 14.4GB 14.4GB primary fat32 lba

2 14.4GB 16.4GB 2013MB primary lba

:RET=0

Mon Sep 20 15:12:56 GMT+08:00 2010: Number: 1

Start: 32.8kB

End: 14.4GB

Size: 14.4GB

Type: fat32

Mon Sep 20 15:12:56 GMT+08:00 2010: Number: 2

Start: 14.4GB

End: 16.4GB

Size: 2013MB

Type: lba

Mon Sep 20 15:12:56 GMT+08:00 2010: TestWrapper failed with error: unable to parse '14.4' as integer
[Galaxy S I9000 Android Development] xiadz:
I spoted a bug with first relase when i try to connect to charger phone freez and hangs with touch butons lighted...then loops restart till i disconnect charger...then restarts 2 times and goes back to normal till i swich charger again....

And the samsung start up logo dissapeard, phone just goes black for 20-30 sec. And pops in when ready to use.
[Galaxy S I9000 Android Development] mat02:
@xiadz

I don't think this bug is connected with RyanZA's fix, because I have this bug on stock JPH. When you set an alarm and connect phone to charger it freezes, vibrates and reboots. I hope Samsung will fix this in official release :/
[Galaxy S I9000 Android Development] RyanZA:
Aww. Epic fail by me! I'm not by my PC until tonight though, so I can't fix it. :(

Sorry. I'll have the fix up this evening for you. Until then, this fix does NOT work on 16GB models! 8GB should work fine though. (I'm using an 8gb with this fix right now. ;) )
[Galaxy S I9000 Android Development] tanzhjoash:
i have this exact same error message too... running froyo JPH on 16gb SGS
[Galaxy S I9000 Android Development] Bierfreund:
Just tried NativeEXT2.0.2.apk (JPH, 8GB) and it worked perfectly!
[Galaxy S I9000 Android Development] tommy1971:
No problem as my phone is still running fine. Thanks a lot.
[Galaxy S I9000 Android Development] fane1:
Ok afer the latest update it works fine now :) I think im gonna stop playing with this "crazy lagfix thing" untill we get oficial froyo.Im happy with the phone right now thank you Ryan :)
[Galaxy S I9000 Android Development] woeds:
Same for me, it paused for quite some time at the bootscreen though, but now it's stuck on the lockscreen. Should I wait? of force a reset?

D:\sdk\tools>adb shell
* daemon not running. starting it now *
* daemon started successfully *
$ cat /dbdata/log
cat /dbdata/log
test 1
lagfix is installed
/data unmounted
Information: You may need to update /etc/fstab.

Information: You may need to update /etc/fstab.

test 2
$
[Galaxy S I9000 Android Development] woeds:
After about 5 minutes I rebooted through adb, and the phone functions again now. How can I check if the fix was applied? Also, my internal SD was formatted during the process :(
[Galaxy S I9000 Android Development] fane1:
Run Quadrant from the market and see the benchmark u get.If u get around 1700 points the fix is there :)
[Galaxy S I9000 Android Development] tommy34:
Install ok here on JPH 8gb
[Galaxy S I9000 Android Development] mat02:
I've tried it couple times and each time phone reboots, but Quadrant still gives me ~900.

here is log:

$ cat /dbdata/log

cat /dbdata/log

test 1

lagfix is installed

/data unmounted

Information: You may need to update /etc/fstab.

Information: You may need to update /etc/fstab.

test 2

hdparm: BLKRRPART: Device or resource busy

mount: mounting /dev/block/mmcblk0p2 on /dbdata/rfsdata failed: Device or resour

ce busy

test 2​

Should I do something first or just install latest APK and tap on TestWrapper?

It's GalaxyS 8GB, JPH. Earlier I had OCLF 2.0, but I uninstalled it before trying new version.
[Galaxy S I9000 Android Development] hardcore:
Aww c'mon, its not a fail at all! Who would know that parted reports the size in GB with 16GB storage and MB with 8GB storage? Especially when you don't have the 16GB version? :p

You probably know this already, but there is a "unit" command in parted to fix the unit size used.
[Galaxy S I9000 Android Development] RyanZA:
No. ;)

Just got home, so I'll put that in now.

EDIT: unit doesn't seem to work, since I'm not using interactive mode...

Uhm... that's not good. Not sure how you're getting test 2 twice either... Something is a bit messed up there. Could you give any other info that might help? You have the same device as me, and mine works fine on JPH. So there must be something.

It looks like sh isn't running the script commands properly for some reason.
[Galaxy S I9000 Android Development] d.fx:
I just tried to apply the lagfix and failed lol.

I flashed a clean jm8 with Odin, formated the insternal sd , rooted the phone with your tool , pressed the two buttons in the correct order , it rebooted ,took more time than it usually does , it booted...and got stuck at lockscreen. Black wallpaper , can't do anything.

i got i9000 8gb

Am i doing something wrong?

EDIT: oddly it rebooted twice all by itself , and it worked!

Thanks Ryan

2ND EDIT: i got 902 with quadrant , is it normal? the i/o tests were done really fast though..

Jesus christ 3RD EDIT: Quadrant is now 1974 , so obviously it worked. Thx again
[Galaxy S I9000 Android Development] RyanZA:
That 2nd reboot is a bit freaky.. mine didn't do that. I'll have to try work out what's doing on there. :D Could you post /dbdata/log ?

Here is the updated version with a quick fix for the 16GB devices (it just shaves the fractions off for now, I'll do it better later.)

I've been running it for the whole day today, and everything worked 100%. So, looking good. :)

I'll start working on adding in other filesystems and size selection for the partition.
[Galaxy S I9000 Android Development] cHarOn99:
great work, worked without a issue on my Galaxy S with 8GB running JM8, internal SD didn't get formated so all runs well, i have it running now since you released 2.0.2, now looking forward for ext4 or nilfs :D, would be cool if you implement nilfs that you disable the garbage or limit it to very low.
[Galaxy S I9000 Android Development] RyanZA:
I'm not so sure about NILFS anymore. It basically seems to give a speedup at the expense of having to do garbage collection once disk space/quota is full. This gives you a nice black screen for a bit. Not worth it imo! I'll probably add it anyway just for completeness. :D

Goal is to make a system where it can download the required modules off the net as needed. Pretty much got it already, just need to work out hosting. I'm thinking google code will do fine. :D

I also had an offer for hosting from someone awhile back, so I'll go with that if google code doesn't work out.

Same for rooting.. I'd really like an on-device root for Froyo, but it looks like nobody has one yet. :(
[Galaxy S I9000 Android Development] cHarOn99:
agree about nilfs, had it running some hours it is really fast, but the garbage creation is in my eyes sht :D, i am also fine with ext4 :D so looking forward to it, let me know if you need some betatesters :D.

I think for Froyo we really need to wait for the sources from Samsung, anyway currently with the bugs inside Froyo i don't care about it, so will use Eclair as long as it runs that stable :D
[Galaxy S I9000 Android Development] gshklover:
Question @RayanZA: If only modifying the MBR, aren't there problems with the stock init overriding it on reboot? (http://xdaforums.com/showpost.php?p=8033922&postcount=16)
[Galaxy S I9000 Android Development] ed10000:
I downloaded 2.0.3, but I still get the error

TestWrapper failed with error: unable to parse '14.4' as an integer

:confused:
[Galaxy S I9000 Android Development] RyanZA:
I think this is answered already earlier, but..

The stock MBR looks like this:

[ /sdcard 6gb FAT32 ][ /data 2gb RFS]

On bootup, the kernel sets the MBR to that one above, and writes stuff and makes changes to /data

/sdcard is set to 6GB, but no data inside it is changed until after bootup, when it is mounted by vold.

What this fix does is change the MBR to look like this:

[ /sdcard 5gb FAT32 ][ /data2 1gb EXT2 ][/data 2gb RFS]

It uses up the last 1GB of the FAT32 partition. Since FAT32 stores it's information from the front to the back, we can resize the FAT32 to 5GB. Then on boot, the kernel will change it to 6GB, and then we change it back to 5GB.

I need to do more testing if the data in /sdcard is 100% secure. So far, it seems to be. (the initial resize itself sometimes seems to cause data loss though. I'm not sure why, parted should be able to manage it! Although you can just make a backup of the data, and copy it back after.)

So there you go - the answer is that this overwrites the FAT32 /sdcard part, so it doesn't matter that the kernel overrides it, since we just override it right back. :)

I need to work out why parted is destroying data on resize though! Maybe it isn't syncing to disk properly? Or could just be a scripting bug on my side (this sounds more likely. ;) )
[Galaxy S I9000 Android Development] RyanZA:
?? Must not have compiled properly...

Let me try to compile it again.

The line looks like this:

NewPartStart = Integer.toString((int) Double.parseDouble(p1.End.replace("GB", "")) - 1) + "GB";

Clearly Double.parseDouble...

Anyway here it is, recompiled. Hopefully that will do it. ;)

Thanks for helping me test it though! :D

I get the feeling there are still more device incompatibilities hiding around... Only having one device makes this hard. :(
[Galaxy S I9000 Android Development] ed10000:
Ok, it ran for a second and I saw a "TestWrapper finished successfully" and then it rebooted just now. Waiting for the miracle ;)

EDIT: Yay! It worked :) Took just half a minute to reboot. Installed it on a fresh JM8 setup. Free internal phone storage shows up as 1.20GB, that sounds about right, right?

Great work Ryan! Let's see how it performs now. Cheers :)
[Galaxy S I9000 Android Development] RyanZA:
You ran it right away after the last error? Bad news.. I don't think it will boot. ;) Maybe I've made a mistake and it will though. If not, you'll have to reflash. :( Sorry.

The failed run will probably have copied the binaries already, and a re-run wouldn't have copied em back. Suffice to say, there isn't much in the way of error checking in this build like in the OCLF one. ;) Error checking comes after it's all working though! :)
[Galaxy S I9000 Android Development] ed10000:
Edit my previous post :)
[Galaxy S I9000 Android Development] RyanZA:
WTF? ;) I have a feeling this is going to need more testing. :)

At least it works though! Hahah
[Galaxy S I9000 Android Development] ed10000:
Seems to be working great so far :) You have a lot on your hand now, though. This one, the other OCLF and not to forget RealBench ;)

BTW, Quadrant gave me a 1979 on first run and 2018 on the second run. I/O 5992.
[Galaxy S I9000 Android Development] RyanZA:
Any data loss on your /sdcard ?
[Galaxy S I9000 Android Development] ed10000:
Nope. 9.3GB of data backed up on my computer, 9.3GB in my phone.
[Galaxy S I9000 Android Development] NIGos:
I worship you RyanZA!! My JPH is now flying through the roof.. Thanks for all your efforts!
[Galaxy S I9000 Android Development] TheVisitorX:
I use your OCLF v2 and I'm really happy with that! How is this one compared to your other OCLF? Like I said... I'm really happy with your other LF so I don't know if it's necessary to try this one out!
[Galaxy S I9000 Android Development] RyanZA:
This one is much much better for installing apps and that kind of thing. For everyday use, the difference is smaller, but it does still feel quite a bit nicer. :)

It's still very beta though. It will show up in the OCLF market app before too long once I have all the issues sorted out and lots of checks and such things built in. Probably 2-3 weeks time if possible.

If you're good with Odin/recovery mode/nandroid/whatever, then feel free to go ahead and use this version here. It seems to work. :)
[Galaxy S I9000 Android Development] RyanZA:
btw, it sits at that black lock screen on first boot because of this:

09-20 20:11:46.905: INFO/ServiceManager(3621): Waiting for sevice yamaha.hardware.sensors...
09-20 20:11:47.907: WARN/SensorClient(3621): SensorService not published, waiting...
09-20 20:11:48.409: INFO/ServiceManager(3621): Waiting for sevice yamaha.hardware.sensors...
09-20 20:11:49.412: INFO/ServiceManager(3621): Waiting for sevice yamaha.hardware.sensors...
09-20 20:11:50.414: INFO/ServiceManager(3621): Waiting for sevice yamaha.hardware.sensors...

Then after a bit it will give up and just reboot. The 'run' script is a bit different from the 'setup' script, so obviously there is a small bug in the setup script. ;)

I might just make it reboot automatically...
[Galaxy S I9000 Android Development] spline1:
I testet 2.04 on my Galaxy with 16GB JPH it works fine, smooth and fast :-)

Wow ! Great !
[Galaxy S I9000 Android Development] RyanZA:
Okay, here is 2.0.5.

It will auto reboot after setting up the lagfix, so that the yamaha_sensorserver or whatever doesn't get confused. Not really sure why it got confused in the first place, and it doesn't happen every time either. The reboot seems to fix it for the few times I tested it.

If anybody using 2.0.5 gets stuck with a black lock screen at startup, let me know! :D