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

[MOD][XPOSED][5.0+] Xperia Camera Enhancements

Search This thread

tryptophane

Senior Member
Dec 31, 2012
120
191
Freiburg
Can you do so that when quick-launch is used (shortcut on lockscreen or holding camera button) it'll use manual mode rather than superior auto?

Thought about this feature too. Maybe, we'll see...

edit: ok, it works again how it should without me doing anything... I'll report if I can somehow reproduce this behavior.

Another little thing: In Xposed your module doesn't show "update available" like others do

Happy to hear that your problem got resolved. Honestly I can't imagine that it was related to this module...

I think it takes some time until Xposed notifies about updates, maybe that's why you don't see them. I don't get notified too, but it's maybe because I always install them directly after having released them...
 

tryptophane

Senior Member
Dec 31, 2012
120
191
Freiburg
@tryptophane how about an option to enable GPS when launching the camera app (dissable it when closing camera app).
It would be a cool feature together with the geo-tag mod.
That way you don't have to remember to toggle it to get geo-tags.

(I know this could also be achieved using Tasker but if you have free time...:p)

I used an algorithm that I found in a forum to enable GPS programatically. In the current implementation, it will only enable location based on GPS satellites, but not on networks. It would be nice to have the possibility to let the user choose which method gets activated for location (GPS, networks or both). With networks allowed you get a much faster fix and can also determine location inside of buildings.

I know how how I can do it and will implement this feature in a future version. But it's a little bit of work to make this in a clean and consistent way. Maybe I'll find some time next week, I will only release it when I have a really clean solution. I think I published too frequent updates since the first version of this module, don't want to annoy people...

Stay tuned!

Done! Now with my own, better implementation for changing the location settings in system. I think that version 0.6 brings great additions to the camera, in particular for all those who care about geo-tags in their pictures :) Especially the mod for the geo-tag icon adds great value, imho...

Please test it and report the bugs you found if any. I would still be happy about some feedback on how this module works on various Xperia Z* devices apart from my Z1C!
 
Last edited:
  • Like
Reactions: B8shT1m3

B8shT1m3

Member
Jun 2, 2014
43
16
Frankfurt
Done! Now with my own, better implementation for changing the location settings in system. I think that version 0.6 brings great additions to the camera, in particular for all those who care about geo-tags in their pictures :) Especially the mod for the geo-tag icon adds great value, imho...

Please test it and report the bugs you found if any. I would still be happy about some feedback on how this module works on various Xperia Z* devices apart from my Z1C!

It doesn't activate GPS any more for me.
But if I enable GPS manually it disables it after quitting the camera. (Z2 5.1.1)
 

tryptophane

Senior Member
Dec 31, 2012
120
191
Freiburg
Hadn't made a change in module settings after updating and posting.
Now I made a change and everything works excellent.
Even when changing the settings back.
Maybe just some cache issue?

Anyway, great work:highfive:

Thank you! Yes, I think it has something to do with wrong default values when new settings get added by an update. I will try to find a proper solution.

I discovered one bug, sometimes GPS stays on after exiting the camera, although it should be deactivated automatically. It happens after switching a few times between different camera modes. I think it is because each camera mode is a different app, and the shutting off of one app (camera mode) happens almost simultaneously to the starting of the next app. This cause problems... I already have an idea of how I can solve this, will be for the next update...
 
  • Like
Reactions: B8shT1m3

tryptophane

Senior Member
Dec 31, 2012
120
191
Freiburg
I discovered one bug, sometimes GPS stays on after exiting the camera, although it should be deactivated automatically. It happens after switching a few times between different camera modes. I think it is because each camera mode is a different app, and the shutting off of one app (camera mode) happens almost simultaneously to the starting of the next app. This cause problems... I already have an idea of how I can solve this, will be for the next update...

Finally it was not possible to find a solution that makes this mod work reliably across all camera modes, so I restricted it to the camera modes "superior auto" and "manual". I explained it a little bit in the module description...

Now there should be notifications aboult updates of the module, it was my fault that there hasn't been until yet, because I didn't increase the version code of the app for each release. A noob failure :D
 

awojtas

Senior Member
Apr 20, 2005
335
68
Wellington
I really liked the bug starting the camera in Manual mode and have wished for this functionality ever since I got my Z1C - and have seen this requested elsewhere by people who don't have the developer skills to make it happen.
Is it possible to make this a permanent option in your xposed module to force camera starting in Manual mode please?

