[Galaxy S III Themes and Apps] jobnik:
Hi,

This is my first MOD ;)

Latest update 13/12/2012

Note 2 Camera app

Based on Latest Official Note 2 JB 4.1.2 DLK7 firmware.

Some new options in HDR

Galaxy S3 Camera app

Based on Latest Official S3 JB 4.1.2 ELKC firmware.

Volume and Power keys as a shutter (no burst shot with volume/power keys).

Volume keys as shutter in Camcorder as follows: Volume Up start recording, Volume Down stop recording.

Power key as shutter in Camcorder will just start recording.

Shutter sound will be off/on in all cases in Camera according to menu selection.

Update 04/12/2012 (Note 2 Camera)

Based on Latest Note 2 JB 4.1.2 DLJ2

Volume keys as a shutter or zoom, choose in Camera/Camcorder menu

Power key as a shutter the same usage as with Volume keys in Camera/Camcorder (the power menu will show up as well) according to menu selection for volume keys.

Shutter sound will be off/on in all cases in Camera according to menu selection.

Notes

:

It's only for Samsung Stock / Custom ROMs ;)

Make backup of your SamsungCamera.apk and SamsungCamera.odex if exists first (the script should do it automatically).

To make it run on ODEXED ROMs, backup and remove the SamsungCamera.odex file from system/app (the script should do it automatically).

Using power button as a shutter will show the power menu as well, but it will take a picture / start recording, just wait until it vibrates

No burst shot when using power key

Galaxy Note 2 Camera app

Galaxy S3 Camera app

I've also modified Camera app for Galaxy S2, Galaxy Note and Galaxy Note 2:

Galaxy S2 mod: http://xdaforums.com/showthread.php?t=1841988

Galaxy Note mod: http://xdaforums.com/showthread.php?t=1863362

Galaxy Note 2 mod: http://xdaforums.com/showthread.php?t=1965801

What's inside?:

Galaxy Note 2 Camera app

Camera "Unable to start while in a call" Alert Disabled

Camera "Low Battery" Alert Disabled

Camera "Can't use flash on low battery" Alert Disabled

Camera Add Power button as a shutter to built in Volume keys

Camera Enable "Shutter Sound On/Off" permanently

Camcorder "Unable to record while in a call" Alert Disabled

Camcorder "Can't use flash on low battery" Alert Disabled

Camcorder "Low Battery" Alert Disabled

Camcorder Add Power button as a shutter to built in Volume keys

Camcorder Better audio quality/video bitrate

Video Quality:

1080p: Normal - 17MBit / Fine - 24MBit / Superfine - 30MBit

720p: Normal - 9MBit / Fine - 13MBit / Superfine - 17MBit

Sound Quality:

192 kbit/s

48000 KHz

Changes I've made in smali files are:

Camera MOD v8 by jobnik (Arthur):
---------------------------------
Please see the Note 2 thread for info:
http://xdaforums.com/showthread.php?t=1965801

Galaxy S3 Camera app

Camera "Unable to start while in a call" Alert Disabled

Camera "Low Battery" Alert Disabled

Camera "Can't use flash on low battery" Alert Disabled

Camera Power and Volume keys as a shutter (The Power menu will popup as well, but it will take a picture, just wait until it vibrates.)

Camera Enable "Shutter Sound On/Off" permanently

Camera "Action shot" shooting mode Volume keys as a shutter

Camera "Panorama" shooting mode Volume keys as a shutter

Camera "Timer" shooting mode Volume keys as a shutter

Camcorder "Unable to record while in a call" Alert Disabled

Camcorder "Can't use flash on low battery" Alert Disabled

Camcorder "Low Battery" Alert Disabled

Camcorder Volume and Power keys as a shutter (The Power menu will popup as well, but it will start recording, just wait until it vibrates.)

Camcorder Better audio quality/video bitrate

Video Quality:

1080p: Normal - 17MBit / Fine - 24MBit / Superfine - 30MBit

720p: Normal - 9MBit / Fine - 13MBit / Superfine - 17MBit

Sound Quality:

192 kbit/s

48000 KHz

Changes I've made in smali files are:

Camera MOD v8 by jobnik (Arthur):
---------------------------------
Files to be changed:
com\sec\android\app\camera\AbstractCameraActivity.smali
com\sec\android\app\camera\Camcorder.smali
com\sec\android\app\camera\Camera.smali
com\sec\android\app\camera\CameraEngine$AutoFocusCallback.smali
com\sec\android\app\camera\CameraEngine.smali
com\sec\android\app\camera\CameraSettings.smali
com\sec\android\app\camera\MediaRecorderProfile.smali
com\sec\android\app\camera\glwidget\TwGLActionMenu.smali
com\sec\android\app\camera\glwidget\TwGLPanoramaMenu.smali
com\sec\android\app\camera\glwidget\TwGLTimerMenu.smali
com\sec\android\app\camera\resourcedata\CameraSettingsMenuResourceData.smali
com\sec\android\app\camera\resourcedata\EditableResourceDataBase.smali

----------------
Camera
----------------

1. Camera "Unable to start while in a call" Alert Disabled
-------------------------------------------------------
* FILE:
com\sec\android\app\camera\AbstractCameraActivity.smali
com\sec\android\app\camera\CameraEngine.smali
* METHOD:
.method protected checkCameraDuringCall()V
.method public onCreateDialog(I)Landroid/app/Dialog;
.method public doTakePictureAsync()V
.method public setShutterSoundEnable(Z)V
* REMOVED these lines or similar in all files and methods above:
invoke-static {}, Lcom/sec/android/app/CscFeature;->getInstance()Lcom/sec/android/app/CscFeature;

move-result-object v0

const-string v1, "CscFeature_Camera_EnableCameraDuringCall"

invoke-virtual {v0, v1}, Lcom/sec/android/app/CscFeature;->getEnableStatus(Ljava/lang/String;)Z

move-result v0

if-eqz v0, :cond_10
* WHERE?:
* EXPLANATION:
Remove "if" condition, that check if "CscFeature_Camera_EnableCameraDuringCall" is enabled in "system/csc/others.xml" or "system/csc/features.xml"
That way we permanently enable Camera and disable shutter sound during Call.

2. Camera "Low Battery" Alert Disabled
-----------------------------------
* FILE:
com\sec\android\app\camera\AbstractCameraActivity.smali
* METHOD:
.method protected handleLowBattery(Z)V
* ADDED new line:
return-void
* WHERE?:
.prologue
.line 1903
return-void
const-string v1, "AbstractCameraActivity"
* EXPLANATION:
We are telling this method to return, exit, as it's just a "void" method

3. Camera "Can't use flash on low battery" Alert Disabled
------------------------------------------------------
* FILE:
com\sec\android\app\camera\Camera.smali
* METHOD:
.method private handlePluggedLowBattery(Z)V
* ADDED new line:
return-void
* WHERE?:
.line 5583
return-void
const-string v1, "Camera"
* EXPLANATION:
We are telling this method to return, exit, as it's just a "void" method

4. Camera Power and Volume keys as a shutter
-----------------------------------------
* FILE:
com\sec\android\app\camera\Camera.smali
* METHOD:
.method public onKeyDown(ILandroid/view/KeyEvent;)Z
* MODIFIED switch case:
:sswitch_data_2c0
.sparse-switch
0x4 -> :sswitch_51
0x17 -> :sswitch_d1
0x18 -> :sswitch_d1
0x19 -> :sswitch_d1
0x1a -> :sswitch_d1
0x1b -> :sswitch_d1
0x42 -> :sswitch_d1
0x45 -> :sswitch_25e
0x46 -> :sswitch_25e
0x50 -> :sswitch_55
0x52 -> :sswitch_4f
0x55 -> :sswitch_53
0x59 -> :sswitch_53
0x5a -> :sswitch_53
0x9c -> :sswitch_25e
0x9d -> :sswitch_25e
.end sparse-switch
* EXPLANATION:
0x18 is volume up key, 0x19 is volume down key, 0x1a is a power key.
We are telling this switch cases to link to "sswitch_d1" and act the same as shutter key, that is 0x17.
----------
* METHOD:
.method public onKeyUp(ILandroid/view/KeyEvent;)Z
* MODIFIED switch case:
:sswitch_data_242
.sparse-switch
0x4 -> :sswitch_4b
0x17 -> :sswitch_108
0x18 -> :sswitch_108
0x19 -> :sswitch_108
0x1a -> :sswitch_108
0x1b -> :sswitch_108
0x42 -> :sswitch_108
0x50 -> :sswitch_1ef
0x52 -> :sswitch_cf
.end sparse-switch
* EXPLANATION:
0x18 is volume up key, 0x19 is volume down key, 0x1a is a power key.
We are telling this switch cases to link to "sswitch_108" and act the same as shutter key, that is 0x17.

