[GUIDE][CAM] How To Hack SONY Xperia Camera (Bring Higher Bitrate & More Options)

Search This thread

s1llhoute

Senior Member
Jan 28, 2013
142
25
You're probably looking for framework-res.apk which is located in /system/framework/.

Sent from my eXposed C6603

New problem, dude
Now got error while install framework using apktool..

Man, such a pain in the ass for just simply recompile the Apk..
Hope op released the camera mod for us to download :-SS

Sent from my C5302 using Tapatalk
 

Okluzhion

Senior Member
Aug 7, 2011
1,596
748
Google Pixel 4a
New problem, dude
Now got error while install framework using apktool..

Man, such a pain in the ass for just simply recompile the Apk..
Hope op released the camera mod for us to download :-SS

Sent from my C5302 using Tapatalk

Don't give up so easily ;) It took me a couple of days to get everything working when it came to de/recompiling. But it made me pay attention to things I deemed unimportant and not worth checking, reading the error log is one of those things, and trust me, reading it will help you a lot. And if you don't know what it means, just copy-paste it here or somewhere where you can get help fixing it :)

Sent from my eXposed C6603
 

s1llhoute

Senior Member
Jan 28, 2013
142
25
Don't give up so easily ;) It took me a couple of days to get everything working when it came to de/recompiling. But it made me pay attention to things I deemed unimportant and not worth checking, reading the error log is one of those things, and trust me, reading it will help you a lot. And if you don't know what it means, just copy-paste it here or somewhere where you can get help fixing it :)

Sent from my eXposed C6603

Would you mind telling me the step for recompiling??
Maybe I missed something, and what version of Apk tool u used??

Sent from my C5302 using Tapatalk
 

Okluzhion

Senior Member
Aug 7, 2011
1,596
748
Google Pixel 4a
Would you mind telling me the step for recompiling??
Maybe I missed something, and what version of Apk tool u used??

Sent from my C5302 using Tapatalk

I haven't used apktool on pc in a long time and I'm not using windows anymore so I don't know. I would have to look into it, but honestly I'm doing other stuff on linux that take priority, so you will have better luck asking someone else.


I know this thread is about porting CM themes, but it will help you a lot in understanding of compiling http://xdaforums.com/showthread.php?t=2334637
.

Sent from my eXposed C6603
 
Last edited:

s1llhoute

Senior Member
Jan 28, 2013
142
25
I haven't used apktool on pc in a long time and I'm not using windows anymore so I don't know. I would have to look into it, but honestly I'm doing other stuff on linux that take priority, so you will have better luck asking someone else.


I know this thread is about porting CM themes, but it will help you a lot in understanding of compiling http://xdaforums.com/showthread.php?t=2334637
.

Sent from my eXposed C6603

Done,recompiling sucess..
But camera forced close when i opened it..lol

Have u tried this and success??,please share ur mod then ..:eek:
 

kin9nothin9

Senior Member
Oct 8, 2012
169
37
tried it on my xperia s
well when ever i switch to video recording it says unknow error
any advice
i checked twice

---------- Post added at 11:14 PM ---------- Previous post was at 10:50 PM ----------

LAG ON VIDEO RECORDING ON XPERIA 2011 & XPERIA 2012 (Snapdragon S3/Novathor)??? :confused:

Here is solution change FORMAT H264 to MPEG4!!!

INFO H264 VS MPEG4​
http://www.y-cam.com/blog/mpeg4-vs-h-264-45/

Smali code

H263 is
Code:
0x1

H264 is
Code:
0x2

MPEG4 is
Code:
0x3

1. Go to smali/com/sonyericsson/android/camera/configuration/parameters

open VideoSize.smali using text editor/notepad++ then find this line

(Note the Local maybe different)
Code:
.local v7, "videoFrameRate":I
const/4 v6, [COLOR="Red"]0x2[/COLOR]

change to

Code:
.local v7, "videoFrameRate":I
const/4 v6, [COLOR="Red"]0x3[/COLOR]

Save it!!! Done ;)

These are not found in my xperia s videosize.smali