Sent from my D5503 using Tapatalk
 

tryptophane

Senior Member
Dec 31, 2012
120
191
Freiburg
I really liked the bug starting the camera in Manual mode and have wished for this functionality ever since I got my Z1C - and have seen this requested elsewhere by people who don't have the developer skills to make it happen.
Is it possible to make this a permanent option in your xposed module to force camera starting in Manual mode please?

Sent from my D5503 using Tapatalk

I think this should be easily achievable. I'll have a look..
 
  • Like
Reactions: awojtas

tryptophane

Senior Member
Dec 31, 2012
120
191
Freiburg
I really liked the bug starting the camera in Manual mode and have wished for this functionality ever since I got my Z1C - and have seen this requested elsewhere by people who don't have the developer skills to make it happen.
Is it possible to make this a permanent option in your xposed module to force camera starting in Manual mode please?

The bug is back and is now a feature :) Of course it's configurable in settings...

Can you do so that when quick-launch is used (shortcut on lockscreen or holding camera button) it'll use manual mode rather than superior auto?

I tried very hard to do this, spent two evenings on it. But I don't get it to work. The camera always crashes when I try to make it start in manual mode with quick-launch. The problem is that with quick-launch, a completely independent activity is started, not the same as for normal start of the camera. I think it is designed like this mainly for security reasons, because this activity has to prevent that someone can bypass the lock screen security options by starting the camera. This activity is not meant to be started in manual mode, even if I managed it, it would probably break the security of the lock screen... So I give it up... Anyway, I think that superior mode makes sense when started by quick-launch, because it's often used for quick snapshots...

I understand why you wouldn't do this but couldn't you perhaps give this "mod" a temporary spin in order to reproduce the steadyshot issue and maybe fix it, which it doesn't seem like whoever ported it will do?

http://forum.xda-developers.com/crossdevice-dev/sony-themes-apps/mod-cyberian-camera-t3267271

I'd appreciate it alot, i rather like that new Z5 camera ui but I cant deal with steadyshot video.

I don't want to install this camera, but if I find the time I'll will have a look at the apk and see if I can easily make a little mod for you... No promise at all ;)
 

awojtas

Senior Member
Apr 20, 2005
335
68
Wellington
The bug is back and is now a feature :) Of course it's configurable in settings...



I tried very hard to do this, spent two evenings on it. But I don't get it to work. The camera always crashes when I try to make it start in manual mode with quick-launch. The problem is that with quick-launch, a completely independent activity is started, not the same as for normal start of the camera. I think it is designed like this mainly for security reasons, because this activity has to prevent that someone can bypass the lock screen security options by starting the camera. This activity is not meant to be started in manual mode, even if I managed it, it would probably break the security of the lock screen... So I give it up... Anyway, I think that superior mode makes sense when started by quick-launch, because it's often used for quick snapshots...



I don't want to install this camera, but if I find the time I'll will have a look at the apk and see if I can easily make a little mod for you... No promise at all ;)
Wow, thanks for looking into this so much! I don't understand everything you've explained but cheers for giving it a good go. The new option is appreciated even if it doesn't work on lock screen.

Sent from my D5503 using Tapatalk
 

neonixxx

Senior Member
May 17, 2010
312
131
Man, am I glad I found this module! Thank you, @tryptophane!

