[MOD][Camera][JB v8 / ICS v6][27/02] Power and Volume buttons as a shutter and more..

Search This thread

jobnik

Senior Member
Mar 4, 2010
127
528
Tel-Aviv
www.jobnik.net
Hi,

This is my first MOD ;)

Latest update 27/02/2013

  • Based on Latest Official Note JB 4.1.2 XXLSZ firmware.
  • Volume and Power keys as a shutter (no burst shot with power key).
  • 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 using Camera according to menu selection.
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 JB/ICS ROMs ;)
  • To make it run on ODEXED JB ROMs, backup and remove the SamsungCamera.odex file from system/app (the script should do it automatically).
  • To make it run on ODEXED ICS ROMs, backup and remove the Camera.odex file from system/app (the script should do it automatically).
  • DO NOT install JB mod on ICS ROM and vice-versa! it simply won't work ;)
JB SamsungCamera app
Download CWM recovery file and install:
http://www.jobnik.net/files/apk/note/jobnik_Camera_Note_JB_MOD_v8_cwm.zip

Or

Download SamsungCamera.apk and push it to system/app, then change permissions to 644
http://www.jobnik.net/files/apk/note/SamsungCamera.apk

Having problems recording in 1080p format? Use this one, that uses the default MediaRecorderProfile.smali
http://www.jobnik.net/files/apk/note/jobnik_Camera_Note_JB_MOD_v8_default_media_cwm.zip

For those who want to restore to original version, that comes with ROM:
http://www.jobnik.net/files/apk/note/restore_Camera_Note_JB_cwm.zip
ICS Camera app
Download CWM recovery file and install:
http://www.jobnik.net/files/apk/note/jobnik_Camera_Note_ICS_MOD_v6_cwm.zip

Or

Download Camera.apk and push it to system/app, then change permissions to 644
http://www.jobnik.net/files/apk/note/Camera.apk

Having problems recording in 1080p format? Use this one, that uses the default MediaRecorderProfile.smali
http://www.jobnik.net/files/apk/note/jobnik_Camera_Note_ICS_MOD_v6_default_media_cwm.zip

For those who want to restore to original version, that comes with ROM:
http://www.jobnik.net/files/apk/note/restore_Camera_Note_cwm.zip
I've also modified Camera app for Galaxy S2, Galaxy S3 and Galaxy Note 2:
Galaxy S2 mod: http://xdaforums.com/showthread.php?t=1841988
Galaxy S3 mod: http://xdaforums.com/showthread.php?t=1883192
Galaxy Note 2 mod: http://xdaforums.com/showthread.php?t=1965801

What's inside?:
  1. "Unable to start camera while in a call" Alert Disabled
  2. Camera "Low Battery" Alert Disabled
  3. Camera Volume Up/Down as a shutter
  4. Camera "Can't use flash on low battery" Alert Disabled
  5. Camera focus sound Disabled
  6. Camcorder "Can't use flash on low battery" Alert Disabled
  7. Camcorder "Low Battery" Alert Disabled
  8. 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
  9. Camera Power button as a shutter (The Power menu will popup as well, but it will take a picture, just wait until it vibrates.)
  10. Camera Self-shot Volume buttons as a shutter
  11. Camera "Action shot" shooting mode Volume buttons as a shutter
  12. Camera "Panorama" shooting mode Volume buttons as a shutter
  13. Camera Enabled "Shutter Sound On/Off" item in Menu

Changes I've made in smali files are:
Code:
Camera MOD v6 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\MediaRecorderProfile.smali
    com\sec\android\app\camera\SelfShotView.smali
    com\sec\android\app\camera\glwidget\TwGLActionMenu.smali
    com\sec\android\app\camera\glwidget\TwGLPanoramaMenu.smali
    com\sec\android\app\camera\resourcedata\CameraSettingsMenuResourceData.smali

  
1. "Unable to start camera while in a call" Alert Disabled
    * FILE:
        com\sec\android\app\camera\AbstractCameraActivity.smali
    * METHOD:
        .method public checkCameraStartCondition_Call()Z
    * ADDED new line:
        goto :goto_1b
    * WHERE?:
        const/4 v2, 0x0

        goto :goto_1b

        .line 1228
        iput-boolean v2, p0, Lcom/sec/android/app/camera/AbstractCameraActivity;->mCheckCalling:Z
    * EXPLANATION:
        We are telling this method to return "false" where it jumps to :goto_1b
        There you will see:
            :goto_1b
            return v2
        As "v2" variable already set to "false" i.e: const/4 v2, 0x0