Sent from my LT26i using Tapatalk
 

krabappel2548

Inactive Recognized Developer
Nov 15, 2011
6,444
16,111
Lommel
Done,recompiling sucess..
But camera forced close when i opened it..lol

Have u tried this and success??,please share ur mod then ..:eek:

Don't forget to install a superuser mod on your device.

Also you need to sign the apk file after recompiling. Open recompiled and original apk with 7z and copy META-INF and manifest.xml too the recompiled apk. Without signing it will never work.


tried it on my xperia s
well when ever i switch to video recording it says unknow error
any advice
i checked twice

---------- Post added at 11:14 PM ---------- Previous post was at 10:50 PM ----------



These are not found in my xperia s videosize.smali


Sent from my LT26i using Tapatalk



Sent from my C6903 using xda app-developers app
 
  • Like
Reactions: Rizal Lovins

BPaul

Inactive Recognized Developer
May 9, 2011
2,355
8,117
31
Astana
empireb.ml
you need to see media_profile.xml look at this

Code:
    <AudioEncoderCap name="aac" enabled="true"
        minBitRate="8000" maxBitRate="156000"
        minSampleRate="8000" maxSampleRate="48000"
        minChannels="1" maxChannels="[COLOR="Red"]1[/COLOR]" /> change to [COLOR="Red"]2[/COLOR] ([COLOR="Red"]6[/COLOR] value is for XT/XV/XTX camera driver) don't try to change to [COLOR="Red"]6[/COLOR]

if it's mono because mod audio recording bitrate, i guess you missed something ;)

I know about here. In my XAS media_profiles setted to "2", i think is in audio_primary and policy... I I found solution, I let you know ;)
 
  • Like
Reactions: Rizal Lovins

17th_angel

Senior Member
Feb 13, 2013
80
13
Is there a way to bypass the 2GB limit on video recording?

I can only record to 43 minutes and the camera stop.


Im on Xperia arc s, GB 2.3.7
 

John98Zakaria

Senior Member
Jan 23, 2013
264
60
Damiatta
Hello Xperia friends....


3. Go to smali/com/sonyericsson/android/camera/configuration/parameters

open VideoSize$VideoProfile$Builder.smali ( if there smali available, i mean different Xperia have diffierent parameters like older Xperia 2011)

search this code
Code:
[COLOR="Red"]0x1f400[/COLOR]

then change to
Code:
[COLOR="Red"]0x3e800[/COLOR]

save it!!!



I Cant find 0x1f400 nor any value you had written on my Xperia ZR 4.4

https://www.mediafire.com/?3qnhpv0vmzn91yj here is my VideoSize$VideoProfile$Builder.smali Could you give me a hand ;)
 

darknessmc

Senior Member
Jul 30, 2013
691
132
Sony Xperia Z2
Redmi Note 9 Pro
For all who had error on video recording in Full hd:

replace this value 0x1c9c380 with this 0x1312d00

because
0x1c9c380 = 30 000 000 bit/s
0x1312d00 = 20 000 000 bit/s

and we have in media_profile.xml only 20000000

I try it and it work
 

s1llhoute

Senior Member
Jan 28, 2013
142
25
Does any of you have WIFI tethering problem in this rom??
For me sometimes it works , sometimes it doesn't..
I have to restart my phone in order tethering to work...
 

mikaaa6

Senior Member
May 27, 2014
65
4
Hacking Camera Resolution/MP (More Options)

More Options for Photo (Only work for Xperia 2011 & 2012 Snapdragon S3/Novathor)

For Xperia 2012 Snapdragon S4 and 2013/2014 doesn't work, need to be removing some code in smali, i'm still looking for it :)

1. Go to res/value

open arrays.xml using text editor/notepad++ then find this line

For 12MP Camera
Code:
<string-array name="ux_recommended_resolution_array_main_12m">
     <item>TWELVE_MP</item>
     <item>NINE_MP</item>
     <item>TWO_MP</item>
     <item>TWO_MP_WIDE</item>