5. Camera Enable "Shutter Sound On/Off" permanently
------------------------------------------------
* FILES:
com\sec\android\app\camera\Camera.smali
com\sec\android\app\camera\CameraEngine$AutoFocusCallback.smali
com\sec\android\app\camera\CameraEngine.smali
com\sec\android\app\camera\CameraSettings.smali
com\sec\android\app\camera\resourcedata\CameraSettingsMenuResourceData.smali
com\sec\android\app\camera\resourcedata\EditableResourceDataBase.smali
* METHODS:
.method public playCameraSound(II)V
.method public onAutoFocus(ILcom/sec/android/seccamera/SecCamera;)V
.method public initialize()V
.method private resetCameraGlobalSettings()V
.method public setDefaultCameraEditableShortcutOrder()V
.method private initCommandIdList(Lcom/sec/android/app/camera/AbstractCameraActivity;)V
.method public resetOrder(Ljava/lang/String;)V
* REMOVED these lines or similar in all files and methods above:
invoke-static {}, Lcom/sec/android/app/CscFeature;->getInstance()Lcom/sec/android/app/CscFeature;

move-result-object v0

const-string v1, "CscFeature_Camera_ShutterSoundMenu"

invoke-virtual {v0, v1}, Lcom/sec/android/app/CscFeature;->getEnableStatus(Ljava/lang/String;)Z

move-result v0

if-eqz v0, :cond_74
* WHERE?:
* EXPLANATION:
Remove "if" condition, that check if "CscFeature_Camera_ShutterSoundMenu" is enabled in "system/csc/others.xml" or "system/csc/features.xml"
That way we permanently enable "Shutter Sound On/Off" feature.

6. Camera "Action shot" shooting mode Volume keys as a shutter
-----------------------------------------------------------
* FILE:
com\sec\android\app\camera\glwidget\TwGLActionMenu.smali
* METHODS:
.method public onKeyDown(ILandroid/view/KeyEvent;)Z
.method public onKeyUp(ILandroid/view/KeyEvent;)Z
* ADDED new line:
goto :cond_c
* WHERE?:
.line 213
goto :cond_c
const/16 v1, 0x18
if-eq p1, v1, :cond_b

const/16 v1, 0x19
if-ne p1, v1, :cond_c
* EXPLANATION:
Jump below "if" conditions that check if volume keys are pressed

7. Camera "Panorama" shooting mode Volume keys as a shutter
--------------------------------------------------------
* FILE:
com\sec\android\app\camera\glwidget\TwGLPanoramaMenu.smali
* METHODS:
.method public onKeyDown(ILandroid/view/KeyEvent;)Z
.method public onKeyUp(ILandroid/view/KeyEvent;)Z
* ADDED new line:
goto :cond_a
* WHERE?:
.line 634
goto :cond_a
const/16 v1, 0x18
if-eq p1, v1, :cond_9

const/16 v1, 0x19
if-ne p1, v1, :cond_a
* EXPLANATION:
Jump below "if" conditions that check if volume keys are pressed

