yashsingh1/xdaforums huggingface dataset:
[Galaxy S I9000 General] newmail:
Thanks for the further summary. I wasn't asking about the initramfs ways though, those I understand them. If I go patch initramfs things go easy... as I can run anything before android init starts.

Reason I asked is because I didn't find the OCLF hooking point internals explained much anywhere, I thought it was quicker to ask... considering OCLF does something similar but gets away without initramfs replacement!

So the reason I've issues and I'm not trying to put ext4 on /data manually, is that I already tried to check "ps" from my autostart.sh run by a replaced playlogos1 (I tried the playlogos1 trick without knowing OCLF does the same or i wouldn't have asked!) and there are a ton of tasks already started. The first one is "sh" this is why I thought of trying to sleep 10 seconds in sh and see if the rest is started serially. Reading android init source should explain too if it could be safe.

I need an hooking point well before playlogos1... if I get that I'm quite sure we can make a script to convert rfs to ext4 on all filesystems (/data and /dbdata) included without replacing the kernel and initramfs.

Now from what I can see fixing up the /data mount during playlogos1 is too late. This is why I was searching for an earlier point... Doing it in playlogos1 leads to the the complexity of what you call nativeEXT, it comes because playlogos1 is too late.

Union mounts may decrease the complexity of nativeEXT without having to stop already running applications, but it'd still require repartitioning which I don't want (I prefer to replace initramfs than to repartition and keep some readonly rfs underneath).

Maybe there is no way to find an hook place immediately after init is started, well before any unix domain socket or anything is created in /data... The stuff done in /data in init.rc I already checked it and that seems easy to fixup, it's the application started that I don't want to deal with. Probably not possible to avoid initramfs replacement, but if it was it'd make life easier... this is why I've been thinking about it :).
[Galaxy S I9000 General] RyanZA:
Yep, you're right, it would be much better! :) But unfortunately, it can't be done because of how Android init / init.rc works. :( There are no outside of kernel hooks before init / init.rc takes over.

The main complexity of my 'nativeext' isn't really solved with union mounts - you need to unmount everything on the disk (mmcblk0) in order to get the kernel to reload the MBR. (Do you know any way around this? It would make my life so much easier! ;) ) That means you have to unmount /data, and unmounting /data means you have to stop Android from starting up.
[Galaxy S I9000 General] newmail:
It can't be done if this first sh started early at boot (well before all other processes), see:

2251 0 0 SW [pvr_timer/0]

2265 0 0 SW [TouchSense Play]

2271 0 0 SW [Si4709_wq]

2337 0 0 SW [svnetd/0]

2348 2000 648 S /system/bin/sh

$ ls -l /proc/2348/exe

lrwxrwxrwx 1 2000 2000 0 Oct 13 19:21 /proc/2348/exe -> /system/bin/sh

is started in _parallel_ with the rest. Otherwise by replacing sh instead of playlogo1 it shall be possible! I don't know Android init to tell if it starts stuff in parallel or serially (I would expect in parallel considering it expect to run on sd cards) but maybe not... this is why I'm asking if anybody knows...

If this initial sh is serially started (and nothing else runs before it) we can do full ext4 without initramfs and without repartition. If sh is started in parallel with all other processes I agree we can't and it won't work :). Running "ps" after sleep 10 like in pseudoscript mentioned before should be enough to verify without digging into the sources.. (if the replacement sh script is wrong it'll likely brick the phone requiring reflash, which is why I'm not testing myself as I'm very happy already and I've no time to risk to reflash or do any other test right now... despite to be fully happy I eventually want ext4 ;).

kernel won't re-read anything as long as there's a reference count on the device, so no there's no way to let it re-read the partititions without altering the kernel. But to reduce the rfs size you've to unmount anyway so I doubt that's the worst problem...
[Galaxy S I9000 General] RyanZA:
The initial sh is started as any other service within init.rc

service console /system/bin/sh
user shell
group shell system log
console

All services are started up in parallel with other services within their class. (Samsung only uses the default class, so everything is parallel.)

If you're interested in Android init, some (very poor) documentation is available from http://pdk.android.com/online-pdk/guide/bring_up.html - but the documentation and source are somewhat out of sync (especially exec, which is just a noop), so if you want to know how it works, the source is a better bet.

So basically, it unfortunately isn't possible. You must either build up a workaround, such as OCLF or NativeEXT, or create a custom kernel such as Voodoo, or patch the existing kernel such as z4mod.

