yashsingh1/xdaforums huggingface dataset:
[Galaxy S I9000 Themes and Apps] MiTMaNeK:
If you want restore old camera. Create restore_camera.txt in /sdcard/sgstools and insert this text

echo "this will delete camera hack"

busybox cp -f /sdcard/sgstools/Camera* /system/app/

Then save file. And run sgstools-run script and select script you created.
[Galaxy S I9000 Themes and Apps] rafalense:
Ey Fr4gg0r,

I managed to modify bitrate and sample rate modifying MediaRecorderProfile.class

My camera now records with different settings, depending on which resolution is selected

48Khz - 160Kbps for 1280x720

44.1Khz - 128Kbps for 720x480

...

16Khz - 32Kbps for 176x144

Works perfectly fine!

Audio quality is improved, obviously. But I think could be much better if AudioSource is changed:

http://developer.android.com/reference/android/media/MediaRecorder.AudioSource.html

I´m not able to find the class where this parameter is set. Do you have any idea?
[Galaxy S I9000 Themes and Apps] moises1204:
mine just keeps force closing.:mad:
[Galaxy S I9000 Themes and Apps] wallac3:
Hi rafa

that is very good to know, did u fix it in the VIBRANT ?

can you please tell us how to do it ?

thanx a lot.
[Galaxy S I9000 Themes and Apps] jokatc:
Hi, I had install this Camera im My vibrant, but the camera software Force close Now.

My FW is 2.1.1

Thanks a lot for a solution.
[Galaxy S I9000 Themes and Apps] GregorVe:
@jokatc

did you remove the e-mail stock app from your sgs ?

Had the same problem, after restoring it, the camera worked (and barcode scanner).

! needs reboot.
[Galaxy S I9000 Themes and Apps] rafalense:
Sorry, but I'm not developing anything, I´m not developer

I'm only trying to improve my own camera (i9000 JPX). If I achieve what I really want (to supress distortion on audio for video recording on noisy evironments), I will share it :)
[Galaxy S I9000 Themes and Apps] xan:
That is interesting :)
[Galaxy S I9000 Themes and Apps] raphy972:
It could be much better if AudioSource is changed to which setting?
[Galaxy S I9000 Themes and Apps] wallac3:
And how do you change it ?
[Galaxy S I9000 Themes and Apps] a-son:
Great hack, Thanks.
[Galaxy S I9000 Themes and Apps] raphy972:
Which tools do you use to modify the camera app? I mean decompile, modify then recompile?

Thanks.
[Galaxy S I9000 Themes and Apps] rafalense:
Did you manage to change it?

Well, do you know Tapamachine? http://tapemachine.samalyse.com/

This app have to options for mic, 'back' and 'front'. If you record with 'back' selected, audio is more like camera recording video + audio, but if 'front' is selected, distortion is not that horrible. We all know SGS has only one micro, but check yourself and you will notice the differences

So, my guess is, if we find the way to set the camera to record with something similar to 'front' mic, audio quality will be improved
[Galaxy S I9000 Themes and Apps] Fr4gg0r:
AudioSource is set in CamcorderEngine
[Galaxy S I9000 Themes and Apps] rafalense:
Ups, I could swear I already checked into that class :s, not properly it seems

I got it, thanks a lot!
[Galaxy S I9000 Themes and Apps] Horus.Campbell:
Do you think you could somehow port this to the Fascinate?
[Galaxy S I9000 Themes and Apps] raphy972:
The maximum sampling rate I can use is 22050Hz. Above this, video and audio are not synchronized, audio plays things that don't yet happened in the video. Are you guys experiencing the same thing?
[Galaxy S I9000 Themes and Apps] rafalense:
Well,

I tried recording with all audio sources, and results does´t vary at all

Playing with tapemachine, I realized that the trick is on autogain control

When hardware auto-gain control is disabled (I suppose on our SGS is enabled by default), audio level decreases a lot, and quality also gets improved

I was busy trying to find info regarding how to disabled auto-gain in android, but nothing yet

