yashsingh1/xdaforums huggingface dataset:
[Galaxy S I9000 Themes and Apps] aleadam:
Well, I still don't know why it happens, but a quick hack will solve it. I feel it's a kinda dirty solution but it works:

Just add this code at the very beginning of the onKeyDown() method in Camera.smali (right after .prologue)

const/16 v1, 0x3

if-ne p1, v1, :cond_x

new-instance v0, Landroid/content/Intent;

const-string v1, "android.intent.action.MAIN"

invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

.local v0, startMain:Landroid/content/Intent;
const-string v1, "android.intent.category.HOME"

invoke-virtual {v0, v1}, Landroid/content/Intent;->addCategory(Ljava/lang/String;)Landroid/content/Intent;

const/high16 v1, 0x1000

invoke-virtual {v0, v1}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;

invoke-virtual {p0, v0}, Lcom/sec/android/app/camera/Camera;->startActivity(Landroid/content/Intent;)V

:cond_x

It will start an intent to show the home screen when the camera detects the home button key.
[Galaxy S I9000 Themes and Apps] habylab:
Could you add the new camera firmware that some people got in Samsung Apps updates? It seems to make such a difference!

Sent from my ever changing Rom (Doc or Darky) Galaxy S
[Galaxy S I9000 Themes and Apps] MikeyMike01:
Sweet, I'll give that a go later.

Sent from my Captivate.
[Galaxy S I9000 Themes and Apps] MikeyMike01:
Okay, so it works, however, the haptic feedback doesn't work when you press the home button.

But it's a great start, and a great improvement.
[Galaxy S I9000 Themes and Apps] aleadam:
Lol I hate the haptic feedback, so I would have never noticed that.

That's probably because the real root of the issue is in android.policy.jar, not in camera.apk. Remember what I pasted from the sdk reference page, in theory the camera should never see that event. It should be handled by the framework.

Quick solution: Add some vibration to the code above, perhaps checking in settings whether haptic feedback is enabled o not.

Real solution: Work on the android.policy.jar home key detection code.
[Galaxy S I9000 Themes and Apps] slayerXcore:
can you make this apk work on the nexus s as well with 2.3.2
[Galaxy S I9000 Themes and Apps] antonisberkous:
hello..!

i am using docs rom js3 and i updated through sgs tools the hacked camera and it didn't work on video and in third-part applications like barcode scanner and fring..

i restored it through sgs tool and third-part applications that need camera still crashing..

