[Galaxy Note II Themes and Apps] jobnik:
Hi,

This is my first MOD ;)

Latest update 13/12/2012

Based on Latest Official Note 2 JB 4.1.2 DLK7 firmware.

Some new options in HDR

Notes

:

Please test it and let me know if it works well and in which ROMs, I have nowhere to test it myself ;)

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

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

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

Galaxy S3 mod: http://xdaforums.com/showthread.php?t=1883192

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

What's inside?:

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):
---------------------------------
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\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 doTakePictureAsync()V
.method public getShutterSoundEnable()Z
.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 v2

const-string v3, "CscFeature_Camera_EnableCameraDuringCall"

invoke-virtual {p0}, Lcom/sec/android/app/camera/AbstractCameraActivity;->enableDuringCallDefaultValue()Z

move-result v4

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

move-result v2

if-eqz v2, :cond_3d
* 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 1968
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 5872
return-void
const-string v1, "Camera"
* EXPLANATION:
We are telling this method to return, exit, as it's just a "void" method

4. Camera Add Power button as a shutter to built in Volume keys
------------------------------------------------------------
* FILE:
com\sec\android\app\camera\Camera.smali
* METHOD:
.method public onKeyDown(ILandroid/view/KeyEvent;)Z
* ADDED new lines:
if-eq p1, v5, :cond_17
const/16 v5, 0x1a
* WHERE?:
.line 1708
.local v2, fakeKeyCode:I
const/16 v5, 0x18
if-eq p1, v5, :cond_17

const/16 v5, 0x19
if-eq p1, v5, :cond_17

const/16 v5, 0x1a
if-ne p1, v5, :cond_56
* EXPLANATION:
This will add new "if" condition for power key along with volume keys, i.e:
if ((paramInt == 24) || (paramInt == 25) || (paramInt == 26))
0x18 is volume key Up, 0x19 is volume key Down, 0x1a is power key
----------
* ADDED new lines:
const/16 v5, 0x1a
if-eq p1, v5, :cond_332
* WHERE?:
.line 1974
:cond_2f1

const/16 v5, 0x1a
if-ne p1, v5, :cond_332

invoke-virtual {p0}, Lcom/sec/android/app/camera/Camera;->isZoomAvailable()Z
* EXPLANATION:
This will add new "if" condition to check if power key was pressed.
That way we'll prevent from Zoom Slider to appear, by skipping it, because we are "riding" on Volume key conditions :)
----------
* MODIFIED switch case:
:sswitch_data_33c
.sparse-switch
0x4 -> :sswitch_a6
0x17 -> :sswitch_128
0x18 -> :sswitch_2d4
0x19 -> :sswitch_2d4
0x1a -> :sswitch_2d4
0x1b -> :sswitch_128
0x42 -> :sswitch_128
0x45 -> :sswitch_2d4
0x46 -> :sswitch_2d4
0x50 -> :sswitch_aa
0x52 -> :sswitch_a4
0x55 -> :sswitch_a8
0x59 -> :sswitch_a8
0x5a -> :sswitch_a8
0x9c -> :sswitch_2d4
0x9d -> :sswitch_2d4
.end sparse-switch
* EXPLANATION:
0x1a is a power key.
We are telling this switch case to link to "sswitch_2d4" and act the same as volume keys (but not the same ;))
----------
* METHOD:
.method public onKeyUp(ILandroid/view/KeyEvent;)Z
* ADDED new lines:
if-eq p1, v3, :cond_13
const/16 v3, 0x1a
* WHERE?:
.line 2011
.local v2, volumeKey:Z
const/16 v3, 0x18
if-eq p1, v3, :cond_13

const/16 v3, 0x19
if-eq p1, v3, :cond_13

const/16 v3, 0x1a
if-ne p1, v3, :cond_3d
* EXPLANATION:
This will add new "if" condition for power key along with volume keys, i.e:
if ((paramInt == 24) || (paramInt == 25) || (paramInt == 26))
0x18 is volume key Up, 0x19 is volume key Down, 0x1a is power key

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_9a
* 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.

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

6. 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 4434
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).

7. 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 4271
return-void
const-string v1, "Camcorder"
* EXPLANATION:
We are telling this method to return, exit, as it's just a "void" method

8. 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 3214
return-void
const-string v0, "Camcorder"
* EXPLANATION:
We are telling this method to return, exit, as it's just a "void" method

9. Camcorder Add Power button as a shutter to built in Volume keys
---------------------------------------------------------------
* FILE:
com\sec\android\app\camera\Camcorder.smali
* METHOD:
.method public onKeyDown(ILandroid/view/KeyEvent;)Z
* ADDED new lines:
if-eq p1, v4, :cond_14
const/16 v4, 0x1a
* WHERE?:
.line 1462
.local v2, fakeKeyCode:I
const/16 v4, 0x18
if-eq p1, v4, :cond_14