I also sent an email to tapemachine developers, but I don´t really think they will answer

Let´s see
[Galaxy S I9000 Themes and Apps] almi88:
Can this app be moded to print the date on the photo? Thanks and a happy new year!!
[Galaxy S I9000 Themes and Apps] Fr4gg0r:
nice, can you provide how you achieved that?
[Galaxy S I9000 Themes and Apps] vt6spd:
how do I install it on my phone? Extreme Noob here.
[Galaxy S I9000 Themes and Apps] raphy972:
Yes, i think so! Because even with 48kHz - 160kbps, the sound quality gets crappy in noisy places or recording music rehearsals. :-/
[Galaxy S I9000 Themes and Apps] rafalense:
New post with more info

http://xdaforums.com/showthread.php?p=10268583
[Galaxy S I9000 Themes and Apps] aleadam:
I'm doing the mod in the armani camera.apk. Which would be that line? I did a diff to the smali files for both camera.apk and camera_old.apk and there are too many changes there to understand it.

I'm assuming is one of:

.line 1664
iget v4, p0, Lcom/sec/android/app/camera/Camera;->mLowBatteryWarningLevel:I

if-ge v0, v4, :cond_0

if-eq v3, v8, :cond_0

.line 1665
invoke-virtual {p0}, Lcom/sec/android/app/camera/Camera;->handleLowBattery()V

.line 1668
:cond_0
if-eq v1, v8, :cond_1

if-ne v1, v7, :cond_2

But I would not know which one... is it

if-ge v0, v4, :cond_0

?
[Galaxy S I9000 Themes and Apps] stephengoo:
installed on Doc Kitchen Rom XXJPY by using Root Explorer overwrite the hacked camera.apk to original camera.apk (do backup first of course) and it run smoothly, thanks for good mod!
[Galaxy S I9000 Themes and Apps] BuBBleSix:
First off: the idea is awesome, hands off. :)

Precisely what i've been thinking when getting an Android phone. App customization to get rid of silly limits (Nokia did the "don't shoot picts when low on battery" too. Nagged me silly).

Now to the hints/bugs:

-Happened a couple times to me: shoot a panorama, shoots the 8 pictures, then reports "error". Manually stopping on the 7th saves the picts correctly, instead.

-Yet another improvement to the stock app: Panorama picts are shot at 0.3M, that's hardly a hardware limit, why not higher res?

And while at it: to shoot a panorama, camera is set at 0.3M.

Close the camera app, reopen, shooting mode is back at "single shot", resolution is still 0.3M instead of 5M - Any way to fix that?
[Galaxy S I9000 Themes and Apps] Fr4gg0r:
This would do it for example:

invoke-virtual {p0}, Lcom/sec/android/app/camera/Camera;->handleLowBattery()V
[Galaxy S I9000 Themes and Apps] frauhottelmann:
You shouldn't use the panorama function anyway. It makes mistakes during the stitching process and as you mentioned it uses a low resolution. I shoot single pictures and use PC software for stitching that is way better.
[Galaxy S I9000 Themes and Apps] cedxhen:
Hello, that's exactly what I need! And I'm sure, not only me.

BUT I tried to install it and for some reasons it doesn't work just saying "program not install".

Do you have an idea of what's appened and how to do?

I9000

root/lagfix
[Galaxy S I9000 Themes and Apps] cedxhen:
To give more information I tried to install the camera.apk for froyo because I have a 2.2.1 version so may be it is because... Tell me and thanks a lot anyway for the forum.
[Galaxy S I9000 Themes and Apps] verine0529:
my camera icon is missing, where can I find it?
[Galaxy S I9000 Themes and Apps] SamsungG:
Thank YOU!!!! I killed my camera with titanium .. downloaded your tools and installed on JL2 and working flawlessly!!

Again, THANKS A LOT!!
[Galaxy S I9000 Themes and Apps] Sagar96:
does this work on the vibrant