2. Camera "Low Battery" Alert Disabled
    * FILE:
        com\sec\android\app\camera\AbstractCameraActivity.smali
    * METHOD:
        .method protected handleLowBattery()V
    * ADDED new line:
        return-void
    * WHERE?:
        .prologue
        .line 1569
        return-void
        const-string v1, "AbstractCameraActivity"
    * EXPLANATION:
        We are telling this method to return, exit, as it's just a "void" method
    ----------
    * FILE:
        com\sec\android\app\camera\Camera.smali
    * METHOD:
        .method private handleBatteryChanged(Landroid/content/Intent;)V
    * REMOVED these lines:
        invoke-virtual {p0}, Lcom/sec/android/app/camera/Camera;->handleLowBattery()V
        invoke-direct {p0, v6}, Lcom/sec/android/app/camera/Camera;->handlePluggedLowBattery(Z)V
    * WHERE?:
        Just search and remove :)
    * EXPLANATION:
        To be sure not to call these methods.

3. Camera Volume Up/Down as a shutter
    * FILE:
        com\sec\android\app\camera\Camera.smali
    * METHOD:
        .method public onKeyDown(ILandroid/view/KeyEvent;)Z
    * MODIFIED switch case:
        .line 1487
        :sswitch_data_204
        .sparse-switch
            0x4 -> :sswitch_38
            0x17 -> :sswitch_90
            0x18 -> :sswitch_90
            0x19 -> :sswitch_90
            0x1a -> :sswitch_38
            0x1b -> :sswitch_90
            0x42 -> :sswitch_90
            0x50 -> :sswitch_3a
            0x52 -> :sswitch_36
            0x55 -> :sswitch_38
            0x59 -> :sswitch_38
            0x5a -> :sswitch_38
        .end sparse-switch
    * EXPLANATION:
        0x18 is volume up, 0x19 is volume down
        We are telling these switch cases to link to sswitch_90 and act the same as touch shutter button.
    ----------
    * METHOD:
        .method public onKeyUp(ILandroid/view/KeyEvent;)Z
    * MODIFIED switch case:
        .line 1690
        nop

        :sswitch_data_184
        .sparse-switch
            0x4 -> :sswitch_3d
            0x17 -> :sswitch_cd
            0x18 -> :sswitch_cd
            0x19 -> :sswitch_cd
            0x1a -> :sswitch_3d
            0x1b -> :sswitch_cd
            0x42 -> :sswitch_cd
            0x50 -> :sswitch_146
            0x52 -> :sswitch_96
        .end sparse-switch
    * EXPLANATION:
        0x18 is volume up, 0x19 is volume down
        We are telling these switch cases to link to sswitch_90 and act the same as touch shutter button.

4. 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?:
        .prologue
        const/4 v3, 0x0

        .line 4629
        return-void
        const-string v1, "Camera"
    * EXPLANATION:
        We are telling this method to return, exit, as it's just a "void" method
     
5. Camera focus sound Disabled
    * FILE:
        com\sec\android\app\camera\Camera.smali
    * METHOD:
        .method public playCameraSound(II)V
    * ADDED new line:
        return-void
    * WHERE?:
        .prologue
        .line 3405
        return-void
        iget-object v0, p0, Lcom/sec/android/app/camera/Camera;->mSoundPool:Landroid/media/SoundPool;
    * EXPLANATION:
        We are telling this method to return, exit, as it's just a "void" method

6. 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?:
        .prologue
        const/4 v4, 0x1
        const/4 v3, 0x0

        .line 2897
        return-void
        const-string v1, "Camcorder"
    * EXPLANATION:
        We are telling this method to return, exit, as it's just a "void" method

7. Camcorder "Low Battery" Alert Disabled
    * FILE:
        com\sec\android\app\camera\Camcorder.smali
    * METHOD:
        .method protected handleLowBattery()V
    * ADDED new line:
        return-void
    * WHERE?:
        .prologue
        .line 2166
        return-void
        const-string v0, "Camcorder"
    * EXPLANATION:
        We are telling this method to return, exit, as it's just a "void" method
    ----------
    * FILE:
        com\sec\android\app\camera\Camcorder.smali
    * METHOD:
        .method private handleBatteryChanged(Landroid/content/Intent;)V
    * REMOVED these lines:
        invoke-virtual {p0}, Lcom/sec/android/app/camera/Camcorder;->handleLowBattery()V
        invoke-direct {p0, v7}, Lcom/sec/android/app/camera/Camcorder;->handlePluggedLowBattery(Z)V
    * WHERE?:
        Just search and remove :)
    * EXPLANATION:
        To be sure not to call these methods.

8. 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_c4
        .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_dc
        .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_f4
        .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_10c
        .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

