yashsingh1/xdaforums huggingface dataset:
[Galaxy S I9000 Android Development] bitblaster:
Yes, i tried and it extracts both initramfs and kernel.img (plus some other files used by the script to repack the kernel)

initramfs.cpio
initramfs.cpio.gz
initramfs.cpio+part3
kernel.img
padding3
padding_piggy
part3
piggy
piggy.gz
piggy.gz+piggy_trailer
piggy_trailer
sizes
[Galaxy S I9000 Android Development] stratosk:
I guess we need the piggy.gz. It's the gzipped kernel image (elf format).
[Galaxy S I9000 Android Development] bitblaster:
ok, i begin to understand :)

your zImage file is so structured:

- it begins with the decompression_code from offset 0 to 0x9429

- the piggy.gz file is at offset 0x9430 and ends at offset 0x769BEF.

- After that there is the piggy_trailer

the piggy file is the piggy.gz unpacked (by the script) and is 14.4MB size, so i suppose this is the unpacked kernel we want to patch.

Now the decompression codes and piggy trailers of the 2 versions are different.

I will now investigate how much they are different and why.

In the meantime i noticed that the initramfs contents is different in many parts (you corrected misspelled comments in script and other files), so if you can build 2 IDENTICAL version of the kernel, one normal and one bigmem, we can see if the decompression codes and piggy trailers are the same in that case (since hopefully the gzipped kernel has the same size in both cases).

Thank you
[Galaxy S I9000 Android Development] stratosk:
Yes, I corrected a couple of typo in bm version.

But that's ok, we don't need the initramfs. Piggy is that we need.
[Galaxy S I9000 Android Development] bitblaster:
Yes, but piggy.gz is 7.4 MB in size. Actually its almost the entire zImage file, excluding the top decompression code and the trailing garbage...

And inside the piggy.gz there's only the piggy file (14.4MB).

So the initramfs has to be inside the piggy file...
[Galaxy S I9000 Android Development] stratosk:
Sorry, I don't know this detail. I have to search it.

But anyway we are interested in piggy file. If the initramfs is in there we can just ignore it.
[Galaxy S I9000 Android Development] bitblaster:
ok, i just found everything looking at a comment inside the unpack script :D

Graphical display of the unpack process:

Each of the indented items on the same level is derived from the
single item one level higher.

zImage
(split)
+---- decompression_code
+---- piggy.gz+piggy_trailer
(split)
+---- piggy.gz
| (gunzip)
| +---- piggy
| ===== either (compressed initramfs) ====
| |
| (split via gunzip limits)
| +---- kernel.img
| +---- initramfs_gz+part3
| (split)
| +---- initramfs.cpio.gz
| | (gunzip)
| | +---- initramfs.cpio
| | (cpio -i)
| | +---- initramfs/
| +---- padding3
| +---- part3
| ===== or (uncompressed initramfs) =====
| |
| (split at "0707")
| +---- kernel.img
| +---- initramfs+part3
| (split after "TRAILER!!!")
| +---- initramfs.cpio
| | (cpio -i)
| | +---- initramfs/
| +---- padding3
| +---- part3
+---- padding_piggy
+---- piggy_trailer

The unpack script:

1) finds the piggy.gz file offset (let's name piggy_gzoff) by searching the gzip magic number in the zImage file (1F 8B)

2) Then it extract (using dd) all the bytes from zImage starting at piggy_gzoff. This file is named piggy.gz+piggy_trailer

3) Then it repeadetly runs gunzip against piggy.gz+piggy_trailer trimming it down until gunzip returns no error. At this stage it knows the real size of the piggy.gz file. Let's name it piggy_gzsize

4) Then it gunzips the file obtaining the uncompressed piggy file. But wait! This file again (i suppose in any android kernel) is composed of the kernel image and of the gzipped initramfs.

5) So the script again searches on the piggy file the gzip magic number (1F 8B) and let's name this offset initram_off

6)Next, and is the last step for our purposes, it splits the piggy file at offset initram_off, obtaining the kernel.img (at last!) and initramfs.gz+some other garbage.

So we need to edit the unpack script to output:

- piggy_gzoff

- piggy_gzsize

This way, when you release a new kernel, you simply:

- create an official version of the kernel and another with a different ram size (no matter the value, just different)

- run the script against the official version and write down the above variables

- run the script against the other version