after that i downloaded the .apk from here but i still had the same problem...:(

some help please..!

thanks...!!!

edit: i had disables the startup of stock e-mail app... i started the e-mail app and then the barcode scanner and fring worked corrrectly...

who knows why...!:confused::confused:
[Galaxy S I9000 Themes and Apps] MikeyMike01:
libcamera.so

Change it for a non-JPY/JS3 one.
[Galaxy S I9000 Themes and Apps] 2k4ever:
I just extracted the camera.apk from your 5.3 to 5.4 update, MikeyMike01

everything works fine so far on my international sgs - thanks!

you should consider to post the modded apk here so that people don't use up your traffic by downloading maybe even your hole rom just to get the modded camera.apk
[Galaxy S I9000 Themes and Apps] aleadam:
You can get it here:

http://xdaforums.com/showpost.php?p=11253470&postcount=19

New mods and source code for all of them can be found here:

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

Includes the power button not only for stills but also for video (works even after zooming during the shot), and focusing while the power button is pressed.
[Galaxy S I9000 Themes and Apps] 2k4ever:
thanks aleadam!

that explains why i haven't found it - i have looked only in the sgs section

now i'll try to mod my android.policy.jar in order to make use of all the features you have implemented
[Galaxy S I9000 Themes and Apps] 2k4ever:
I'v just tried to mod my android.policy.jar but it didn't work out

(long pressing the power button still brings up the shutdown menu and the extended powermenu is broken)

tbh i expected that, as i'm using an already modified android.policy.jar (R64 Theme - extended powermenu & 4 lockscreens) and my GlobalActions.smali wasn't exactly the same as the code presented by you (and i'm not able to adopt it myself)

but no problem, i don't really need the additional features, i just wanted to see if i could get it to work ;)

thanks agian for your modded Camera.apk, aleadam!
[Galaxy S I9000 Themes and Apps] aleadam:
Don't give up! After a while it's not that hard.

The key is to add the code right before the line

invoke-virtual {v0}, Landroid/app/AlertDialog;->show()V

And make sure you get the camera.apk from the andromeda rom update (just get the 1.0 to 1.1 zip and grab camera.apk from there) or from my github

https://github.com/aleadam/Team-Komin/tree/master/1.0_Branch

Edit: I am attaching a little app may help you with the policy.jar debugging. It has three buttons: set camera in use, set not in use, and show home. Press the first button and then test to see if the power dialog shows up. Just rename it CameraLock.apk and install as a regular app.
[Galaxy S I9000 Themes and Apps] 2k4ever:
thanks for your help, aleadam!

i'll try it again
[Galaxy S I9000 Themes and Apps] 2k4ever:
I'v tried to implement only the changes from

http://xdaforums.com/showpost.php?p=11254897&postcount=23

(and not all the changes from GlobalActions.smali.diff.txt)

but that got my phone weirdly semi-bricked (when pressing the power button long to access the powermenu, phone vibrated like on boot error and did some kind of soft reboot)

I'v also tried the new camera.apk that you suggested, but with that one the power button doesn't even work to take pictures

so now i'm back to this apk without modded android.policy.jar and happy with it ;)
[Galaxy S I9000 Themes and Apps] BlackDino:
What roms have this press to hold powerbutton for focus in the camera?

I would love to have this :)
[Galaxy S I9000 Themes and Apps] pablacho:
has anyone tried to add slow motion video capabilities??...

i mean, samsung wave has it and i believe SGS is as (or even more?) powerfull...
[Galaxy S I9000 Themes and Apps] 2k4ever:
aleadam's Andromeda rom works - but attention: its a Captivate rom, no clue whether it works with your device

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

or you could try to mod your current rom - if you don't use an extended powermenu i think it should work
[Galaxy S I9000 Themes and Apps] aleadam:
The rom is a team work.

And it could be added to any policy.jar. Ours have an extender power menu also and several other mods to it.
[Galaxy S I9000 Themes and Apps] freakfingers12:
This, I am curious too.

BTW, I have a request fr4gg0r. Could you hack it so that the "contrast, saturation and sharpness" settings retains after exiting the camera app? I find the pics are much better when all settings are set to "2."
[Galaxy S I9000 Themes and Apps] 2k4ever:
sorry, it surely wasn't my intention to offend your team members!

And i'm certain that this hack can be combined with an extended powermenu, i myself just don't have the skills to do it and from my attempts to me it seems that the powermenu is the cause that i can't simply apply your code
[Galaxy S I9000 Themes and Apps] aleadam:
No problem, nobody got offended :) I just wanted to say it.

MikeyMike01 is working in implementing it in his Serendipity rom also. I'm sure he'll have it finished very soon.
[Galaxy S I9000 Themes and Apps] Fr4gg0r:
interesting :)

How did you manage to block the shutdown dialog only in camera app?
[Galaxy S I9000 Themes and Apps] aleadam:
Everything is detailed here:

http://xdaforums.com/showthread.php?t=777707
[Galaxy S I9000 Themes and Apps] MikeyMike01:
And there we go. ;)
[Galaxy S I9000 Themes and Apps] Peguth:
Well, hello first, hopefully someone can provide me some info ..

Pretty noobish at this, so give me some space okay :)

I got this to run after reinstalling the camera app via SGS tools and the reinstall_camera.txt script, cause at first it only reported an error everytime I tried recording stuff. (maybe it was due to me installing the hacked camera app via SGS tools in the first place)