hey i have a vibrant with gingerclone v3 do u think i can add this camera apk with bricking
[Galaxy S I9000 Themes and Apps] _atlien_:
The hacked camera worked for me when I was running Nero v3. I upgraded to Nero v4.1 and I can't get it to install. I love how fast Nero v4.1 is but v3 was fast and smooth as well and that camera hack was one of my most used features so I'm downgrading. I hope that hack works with Ginger when the stable roms start coming in.
[Galaxy S I9000 Themes and Apps] _atlien_:
Hey peeps. Is anyone running the hacked camera with Nero v4.1? I can't get it to install. I was running it on earlier versions of Nero and I'm going to switch back cuz this hack rules. But I wanted to make sure no one else was running it on Nero v4.1 before I take the plunge. Thanks.

Meant to add this to prior post. Sorry for the dub post.
[Galaxy S I9000 Themes and Apps] morx:
Does it work on Stock LG P-500 [Froyo 2.2] rooted?
[Galaxy S I9000 Themes and Apps] lofreq-:
i installed Darky's v8 ROM which includes SGS Tools and the camera hack - and now my "Retro Camera" app and "Vignette" camera apps no longer work (now that the Hacked Camera app from SGS Tools is installed). the apps report that the 'camera could not be initialised' or the 'camera hardware is not responding'.

the stock camera works fine, power button for shutter works, video recording works, etc.

has anyone else's 3rd party camera apps been affected like this? is there a workaround to get the apps working or do i need to somehow reinstall the stock camera.apk?

this is on my i9000 running 2.2.1 XXJPY firmware
[Galaxy S I9000 Themes and Apps] .:Crack:.:
Hey, could you hack the camera.apk, musicplayer.apk and videoplayer.apk, so you can make videos, listen to music and watch videos on low battery percentage?

Thanks
[Galaxy S I9000 Themes and Apps] BlackDino:
change the galaxy tab email back to the stock email client
[Galaxy S I9000 Themes and Apps] seeARMS:
Ported it for JL2... If anyone would like it, shoot me a PM and I'll get it uploaded + posted here ASAP.

Thanks to fr4ggor for the help. :)
[Galaxy S I9000 Themes and Apps] lpy:
Yep, but even at 22050Hz. The only good setting is 16000, it's out of sync with anything higher or lower :|
[Galaxy S I9000 Themes and Apps] stfudude:
hi guys!

can someone check if the latest kernel by supercurio (5.2), fixes sound recording during HD video recording?
[Galaxy S I9000 Themes and Apps] stfudude:
+1 to this. me wants this too. :)
[Galaxy S I9000 Themes and Apps] x86-Dark:
Dont go off topic anymore

https://github.com/project-voodoo/linux_gt-i9000/commit/04c0c6e20b7a0c0b29868cbc15a685c26405e9e4
[Galaxy S I9000 Themes and Apps] xan:
Any clues for repacking it myself? I want to repack JS3 camera (multi-DPI+hacks from Fr4gg0r), but getting ****loads of:

C:\Android\apk_manager_4.9\other\..\projects\Camera.apk\res\values\public.xml:226: error: Public symbol drawable/bg_camera_pattern declared here is not defined.

Both linux and M$, both apktool 1.3.1 and 1.3.2. Any clues?
[Galaxy S I9000 Themes and Apps] Falloutboy2000:
@ Fr4gg0r

@ all

i have a questions/ request. dunno if this has been discussed before.

is it possible to improove the camera quality in dark rooms/indoor or in bad light conditions ? especially the white balance.

compared to the iphone 4 cam the pics have a poor quality.

i did some test with a friend with iphone. the flashlight was OFF. so i can compare with same circumstances. in both camera and video recording the picture was very dark and not sharp. also the colours are better.

is there a possibility to fix that problem. or is it the hardware which is bad ?

also tried 360cam f.e. but the results are nearly the same.
[Galaxy S I9000 Themes and Apps] tiuk:
I used this when I was on cognition, now have perc 10.2. any problems using this on an armani based rom?
[Galaxy S I9000 Themes and Apps] Falloutboy2000:
possible ?
[Galaxy S I9000 Themes and Apps] phoenix6666:
I have copied the old version on JPJPG on system/app but I always get FC on camera apk