- compare the 2 extracted kernel.img files to find the change offset (namely memsize_off and write it down

That's all!

The android app, using simply the dd, gunzip and gzip utils, can then, starting from zImage:

- extract (dd) piggy.gz using piggy_gzoff and piggy_gzsize

- uncompress piggy.gz -> piggy

- extract the kernel image first memsize_off bytes

- append to this the desired mem size value

- append to this the rest of the piggy file (from offset memsize_off+1 till the end)

- gzip back the piggy file to piggy.gz

- using dd recompose the zImage file

- flash it in the correct partition

Of course the downside is that you cannot deliver the apk inside the kernel, since you know the offsets only after building the complete zImage...

What do you think? Let's do it? :eek::eek::eek::eek:
[Galaxy S I9000 Android Development] stratosk:
Thank you very much for your investigation. Yes, we will definitely try something like this.

My remarks:

1) We don't need to extract initramfs from piggy file.

2) We don't have to compare the 2 versions. We will just search in the binary for a 'magic' value that we will define in the source and change it.

But unfortunately I can't search for this now. This is a tricky and dirty way to enable/disable something like that. And we need to spend a lot of free time to be totally sure that everything works OK and it's safe.

Anyway, I will PM you when I find some free time. Of course, you may continue your investigation if you want to. :)
[Galaxy S I9000 Android Development] darckengel:
If i understand well, you're saying that it could be possible that the user could adjust 'on the fly' only by reboot to adjust the memory available depending of the uses of each other (with presets like disabling snaps while rec, disabling hd record, full mem no video, etc.)?
[Galaxy S I9000 Android Development] bigdave196:
Sorry if this has already been answered, but I couldn't find a definitive answer by searching the thread.

I've got stock XXJVO ROM, is there a specific version of this kernel I need to use, or will the latest one work?

Thanks
[Galaxy S I9000 Android Development] bitblaster:
yes, the aim is to do something like that :-)

Inviato dal mio GT-I9000 usando Tapatalk
[Galaxy S I9000 Android Development] O-T:
Latest is good to go.

I had Semaphore JW1 on XWJVH 2.3.3,

and the same now on XXJVU. B-)

Thx for reading, press THANKS if u like
[Galaxy S I9000 Android Development] bitblaster:
@stratosk

thank you for your suggestions, of course this is not a priority, I will try to do some scripting and some tests, then when you will have some time we'll try to going further.

Sent from my Galaxy S using my finger
[Galaxy S I9000 Android Development] airjoe:
I am using JW1 kernel on XXJVU stock rom. Everything is working fine except new feature video recording when I take photo, the picture file is invalid. Anyone have the same problem?
[Galaxy S I9000 Android Development] stoske:
Maybe you should read a couple of pages back...

Beamed from Dark Side
[Galaxy S I9000 Android Development] airjoe:
Yeah, I got it. Thanks very much!
[Galaxy S I9000 Android Development] maopaopao:
Looking forward to the new JVU semaphore kernel.
[Galaxy S I9000 Android Development] elhennig:
Hi stratosk,

could you find out, what Lukiqq does different in Galaxian Kernel regarding the car dock function? Sound redirection works - as reported here - on Galaxian V3. As he also uses Voodoo Sound it should be possible to find out what the difference is and make sound redirection work with Semaphore
[Galaxy S I9000 Android Development] djb77:
I also noticed when checking it out that the Galaxian kernel had a little blue progress bar on startup, so it is possible to have some kind of animation. if it's something that can be changed by an end-user is a different story though I'm guessing.

Have one loaded as default built in to the kernel, then have another one loaded if present. The only thing like you mentioned before is finding somewhere to actually put it which will be mounted on boot.
[Galaxy S I9000 Android Development] darckengel:
Humm ..No progress bar ...

I noticed that its more difficult to enter in CWM mode by the 3 buttons method for kernels using this "feature"...
[Galaxy S I9000 Android Development] sajidmkhan:
This is only Bug/Feature Reporting/Request

I using semaphore 2.4.0 with XXJVU (29 Dec Release)

As for as i only got one issue which is complained by my ROM user is Mobile AP (tethering)

I my self tested it and it working perfectly with JVU stock and CF-Root but not with semaphore.
[Galaxy S I9000 Android Development] jocke_lulle:
Did the user check the netfilter box in semaphore app?
[Galaxy S I9000 Android Development] stratosk:
I think there are no sources available for V3...

This definitely cannot be changed by user.
[Galaxy S I9000 Android Development] Fenvarien:
Yes, I prefer functionality too.

I'm excited what Stratosk is up to for the next kernel version - besides eliminating this useless video frame capturing feature, Samsung "invented" instead of ICS ;-)

... using tapatalk
[Galaxy S I9000 Android Development] NEFart:
Never understand why peopels are so demanding to the boot animation... this animation you cen see only once, during very short moment when your phone is booting. Probably something I do not understand in this))