add others line
Code:
<string-array name="ux_recommended_resolution_array_main_12m">
        <item>TWELVE_MP</item>
        <item>NINE_MP</item>
	<item>EIGHT_MP</item>
	<item>FIVE_MP</item>
	<item>THREE_MP_WIDE</item>
        <item>TWO_MP</item>
        <item>TWO_MP_WIDE</item>

For 8MP Camera
Code:
<string-array name="ux_recommended_resolution_array_main_8m">
     <item>EIGHT_MP</item>
     <item>SIX_MP</item>
     <item>TWO_MP</item>
     <item>TWO_MP_WIDE</item>

add others line
Code:
<string-array name="ux_recommended_resolution_array_main_8m">
     <item>EIGHT_MP</item>
     <item>SIX_MP</item>
     <item>FIVE_MP</item>
     <item>THREE_MP</item>
     <item>TWO_MP</item>
     <item>TWO_MP_WIDE</item>


More Options for Video (Work for all Xperia)

1. Go to res/value

open arrays.xml using text editor/notepad++ then find this line

For 20MP Camera
Code:
<string-array name="ux_recommended_video_size_array_main_20m">
     <item>FULL_HD</item>
     <item>HD</item>
     <item>MMS</item>

add others line
Code:
<string-array name="ux_recommended_video_size_array_main_20m">
     <item>FULL_HD</item>
     <item>HD</item>
     <item>FWVGA</item>
     <item>VGA</item>
     <item>QVGA</item>
     <item>MMS</item>

For 13MP Camera
Code:
<string-array name="ux_recommended_video_size_array_main_13m">
     <item>FULL_HD</item>
     <item>HD</item>
     <item>MMS</item>

add others line
Code:
<string-array name="ux_recommended_video_size_array_main_13m">
     <item>FULL_HD</item>
     <item>HD</item>
     <item>FWVGA</item>
     <item>VGA</item>
     <item>QVGA</item>
     <item>MMS</item>

For 12MP Camera
Code:
<string-array name="ux_recommended_video_size_array_main_12m">
     <item>FULL_HD</item>
     <item>HD</item>
     <item>MMS</item>

add others line
Code:
<string-array name="ux_recommended_video_size_array_main_12m">
     <item>FULL_HD</item>
     <item>HD</item>
     <item>FWVGA</item>
     <item>VGA</item>
     <item>QVGA</item>
     <item>MMS</item>

For 8MP Camera FULL HD 1080p
Code:
<string-array name="ux_recommended_video_size_array_main_8m_full_hd">
     <item>FULL_HD</item>
     <item>HD</item>
     <item>MMS</item>

add others line
Code:
<string-array name="ux_recommended_video_size_array_main_8m_full_hd">
     <item>FULL_HD</item>
     <item>HD</item>
     <item>FWVGA</item>
     <item>VGA</item>
     <item>QVGA</item>
     <item>MMS</item>

For 8MP Camera HD 720p
Code:
<string-array name="ux_recommended_video_size_array_main_8m_hd">
     <item>HD</item>
     <item>FWVGA</item>
     <item>QVGA</item>
     <item>MMS</item>

add others line
Code:
<string-array name="ux_recommended_video_size_array_main_8m_hd">
     <item>HD</item>
     <item>FWVGA</item>
     <item>VGA</item>
     <item>QVGA</item>
     <item>MMS</item>

For 5MP Camera HD 720p
Code:
<string-array name="ux_recommended_video_size_array_main_5m_fwvga">
     <item>HD</item>
     <item>FWVGA</item>
     <item>QVGA</item>
     <item>MMS</item>

add others line
Code:
<string-array name="ux_recommended_video_size_array_main_5m_fwvga">
     <item>HD</item>
     <item>FWVGA</item>
     <item>VGA</item>
     <item>QVGA</item>
     <item>MMS</item>

Save it!!!