Thanks for the heads up on the reference count, it confirms it. As to why I want to do that, resizing the /data RFS after kernel boot is plain impossible - the kernel rewrites the MBR on boot which would destroy everything! ;) So the NativeEXT method is forced to use a chunk of /sdcard instead of a chunk of /data.

Feel free to keep coming up with ideas though! Maybe we can get one of them to work! :D
[Galaxy S I9000 General] newmail:
Yep I read the init.rc script and I guessed the syntax, thanks a lot for the reference! Not even the linked document goes into the details if the services are started in parallel but it is the right thing as it decreases the boottime on flash... thanks for the info!

So next idea is quite simple and less troubesome than sh, we've to hook on something that executes at the top of the init.rc while stuff is still serial.

The PATH is /sbin:/system/sbin:/system/bin:/system/xbin and there's no other mount to be found other than /system/xbin/mount, so I guess right after this line:

mount rfs /dev/block/stl9 /system ro check=no

there is a:

mkdir /data

Where are the original boot time binaries located? are they in /system/ somewhere overloaded by the /system mount? I can't mount / somewhere --bind to see what's behind /system to be sure.... If they're overloaded as I guess we can hook into "mkdir /data", track that it was the first run by touching a file in /swapping-ext4, and do our stuff inside it, mount /data and then the next line is:

mount rfs /dev/block/mmcblk0p2 /data nosuid nodev check=no

which will fail now! I bet rfs checks the vfat magic number :).
[Galaxy S I9000 General] RyanZA:
Negative, but great idea! :D

To paraphrase https://android.git.kernel.org/?p=p...lob_plain;f=init/builtins.c;hb=froyo-release:

