Camera2 API development

As I don’t see anyone working on this (maybe I’m wrong?) I’ll take a stab at it and attempt to implement Camera2 API support. As a developer with 10+ years of experience how hard can it be :see_no_evil: ?

All joking aside, I have substantial experience in Java and Python but almost none in C++ so any help to get me started with setting up the project is welcome as I don’t see any guidelines how one actually develops and debugs internal components for SFOS.

So let’s get started with basic information - we have release blog for version 4.4 that states the following:

Sailfish OS hooks into the Android Camera API to access the camera firmware. The glitch exists in this version of the API, but is fixed in the Camera2 API. Switching Sailfish OS to use the Camera2 API is a large, but not impractical, amount of work. What’s more, because the code that needs changing is open source, and we’ve had a number of excellent contributions to the camera pipeline from the community in the past, we’re hoping we can work together with you i the community to get this resolved in a future release.

I have created a fork of droidmedia project and, for starters, two bits of information would be extremely helpful:

  1. Where are the other (non-main) lenses disabled in SFOS?
  2. Are there any guides how to setup droidmedia project for development? If I open it in Sailfish IDE i get a bunch of dependency errors.



That one is easy: /vendor/etc/camera/camxoverridesettings.txt, search for multiCameraEnable.


I have already made a partial implementation of Camera2 API support and plan to continue adding the missing things.


Great! I’ll be happy to test and/or contribute (I own Xa2, xa2 plus and 10 iii).

Are your changes (publicly) available on github?


Thanks for picking this up, or at least trying to! I tried to tinker around Camera2 API earlier, but came out with nothing…

Please share your work to the community, no matter how early steps, the more eyes there is to it the faster it progresses! I’m happy to help in whatever I can, with all the zero knowledge I have about porting and Android inner workings :muscle: :joy:


I need to check the code and clean it up a bit before pushing it to public, it’s just too ugly right now because of the missing parts and commented out code.


if you need it, i volunteer to test it on 10 ii

1 Like