But if boot animation must be changed, it should be not an animation of blue progress bar, it should be an animation of Chuck Norris wich will symbolize that Semaphore Kernel is the best one!!!))) Joke))
[Galaxy S I9000 Android Development] sajidmkhan:
Thanks its working perfectly
[Galaxy S I9000 Android Development] erto90:
mm the kernel has fuc** my phone xD i tried to set semaphore autobrightness and my phone has become all green! i have restarted but stuck on bootloop.. i reflashed all but i will don,t touch that setting xD.. is there a reason of this issue?
[Galaxy S I9000 Android Development] sajidmkhan:
your phone f*** cuz of your knowledge..

Extra Knowledge is always harmfull ;)
[Galaxy S I9000 Android Development] erto90:
yup you right

but can you explain how i had to do to set autobrightness?

Thanks
[Galaxy S I9000 Android Development] stratosk:
I think that something else caused this. Semaphore auto brightness script just loads a module that changes the brightness level.

What was your configuration? ROM? What was your previous kernel? (I'm asking this in case that something was left in init.d)
[Galaxy S I9000 Android Development] darckengel:
You reflashed everything???

It's just a voodoo color issue :)

You have to adjust the colors with voodoo app.

Semaphore auto brightness uses levels of brightness you didn't use before and that are not compatible with some levels of brightness (i had the same problem too as i used dark settings in voodoo app, i had to tweak a bit these).

It's a well known voodoo color issue, the easiest, set settings by degault in voodoo app, you should not have the problem anymore.

---------- Post added at 01:41 PM ---------- Previous post was at 01:29 PM ----------

For the same reasons that they want to take snaps while recording videos, to show it to their schoolmates :)
[Galaxy S I9000 Android Development] madphone:
overheating happened in power supply. temerature on usb is ok. but i guess it would take more than a half day to charge.

Edit: reflashed the kernel and temperature problem seems to be solved.
[Galaxy S I9000 Android Development] pingvinen:
Thanks, this seems much easier than using ADB and Android SDK to fix this. Just what I was looking for!
[Galaxy S I9000 Android Development] srkonus:
Hi,

I flashed the kernel today over the rom i use (galaxy s2) and have no problem so far. I can say nothing about the battery life but i hope that it is better than darky kernel 2.9

I use the following voltages and i hope that i save some battery with them:

1000 - 50

800 - 50

400 - 75

200 - 75

100 - 100

I will be happy if somebody has good ideas to ojcrease the battery life with this kernel.
[Galaxy S I9000 Android Development] JB-007:
init.d content

Hi,

I'm with Juwe5.1 and semaphore kernel 1.3.0 jvq. I'm not sure to have the right files in my init.d directory, because i'm using also Chainfire tweak software and it seems i have some files that doing the same thing in my init.d dir.

Please, can somebody can tell me what i should have in init.d dir?

Thankss
[Galaxy S I9000 Android Development] yamatona:
I came from cf-root and I had enabled all the tweaks, but i didn't even have init.d directory so afaik chainfire tweaks don't use init.d directory.

What I have is all the enable_* files copied from /res/scripts and things are going great; droidwall, ext4, chainfire tweaks, 1.2ghz oc (and the bt/3g problems)
[Galaxy S I9000 Android Development] gcogger:
That's odd - mine has been fine until now but last night I had the same problem. The CPU was stuck at 1200MHz while charging overnight so, in the morning, the charge level was only 83%. My CPU speed stayed high even after it was unplugged and only went back to normal after a reboot.
[Galaxy S I9000 Android Development] yoshinatsu:
stratosk, did you tweak the sharpness?

I came from 1.0.1, and I think it looks a little blurrier with 1.3.1.
[Galaxy S I9000 Android Development] Jobiza:
Heya,

Mine oc/uv settings are these:

Oc to 1,2Ghz

Undervolt from 1,2Ghz to 100Mhz:

-25

-75

-100

-100

-150

-225

These seems the best i can get. Odd is that i once had -125 mV to 100Mhz at most, but now it can do up to -225 mV. I suggest trying to undervolt few months later more, maybe it can live all the time with lower volt. :D
[Galaxy S I9000 Android Development] madphone:
I think this is the most complete kernel out there. bln works, tun support is perfect, and battery consumption is minimal. I lost only one percent of battery in six hours last night, although wlan was enabled.