does anyone know y?

also used sgs tools but force closes still remain
[Galaxy S I9000 Themes and Apps] -=MaD DoC=-:
Increasing Sampling rate

Hello,

I have read all the posts and there absolutely no info on HOW to Increasing Sampling rate of camera app from 16000 to 22050

any help?

thanks
[Galaxy S I9000 Themes and Apps] -=MaD DoC=-:
Thanks, Ill try that

:)
[Galaxy S I9000 Themes and Apps] discophil:
Thanks for the info rafalense!

However i am having problems with the rebuild apk file.

I have done a test, i just decompiled Camera.apk to smali files with apktool, then didnt change anything, recompiled again using apktool, replaced the rebuilt camera.apk in system\apps but it doesnt work. Camera icon is missing. If i swap back to the original camera.apk again its working fine.

Any ideas what i am doing wrong? I dont get any errors on apktool and used the commands below:

apktool.bat d Camera.apk ./out

apktool.bat b -f .\out Camera.apk
[Galaxy S I9000 Themes and Apps] discophil:
DONT WORRY! :) figured it out... I hadnt signed the apk, never done any of this before and not a developers lol.. haha... learning a bit though :)
[Galaxy S I9000 Themes and Apps] rafalense:
hehe

I just show your post, and that was my guess

Try ApkManager, will be more easy
[Galaxy S I9000 Themes and Apps] discophil:
Ok so i just tested the video recorder with higher sample rate only, no increase in bitrate. The bitrate was already 63kbps which is pretty much cd quality for mono audio i think.

I set the sample rate to 44.1khz and it definatly sounds better and there doesnt seem to be any difference in the audio/video sync. I videod my finger tapping on the desk and sync seems exactly the same as the original camera apk.

So i think increasing the bitrate might be causing the sync issues, where as sample rate only doesnt.

anyhoo, the issue i now have with the modified 44khz camera apk is that if you click to look at the video from within the camera apk it force closes... hmmm..
[Galaxy S I9000 Themes and Apps] discophil:
LOL... no scrap that... only changing samplerate 44.1khz with no bitrate change still introduces sync issues... i didnt record a long enough video when i tested it :o
[Galaxy S I9000 Themes and Apps] rafalense:
Welcome to our main issues ;)

On JPU we didn't get the FC when opening gallery from camera, but when little preview on gallery button was introduced on new ROMs like JPY, FC appears

Should be something related with framework-res.apk, or other dependencies, but I still don't know how to fix that
[Galaxy S I9000 Themes and Apps] raphy972:
Use apk manager instead of apk tool and don't sign your Camera.apk (system app). By doing that, you won't have this force close issue when trying to watch the video.
[Galaxy S I9000 Themes and Apps] raphy972:
I had this issue too when using apktool. When using apk manager and choose yes for the question "System app?" and you delete what you've modified and then don't need to sign. It resolves the issue for me at least. :)
[Galaxy S I9000 Themes and Apps] rafalense:
Hi raphy,

As you can see some posts above, if he does what you say, he won't be able to find camera app on menu, same issue I experience

"...replaced the rebuilt camera.apk in system\apps but it doesnt work. Camera icon is missing. If i swap back to the original camera.apk again its working fine"

"DONT WORRY! figured it out... I hadnt signed the apk, never done any of this before and not a developers lol.. haha... learning a bit though"
[Galaxy S I9000 Themes and Apps] rafalense:
Thanks again raphy, I got it now :D

I was pressing always NO when asking if it was a system app (stupid :o)

Now works fine for me as well
[Galaxy S I9000 Themes and Apps] raphy972:
Yeah but it's because he used apktool. I had the same issue, if you re-sign a system app you should re-sgin all apk's that share its shared:uid . That's the reson why you can't view videos/photos via the Camera.apk.