9. Camera Power button as a shutter
    * FILE:
        com\sec\android\app\camera\Camera.smali
    * METHOD:
        .method public onKeyUp(ILandroid/view/KeyEvent;)Z
    * ADDED new line:
        goto :cond_d2
    * WHERE?:
        .line 1727
        :sswitch_cd
        goto :cond_d2
        if-eqz p2, :cond_d2
    * EXPLANATION:
        We are telling this switch case "_cd" to jump to "if" condition and start taking a picture.
    ----------
    * MODIFIED switch case:
        .line 1690
        nop

        :sswitch_data_184
        .sparse-switch
            0x4 -> :sswitch_3d
            0x17 -> :sswitch_cd
            0x18 -> :sswitch_cd
            0x19 -> :sswitch_cd
            0x1a -> :sswitch_cd
            0x1b -> :sswitch_cd
            0x42 -> :sswitch_cd
            0x50 -> :sswitch_146
            0x52 -> :sswitch_96
        .end sparse-switch
    * EXPLANATION:
        0x1a is a power button.
        We are telling this switch cases to link to sswitch_cd and act the same as touch shutter button.

10. Camera "Self-shot" Volume Up/Down as a shutter
    * FILE:
        com\sec\android\app\camera\SelfShotView.smali
    * METHOD:
        .method public onKeyDown(ILandroid/view/KeyEvent;)Z
    * REMOVED these lines:
        const/16 v0, 0x18
        if-eq p1, v0, :cond_c

        const/16 v0, 0x19
        if-eq p1, v0, :cond_c
    * WHERE?:
        .prologue
        .line 43
        const/16 v0, 0x18
        if-eq p1, v0, :cond_c

        const/16 v0, 0x19
        if-eq p1, v0, :cond_c

        const/16 v0, 0x50
        if-ne p1, v0, :cond_e
    * EXPLANATION:
        These are "if" conditions to check if volume keys up/down are pressed
    ----------
    * FILE:
        com\sec\android\app\camera\SelfShotView.smali
    * METHOD:
        .method public onKeyUp(ILandroid/view/KeyEvent;)Z
    * REMOVED these lines:
        const/16 v0, 0x18
        if-eq p1, v0, :cond_c

        const/16 v0, 0x19
        if-eq p1, v0, :cond_c
    * WHERE?:
        .prologue
        .line 53
        const/16 v0, 0x18
        if-eq p1, v0, :cond_c

        const/16 v0, 0x19
        if-eq p1, v0, :cond_c

        const/16 v0, 0x50
        if-ne p1, v0, :cond_e
    * EXPLANATION:
        These are "if" conditions to check if volume keys up/down are pressed

11. Camera "Action shot" shooting mode Volume Up/Down as a shutter
    * FILE:
        com\sec\android\app\camera\glwidget\TwGLActionMenu.smali
    * METHOD:
        .method public onKeyDown(ILandroid/view/KeyEvent;)Z
    * ADDED new line:
        goto :cond_c
    * WHERE?:
        .prologue
        const/16 v2, 0x1b
        const/4 v0, 0x1

        .line 271
        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 up/down are pressed
    ----------
    * FILE:
        com\sec\android\app\camera\glwidget\TwGLActionMenu.smali
    * METHOD:
        .method public onKeyUp(ILandroid/view/KeyEvent;)Z
    * ADDED new line:
        goto :cond_c
    * WHERE?:
        .prologue
        const/16 v2, 0x1b
        const/4 v0, 0x1

        .line 293
        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 up/down are pressed

12. Camera "Panorama" shooting mode Volume Up/Down as a shutter
    * FILE:
        com\sec\android\app\camera\glwidget\TwGLPanoramaMenu.smali
    * METHOD:
        .method public onKeyDown(ILandroid/view/KeyEvent;)Z
    * ADDED new line:
        goto :cond_c
    * WHERE?:
        .prologue
        const/16 v2, 0x1b
        const/4 v0, 0x1

        .line 337
        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 up/down are pressed
    ----------
    * FILE:
        com\sec\android\app\camera\glwidget\TwGLPanoramaMenu.smali
    * METHOD:
        .method public onKeyUp(ILandroid/view/KeyEvent;)Z
    * ADDED new line:
        goto :cond_c
    * WHERE?:
        .prologue
        const/16 v2, 0x1b
        const/4 v0, 0x1

        .line 361
        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 up/down are pressed