very good job, stratosk!!!
[Galaxy S I9000 Android Development] nozerogravity:
Can someone please tell me if i have JVP, is it safe and generally ok to flash latest version - 1.3.1? Or is it only for JVQ?
[Galaxy S I9000 Android Development] yamatona:
My friends phone is JVP and it worked with 1.3.0, I don't know about the stability though. His phone.apk gave lot more FCs than normal.
[Galaxy S I9000 Android Development] Brignoud:
Please, wich is the program that manage this kind of parameters?

Cause it seems that they are so different from CPU Master I use to OC.

Cpu Master manage a few number of parameters then showed here.
[Galaxy S I9000 Android Development] stratosk:
Speedmod sharpness/color fix is implemented in the kernel since version JVP_1.2.2
[Galaxy S I9000 Android Development] stratosk:
It is better to flash the JVP_1.3.0a. But it will not harm your phone if you flash the 1.3.1. Maybe you will face some incompatibilities
[Galaxy S I9000 Android Development] cgvelmax:
Thanks stratosk for this awesome kernel, a chance to have voodoo color in the kernel?
[Galaxy S I9000 Android Development] blackheart2925:
Hi am on Juwe's JVP 5.0 and using the Semaphore kernel v1.3.0a. Everything's great except three things -

1. The in call vol is really really low! Any way to fix this?

2. The netfilter scripts for WiFi tethering are not there in /free/scripts directory...actually there is no /scripts direcotory in/free...:-[

3.BT does not work at all...:-(

Any help for second at least plz?
[Galaxy S I9000 Android Development] malcho:
I managed to get my bluetooth working after disable all tweaks in tweaks app.
[Galaxy S I9000 Android Development] stratosk:
Hi,

1) I don't think it's kernel related issue.

2) 1.3.0a does not include the scripts. Please find them attached. In previous posts you may also find the xt_owner.ko module if you need it.

3) This is known issue. BT is not working in some cases.

As malcho said there are references that disabling the Kernel scheduler tweaks in the chainfire's tweak application problem solved.
[Galaxy S I9000 Android Development] stratosk:
You may try Voltage Control.
[Galaxy S I9000 Android Development] Jobiza:
I myself like very much of Pimp my cpu, because it's harder to select UVs on Voltage Control.
[Galaxy S I9000 Android Development] Stile35:
Is it safe to flash Semaphore 2.4.0. on the newest official JVU firmware?

Thanks.
[Galaxy S I9000 Android Development] darckengel:
Why don't you just read the few 2-3 pages before your post before asking?
[Galaxy S I9000 Android Development] Stile35:
It seems that it will work on JVU. Thanks...
[Galaxy S I9000 Android Development] Fenvarien:
Just set the gamma values in the voodoo control app to something around -18/-19/-20 and you will have no more 'green overlay'.

... using tapatalk
[Galaxy S I9000 Android Development] Boggy22:
I think it does something more, because after I flashed 2.4.0 and activated Auto-Brightness my screen turned green also.

I had custom values for RGB Gamma in Voodoo set to -43, -47, -50. (This makes the black richer, and kinda fixes the gamma problem on the SGS screen. Why not lower? Because lower values make the screen green when it dims before turning off)

Activated Auto-Brightness, bam, green. I couldn't set those values anymore, even after turning ABR off. After a restart with ABR off, I can set them back.

Too bad, because I want this custom gamma, but ABR enabled too. If I can't have them both, I choose custom gamma.

Hope you can do something to fix this so they can both work with those values.
[Galaxy S I9000 Android Development] darckengel:
It's related to brightness and voodoo colors, as with semaphore autobrighness

you use values lower than before.
[Galaxy S I9000 Android Development] stratosk:
I was talking about the bootloop that erto90 mentioned.

About the green screen is the too low gamma setting and low brightness as already mentioned.

You don't have to reboot. Disable auto brightness from Semaphore and increase the the brightness from your settings. The green screen will disappear.
[Galaxy S I9000 Android Development] Boggy22:
I disabled, but it remained green with those settings. If I changed them to "Punchy Settings" inside Voodoo they looked ok(higher values). But my original custom settings didn't work, even after disabling Auto-Brightness.

After reboot all was ok.

BTW, how can I edit this value:

- instant adjust_thres (valid values 1-100, default 30 - instant adjust threshold, the threshold that over this the brightness is adjusted instantly and under this is adjusted step by step)

Using a text editor by opening /sys/devices/virtual/misc/sema_autobr ?

I want the "detection => reaction time" to be quicker. If the light sensor detects light change, it will react faster.
[Galaxy S I9000 Android Development] syamsoul:
it is safe ...but I think, I cant use my front facing camera for selfshot.
[Galaxy S I9000 Android Development] stratosk:
This is also solved with the 3MB less available memory (please see discussion in previous pages)
[Galaxy S I9000 Android Development] stratosk:
If you want the threshold to 10 for example, the command is:

echo 10 > sys/devices/virtual/misc/sema_autobr/instant_update_thres

You may include this in a script, or change the script that already exist in init.d S44enable_semaautobr_****
[Galaxy S I9000 Android Development] elhennig:
Front camera works with the camera app on 2.4bm, but the new face lock on JVU keeps exiting. I don't know if it is kernel specific, however. Any one else experiencing this?
[Galaxy S I9000 Android Development] erto90:
I was on amestris 7.1 final, that come with this kernel

I had setted voodoo color but that wasn't the problem i think because of the bootloop.. I have reflashed all also because recovery was currupted ( every click on recovery gave me lot of error, impossible mount anything etc) i tried to reinstall kernel and recovery, but still same problems

So i flashed from stock and all is fine ( i moved to cm9 to try it)

Maybe i'm noob and maybe not, but is the first time i saw this kind of problem
[Galaxy S I9000 Android Development] darckengel:
Well, it's not so surprising that it don't work too.

But seriously, it's useless goodies which nobody with some common sense will care about.

As i said it's just for amusing kids at school
[Galaxy S I9000 Android Development] MasterJam882:
sry m8 but I have to deny that.

I go with u by saying that capturing photo while video recording is useless(at least for me), but photo with front cam is indeed useful and I used it very often in the past.

So for me it would be great to see this function working again and furthermore it's a stock function available from the very beginning and not a "new" trendy feature by samsung.

Just my 2 cents.

greetz
[Galaxy S I9000 Android Development] andip71:
+1

Yes, the front cam not working is also a bad thing for me.

Would really love to see this corrected.

Thanks

Andi
[Galaxy S I9000 Android Development] stoske:
I use this Voodoo color setting, without green display (Semaphore auto brightness on Dark settings)
[Galaxy S I9000 Android Development] darckengel:
I'm agree with taking photos with front camera, but actually he said that it's not taking photos that's don't work but face unlock with front camera which is useless
[Galaxy S I9000 Android Development] Dan_Aykroyd:
Hi stratosk,

I've read about it a couple of pages before, but I don't know how it was solved. What was / will be your solution to the su access rights "problem" with Titanium Root?

I mean, to the message that now pops up every time saying that "Your ROM is rooted but the 'su' binary has non-optimal access rights, which may cause problems."

I read you were about to write an email to the TB developer, did you get a reply?

Thanks!!!
[Galaxy S I9000 Android Development] cdmackay:
I believe the latest version of TB has fixed this.
[Galaxy S I9000 Android Development] maopaopao:
I don't have TB root problems with Semaphore kernel. May be you need to wipe and re install the TB.
[Galaxy S I9000 Android Development] Dan_Aykroyd:
I've installed the update that came as today and it still shows the message.

Will try uninstalling and reinstalling it to see how it goes. Thanks
[Galaxy S I9000 Android Development] Nergla:
You can also have TB not perform SU check by ticking option in Preferences down at the bottom of the list - removes the irritation of the popup at least
[Galaxy S I9000 Android Development] MasterJam882:
No it was said before that taking pics with front cam isn't working and that's true - try it! And then startosk said that's because of the extra RAM as it is the case with faceunlock feature.

Nevertheless I hope startosk will release a kernel where the front cam feature is functional again.

For faceunlock I don't care - if it's working ok but I wouldn't miss it^^

greetz
[Galaxy S I9000 Android Development] darckengel:
I don't installed JVU so i could not test, but :

So it seems to work...
[Galaxy S I9000 Android Development] Millionas:
Tested it now, JVU and SemaphoreBM 2.4.0. and the camera froze when i took the picture.

Have to press the home key to get out.

I have installed a camera hack, but it was for a deodex version. And I am running an odex version (Dont know how to remove the hack) So maybe that is the problem for me.
[Galaxy S I9000 Android Development] elhennig:
I just switched the front cam on, and that works. However, taking images freezes the camera app, so unfortunately it does not work
[Galaxy S I9000 Android Development] darckengel:
Can you test with stock or cf-root kernel to see if it's kernel related?
[Galaxy S I9000 Android Development] MasterJam882:
As I said before:

Front cam is working - yes BUT a snapshot causes app freeze.

On stock kernel this doesn't happen on my phone so as stratosk already said it's same case as it is with snapshot while recording because of RAM.

Greetz

Gesendet von meinem GT-I9000 mit Tapatalk
[Galaxy S I9000 Android Development] Fenvarien:
Yes, I can confirm this (tested with stock kernel and latest Semaphore).

... using tapatalk