Use apk manager and don't re-sign the Camera.apk. It works for me so I share. :)
[Galaxy S I9000 Themes and Apps] raphy972:
Good to hear! :D
[Galaxy S I9000 Themes and Apps] rafalense:
Here I share my modification in order to use power button as shutter for taking pictures:

'Camera.smali'

Original

.line 764

invoke-direct {p0}, Lcom/sec/android/app/camera/Camera;->resetFocusDueToZoom()V

.line 765

Modified

.line 764

const/16 p1, 0x42

goto :cond_1

.line 765

As you can see, it's a bit simplier than Fr4gg0r solution

Check yourself and let my know if you find any issue

As a plus, I'm trying to apply this also for video recording, but I only found out so far how to start recording, but no how to stop it :p
[Galaxy S I9000 Themes and Apps] raphy972:
Does the focus work when using power button to take pictures for the time or do I have to focus once first by taping on the screen?
[Galaxy S I9000 Themes and Apps] rafalense:
It works as camera button on screen does, and that button does not focus automatically, so you have to tape on screen in both cases
[Galaxy S I9000 Themes and Apps] frewys:
Love this hack Fr4gg0r!

Two Requests though.

1. If I have low battery and left the video rec mode on it wont let me change it to camera on low battery. Can you make the video recorder work on low battery too?

2. Panoramic photography is freaking cool!! (if you haven't tried it yet give it a go!)

BUT

it only takes 0.3 MP res pictures. Is there ANY way to make it even a little higher resolution? Maybe even just have a maximum of three images stitch together at full resolution is a possible solution?

(If anyone knows a program that can do the second request and works good please PM me)

Thanks for this necessary hack!

Regards

/Frewys
[Galaxy S I9000 Themes and Apps] Falloutboy2000:
hi guys

in video rec mode cant i change the exposure value (-2 to +2).

i see no difference, but in cam mode its working.

do u have the same problem. is it turned off in general in video mode?

seems like u have skill in reading the codes :-) can u look into ?

btw are u satisfied with the quality of recording in video and picture ?

like i posted above, i think there are potentials to improve. sadly i have no skills to help.

i wonder why people are not discussing about that point.

there are so many improvments to sound (link supercurio does)

why are dev not looking into this topic ?

should we start a bounty thread about for this ?
[Galaxy S I9000 Themes and Apps] aleadam:
If you use apktool to rebuild it, you can use signapk to sign it. But before that, you need to make sure that both resources.arsc file and the res/raw folder are stored in the zip (i.e., zero compression). The way I do it is to unzip the apk and manually zip it again (i made a little script to do all that).

Answering Y for system app works because it maintains the zip structure from the original file, but only works on windows. Linux apk manager script is a partial port.
[Galaxy S I9000 Themes and Apps] 30000:
I'm new to this forum, and I don't know if anyone can help me, but here's hoping. The camera (photo) is working fine. Pinch-to-zoom and power button controls are working fine. Only thing is when I press record in the camcorder, the whole phone will freeze up and I will have to take out the battery and put it back in and whatnot. Any ideas for a fix?

Update: Maybe I should elaborate on what happens more. No matter what happens, the entire phone will freeze upon pressing record for video playback in the hacked camera app. I checked and SGS Tools doesn't have any problems, and I am still able to run the script that reverses the hack, but for now I am still using the hacked camera for photos and using the Qik app for videos. Getting back down to business, the phone will always freeze up when the record button is pressed, but it may do different things before it freezes up. It may immediately become unresponsive and go to a black screen and the buttons at the bottom of the phone may or may not go on and stay on, or the camera may start recording while the whole screen flashes white and then the whole phone will freeze about 9-12 seconds later.

Phone: Samsung Vibrant (rooted w/ busybox) (does not have ffc mod)

ROM: Official KA6 update to 2.2 (gotten thru Kies mini) (not a custom ROM)

P.S. If this works out and gets fixed, what are the chances of the hacked camera app running a front-facing camera without me flashing my phone to a new ROM, because I am seriously thinking about doing that and I noticed the button where I could swap between rear camera and the front-facing camera in the hacked camera.
[Galaxy S I9000 Themes and Apps] aleadam:
1) You are using a i9000 camera on a vibrant phone, could that be it?