#include <sys/mount.h>
/* mount <type> <device> <path> <flags ...> <options> */
int do_mount(int nargs, char **args)
if (mount(tmp, target, system, flags, options) < 0) {

The kernel mount is used directly, it doesn't use an external binary. (Which causes some problems for auto mount, since kernel mount requires a filesystem... ;) )

Identical for 'mkdir'. The idea behind Android init is probably to be entirely minimal and self-contained.
[Galaxy S I9000 General] newmail:
Arghhh well I thought it didn't embed the command and just unpacked a few binaries in /system.. it looked weird that it didn't delete them though, so the embedding explains it fully... yeah checking your document better it is now clear we can only hook into "exec" commands..

So next idea: what if I create a /system/xbin/apply_disk_policy that does everything we need and then mount ext4????

exec apply_disk_policy

mkdir /data

mount rfs /dev/block/mmcblk0p2 /data nosuid nodev check=no

exec <path> [ <argument> ]*	Fork and execute a program (<path>). This will block until the program completes execution. Try to avoid exec. Unlike the builtin commands, it runs the risk of getting init "stuck".

I just hope PATH doesn't require full path and just picks from $PATH... that's the next question to know if we can do it or not. There's no such binary anywhere in /sbin, so we can definitely put it in /system! It is executed after mounting system and before creating /data. so it's just perfect....

I'll just try to create it and see if it runs, if it runs we're done.
[Galaxy S I9000 General] RyanZA:
I mentioned it a couple posts up, but here is the code for 'exec' inside the android init system (it's awesome code, some of the first code I've seen that can't contain bugs! :D Guranteed bug free code! )

int do_exec(int nargs, char **args)
{
return -1;
}
[Galaxy S I9000 General] newmail:
no luck, unless I did something wrong, it doesn't seem to run... so back to square one :). I wonder where it would pick it from, maybe no full path actually means /apply_disk_policy?
[Galaxy S I9000 General] newmail:
I didn't expect it to be so bug free :)
[Galaxy S I9000 General] sztupy:
A custom kernel with custom initramfs can hold busybox, and some other files too. (I replaced the recovery screen png images with blanks, and with this modification I had space for busybox 1.17.1, mkfs.ext4 and ext4.ko (and 2e recovery and superuser and such. Used CF-root as a base kernel). Didn't went further because of time constraints, but will do sometime.)

I know that this still requires custom kernels, but only the initramfs part needs to be changed. The stock kernels for example will have enough space to hold these extra files (if they don't change to gzipped initramfs files, which I don't think they will...). The good part is that you don't even need to mount /system, and busybox has enough commands to do a lot of things where the basic init or toolbox fails (like automounting)
[Galaxy S I9000 General] RyanZA:
No need to go that far, check out the work by z4ziggy. A simple patch to the initramfs is enough, and this allows it to be automated across all available devices/firmwares without change.

I gotta say, I repeat myself about once per page on this forum. Don't really mind, but it's a bit weird. :)
[Galaxy S I9000 General] sztupy:
I'm reading his works, but they too have some limitations. For example in the original CF-root kernel you can't add ext3/4.ko to initramfs, because there is very little space to spare (busybox takes away a lot of space). And you still have to rely on a partition that holds the updates and busybox (iirc it's /cache or /system) being available while doing the flashing.
[Galaxy S I9000 General] RyanZA:
Ah, that makes sense. You're right about the space issue, but once you're doing a custom kernel, you can just use the Voodoo modifications. Or you can roll your own as a voodoo clone if you don't like the way Voodoo does things, I guess, but it's pretty known that the voodoo method works? :)
[Galaxy S I9000 General] sztupy:
I'm working on one-shot-flash ROMs (you use odin only one time to acquire everything), that are easy to install. Their drawback is that you lose all you settings and only have one specific rom version, their advantage is that you won't have to deal with different configurations/rooting methods/incompatible busybox versions, etc. In this you only have the initramfs to do the hard work (and maybe /system and /sdcard too, but only for some of the time). For this you have to roll your own stuff. And well... the smaller the initramfs, the less memory it consumes.
[Galaxy S I9000 General] RyanZA:
Wouldn't putting the modules and everything inside the initramfs with a custom kernel cause it to use more ram than placing it into /system ?
[Galaxy S I9000 General] mutuz:
hi!

im new here i did something very stupid out of distraction

instead of putting the update.zip file on the sdcard root directory i put it on the phone

and now my phone has gone crazy lol

the home button doesnt work, so i cant do a hard reset on the recovery mode

the sdcard doesnt work anymore either

any solutions? plz?
[Galaxy S I9000 General] RyanZA:
Take your phone back and get the home button repaired. Seriously... ;)
[Galaxy S I9000 General] mutuz:
It stopped working after i tried to do this. It still work to reboot into the recovery menu but i cant select any option there.
[Galaxy S I9000 General] RyanZA:
You flashed the wrong kernel to your phone? Anyway go into download mode with 'adb reboot download' and flash a proper kernel. You're in the wrong thead... ;)
[Galaxy S I9000 General] mutuz:
i dont know for sure but i dont think i did, i mean i have an SGS i9000b from brazil, eclair 2.1, and i used the lagfix for SGS international, i thought it would work

let me explain now

i was using the one click lag fix, i uninstalled that one e downloaded this one from the voodoo page (Galaxy S International version (GT-I9000) )

so instead of copying the update.zip to the sdcard directory i copied to the phone root directory, dont know if that makes a difference

but after reboot the phone went crazy mode, it doesnt recognize the sdcard anymore, its laggin like hell, the phone thinks that the headset is plugged but its not, so when i plug the headset it thinks that its not plugged

ah and the home button doesnt work anymore, so i still can reboot into the recovery menu but i cant choose anything from there

sry about the english

if its hard to understand illl try to explain again
[Galaxy S I9000 General] sztupy:
Well yeah. In the end the initramfs became quite small (thanks to the fact that the /system partition could be pre-rooted). Here are the results if interested.
[Galaxy S I9000 General] lifelessfreak:
Distorted, i've installed both. Which one is recommended to use? And what values should i write in? When i enter that app, it shows me values that is already written there. Should i just click apply?
[Galaxy S I9000 General] Kamui_:
Just a thought for some SGS gurus here. Please now that the final froyo is out (Ok not for all countries but it'll be the same with different languages i think) make a good step by step guide (hope see it sticky) on how to root, lag fix,task manager, full backup,safe recovery and other hacks & tips so we can get the best out of froyo and first of all be safe so we don't brick our phone.

I'm good to this stuff in general but i got the phone a couple of days ago. It's good to have a new froyo start with all the easy and best methods to root and lagfix. I found like a hundred lagfix tools out there,i don't even know which one is good.

Thanks in advance for every effort.
[Galaxy S I9000 General] mondychan:
+1 here!

That would be really awesome, since i personally feel, that the phone overall performance went down with this update ;(
[Galaxy S I9000 General] RyanZA:
Graphics performance and that def. has gone down... I'd really like to know why. It could be either A.Less optimized drivers or B.OpenGL2 support
[Galaxy S I9000 General] FITRS:
I cannot for the life of me find the original post of the lag fix I did to my phone. I want to either try a new lag fix (cause this one is lagging again) or prep my phone for Froyo update.

If I back everything up I need and then do:

1. Wipe Data/Factory Reset

2. Wipe cache partition

Will this get rid of the previous lag fix?

I believe the one I did was the Internal Lag fix...
[Galaxy S I9000 General] ludovicianul:
My phone was really laggy too. There were times when I regretted buying it. But after installing Launcher Pro everything works great. No more lag in any application. And I have 100+ apps.
[Galaxy S I9000 General] dakine:
Universal Lagfix Kernel takes just about every lagfix created thus far and lets you choose. Pretty awesome IMO.
[Galaxy S I9000 General] elyafi:
I thought the problem was with v2.1 ... I installed Froyo, it was worse than 2.1!!! it would take around 5 seconds for a character to appear after I type it!!!

I did the voodoo lagfix... its not bad... but I expected Froyo to have been the solution to lagging!
[Galaxy S I9000 General] kencix:
How do I check, if a phone have a lag
[Galaxy S I9000 General] INeedYourHelp:
lol... use it, and you will find out.
[Galaxy S I9000 General] pwhooftman:
I found that doing a factory reset after the upgrade was necessary to get rid of that kind of lag. Problem was mostly experienced in the Email app when there are Exchange accounts defined. The Email app is broken in the Scandinavian Froyo when using Exchange. Voodoo lagfix will cure the speed problem, then 1 problem remains: using 10% cpu all the time. Setting email retrieval interval to Never in the Exchange accounts cures that
[Galaxy S I9000 General] Chad_Petree:
is it true the epic 4g doesnt have lag issues? why is that?
[Galaxy S I9000 General] RyanZA:
Epic 4G still has lag issues, just much less. This is because the Epic 4G runs on OneNAND, and not MoviNAND.
[Galaxy S I9000 General] EarlZ:
How about phones from HTC, they barely lag when navigating around..
[Galaxy S I9000 General] Chad_Petree:
mmm seems samsung learnt their lesson with the epic, oneNAND , led for notifications ...

btw can u point the differences between OneNAND and MoviNAND is still rfs?
[Galaxy S I9000 General] funk0014:
Keyboard lagg

Hey dear XDA members,

I got this problem. I flashed different firmwares. Now I run JPA. With voodoo. And with every flash I did I always run a factory reset and wipe cache in recovery menu. The problem is that my SGS keeps lagging. Mainly and the most frustrating one is when I use my keyboard. While typing a message the keyboard laggs a lot! Overall my SGS laggs. This is with voodoo enabled.

Why is this happening? When I disable voodoo there is a slight difference. But not much I think.

If I read along the XDA forums people don't have this problem while typing. So what did I wrong? What can I do about it?
[Galaxy S I9000 General] airf0rce:
If u are reffering to Samsung Keypad, Samsung froyo keyboard is very laggy, im using Smart Keyboard i bought from Market and it works very fast without any lags, so try to use other virtual keyboards (there are few trial/demo version i guess) and see if its better.
[Galaxy S I9000 General] Chatbox:
With so many so called "lag fix" out there, which "one" of them is actually a fix? The way I see it is, if there's an issue or a problem (in the general sense), it's either fixed, or it's not. So, if there are so many of them...are they all just "attempts" at fixing a problem? But without a real solution?
[Galaxy S I9000 General] ADeadlySpoon:
I found this thread a few days ago, it's a ref to how to get the Eclair keyboard on Froyo, I'm looking over it now.

I see that there's a download at the bottom of the first post... Gonna have a go at this.. I'll post back here if it works. :)
[Galaxy S I9000 General] brunes:
Turn off XT9 and your problem will vanish. XT9 on the samsung keyboard is horrible. Turn it off, or use Swype.

It's not the keyboard, it is Xt9 only. I don't know why. I hate XT9 so I don't mind having it disabled.

For the record - I am running the latest DocMod Froyo 7.6.1/7.6.2 with EXT4 "lagfix" and am LOVING IT. I highly recommend the DocMod rom to anyone and everyone, and follow the step by step instructions to choose the ext4 lagfix.

If you follow the instructions to a T and clear your Davlik cache and cache partition, you can upgrade without losing any data or settings.
[Galaxy S I9000 General] allotrios:
That is because the froyo implementation on SGS sucks. If you still want to stick with froyo, I suggest you install HTC_IME

http://www.hallerud.se/htc_ime_jonasl_hires22_27.zip

all you need to do is extract the zip contents onto your phone, and open the two .apk files (let's say with astro file manager)

then go to settings, language and test, and enable HTC_IME (and probably set it up how you like)

here is the HTC_IME thread

http://xdaforums.com/showthread.php?t=624416

It is a much better keyboard than the samsung keyboard anyway.
[Galaxy S I9000 General] allotrios:
It is a good effort but it was lagging while scrolling and creating shortcuts. I went back to JM9 and the difference is huge. I don't think samsung's froyo is ready yet.
[Galaxy S I9000 General] brunes:
Can you give more of an explanation? Scrolling in what app, creating shortcuts where? Did you enable full EXT4?

Like I said I have been running this for a few days now and it is by far the fastest of any ROM I have had on this device.
[Galaxy S I9000 General] allotrios:
Sure i can elaborate a bit more.

For example, it was stuttering when I was scrolling the app list in launcher pro (I have about 100 apps). It was lagging whenever I would long press on the homescreen in order to add a widget. The keyboard was really slow (both swype and stock). The browser was even slower.

I had EXT4 enabled as suggested by Doc.

It wasn't awful or anything like that but it was nowhere near as snappy as JM9 with voodoo.
[Galaxy S I9000 General] w0uter:
Id did just voodoo lagfix and i had a quadrant score of 1502, with XWJPA
[Galaxy S I9000 General] allotrios:
I get 1854 on JM9 :D
[Galaxy S I9000 General] Maloneyt:
Simple Lag fix rooting help

hi, I dont have much knowledge on rooting etc, I can manage to drag and drop a zip file from my pc to my phone but thats about it.just wondering if there are any hacks out there for the new froyo 2.2 update? Plus I think I have one of the models that can't access recovery mode.
[Galaxy S I9000 General] brunes:
Strange, I have absolutely none of those issues.
[Galaxy S I9000 General] allotrios:
You are one lucky guy then! Either that or you are too patient and lag doesn't bother you so you don't notice it. :)

Because everyone I have seen that has installed more than 70-80 apps is experiencing a lot of lag with JPO.
[Galaxy S I9000 General] choloxinzo:
I too... with Galaxy S Vodafone 16GB... lag in keyboard and when i create shutcorts
[Galaxy S I9000 General] cashif:
Hiya!

When I tested my SGS, it had a Quadrant score of 1800+. I have Darkys ROM v3.0 and Ryan OCLF enabled..

I face tremendous lag in almost everything especially in phone (contacts)..It takes nearly 10 mins to get my phone going when I restart my phone. I have around 250+ apps in my phone and I dunno which of those are active at startup..I have ADW launcher enabled. Anyways to solve these issues?
[Galaxy S I9000 General] cashif:
Further to the above, I have superpower installed and whenever it disables wifi, it takes me nearly 5 mins to just switch on my wifi. EVerytime I get Error message and after 2-3 attempts, wifi is enabled...
[Galaxy S I9000 General] Celluciano:
my samsung galaxy s (froyo) give me a lot of force closes when i boot it and some thing aren't working. i tried first installing a modaco pre-rooted rom but the problem still. So i flashed the original italian firmware of 2.2 to unroot it cause i was thinking about sending it to samsung, and the problem still. Tried also reading FAQ and doing data/factory/cache wipe, everything but i keep getting those crazy force closes messages, and they're a lot! i hope you will help me, thanks :)

sorry for my english
[Galaxy S I9000 General] ivan1975:
Hi all, I buyed a GT-I9000 three days ago. I update via Kies to Froyo. I was surprised by the big lag :( but I found an interesting thing. I activated the swipe keyboard and the lag is less not only in typing but in the general use of the phone. This for me is strange.

I will wait the stable release of the voodoo kernel. I think the ext4 is good.

What about the ReiserFs4? Now it is the default filesystem of ubuntu. Could be implemented also in the voodoo kernel?

Ciao

Ivan
[Galaxy S I9000 General] QwertyManiac:
Really? When was this decided? I heard a complete opposite instead.
[Galaxy S I9000 General] ivan1975:
Hi, I didn't know this. Thank for the correction. Btw I was wondering if reiserfs could be included in the voodoo kernel. I usually use it on my desktop.
[Galaxy S I9000 General] richie.aks:
Lag issues?

I recently bought a Samsung Galaxy S GT-i9000; 2.1-update1, I9000DXJG4, 2.6.29 root@SE-S604 #2, ECLAIR.DXJG4 and am pleased with the phone.

I am just wondering what is this lag issues that is confirmed with this phone model which i don't seem to experience on my phone.

Is there any reason for me to update my firmware to the Froyo firmware if i am not experiencing any serious lag or problems? Such as faster speed, better stability and etc.