const/16 v4, 0x19
if-eq p1, v4, :cond_14

const/16 v4, 0x1a
if-ne p1, v4, :cond_4c
* EXPLANATION:
This will add new if condition for power key along with volume keys, i.e:
if ((paramInt == 24) || (paramInt == 25) || (paramInt == 26))
0x18 is volume key Up, 0x19 is volume key Down, 0x1a is power key
----------
* ADDED new lines:
const/16 v4, 0x1a
if-eq p1, v4, :cond_10a
* WHERE?:
.line 1541
:cond_b2

const/16 v4, 0x1a
if-eq p1, v4, :cond_10a

invoke-virtual {p0, v5}, Lcom/sec/android/app/camera/Camcorder;->isZoomAvailable(Z)Z
* EXPLANATION:
This will add new "if" condition to check if power key was pressed.
That way we'll prevent from Zoom Slider to appear, by skipping it, because we are "riding" on Volume key conditions :)
----------
* MODIFIED switch case:
:sswitch_data_144
.sparse-switch
0x4 -> :sswitch_8d
0x18 -> :sswitch_91
0x19 -> :sswitch_91
0x1a -> :sswitch_91
0x45 -> :sswitch_91
0x46 -> :sswitch_91
0x4f -> :sswitch_8f
0x50 -> :sswitch_11c
0x52 -> :sswitch_8b
0x55 -> :sswitch_8f
0x7e -> :sswitch_8f
0x7f -> :sswitch_8f
0x9c -> :sswitch_91
0x9d -> :sswitch_91
.end sparse-switch
* EXPLANATION:
0x1a is a power key.
We are telling this switch case to link to "sswitch_91" and act the same as volume keys (but not the same ;))
----------
* METHOD:
.method public onKeyUp(ILandroid/view/KeyEvent;)Z
* ADDED new lines:
if-eq p1, v4, :cond_13
const/16 v4, 0x1a
* WHERE?:
.line 1642
.local v3, volumeKey:Z
const/16 v4, 0x18
if-eq p1, v4, :cond_13

const/16 v4, 0x19
if-eq p1, v4, :cond_13

const/16 v4, 0x1a
if-ne p1, v4, :cond_3d
* EXPLANATION:
This will add new "if" condition for power key along with volume keys, i.e:
if ((paramInt == 24) || (paramInt == 25) || (paramInt == 26))
0x18 is volume key Up, 0x19 is volume key Down, 0x1a is power key
----------
* ADDED to switch case:
:sswitch_data_1aa
.sparse-switch
0x4 -> :sswitch_120
0x17 -> :sswitch_a6
0x18 -> :sswitch_169
0x19 -> :sswitch_169
0x1a -> :sswitch_169
0x1b -> :sswitch_a6
0x42 -> :sswitch_a6
0x50 -> :sswitch_16c
0x52 -> :sswitch_8b
.end sparse-switch
* EXPLANATION:
0x1a is a power key.
We are telling this switch case to link to "sswitch_169" and act the same as volume keys (but not the same ;))

10. 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:
.line 66
:array_12e
.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_146
.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_15e
.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_176
.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

:array_18e
.array-data 0x4
0x2t 0x0t 0x0t 0x0t
0x18t 0xb4t 0xbt 0x0t
0xe8t 0xc7t 0x9t 0x0t
0x70t 0xe7t 0x7t 0x0t
0x1et 0x0t 0x0t 0x0t
0x2t 0x0t 0x0t 0x0t
0x3t 0x0t 0x0t 0x0t
0x0t 0xf4t 0x1t 0x0t
0x2t 0x0t 0x0t 0x0t
0x80t 0xbbt 0x0t 0x0t
.end array-data

:array_1a6
.array-data 0x4
0x2t 0x0t 0x0t 0x0t
0x0t 0xdct 0x5t 0x0t
0x0t 0xe2t 0x4t 0x0t
0x0t 0xe8t 0x3t 0x0t
0x1et 0x0t 0x0t 0x0t
0x2t 0x0t 0x0t 0x0t
0x3t 0x0t 0x0t 0x0t
0x0t 0xf4t 0x1t 0x0t
0x2t 0x0t 0x0t 0x0t
0x80t 0xbbt 0x0t 0x0t
.end array-data

:array_1be
.array-data 0x4
0x1t 0x0t 0x0t 0x0t
0x64t 0x77t 0x1t 0x0t
0x64t 0x77t 0x1t 0x0t
0x64t 0x77t 0x1t 0x0t
0xft 0x0t 0x0t 0x0t
0x1t 0x0t 0x0t 0x0t
0x1t 0x0t 0x0t 0x0t
0xa8t 0x2ft 0x0t 0x0t
0x1t 0x0t 0x0t 0x0t
0x40t 0x1ft 0x0t 0x0t
.end array-data

Credits:

zxz0O0 - Camcorder Better audio quality/video bitrate

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 ***

* 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! ;)