But my problem is now that every app that uses the camera doesnt seem to work, for example Barcoo, Barcode scanner or QR Droid, the either crash or show a black screen.

I guess I am the only one having this problem :(

I just recently got Darkys Rom 9.2 Ex to work and root and all the stuff I need.. (first time :rolleyes: ).

So..anyone got any ideas on what to do now :confused:

Will provide cookies for answers ;D
[Galaxy S I9000 Themes and Apps] zmirburger:
does this work with this guys camera autofocus video cam?

http://www.youtube.com/watch?v=1Q_JuJmNat8

if so, how do i go about installing both?
[Galaxy S I9000 Themes and Apps] 2k4ever:
yes, it does

you need the update for your camera firmware (and obviously the modded Camera.apk)

the firmware update is a apk you have to install and run once

someone has uploaded it somewhere in this thread:

http://xdaforums.com/showthread.php?t=905502
[Galaxy S I9000 Themes and Apps] Reeby:
Fellows, I'm on DocRom_V9.1.4_XWJS3 and decided to try this hacked camera stuff form SGS Tools and...the camera is gone. Downloaded the .apk's from here, both "hacked" and "old" - won't install non of them.

Can you tell me how to get it back?
[Galaxy S I9000 Themes and Apps] aleadam:
just unzip Doc's rom, find the Camera.apk file and copy it over the one in your phone in the folder /system/app/ using root explorer or similar
[Galaxy S I9000 Themes and Apps] frewys:
Any update to these?
[Galaxy S I9000 Themes and Apps] zmirburger:
thanks for that!

does the order matter of which i install? (im guessing not since the firmware update is a one time thing)

so ill install this .apk and then update the firmware, will do it now

UPDATE:

did this and both works fine together! loving it
[Galaxy S I9000 Themes and Apps] 2k4ever:
glad it worked!
[Galaxy S I9000 Themes and Apps] N5577S:
Hi there,

first post on XDA, great forum, btw.

Well, I have the same problem that one guy on page 26 had. Camera working fine with mod, but all 3rd party apps which make use of the camera (Goggles, Barcodescanner) give FC, others (Layar) reply "Can't access camera".

I've restored the original camera.apk and camera.odex (by copying+pasting both files from sdcard/sgstools to system/app). No restore script appears on SGS Tools. Same thing, no results.

What can I do? Do I have to delete/change permissions or something with the file camerafirmware. apk and camerafirmware.odex files, which I still have on system/app?

Thanks in advance.
[Galaxy S I9000 Themes and Apps] aleadam:
I didn't do that for the camcorder. I think MikeyMike01 did it for his apk tho. I will add the mod to the armani apk probably soon.

I don't know about panoramic photos. I guess it will depend on how complex is that code.
[Galaxy S I9000 Themes and Apps] 2k4ever:
sorry, my mistake!

i came back to this thread because i had exactly the same problem as frewys

its true that i tried MikeyMike01s apk at first (and video recording on low battery worked for sure), but then i changed to your apk and i thought i tested it there too, but obviously not

sounds like you don't have the standard email client installed - if so, you have to restore it and all camera apps should work again
[Galaxy S I9000 Themes and Apps] aleadam:
New apk that should take care of the battery issue while recording video. Give it a try and let me know

http://xdaforums.com/showpost.php?p=11253470&postcount=19
[Galaxy S I9000 Themes and Apps] 2k4ever:
thanks! i'll try it later today when my battery is low and will report back
[Galaxy S I9000 Themes and Apps] frewys:
Looking forward to your feedback if it works.

And thanks for the update aleadam!
[Galaxy S I9000 Themes and Apps] 2k4ever:
i finally have less then 10% battery and was able to try it ;)

the old one doesn't allow video recording on low battery, but the new one does

great job aleadam, thanks again

PS: the new one is Camera.apk and not home_key_fix_camera.zip
[Galaxy S I9000 Themes and Apps] aleadam:
Cool. Glad it worked.