8. Camera "Timer" shooting mode Volume keys as a shutter
-----------------------------------------------------
* FILE:
com\sec\android\app\camera\glwidget\TwGLTimerMenu.smali
* METHODS:
.method public onKeyDown(ILandroid/view/KeyEvent;)Z
.method public onKeyUp(ILandroid/view/KeyEvent;)Z
* ADDED new line:
goto :cond_a
* WHERE?:
.line 114
goto :cond_a
const/16 v1, 0x18
if-eq p1, v1, :cond_9

const/16 v1, 0x19
if-ne p1, v1, :cond_a
* EXPLANATION:
Jump below "if" conditions that check if volume keys are pressed

-----------
Camcorder
-----------

9. Camcorder "Unable to record while in a call" Alert Disabled
-----------------------------------------------------------
* FILE:
com\sec\android\app\camera\Camcorder.smali
* METHOD:
.method protected checkCameraDuringCall()V
* MODIFIED boolean from 0x0 (false) to 0x1 (true):
const/4 v0, 0x1
* WHERE?:
.prologue
.line 4118
const/4 v0, 0x1
* EXPLANATION:
This function will set "mEnableDuringCall" variable always to "true".
That way it is possible now to record video during call (but not if you're recording your call).

10. Camcorder "Can't use flash on low battery" Alert Disabled
---------------------------------------------------------
* FILE:
com\sec\android\app\camera\Camcorder.smali
* METHOD:
.method private handlePluggedLowBattery(Z)V
* ADDED new line:
return-void
* WHERE?:
.line 3955
return-void
const-string v1, "Camcorder"
* EXPLANATION:
We are telling this method to return, exit, as it's just a "void" method

11. Camcorder "Low Battery" Alert Disabled
--------------------------------------
* FILE:
com\sec\android\app\camera\Camcorder.smali
* METHOD:
.method protected handleLowBattery(Z)V
* ADDED new line:
return-void
* WHERE?:
.prologue
.line 2908
return-void
const-string v0, "Camcorder"
* EXPLANATION:
We are telling this method to return, exit, as it's just a "void" method

12. Camcorder Volume and Power keys as a shutter
--------------------------------------------
* FILE:
com\sec\android\app\camera\Camcorder.smali
* METHOD:
.method public onKeyDown(ILandroid/view/KeyEvent;)Z
* MODIFIED switch case:
:sswitch_data_ec
.sparse-switch
0x4 -> :sswitch_3d
0x18 -> :sswitch_3d
0x19 -> :sswitch_3d
0x1a -> :sswitch_3d
0x45 -> :sswitch_41
0x46 -> :sswitch_41
0x4f -> :sswitch_3f
0x50 -> :sswitch_cb
0x52 -> :sswitch_3b
0x55 -> :sswitch_3f
0x7e -> :sswitch_3f
0x7f -> :sswitch_3f
0x9c -> :sswitch_41
0x9d -> :sswitch_41
.end sparse-switch
* EXPLANATION:
0x18 is volume up key, 0x19 is volume down key.
We are telling this switch cases to link to "sswitch_3d" and do nothing when pressed.
----------
* METHOD:
.method public onKeyUp(ILandroid/view/KeyEvent;)Z
* ADDED new lines:
const/16 v2, 0x19
if-eq p1, v2, :cond_122
* WHERE?:
.line 1679
:cond_10e

const/16 v2, 0x19
if-eq p1, v2, :cond_122

invoke-virtual {p0}, Lcom/sec/android/app/camera/Camcorder;->processBack()V
* EXPLANATION:
This will add new "if" condition for 0x19 (volume down) key.
Becasue I've linked 0x19 (volume down) key to "sswitch_db" switch case, that uses by 0x4 (back button) key,
this will skip from Camera to exit when volume down is pressed and will just stop recording.
----------
* MODIFIED and ADDED switch case:
:sswitch_data_14e
.sparse-switch
0x4 -> :sswitch_db
0x17 -> :sswitch_60
0x18 -> :sswitch_60
0x19 -> :sswitch_db
0x1a -> :sswitch_60
0x1b -> :sswitch_60
0x42 -> :sswitch_60
0x50 -> :sswitch_117
0x52 -> :sswitch_45
.end sparse-switch
* EXPLANATION:
0x18 is volume up key and it's linked to "sswitch_60" the same as shutter key 0x17.
0x19 is volume down key and it's linked to "sswitch_db" the same as back button 0x4 (see above info).
added 0x1a (power key) switch case to be linked to "sswitch_60" the same as shutter key 0x17.

13. Camcorder Better audio quality/video bitrate
--------------------------------------------
FILE:
com\sec\android\app\camera\MediaRecorderProfile.smali
INFO FROM:
http://xdaforums.com/showthread.php?t=1832472
VIDEO QUALITY:
1080p: Normal - 17MBit / Fine - 24MBit / Superfine - 30MBit
720p : Normal - 9MBit / Fine - 13MBit / Superfine - 17MBit
SOUND QUALITY:
192kbit/s
48000 Khz
MODIFIED Arrays:
:array_11c
.array-data 0x4
0x2t 0x0t 0x0t 0x0t
0x80t 0xc3t 0xc9t 0x1t
0x0t 0x36t 0x6et 0x1t
0x40t 0x66t 0x3t 0x1t
0x1et 0x0t 0x0t 0x0t
0x2t 0x0t 0x0t 0x0t
0x3t 0x0t 0x0t 0x0t
0x0t 0xeet 0x2t 0x0t
0x2t 0x0t 0x0t 0x0t
0x80t 0xbbt 0x0t 0x0t
.end array-data

:array_134
.array-data 0x4
0x2t 0x0t 0x0t 0x0t
0x40t 0x66t 0x3t 0x1t
0x40t 0x5dt 0xc6t 0x0t
0x40t 0x54t 0x89t 0x0t
0x1et 0x0t 0x0t 0x0t
0x2t 0x0t 0x0t 0x0t
0x3t 0x0t 0x0t 0x0t
0x0t 0xeet 0x2t 0x0t
0x2t 0x0t 0x0t 0x0t
0x80t 0xbbt 0x0t 0x0t
.end array-data

:array_14c
.array-data 0x4
0x2t 0x0t 0x0t 0x0t
0xa8t 0xa0t 0x34t 0x0t
0x50t 0x3et 0x2bt 0x0t
0x90t 0x10t 0x23t 0x0t
0x1et 0x0t 0x0t 0x0t
0x2t 0x0t 0x0t 0x0t
0x3t 0x0t 0x0t 0x0t
0x0t 0xeet 0x2t 0x0t
0x2t 0x0t 0x0t 0x0t
0x80t 0xbbt 0x0t 0x0t
.end array-data

:array_164
.array-data 0x4
0x2t 0x0t 0x0t 0x0t
0x70t 0xf7t 0x2et 0x0t
0xa8t 0xf4t 0x26t 0x0t
0xb8t 0xcet 0x1et 0x0t
0x1et 0x0t 0x0t 0x0t
0x2t 0x0t 0x0t 0x0t
0x3t 0x0t 0x0t 0x0t
0x0t 0xeet 0x2t 0x0t
0x2t 0x0t 0x0t 0x0t
0x80t 0xbbt 0x0t 0x0t
.end array-data

Credits:

zxz0O0 - Camcorder Better audio quality/video bitrate

HyperX - Additional library files from Galaxy Note 2

megapinky - Additional files from Galaxy Note 2 for "Best Face"

xavierjohn22 - AutoAPKTool2.0.4a

Tungstwenty - Backup/Restore CWM script

*** Don't forget to give me Credit and link to this XDA thread if you're using my modifications or SamsungCamera.apk in your ROM ***

This mod found working fine on ROMs based XXELKC/4/DLJ5/4/IJ2/B/8/7/5/H8

Galaxy Note 2 Camera mod tested on ROMs based XXELKC/4/DLJ5/4 and found working fine

* You're using this mod on your own risk. I'm not responsible for any damage of use or misuse of this fixed application SamsungCamera.apk

Liked it? Please make a donation :)

* Don't want to donate? Then at least hit Thanks button!

Thank you!

Have fun! ;)