I was wondering if you could/would add one more feature? I desperately want to be able to force the camera to use a file-naming scheme that uses the date (like Google Camera's simple "IMG_YYYYMMDD_SECOND.jpg") instead of the incremental DSC numbering thing that it does.
 
  • Like
Reactions: tryptophane

tryptophane

Senior Member
Dec 31, 2012
120
191
Freiburg
Man, am I glad I found this module! Thank you, @tryptophane!

I was wondering if you could/would add one more feature? I desperately want to be able to force the camera to use a file-naming scheme that uses the date (like Google Camera's simple "IMG_YYYYMMDD_SECOND.jpg") instead of the incremental DSC numbering thing that it does.

Yes! Now that you say it, this primitive naming scheme was one of the first things that annoyed me with the sony cam. It's easy to mod, will be done soon :)
 

tryptophane

Senior Member
Dec 31, 2012
120
191
Freiburg
Awesome! Love to hear that. :victory: Thank you!

It's done :)

I have chosen to append the milliseconds to the filename to make sure to avoid duplicate file names. I kept the DSC_ prefix, as a kind of signature for sony pictures. Maybe I'll add an option for an user-defined prefix in a later version...

It would also be nice to be able to defina a path where the picture get stored. And to let the different camera modes store pictures in the same common folder. It's a little bit more work to implement it, but maybe I'll be very motivated some day ;)
 

Top Liked Posts

  • There are no posts matching your filters.
  • 15
    Various mods for the stock camera app of Sony Xperia devices.

    For now, this module consists of 8 mods:

    • Let the user choose which gallery app gets opened by the camera
    • Use date-time naming-scheme
    • Force photo mode on start
    • Force manual mode on start
    • Keep Geo-Tags setting ON
    • Enable location setting in system on start
    • Choose location mode setting
    • Restore location setting in system on exit
    • Mod geo-tag icon

    This module is meant to grow, therefore the rather generic name. Ideas are welcome!

    Note: Tested on my Z1 Compact. Chances are good that it works well with other Xperia devices, as far as they have the same camera app. I would appreciate your feedback :)

    Note 2: This module is for Lollipop on Xperia Z* devices only!

    MOD #1: Let the user choose which gallery app gets opened by the camera

    In the latest Lollipop releases for the Xperia Z1 Compact and other Xperia Z devices, it is not possible anymore to choose which gallery app is used when you tap on the small picture thumbnail in the camera UI. It will always open the Sony Album app. But some people, like me, dislike the Sony Album app and prefer to use alternatives like Quickpic or others.

    With this mod, the camera app lets you choose again which gallery app to use when you tap on the thumbnail. Even better, it lets you choose different apps for normal JPEG photos and some special formats, like timeshift pictures or sound photos. For those kind of pictures, it is still advisable to use the Album app which supports the features of those formats (like playing sound on a picture).

    The mod has been implemented to work in the following camera modes (each of them has a separate implementation for launching the gallery and had to be hacked separatedly:

    • Superior Auto
    • Manual
    • Background Defocus
    • AR-Effect
    • Panorama
    • Creative Effect
    • Sound Photo
    • Timeshift burst

    In other camera modes, the camera will possibly still always use the Album app.

    If it does not work and you do not get asked which app to use, try to clear the defaults of the gallery app that gets opened by default!

    MOD #2: Use date-time naming-scheme
    This will save pictures and movies according to a date-time-with-milliseconds naming scheme:
    • for pictures: DSC_yyyyMMdd_HHmmss_SSS.JPG (example: DSC_20151230_133825_423.JPG)
    • for movies: DSC_yyyyMMdd_HHmmss_SSS.JPG (example: MOV_20151230_134232_922.mp4)
    It will apply to the modes Superior Auto, Manual and Creative Effects


    MOD #3: Force photo mode on start
    In manual mode, the camera will always start in photo mode, even if the last mode used was video.
    This mod is disabled by default. Go to settings page to enable it.

    MOD #4: Force manual mode on start
    The camera will always start in manual mode, when started from menu, shortcut or history. This mod does not apply when the camera is started from the camera button or lockscreen. In this case, the default "Superior Auto" mode will be started.

    MOD #5: Keep Geo-Tags setting ON

    This mod prevents a very annoying behavior of the stock camera app. Whenever you switch the camera to another mode than superior auto or manual, it will set the Geo-Tags setting to OFF, if GPS has been disallowed in the system-wide android settings. It will stay OFF in all camera modes until you set it to ON manually again, even if GPS has been allowed again in the system settings. The result of this behavior is that most of the pictures I made with my phone lack the location tag, although I never disabled the geo tags intentionally in the camera settings.

    This mod prevents this behavior, the Geo-Tags setting will stay set to ON until you deliberately disable it. Geo-Tag setting can be switched on or off independantly from the location settings in android.

    MOD #6: Enable location setting in system on start
    This will enable location in the android system settings on camera start/resume, to make sure that geo tags can always get recorded (see also MOD #8 to restore the previous location settings on camera exit.

    This mod applies only to the camera modes "superior auto" and "manual". When starting other modes, the location setting will stay untouched. In combination with MOD #8, this means: if GPS gets activated by starting one of this 2 modes and MOD #8 is activated, switching to another mode will deactivate GPS again. To record geo-tags in the other modes, you will still have to activate GPS manually in the system settings if MOD #8 is activated. This restriction is due to technical limitations due to the fact that each camera mode is an independent app, and these apps cannot communicate without any time lag. But this would be necessary to make this mod work reliably across different modes.

    MOD #7: Choose location mode setting
    This mod enables to choose the mode for acquiring location to be set in system. It can be either GPS, networks or both.
    This Xposed module will never disable a mode that was activated prior to camera start! E.g., if before camera start location was enabled in system and set to GPS, and you choose to enable location based on networks in this module, it will set the location mode to GPS and networks on camera start.

    MOD #8: Restore location setting in system on exit
    When exiting the camera, this mod will restore the location settings in system to their state before camera start. It applies only to the modes "superior auto" and "manual".

    MOD #9: Mod geo-tag icon
    Show a blue geo-tag icon when location is fixed by networks and a white one for GPS-fix.


    Credits:
    Many thanks to:

    • rovo89 for the magnific Xposed framework.
    • venkat kamesh for a tutorial on how to hack the camera UI on a smali basis, which led me to make my first steps in reverse engineering of android APKs.

    Download:
    Xposed Module Repository

    License
    This module is released under the Apache License Version 2.0
    Here you can say Thank You if you like my work :) _____
    |
    V​
    3
    I really liked the bug starting the camera in Manual mode and have wished for this functionality ever since I got my Z1C - and have seen this requested elsewhere by people who don't have the developer skills to make it happen.
    Is it possible to make this a permanent option in your xposed module to force camera starting in Manual mode please?

    The bug is back and is now a feature :) Of course it's configurable in settings...

    Can you do so that when quick-launch is used (shortcut on lockscreen or holding camera button) it'll use manual mode rather than superior auto?

    I tried very hard to do this, spent two evenings on it. But I don't get it to work. The camera always crashes when I try to make it start in manual mode with quick-launch. The problem is that with quick-launch, a completely independent activity is started, not the same as for normal start of the camera. I think it is designed like this mainly for security reasons, because this activity has to prevent that someone can bypass the lock screen security options by starting the camera. This activity is not meant to be started in manual mode, even if I managed it, it would probably break the security of the lock screen... So I give it up... Anyway, I think that superior mode makes sense when started by quick-launch, because it's often used for quick snapshots...

    I understand why you wouldn't do this but couldn't you perhaps give this "mod" a temporary spin in order to reproduce the steadyshot issue and maybe fix it, which it doesn't seem like whoever ported it will do?

    http://forum.xda-developers.com/crossdevice-dev/sony-themes-apps/mod-cyberian-camera-t3267271

    I'd appreciate it alot, i rather like that new Z5 camera ui but I cant deal with steadyshot video.

    I don't want to install this camera, but if I find the time I'll will have a look at the apk and see if I can easily make a little mod for you... No promise at all ;)
    2
    Changelog

    Version 0.1
    - initial release

    Version 0.2
    - added settings page

    Version 0.3
    - corrected a bug introduced with last version which caused the Geo-Tags mod not working properly anymore

    Version 0.4
    - added new mod: force photo mode on start

    Version 0.5
    - added new mod "enable location in system on camera start"
    - corrected a bug that caused that the camera always started in manual mode when the mod "force photo mode on start" was enabled

    Version 0.6
    - added new mod "choose location mode in system"
    - made the restoring of location setting in system on camera exit optional
    - added a mod to show a different geo-tag icon when the camera got a location fix by networks or GPS
    - Debugging message are sent to logcat instead of Xposed log
    - various enhancements and bugfixes

    Version 0.6.1
    - restrict mods "Enable/disable location setting in system on start/stop" to camera modes "superior auto" and "manual" (see module description for an explanation)

    Version 0.6.2
    - Location mode defaults to GPS. This makes the mod "Enable location on start" work as expected without entering settings when upgrading from version 0.5

    Version 0.7
    - added new mod: Force manual mode on start

    Version 0.8
    - new mod: use date-time naming-scheme
    2
    Man, am I glad I found this module! Thank you, @tryptophane!

    I was wondering if you could/would add one more feature? I desperately want to be able to force the camera to use a file-naming scheme that uses the date (like Google Camera's simple "IMG_YYYYMMDD_SECOND.jpg") instead of the incremental DSC numbering thing that it does.

    Yes! Now that you say it, this primitive naming scheme was one of the first things that annoyed me with the sony cam. It's easy to mod, will be done soon :)
    1
    this module is amazing but we need the MM version