13. Camera Enabled "Shutter Sound On/Off" item in Menu
    JB
    --
    * FILE:
        com\sec\android\app\camera\resourcedata\CameraSettingsMenuResourceData.smali
    * METHOD:
        .method private initCommandIdList(Lcom/sec/android/app/camera/AbstractCameraActivity;)V
    * REMOVED these lines:
        invoke-static {}, Lcom/sec/android/app/CscFeature;->getInstance()Lcom/sec/android/app/CscFeature;

        move-result-object v2

        const-string v3, "CscFeature_Camera_ShutterSoundMenu"

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

        move-result v2

        if-eqz v2, :cond_f8
    * WHERE?:
        .line 80
        iget-object v2, p0, Lcom/sec/android/app/camera/resourcedata/CameraSettingsMenuResourceData;->mCommandIdList:Ljava/util/ArrayList;

        const/16 v3, 0x14

        invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

        move-result-object v3

        invoke-virtual {v2, v3}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

        .line 82
        :cond_e1
    * EXPLANATION:
        Remove "if" condition, below ":cond_e1", 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" menu item in menu array.

    ICS
    ---
    * FILE:
        com\sec\android\app\camera\resourcedata\CameraSettingsMenuResourceData.smali
    * METHOD:
        .method private initCommandIdList(Lcom/sec/android/app/camera/AbstractCameraActivity;)V
    * ADDED these lines:
        iget-object v0, p0, Lcom/sec/android/app/camera/resourcedata/CameraSettingsMenuResourceData;->mCommandIdList:Ljava/util/ArrayList;

        const/16 v1, 0x15

        invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

        move-result-object v1

        invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
    * WHERE?:
        .line 67
        iget-object v0, p0, Lcom/sec/android/app/camera/resourcedata/CameraSettingsMenuResourceData;->mCommandIdList:Ljava/util/ArrayList;

        const/16 v1, 0x14

        invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

        move-result-object v1

        invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
    * EXPLANATION:
        0x15 item is a "Shutter sound On/Off" and it's missing in ICS app.
        That way we permanently enable "Shutter Sound On/Off" menu item in menu array.

Credits:
nguyenxuanhoa - Camera Volume Up/Down as a shutter
GizmoDroid - "Unable to start camera while in a call" Alert Disabled
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 Camera.apk in your ROM ***

This mod found working fine on ROMs based for JB: LSZ/A , for ICS:LRT/Q/G/K/5:

LRK KingDroid ICS NoteMania v7.3/4
LRK RocketROM v10 ICS 4.0.4

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

Liked it? Please make a donation :)



* Don't want to donate? Then at least hit Thanks button! (from hundred of downloads, only a few dozens say thanks).

Thank you!

Have fun! ;)
 
Last edited:

shivg86

Senior Member
Jul 21, 2012
498
90
delhi
Cant we just push the files in the root system if we dont want to flash thru cwm????tell me the procedure

Sent from my GT-N7000 using xda app-developers app
 

shivg86

Senior Member
Jul 21, 2012
498
90
delhi
Thanks...mm on stock 4.0.4 and wd speedmpd kernel......so cn i go in recovery mode nd flash it.????

Sent from my GT-N7000 using xda app-developers app
 

bigfau

Inactive Recognized Developer
Volume button is working for capture but not power button can you fix it:confused::confused:

The Power button work for capture. You just have to hold it longer. Your power menu will pop up but it will still take the picture. #9

What's inside?:
1. "Unable to start camera while in a call" Alert Disabled
2. Camera "Low Battery" Alert Disabled
3. Camera Volume Up/Down as a shutter
4. Camera "Can't use flash on low battery" Alert Disabled
5. Camera focus sound Disabled
6. Camcorder "Can't use flash on low battery" Alert Disabled
7. Camcorder "Low Battery" Alert Disabled
8. Camcorder Better audio quality/video bitrate
9. Camera Power button as a shutter (The Power menu will popup as well, but it will take a picture, just wait until it vibrates.)
10. Camera Self-shot Volume buttons as a shutter
11. Camera "Action shot" shooting mode Volume buttons as a shutter
12. Camera "Panorama" shooting mode Volume buttons as a shutter
13. Camera icon taken from VK 5.1.2