2) None. Vibrants do not have a ffc afaik.
[Galaxy S I9000 Themes and Apps] 30000:
1) Currently, the camera is the original camera that came with the Vibrant, not an i9000 camera (and the only thing different about it is the hacked camera I got thru SGS Tools).

2) Vibrants don't have a ffc, but there is a very popular post by siirial detailing that a front facing camera can be installed on the Vibrant, and that it is actually quite easy (the camera just pops in and there is already a hole and camera lens on the phone, and it just has paint over it which can be removed with a q-tip). Will the ffc work on my vibrant, assuming I don't flash any ROMs or anything? (the OS I'm using is the exact same as the Vibrant 4G, which will have a ffc).
[Galaxy S I9000 Themes and Apps] aleadam:
Lol I meant i9000 camera.apk, the camera app. That could be the issue. It should be possible to make the same mod in a vibrant apk. Tho I'm not even sure that's the problem.

And I can't answer the second question. Probably the person that posted that hack you mention could.
[Galaxy S I9000 Themes and Apps] frauhottelmann:
But when you press and hold the on screen button it focuses and when you release it, then it takes a picture. That would be a desirable behaviour for the power button (don't know if this is possible though) .
[Galaxy S I9000 Themes and Apps] aleadam:
It is. Stay tuned :)
[Galaxy S I9000 Themes and Apps] MikeyMike01:
I fixed the low battery for video.

All I did was comment out every line in the smali files that had handlelowbattery or something like that.

Either way I posted the .apk in my latest ROM update if you want the specifics.

Sent from my Captivate.
[Galaxy S I9000 Themes and Apps] Maxaiai:
Thank you ;)
[Galaxy S I9000 Themes and Apps] MikeyMike01:
When you take a picture with the power button, the home button stops working. Until you take a picture again, with the power button.

I assume this to be some leftover fragment of when the Power button serves to lock the camera app.

Any ideas on how to turn it off?
[Galaxy S I9000 Themes and Apps] aleadam:
I noticed that also in the armani camera with this mod. We might try to remove all the setLock() (and perhaps getLock() ) calls. I'll do tomorrow if I have time.

BTW, I also modded it to use the pwr btn for video recording. Coming soon.
[Galaxy S I9000 Themes and Apps] MikeyMike01:
I'm using the armani version that you posted in that other thread, with the battery mod I did on top of that.

I'll give that a shot.

Nice.
[Galaxy S I9000 Themes and Apps] MikeyMike01:
Removed all the "setLock" lines (there were 6 or so) and all that accomplished was removing the lock icon from showing up. The home button still didn't work.
[Galaxy S I9000 Themes and Apps] MikeyMike01:
Took out the getLock in those same files, and it force closed upon opening.
[Galaxy S I9000 Themes and Apps] blazingcaloy:
Hi im using docs rom js3 i was wondering if why cant i install it using sgs toolbox it will show changes has been applied but camera application wont show up in my app drawer and doesnt even show on restore to revert. I had it working before but now cant do it anymore

Help please
[Galaxy S I9000 Themes and Apps] aleadam:
Probably all the getLock() calls should be replaced by some const v1, 0x0 (replace v1 with whatever variable was used for the return-value part)

Nevertheless, removing the setLock() should do it if that was the case. But I don't think so:

reading http://developer.android.com/reference/android/view/KeyEvent.html, I find this little piece:

It clearly states that the apps should not receive it, but a

$:adb logcat | grep 'Camera' | grep 'Key'

would return this:

D/Camera ( 4607): onKeyDown()-keyCode:3
V/Camera ( 4607): handling onKeyDown event from Activity class

but only some times, not every time I hit Home. I can't explain that behaviour right now, but it might be the answer to that bug.
[Galaxy S I9000 Themes and Apps] blazingcaloy:
Never mind i pushed apk to system/app and replaced existing camera.apk since sgs toolbox is not effin workig well