BTW, unless I screwed something, the zip now should also contain the new camera.apk. It should be the same but cwm flashable for those that do not have root explorer and don't use adb.
[Galaxy S I9000 Themes and Apps] .:Crack:.:
so which one is the newest one?

Getting confused..
[Galaxy S I9000 Themes and Apps] aleadam:
It depends on what are you looking for. i9000 camera with ffc support or i897 camera without it? Long power button press for autofocus or not?

for i9000, get it from sgs tools (the original mod made by fr4gg0r)

for i897, get it here:

http://xdaforums.com/showpost.php?p=11253470&postcount=19

for i897 with long power button press for autofocus, get the Andromeda ROM (it requires other mods besides the camera to work)

http://xdaforums.com/showthread.php?t=948424
[Galaxy S I9000 Themes and Apps] .:Crack:.:
searching for i9000 with long power button press for autofocus (and low power vid

recording)
[Galaxy S I9000 Themes and Apps] N5577S:
Well, in fact I do have the email app installed, but never used it (I like K9 much more). But the strange thing is that when I ran the email app after reading your post, the 3rd party apps using the camera began to work normally. What the email app has to do with the camera?

Since I do not use stock email, I removed it from initializing upon start up with Autostarts, so I enabled it again, created an email account on it and now everything is working fine again, although I am a bit reluctant to install the hack of the camera again, just in case.

Thanks for your help anyway.
[Galaxy S I9000 Themes and Apps] aleadam:
I don't think all the mods are done for that camera.

2k4ever is right on that. For some reason, the camera relies on the email.apk. That is true for the original one and for the modded ones.
[Galaxy S I9000 Themes and Apps] .:Crack:.:
cant you do that? Please? :D

Would be so cool ;)

Thanks!
[Galaxy S I9000 Themes and Apps] aleadam:
Sorry man but I doubt that I'll have the time. Besides, I don't own an i9000 so I can't test the ffc anyway.

On top of that, as I said above, the long press for focusing requires other mods (android.policy.jar) and thus is rom-specific.

You can ask your favourite rom dev to mod it, or you can try to do it yourself. All the changes are detailed here:

http://xdaforums.com/showthread.php?t=777707
[Galaxy S I9000 Themes and Apps] .:Crack:.:
Hey!

What's the big difference between the i897 and i9000 camera? What's that ffc?

I would do it by myself but idk what I exactly have to change?

And how and where? The Camera.smali is so big :D

Thanks!
[Galaxy S I9000 Themes and Apps] lgkahn:
Need a vers for the I 9000 with everything working please. The prof breaks hd video recording I believe.
[Galaxy S I9000 Themes and Apps] lgkahn:
As for the camera fc you need to have original email.apk and let it run on boot or run it manually. It does not need to be configured I.e. have an acct and can be killed later. As long as it runs once .
[Galaxy S I9000 Themes and Apps] WiwiPouPou:
You can also search for the libcamera.so which does not FC others apps when Stock Mail app is deleted.
[Galaxy S I9000 Themes and Apps] rafalense:
i9000 Camera.apk apk modded, from JS5 deodexed rom

Able to record and take pictures with power button and on low battery

Does not handle power menu yet ( no automatic focus). Working on it

Will update when ready

http://www.multiupload.com/TIC8HWFA8F
[Galaxy S I9000 Themes and Apps] Fuma:
can someone please upload the stock camera apk, please?

i searched for it and didnt find.

the hacked apk broke video recording on my sgs.
[Galaxy S I9000 Themes and Apps] 2k4ever:
best to extract the .apk from your rom (from the CWM zip or Odin file you used to install your rom)
[Galaxy S I9000 Themes and Apps] supraman89:
Can someone make a hacked version of the vibrant camera?
[Galaxy S I9000 Themes and Apps] Alson McLaren:
nice.......:)
[Galaxy S I9000 Themes and Apps] habylab:
So this is the latest one for i9000?