Sent from my SAMSUNG-SGH-I717 using Tapatalk 2
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 105
    Hi,

    This is my first MOD ;)

    Latest update 27/02/2013

    • Based on Latest Official Note JB 4.1.2 XXLSZ firmware.
    • Volume and Power keys as a shutter (no burst shot with power key).
    • 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 using Camera according to menu selection.
    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 JB/ICS ROMs ;)
    • To make it run on ODEXED JB ROMs, backup and remove the SamsungCamera.odex file from system/app (the script should do it automatically).
    • To make it run on ODEXED ICS ROMs, backup and remove the Camera.odex file from system/app (the script should do it automatically).
    • DO NOT install JB mod on ICS ROM and vice-versa! it simply won't work ;)
    JB SamsungCamera app
    Download CWM recovery file and install:
    http://www.jobnik.net/files/apk/note/jobnik_Camera_Note_JB_MOD_v8_cwm.zip

    Or

    Download SamsungCamera.apk and push it to system/app, then change permissions to 644
    http://www.jobnik.net/files/apk/note/SamsungCamera.apk

    Having problems recording in 1080p format? Use this one, that uses the default MediaRecorderProfile.smali
    http://www.jobnik.net/files/apk/note/jobnik_Camera_Note_JB_MOD_v8_default_media_cwm.zip

    For those who want to restore to original version, that comes with ROM:
    http://www.jobnik.net/files/apk/note/restore_Camera_Note_JB_cwm.zip
    ICS Camera app
    Download CWM recovery file and install:
    http://www.jobnik.net/files/apk/note/jobnik_Camera_Note_ICS_MOD_v6_cwm.zip

    Or

    Download Camera.apk and push it to system/app, then change permissions to 644
    http://www.jobnik.net/files/apk/note/Camera.apk

    Having problems recording in 1080p format? Use this one, that uses the default MediaRecorderProfile.smali
    http://www.jobnik.net/files/apk/note/jobnik_Camera_Note_ICS_MOD_v6_default_media_cwm.zip

    For those who want to restore to original version, that comes with ROM:
    http://www.jobnik.net/files/apk/note/restore_Camera_Note_cwm.zip
    I've also modified Camera app for Galaxy S2, Galaxy S3 and Galaxy Note 2:
    Galaxy S2 mod: http://xdaforums.com/showthread.php?t=1841988
    Galaxy S3 mod: http://xdaforums.com/showthread.php?t=1883192
    Galaxy Note 2 mod: http://xdaforums.com/showthread.php?t=1965801

    What's inside?:
    1. "Unable to start camera while in a call" Alert Disabled
    2. Camera "Low Battery" Alert Disabled
    3. Camera Volume Up/Down as a shutter
    4. Camera "Can't use flash on low battery" Alert Disabled
    5. Camera focus sound Disabled
    6. Camcorder "Can't use flash on low battery" Alert Disabled
    7. Camcorder "Low Battery" Alert Disabled
    8. 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
    9. Camera Power button as a shutter (The Power menu will popup as well, but it will take a picture, just wait until it vibrates.)
    10. Camera Self-shot Volume buttons as a shutter
    11. Camera "Action shot" shooting mode Volume buttons as a shutter
    12. Camera "Panorama" shooting mode Volume buttons as a shutter
    13. Camera Enabled "Shutter Sound On/Off" item in Menu

    Changes I've made in smali files are:
    Code:
    Camera MOD v6 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\MediaRecorderProfile.smali
        com\sec\android\app\camera\SelfShotView.smali
        com\sec\android\app\camera\glwidget\TwGLActionMenu.smali
        com\sec\android\app\camera\glwidget\TwGLPanoramaMenu.smali
        com\sec\android\app\camera\resourcedata\CameraSettingsMenuResourceData.smali
    
      
    1. "Unable to start camera while in a call" Alert Disabled
        * FILE:
            com\sec\android\app\camera\AbstractCameraActivity.smali
        * METHOD:
            .method public checkCameraStartCondition_Call()Z
        * ADDED new line:
            goto :goto_1b
        * WHERE?:
            const/4 v2, 0x0
    
            goto :goto_1b
    
            .line 1228
            iput-boolean v2, p0, Lcom/sec/android/app/camera/AbstractCameraActivity;->mCheckCalling:Z
        * EXPLANATION:
            We are telling this method to return "false" where it jumps to :goto_1b
            There you will see:
                :goto_1b
                return v2
            As "v2" variable already set to "false" i.e: const/4 v2, 0x0
    
    2. Camera "Low Battery" Alert Disabled
        * FILE:
            com\sec\android\app\camera\AbstractCameraActivity.smali
        * METHOD:
            .method protected handleLowBattery()V
        * ADDED new line:
            return-void
        * WHERE?:
            .prologue
            .line 1569
            return-void
            const-string v1, "AbstractCameraActivity"
        * EXPLANATION:
            We are telling this method to return, exit, as it's just a "void" method
        ----------
        * FILE:
            com\sec\android\app\camera\Camera.smali
        * METHOD:
            .method private handleBatteryChanged(Landroid/content/Intent;)V
        * REMOVED these lines:
            invoke-virtual {p0}, Lcom/sec/android/app/camera/Camera;->handleLowBattery()V
            invoke-direct {p0, v6}, Lcom/sec/android/app/camera/Camera;->handlePluggedLowBattery(Z)V
        * WHERE?:
            Just search and remove :)
        * EXPLANATION:
            To be sure not to call these methods.
    
    3. Camera Volume Up/Down as a shutter
        * FILE:
            com\sec\android\app\camera\Camera.smali
        * METHOD:
            .method public onKeyDown(ILandroid/view/KeyEvent;)Z
        * MODIFIED switch case:
            .line 1487
            :sswitch_data_204
            .sparse-switch
                0x4 -> :sswitch_38
                0x17 -> :sswitch_90
                0x18 -> :sswitch_90
                0x19 -> :sswitch_90
                0x1a -> :sswitch_38
                0x1b -> :sswitch_90
                0x42 -> :sswitch_90
                0x50 -> :sswitch_3a
                0x52 -> :sswitch_36
                0x55 -> :sswitch_38
                0x59 -> :sswitch_38
                0x5a -> :sswitch_38
            .end sparse-switch
        * EXPLANATION:
            0x18 is volume up, 0x19 is volume down
            We are telling these switch cases to link to sswitch_90 and act the same as touch shutter button.
        ----------
        * METHOD:
            .method public onKeyUp(ILandroid/view/KeyEvent;)Z
        * MODIFIED switch case:
            .line 1690
            nop
    
            :sswitch_data_184
            .sparse-switch
                0x4 -> :sswitch_3d
                0x17 -> :sswitch_cd
                0x18 -> :sswitch_cd
                0x19 -> :sswitch_cd
                0x1a -> :sswitch_3d
                0x1b -> :sswitch_cd
                0x42 -> :sswitch_cd
                0x50 -> :sswitch_146
                0x52 -> :sswitch_96
            .end sparse-switch
        * EXPLANATION:
            0x18 is volume up, 0x19 is volume down
            We are telling these switch cases to link to sswitch_90 and act the same as touch shutter button.
    
    4. 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?:
            .prologue
            const/4 v3, 0x0
    
            .line 4629
            return-void
            const-string v1, "Camera"
        * EXPLANATION:
            We are telling this method to return, exit, as it's just a "void" method
         
    5. Camera focus sound Disabled
        * FILE:
            com\sec\android\app\camera\Camera.smali
        * METHOD:
            .method public playCameraSound(II)V
        * ADDED new line:
            return-void
        * WHERE?:
            .prologue
            .line 3405
            return-void
            iget-object v0, p0, Lcom/sec/android/app/camera/Camera;->mSoundPool:Landroid/media/SoundPool;
        * EXPLANATION:
            We are telling this method to return, exit, as it's just a "void" method
    
    6. 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?:
            .prologue
            const/4 v4, 0x1
            const/4 v3, 0x0
    
            .line 2897
            return-void
            const-string v1, "Camcorder"
        * EXPLANATION:
            We are telling this method to return, exit, as it's just a "void" method
    
    7. Camcorder "Low Battery" Alert Disabled
        * FILE:
            com\sec\android\app\camera\Camcorder.smali
        * METHOD:
            .method protected handleLowBattery()V
        * ADDED new line:
            return-void
        * WHERE?:
            .prologue
            .line 2166
            return-void
            const-string v0, "Camcorder"
        * EXPLANATION:
            We are telling this method to return, exit, as it's just a "void" method
        ----------
        * FILE:
            com\sec\android\app\camera\Camcorder.smali
        * METHOD:
            .method private handleBatteryChanged(Landroid/content/Intent;)V
        * REMOVED these lines:
            invoke-virtual {p0}, Lcom/sec/android/app/camera/Camcorder;->handleLowBattery()V
            invoke-direct {p0, v7}, Lcom/sec/android/app/camera/Camcorder;->handlePluggedLowBattery(Z)V
        * WHERE?:
            Just search and remove :)
        * EXPLANATION:
            To be sure not to call these methods.
    
    8. 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_c4
            .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_dc
            .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_f4
            .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_10c
            .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
    
    9. Camera Power button as a shutter
        * FILE:
            com\sec\android\app\camera\Camera.smali
        * METHOD:
            .method public onKeyUp(ILandroid/view/KeyEvent;)Z
        * ADDED new line:
            goto :cond_d2
        * WHERE?:
            .line 1727
            :sswitch_cd
            goto :cond_d2
            if-eqz p2, :cond_d2
        * EXPLANATION:
            We are telling this switch case "_cd" to jump to "if" condition and start taking a picture.
        ----------
        * MODIFIED switch case:
            .line 1690
            nop
    
            :sswitch_data_184
            .sparse-switch
                0x4 -> :sswitch_3d
                0x17 -> :sswitch_cd
                0x18 -> :sswitch_cd
                0x19 -> :sswitch_cd
                0x1a -> :sswitch_cd
                0x1b -> :sswitch_cd
                0x42 -> :sswitch_cd
                0x50 -> :sswitch_146
                0x52 -> :sswitch_96
            .end sparse-switch
        * EXPLANATION:
            0x1a is a power button.
            We are telling this switch cases to link to sswitch_cd and act the same as touch shutter button.
    
    10. Camera "Self-shot" Volume Up/Down as a shutter
        * FILE:
            com\sec\android\app\camera\SelfShotView.smali
        * METHOD:
            .method public onKeyDown(ILandroid/view/KeyEvent;)Z
        * REMOVED these lines:
            const/16 v0, 0x18
            if-eq p1, v0, :cond_c
    
            const/16 v0, 0x19
            if-eq p1, v0, :cond_c
        * WHERE?:
            .prologue
            .line 43
            const/16 v0, 0x18
            if-eq p1, v0, :cond_c
    
            const/16 v0, 0x19
            if-eq p1, v0, :cond_c
    
            const/16 v0, 0x50
            if-ne p1, v0, :cond_e
        * EXPLANATION:
            These are "if" conditions to check if volume keys up/down are pressed
        ----------
        * FILE:
            com\sec\android\app\camera\SelfShotView.smali
        * METHOD:
            .method public onKeyUp(ILandroid/view/KeyEvent;)Z
        * REMOVED these lines:
            const/16 v0, 0x18
            if-eq p1, v0, :cond_c
    
            const/16 v0, 0x19
            if-eq p1, v0, :cond_c
        * WHERE?:
            .prologue
            .line 53
            const/16 v0, 0x18
            if-eq p1, v0, :cond_c
    
            const/16 v0, 0x19
            if-eq p1, v0, :cond_c
    
            const/16 v0, 0x50
            if-ne p1, v0, :cond_e
        * EXPLANATION:
            These are "if" conditions to check if volume keys up/down are pressed
    
    11. Camera "Action shot" shooting mode Volume Up/Down as a shutter
        * FILE:
            com\sec\android\app\camera\glwidget\TwGLActionMenu.smali
        * METHOD:
            .method public onKeyDown(ILandroid/view/KeyEvent;)Z
        * ADDED new line:
            goto :cond_c
        * WHERE?:
            .prologue
            const/16 v2, 0x1b
            const/4 v0, 0x1
    
            .line 271
            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 up/down are pressed
        ----------
        * FILE:
            com\sec\android\app\camera\glwidget\TwGLActionMenu.smali
        * METHOD:
            .method public onKeyUp(ILandroid/view/KeyEvent;)Z
        * ADDED new line:
            goto :cond_c
        * WHERE?:
            .prologue
            const/16 v2, 0x1b
            const/4 v0, 0x1
    
            .line 293
            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 up/down are pressed
    
    12. Camera "Panorama" shooting mode Volume Up/Down as a shutter
        * FILE:
            com\sec\android\app\camera\glwidget\TwGLPanoramaMenu.smali
        * METHOD:
            .method public onKeyDown(ILandroid/view/KeyEvent;)Z
        * ADDED new line:
            goto :cond_c
        * WHERE?:
            .prologue
            const/16 v2, 0x1b
            const/4 v0, 0x1
    
            .line 337
            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 up/down are pressed
        ----------
        * FILE:
            com\sec\android\app\camera\glwidget\TwGLPanoramaMenu.smali
        * METHOD:
            .method public onKeyUp(ILandroid/view/KeyEvent;)Z
        * ADDED new line:
            goto :cond_c
        * WHERE?:
            .prologue
            const/16 v2, 0x1b
            const/4 v0, 0x1
    
            .line 361
            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 up/down are pressed
    
    13. Camera Enabled "Shutter Sound On/Off" item in Menu
        JB
        --
        * FILE:
            com\sec\android\app\camera\resourcedata\CameraSettingsMenuResourceData.smali
        * METHOD:
            .method private initCommandIdList(Lcom/sec/android/app/camera/AbstractCameraActivity;)V
        * REMOVED these lines:
            invoke-static {}, Lcom/sec/android/app/CscFeature;->getInstance()Lcom/sec/android/app/CscFeature;
    
            move-result-object v2
    
            const-string v3, "CscFeature_Camera_ShutterSoundMenu"
    
            invoke-virtual {v2, v3}, Lcom/sec/android/app/CscFeature;->getEnableStatus(Ljava/lang/String;)Z
    
            move-result v2
    
            if-eqz v2, :cond_f8
        * WHERE?:
            .line 80
            iget-object v2, p0, Lcom/sec/android/app/camera/resourcedata/CameraSettingsMenuResourceData;->mCommandIdList:Ljava/util/ArrayList;
    
            const/16 v3, 0x14
    
            invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
    
            move-result-object v3
    
            invoke-virtual {v2, v3}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
    
            .line 82
            :cond_e1
        * EXPLANATION:
            Remove "if" condition, below ":cond_e1", 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" menu item in menu array.
    
        ICS
        ---
        * FILE:
            com\sec\android\app\camera\resourcedata\CameraSettingsMenuResourceData.smali
        * METHOD:
            .method private initCommandIdList(Lcom/sec/android/app/camera/AbstractCameraActivity;)V
        * ADDED these lines:
            iget-object v0, p0, Lcom/sec/android/app/camera/resourcedata/CameraSettingsMenuResourceData;->mCommandIdList:Ljava/util/ArrayList;
    
            const/16 v1, 0x15
    
            invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
    
            move-result-object v1
    
            invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
        * WHERE?:
            .line 67
            iget-object v0, p0, Lcom/sec/android/app/camera/resourcedata/CameraSettingsMenuResourceData;->mCommandIdList:Ljava/util/ArrayList;
    
            const/16 v1, 0x14
    
            invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
    
            move-result-object v1
    
            invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
        * EXPLANATION:
            0x15 item is a "Shutter sound On/Off" and it's missing in ICS app.
            That way we permanently enable "Shutter Sound On/Off" menu item in menu array.

    Credits:
    nguyenxuanhoa - Camera Volume Up/Down as a shutter
    GizmoDroid - "Unable to start camera while in a call" Alert Disabled
    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 Camera.apk in your ROM ***

    This mod found working fine on ROMs based for JB: LSZ/A , for ICS:LRT/Q/G/K/5:

    LRK KingDroid ICS NoteMania v7.3/4
    LRK RocketROM v10 ICS 4.0.4

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

    Liked it? Please make a donation :)



    * Don't want to donate? Then at least hit Thanks button! (from hundred of downloads, only a few dozens say thanks).

    Thank you!

    Have fun! ;)
    2
    It's based on Note JB 4.1.2 LSA firmware

    btw, I've just noticed that this version has built in Volume keys as shutter/zoom just like in latest Note 2 JB 4.1.2 DLJ2 firmware :)
    I've nowhere to test it, so I didn't notice it before ;) interesting if it could work in Galaxy S2 as Note 2 camera works fine in Galaxy S3 :)
    2
    but as you zoom now?

    With your fingers on a screen ;)
    2
    Please see the main thread, I've fixed a couple of bugs there ;)

    Working on Stock ICS 4.0.3.

    But "Action Shot" mode is not working and cannot exit camera when "Action Shot" mode is selected. :(

    Please redownload, it's fixed now ;)

    On 4.04 LRG I have the same behaviour. However I did not make a backup of the file before patching through CMW. Does your script save the original file somewhere ? This way, I could send you the original camera app if you need, for testing.

    I've compared the LRK and LRG sources and they are identical. Yes the original file is saved in system/app folder as Camera.apk_JBK-ori

    i can send stock camera from LR1 as well.. I've been waiting for this mod for a long time..I even made a thread about it.. :)

    edit: what the hell, I sent you the file.. and a little request from me.. :)

    I'm not sure how to mod this one, as there's no classes.dex file in Camera.apk :confused:

    Attached Stock Camera (With Better Icon) from LRG 4.0.4 If anyone's looking for it.

    The sources of LRK and LRG are identical.

    Mate How did you decompile the Camera Apk from ICS ? - I get a number of errors from APK Manager 5.0.2

    I'm using AutoAPKTool 2.0.4a
    I'm not decompiling the whole apk file, only the classes.dex

    If you want to change smali files, then decompress classes.dex out of Camera.apk, then with Baksmali DEX file decompile the classes and after changes are made use Smali DEX file and compress it back into the Camera.apk
    If you want also change some XMLs, then get the classes.dex out of the Camera.apk, decompile APK (now you shouldn't get any error)
    2
    Weird.. doesn't work here on jellybam 1.2
    Used the cwm zip file.. flashed OK. But afterwards no differences noticed in the camera app..?

    Send from a Nokia 3210
    If I've understood correctly then JellyBam is AOKP/AOSP based ROM.
    The camera mod here is for Samsung Stock based ROMs only :)
    From OP:
    For those who want to restore to original version, that comes with ROM:
    http://www.jobnik.org/files/apk/note...a_Note_cwm.zip

    Cwm zip file is empty (no samsungcamera.apk). Can you correct the file so I may do a diff for porting to my JB? Thanks - TD

    Note: Filename is - ' restore_Camera_Note_JB_cwm.zip'
    The restore zip has only a script that restores the previously backed files using the install zip :)