this works on my Xperia J? I have a 5 Mp camera, I can get her to 12 Mp?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 71
    Hello Xperia friends....
    I just want to show you how to hack All Xperia Camera :laugh:


    Requirement :

    Knowladge in decompile/recompile apps


    Hacking Audio Bitrate Video Recording

    INFO for smali code

    Value 0
    Name: LowRate
    Type: REG_DWORD
    Data: 0x1f400 (SONY use this low bitrate :mad: so find this code to replace in the next step)

    Value 1
    Name: MediumRate
    Type: REG_DWORD
    Data: 0x2ee00

    Value 2
    Name: MediumHighRate
    Type: REG_DWORD
    Data: 0x3e800 (i'm use this code)

    Value 3
    Name: HighRate
    Type: REG_DWORD
    Data: 0x4e200​

    1. Decompile SemcCameraUI.apk
    2. Go to smali/com/sonyericsson/android/camera

    open Constants.smali using text editor/notepad++ then find this line
    Code:
    .field public static final VIDEO_AUDIO_BIT_RATE:I = [COLOR="Red"]0x1f400[/COLOR]

    change RED Color code to code from INFO CODE, example :
    Code:
    .field public static final VIDEO_AUDIO_BIT_RATE:I = [COLOR="Red"]0x3e800[/COLOR]

    save it!!!!

    3. Go to smali/com/sonyericsson/android/camera/configuration/parameters

    open VideoSize$VideoProfile$Builder.smali ( if there smali available, i mean different Xperia have diffierent parameters like older Xperia 2011)

    search this code
    Code:
    [COLOR="Red"]0x1f400[/COLOR]

    then change to
    Code:
    [COLOR="Red"]0x3e800[/COLOR]

    save it!!!

    4. Go to smali/com/sonyericsson/android/camera/configuration/parameters

    open VideoSize.smali

    search all this code
    Code:
    [COLOR="Red"]0x1f400[/COLOR]

    then change all code to
    Code:
    [COLOR="Red"]0x3e800[/COLOR]

    save it!!! Done


    LAG ON VIDEO RECORDING ON XPERIA 2011 & XPERIA 2012 (Snapdragon S3/Novathor)??? :confused:

    Here is solution change FORMAT H264 to MPEG4!!!

    INFO H264 VS MPEG4​
    http://www.y-cam.com/blog/mpeg4-vs-h-264-45/

    Smali code

    H263 is
    Code:
    0x1

    H264 is
    Code:
    0x2

    MPEG4 is
    Code:
    0x3

    1. Go to smali/com/sonyericsson/android/camera/configuration/parameters

    open VideoSize.smali using text editor/notepad++ then find this line

    (Note the Local maybe different)
    Code:
    .local v7, "videoFrameRate":I
    const/4 v6, [COLOR="Red"]0x2[/COLOR]

    change to

    Code:
    .local v7, "videoFrameRate":I
    const/4 v6, [COLOR="Red"]0x3[/COLOR]

    Save it!!! Done ;)
    35
    Hacking Video Recording Bitrate

    INFO for smali code

    Value 1
    Name: MediumRate
    Data: 0xb71b00

    Value 2
    Name: MediumHighRate
    Data: 0x10b0760

    Value 3
    Name: HighRate
    Data: 0x1312d00

    Value 4
    Name: UltraHighRate
    Data: 0x1c9c380​


    1. Go to smali/com/sonyericsson/android/camera

    open Constants.smali using text editor/notepad++ then find this line

    For HD 720p
    Code:
    .field public static final VIDEO_BIT_RATE_EX_HIGH_12M:I = [COLOR="Red"]0xb71b00[/COLOR]

    change to
    Code:
    .field public static final VIDEO_BIT_RATE_EX_HIGH_12M:I = [COLOR="Red"]0x10b0760[/COLOR]

    For FULL HD 1080p
    Code:
    .field public static final VIDEO_BIT_RATE_EX_HIGH_17_5M:I = [COLOR="Red"]0x10b0760[/COLOR]

    change to
    Code:
    .field public static final VIDEO_BIT_RATE_EX_HIGH_17_5M:I = [COLOR="Red"]0x1312d00[/COLOR]

    save it!!!

    2. Go to smali/com/sonyericsson/android/camera/configuration/parameters

    open VideoSize.smali the find this line

    For HD 720p
    Code:
    [COLOR="Red"]0xb71b00[/COLOR]

    change to
    Code:
    [COLOR="Red"]0x10b0760[/COLOR]

    For FULL HD 1080p
    Code:
    [COLOR="Red"]0x10b0760[/COLOR]

    change that all code to
    Code:
    [COLOR="Red"]0x1312d00[/COLOR]

    save it!!! Done ;)

    NOW AFTER EDITING VIDEO AUDIO BITRATE & VIDEO BITRATE YOU NEED TO EDIT media_profile.xml

    open media_profile.xml using text editor/notepad++ then find this line

    FIX 100% Image Quality
    Code:
    <!ATTLIST ImageEncoding quality [COLOR="Red"](90|80|70|60|50|40)[/COLOR] #REQUIRED>

    change to
    Code:
    <!ATTLIST ImageEncoding quality [COLOR="Red"](100|90|80|70|60|50)[/COLOR] #REQUIRED>

    There is 2 lines code for back camera & front camera

    Code:
    <ImageEncoding quality="[COLOR="Red"]95[/COLOR]" />
    <ImageEncoding quality="[COLOR="Red"]80[/COLOR]" />
    <ImageEncoding quality="[COLOR="Red"]70[/COLOR]" />

    change all code to
    Code:
    <ImageEncoding quality="[COLOR="Red"]100[/COLOR]" />
    <ImageEncoding quality="[COLOR="Red"]90[/COLOR]" />
    <ImageEncoding quality="[COLOR="Red"]80[/COLOR]" />


    Adjust the value of smali Video & Audio Video bitrate with media-profile.xml (as you modified it)

    There is many lines code for Video you need to change them all, example

    Code:
            <EncoderProfile quality="1080p" fileFormat="mp4" duration="60">
                <Video codec="h264"
                       bitRate="17500000"
                       width="1920"
                       height="1080"
                       frameRate="30" />
    
                <Audio codec="aac"
                       bitRate="156000"
                       sampleRate="48000"
                       channels="2" />
            </EncoderProfile>
    
            <EncoderProfile quality="720p" fileFormat="mp4" duration="60">
                <Video codec="h264"
                       bitRate="12000000"
                       width="1280"
                       height="720"
                       frameRate="30" />
    
                <Audio codec="aac"
                       bitRate="156000"
                       sampleRate="48000"
                       channels="2" />
            </EncoderProfile>

    change to

    Code:
            <EncoderProfile quality="1080p" fileFormat="mp4" duration="60">
                <Video codec="h264"
                       bitRate="20000000"
                       width="1920"
                       height="1080"
                       frameRate="30" />
    
                <Audio codec="aac"
                       bitRate="256000"
                       sampleRate="48000"
                       channels="2" />
            </EncoderProfile>
    
            <EncoderProfile quality="720p" fileFormat="mp4" duration="60">
                <Video codec="h264"
                       bitRate="1750000"
                       width="1280"
                       height="720"
                       frameRate="30" />
    
                <Audio codec="aac"
                       bitRate="256000"
                       sampleRate="48000"
                       channels="2" />
            </EncoderProfile>

    Code:
        <VideoEncoderCap name="h264" enabled="true"
            minBitRate="64000" maxBitRate="[COLOR="Red"]20000000[/COLOR]"
            minFrameWidth="176" maxFrameWidth="1920"
            minFrameHeight="144" maxFrameHeight="1080"
            minFrameRate="15" maxFrameRate="30" />

    Code:
        <AudioEncoderCap name="aac" enabled="true"
            minBitRate="8000" maxBitRate="[COLOR="Red"]256000[/COLOR]"
            minSampleRate="8000" maxSampleRate="48000"
            minChannels="1" maxChannels="[COLOR="Red"]2[/COLOR]" />

    Note maxChannels Number in RED Color, can be 6 or 2
    32
    Hacking Camera Resolution/MP (More Options)

    More Options for Photo (Only work for Xperia 2011 & 2012 Snapdragon S3/Novathor)

    For Xperia 2012 Snapdragon S4 and 2013/2014 doesn't work, need to be removing some code in smali, i'm still looking for it :)

    1. Go to res/value

    open arrays.xml using text editor/notepad++ then find this line

    For 12MP Camera
    Code:
    <string-array name="ux_recommended_resolution_array_main_12m">
         <item>TWELVE_MP</item>
         <item>NINE_MP</item>
         <item>TWO_MP</item>
         <item>TWO_MP_WIDE</item>

    add others line
    Code:
    <string-array name="ux_recommended_resolution_array_main_12m">
            <item>TWELVE_MP</item>
            <item>NINE_MP</item>
    	<item>EIGHT_MP</item>
    	<item>FIVE_MP</item>
    	<item>THREE_MP_WIDE</item>
            <item>TWO_MP</item>
            <item>TWO_MP_WIDE</item>

    For 8MP Camera
    Code:
    <string-array name="ux_recommended_resolution_array_main_8m">
         <item>EIGHT_MP</item>
         <item>SIX_MP</item>
         <item>TWO_MP</item>
         <item>TWO_MP_WIDE</item>

    add others line
    Code:
    <string-array name="ux_recommended_resolution_array_main_8m">
         <item>EIGHT_MP</item>
         <item>SIX_MP</item>
         <item>FIVE_MP</item>
         <item>THREE_MP</item>
         <item>TWO_MP</item>
         <item>TWO_MP_WIDE</item>


    More Options for Video (Work for all Xperia)

    1. Go to res/value

    open arrays.xml using text editor/notepad++ then find this line

    For 20MP Camera
    Code:
    <string-array name="ux_recommended_video_size_array_main_20m">
         <item>FULL_HD</item>
         <item>HD</item>
         <item>MMS</item>

    add others line
    Code:
    <string-array name="ux_recommended_video_size_array_main_20m">
         <item>FULL_HD</item>
         <item>HD</item>
         <item>FWVGA</item>
         <item>VGA</item>
         <item>QVGA</item>
         <item>MMS</item>

    For 13MP Camera
    Code:
    <string-array name="ux_recommended_video_size_array_main_13m">
         <item>FULL_HD</item>
         <item>HD</item>
         <item>MMS</item>

    add others line
    Code:
    <string-array name="ux_recommended_video_size_array_main_13m">
         <item>FULL_HD</item>
         <item>HD</item>
         <item>FWVGA</item>
         <item>VGA</item>
         <item>QVGA</item>
         <item>MMS</item>

    For 12MP Camera
    Code:
    <string-array name="ux_recommended_video_size_array_main_12m">
         <item>FULL_HD</item>
         <item>HD</item>
         <item>MMS</item>

    add others line
    Code:
    <string-array name="ux_recommended_video_size_array_main_12m">
         <item>FULL_HD</item>
         <item>HD</item>
         <item>FWVGA</item>
         <item>VGA</item>
         <item>QVGA</item>
         <item>MMS</item>

    For 8MP Camera FULL HD 1080p
    Code:
    <string-array name="ux_recommended_video_size_array_main_8m_full_hd">
         <item>FULL_HD</item>
         <item>HD</item>
         <item>MMS</item>

    add others line
    Code:
    <string-array name="ux_recommended_video_size_array_main_8m_full_hd">
         <item>FULL_HD</item>
         <item>HD</item>
         <item>FWVGA</item>
         <item>VGA</item>
         <item>QVGA</item>
         <item>MMS</item>

    For 8MP Camera HD 720p
    Code:
    <string-array name="ux_recommended_video_size_array_main_8m_hd">
         <item>HD</item>
         <item>FWVGA</item>
         <item>QVGA</item>
         <item>MMS</item>

    add others line
    Code:
    <string-array name="ux_recommended_video_size_array_main_8m_hd">
         <item>HD</item>
         <item>FWVGA</item>
         <item>VGA</item>
         <item>QVGA</item>
         <item>MMS</item>

    For 5MP Camera HD 720p
    Code:
    <string-array name="ux_recommended_video_size_array_main_5m_fwvga">
         <item>HD</item>
         <item>FWVGA</item>
         <item>QVGA</item>
         <item>MMS</item>

    add others line
    Code:
    <string-array name="ux_recommended_video_size_array_main_5m_fwvga">
         <item>HD</item>
         <item>FWVGA</item>
         <item>VGA</item>
         <item>QVGA</item>
         <item>MMS</item>

    Save it!!!
    29
    EXperimental hacking, Change format RGB_565 to ARGB8888

    I use ONLY on Xperia 2011

    1. Go to smali/com/sonyericsson/android/camera

    open CameraActivity.smali using text editor/notepad++ then find this line

    Code:
    sget-object v12, Landroid/graphics/Bitmap$Config;->[COLOR="Red"]RGB_565[/COLOR]:Landroid/graphics/Bitmap$Config;
    Code:
    sget-object v0, Landroid/graphics/Bitmap$Config;->[COLOR="Red"]RGB_565[/COLOR]:Landroid/graphics/Bitmap$Config;

    Change RED Color code to

    Code:
    [COLOR="Red"]ARGB_8888[/COLOR]

    2. Go to smali/com/sonyericsson/android/camera

    open ImageManager.smali then search for RGB example :
    Code:
    sget-object v0, Landroid/graphics/Bitmap$Config;->[COLOR="Red"]RGB_565[/COLOR]:Landroid/graphics/Bitmap$Config;

    change all code to
    Code:
    sget-object v0, Landroid/graphics/Bitmap$Config;->[COLOR="Red"]ARGB_8888[/COLOR]:Landroid/graphics/Bitmap$Config;

    3. Go to smali/com/sonyericsson/android/camera/device

    open CameraExtensionValues.smali then search for RGB example :
    Code:
    .field public static final POSTVIEW_FORMAT_RGB565:Ljava/lang/String; = [COLOR="Red"]"rgb565"[/COLOR]

    change to

    Code:
    .field public static final POSTVIEW_FORMAT_RGB565:Ljava/lang/String; = [COLOR="Red"]"argb8888"[/COLOR]

    save it!!!

    Enable inPreferQualityOverSpeed (I Use ONLY on Xperia 2011)

    1. Go to smali/com/sonyericsson/android/camera

    open CameraActivity.smali

    Code:
    [COLOR="Red"].local v11, opt:Landroid/graphics/BitmapFactory$Options;[/COLOR]
    [COLOR="Red"]sget-object v15, Landroid/graphics/Bitmap$Config;->RGB_565:Landroid/graphics/Bitmap$Config;[/COLOR]
    
    [COLOR="Red"]iput-boolean v6, v11, Landroid/graphics/BitmapFactory$Options;->inPreferQualityOverSpeed:Z[/COLOR]
    
    iput-object v15, v11, Landroid/graphics/BitmapFactory$Options;->inPreferredConfig:Landroid/graphics/Bitmap$Config;

    Look for RED Color it's should be like this
    Code:
    [COLOR="Red"]
    .local v11, opt:Landroid/graphics/BitmapFactory$Options;
    const/4 v6, 0x1[/COLOR]
    [COLOR="Red"]iput-boolean v6, v11, Landroid/graphics/BitmapFactory$Options;->inPreferQualityOverSpeed:Z
    
    iput-boolean v6, v11, Landroid/graphics/BitmapFactory$Options;->inDither:Z[/COLOR]
    
    [COLOR="Red"]sget-object v15, Landroid/graphics/Bitmap$Config;->ARGB_8888:Landroid/graphics/Bitmap$Config;[/COLOR]
    
    iput-object v15, v11, Landroid/graphics/BitmapFactory$Options;->inPreferredConfig:Landroid/graphics/Bitmap$Config;
    26
    Enable 12MP Superior Auto on Jelly Bean 4.3

    How to Install :

    - Download the file in attachment
    - Copy to system with root explorer etc
    - Set permissions to 644 (rw-r--r--)
    - Move the file to system>vendor>overlay
    - Reboot
    - After boot go to settings>apps>all
    - Clear data Camera & try open camera app

    Enjoy :laugh:

    Credits :
    Thanks to SONY Mobile that made all this possible
    Thanks to my old friend @Xperia-Ray for helping me from beginning