• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[REQ] Multi DPI Stock Camera

Search This thread

datajosh

Inactive Recognized Contributor
Nov 13, 2009
1,274
784
Greenville, SC
Is anyone able to make a multi DPI version of the stock camera app? I tried modding it for 560 myself with the latest APKTool but the recompiled APK doesn't work.
 

Brava27

Senior Member
Sep 7, 2012
3,482
885
Toronto
It works you just have to be patient and modify the dimens xml file. It takes time and patience. My dpi is 500 and this is how my camera looks....
d2c2e52a81df0608af899416ff9a603b.jpg
 

datajosh

Inactive Recognized Contributor
Nov 13, 2009
1,274
784
Greenville, SC
It works you just have to be patient and modify the dimens xml file. It takes time and patience. My dpi is 500 and this is how my camera looks....
Interesting, I did that and got the APK to compile but it wouldn't work on my phone. Which version of APKTool did you use? (And did you install the frameworks beforehand?)
 

Brava27

Senior Member
Sep 7, 2012
3,482
885
Toronto
Interesting, I did that and got the APK to compile but it wouldn't work on my phone. Which version of APKTool did you use? (And did you install the frameworks beforehand?)
Yeah, you gotta install
apktool if framework-res.apk
apktool d SamsungCamera4.apk then go into res/values/dimens.xml and modify every DIP you see by multiplaying it by original dpi (640/560) which equals 1.14. So if you see 640*1.14 = 729.6 etc...
Takes a loooong time,
Just use google camera isntead lol
 
  • Like
Reactions: TheEndHK

datajosh

Inactive Recognized Contributor
Nov 13, 2009
1,274
784
Greenville, SC
Yeah, you gotta install
apktool if framework-res.apk
apktool d SamsungCamera4.apk then go into res/values/dimens.xml and modify every DIP you see by multiplaying it by original dpi (640/560) which equals 1.14. So if you see 640*1.14 = 729.6 etc...
Takes a loooong time,
Just use google camera isntead lol
Yeah that's what I did lol I also installed twframework-res.apk, but since that's not needed I'm going to try again without it. And I have Google Camera installed but I can't launch it with the lockscreen or double tap home shortcuts :)

Edit: Still can't get this thing to produce a working APK, I guess this is what I get for going so long without doing this type of thing.
 
Last edited:

Brava27

Senior Member
Sep 7, 2012
3,482
885
Toronto
Yeah that's what I did lol I also installed twframework-res.apk, but since that's not needed I'm going to try again without it. And I have Google Camera installed but I can't launch it with the lockscreen or double tap home shortcuts :)

Edit: Still can't get this thing to produce a working APK, I guess this is what I get for going so long without doing this type of thing.

I have almost perfected my samsung camera, but I have it at 500 dpi.
Do you want it?
 

mDaniel

Senior Member
Jul 6, 2008
85
31
Tried your apk brava, but unfortunately it force-closes for me.
Gonna have to give the apk compiling stuff another try, I tried to remove the brightness bars from the notification panel but failed to create an apk as well.
 

KqK

Member
Oct 21, 2010
16
1
I did mine for 520 dpi. It's not perfect but enough for me.
About the force close, I always do a cache and dalvik cache wipe after replace a system apk and before open it, just in case.
 

Attachments

  • Screenshot_2015-04-22-19-42-10.jpg
    Screenshot_2015-04-22-19-42-10.jpg
    232.6 KB · Views: 431
  • Screenshot_2015-04-22-19-42-15.jpg
    Screenshot_2015-04-22-19-42-15.jpg
    163.5 KB · Views: 427

Brava27

Senior Member
Sep 7, 2012
3,482
885
Toronto
Yeah that's what I did lol I also installed twframework-res.apk, but since that's not needed I'm going to try again without it. And I have Google Camera installed but I can't launch it with the lockscreen or double tap home shortcuts :)

Edit: Still can't get this thing to produce a working APK, I guess this is what I get for going so long without doing this type of thing.

I had not tried the video recording until I read your post. Sadly it does not work. Black screen with inoperable buttons. I will try to check the lines in the file that has something to do with recording.
I hardly ever record video unless I see an accident or UFO so I am not that upset, I always have google camera as a backup.
If you do in deed find that line that needs modifying, let me know! Front Camera actually works to record video. I must have modified that line correctly. hmm
 

KqK

Member
Oct 21, 2010
16
1
Front Camera actually works to record video. I must have modified that line correctly. hmm

My front camera is recording video also.
I modified every line in the file, and I didnt have time yet to see what could be wrong. In the meantime I downloaded google camera, thanks for the tip.
 

Brava27

Senior Member
Sep 7, 2012
3,482
885
Toronto
My front camera is recording video also.
I modified every line in the file, and I didnt have time yet to see what could be wrong. In the meantime I downloaded google camera, thanks for the tip.

Google camera is a very decent camera, although I prefer the touchwiz camera, I guess we can live for now until xposed-app settings comes around.
 

Dr4g0n

Senior Member
Apr 28, 2007
111
30
33
hello, same problem here..
i write myselfe a tool to replace all values in dimens.xml with OldValue/(newDPI / oldDPI) so i get this math 640 / (480/640) -> 640/0.75 and this works as well. but i cant start the camcorder. Blackscreen also.
if you change the camera to frontfacing than recording works... also recording with 640x480 works as well. only higher resolutions dosnt work :(
and the other "camera modus" dosent work. the cam is only freeze.

but i tried this all on my g925F

maybe someone have a little time... than view this file, its very intresting =)
\SamsungCamera4.apk\smali\com\sec\android\app\camera\CommonFeature.smali
 
Last edited:

mcgrathpatj

Senior Member
Nov 13, 2012
165
31
This is great guys. Thanks.

If I understand correctly, the correct method to install this would be to replace the default .apk file with the one here, wipe cache and dalvik.... What about permissions?
 

XxCE0xX

Senior Member
Jul 8, 2012
163
17
I did mine for 520 dpi. It's not perfect but enough for me.
About the force close, I always do a cache and dalvik cache wipe after replace a system apk and before open it, just in case.

Is there any way you could post the 520 DPI apk, as I also prefer 520 dpi
 

Top Liked Posts