Sent from my ever changing Rom (Doc or Darky) Galaxy S
[Galaxy S I9000 Themes and Apps] 2k4ever:
yes

works good so far for me
[Galaxy S I9000 Themes and Apps] robkellie11:
CAMERA HACK APK crashes camera

Am running on Doc Rom9.6.6. with Speed Mod k13c build XWJS5, but when I run the camera hack apk, it crashes the camera function, removing the last shot view in the right corner, it also takes out video function and snap and go -the last not being a major problem, as blue tooth/usb connection just as fast.

Any answers on the first two problems would be helpful.

Am using the APK from SGS tools 4.1.9

Is the new APK more stable and an advance from the APK attached
[Galaxy S I9000 Themes and Apps] htcgr:
i have the same problem....!!!
[Galaxy S I9000 Themes and Apps] fire314:
verified. same here :(
[Galaxy S I9000 Themes and Apps] crudelios:
For those having audio/video sync issues due to the hacked bitrate/sample rate, simply re-encode the audio as a mono MP3 using avidemux. This fixes the syncing problems.
[Galaxy S I9000 Themes and Apps] lpy:
Excellent, just what we needed!

I couldn't find any higher quality hacks, so I just did my own deodexed stock JS5 camera and improved the audio (no other hacks included):

1280x720 - Bitrate: 192kbps (original: 63kbps), Samplerate: 44100Hz (original: 16000Hz). Video quality slightly higher for Superfine setting.

720x480 - Bitrate: 192kbps (original: 63kbps), Samplerate: 44100Hz (original: 16000Hz). Video quality slightly higher for Superfine setting.

640x480 - Unchanged (Bitrate: 63kbps, Samplerate: 16000Hz).

320x240 - Unchanged (Bitrate: 63kbps, Samplerate: 16000Hz).

176x144 - Unchanged (Bitrate: 12kbps, Samplerate: 8000Hz).

After you run it through avidemux, it's back in sync.
[Galaxy S I9000 Themes and Apps] thunderteaser:
Fr4gg0r, can you remove battery check from JS5 music player and video player as well? That would make us happy! :)
[Galaxy S I9000 Themes and Apps] crudelios:
Lpy does your video quality hack increase file size? I found that re encoding the video as h.264 in avidemux with default settings results in a 50% smaller file with few visual differences.

Also, there is an audacity plugin that creates a stereo wav from a mono file (not just doubling the channels, but actually splitting sounds between L & R channel), and surprisingly it sounds quite good. I will post a link to the guide if someone is interested.
[Galaxy S I9000 Themes and Apps] lpy:
It would increase, but not by much. The video bitrate is increased just a tad, and the audio,from 63kbps to 192kbps, which wouldn't make difference either.
[Galaxy S I9000 Themes and Apps] thunderteaser:
I am! I use Audacity very often, but didn't know about this. I just knew about splitting a stereo file into 2 mono files.

@lpy I can't understand which apk is producing out of sync videos, yours or the original modded one?
[Galaxy S I9000 Themes and Apps] lpy:
Mine does, the original doesn't.

The sample rate is what causes out-of-sync issues. Anything other than the Samsung default of 16000Hz (above or below) will need to be processed by avidemux, as explained by crudelios. (The bitrate, however, has no effect on sync.)

In regards to converting to stereo using an audacity plugin, I can't see how this would be true stereo if the recording source only uses 1 mic and not 2.
[Galaxy S I9000 Themes and Apps] Shake&Bake:
Either it's rather late, or I'm rather confused by all of the .apk's being thrown around in this thread :D

But would it be possible for the OP to be updated with the various .apk's and a bried description if what it's meant to do? Or what fixes there are?

The last post was a few minutes ago, but the last time the OP was edited was on 03 Jan 2011.

Would be good to have everything centralized.

Even if those posters could PM the OP with their mods, etc for quicker editing.

Just a thought.
[Galaxy S I9000 Themes and Apps] crudelios:
Well yes, it is not a true stereo track, as that is impossible to recreate. However, if you record some live music (as I do), this "fake conversion" to stereo gives the sound some extra depth. Feel free to try it yourself ;)

Here you go then.

First you'll need to get the proper audacity plugins. Unfortunately I don't have enough posts to post direct links, but if you google "ehow convert mono to stereo" (without the quotes) the first link will take you to the Ehow article on which I based this guide.

The article itself is not very helpful, but the answer lies on escapemcp's comments, so thanks to him. Follow his comments in order to get the plugins:

- Download VST enabler from the Audacity site;

- Unzip and put in the audacity\Plug-Ins folder

- Download MDA's Stereo Simulator - you have to download all their plugins in the one download, but it is reasonably small (1 meg)

- From the zip you have just downloaded, copy mda_stereo.dll into the Audacity\Plug-Ins folder

With that taken care of, the steps to turn mono audio into stereo are these:

- Open the video with avidemux.

- On the left side, set the audio to "PCM".

- Go to "Audio" menu and choose "Save...".

- Save with any name you want, but remember to add the ".wav" extention.

- Open the wav with Audacity. It should open as a stereo file, with duplicated channels. If it doesn't follow the first six steps of the ehow article in order to duplicate your channels.

- Press Ctrl+A to select all.

- Go to the "effects" menu and choose "VST mda stereo".

- You should now have "stereo" audio. If you're happy with the result, it's time to add it to the video!

- Go to "File", then choose "Export...". Export the file as a wav (you can overwrite the one you got from the video).

- In avidemux, go to the "Audio" menu and choose "Main track...". Set the audio source to "External Wav" and choose the file you just exported from audacity. Click OK.

- Finally, choose Mp3 (lame) as the audio codec, increase the bitrate to 192kbps (a 128kb mono track has the same quality as a 256kbps stereo, so do this in order to avoid quality loss) and save the video.

- Done! :)

Oh, I should mention that doing this also fixes the sync problems, so if you turn your sound into stereo, you won't need to encode audio as MP3 before doing this.

if there is any trouble, ask away!
[Galaxy S I9000 Themes and Apps] pablacho:
Hi you all!!

i'm trying to tweak the video frame rates in order to obtain slo-mo (and possibly fast-mo??). I've found the config files and i believe i've managed to increase the fps up to 240fps (super-slow-motion!) in 320x240. The file is bigger so the data should be there, but it plays at regular speed! it's like there is some time-stamp so the actual playing time is reduced to the actual recording time, and the video looks 'jumpy' because all the frames lost... also, the progress bar displaying remaining time never reaches to 100%, it hungs at about 30% (more or less, depending on the actual lenghth of the video recorded) and returns to gallery, as if there were some sort of bug at the EOF...

i'm searching the entire code but i cannot find when the file is actually being saved with all the video data. Has anyone tried this?? Or knows where my problem might be??

i'm sure the sensor is capable of doing this... samsung wave has the exact same cam-controller IC...

help plz!!
[Galaxy S I9000 Themes and Apps] thunderteaser:
Thanks, crudelios! :)
[Galaxy S I9000 Themes and Apps] Reeby:
Last time I did this hack through the SGS Tools I lost the camera. I'm on Doc's ROM with Hardcore kernel - could that be the prob? How do I install it for it to work?
[Galaxy S I9000 Themes and Apps] rafalense:
I agree with you

I created a new thread with my own hacks, as Fr4gg0r is not updating this one since time ago

Feel free to check it here: http://xdaforums.com/showthread.php?t=980835
[Galaxy S I9000 Themes and Apps] xefe:
What about a native HDR mode for the camera?

The concept would ve to take 3 photos fast with 3 exposure, -2, 0 and +2, we can merge them in photoshop or other programs to make the HDR effect that is present on professional cameras. But i heard that there are limits in android api and there is no app that do the real HDR (the iphone does this and not a fake mode).