Camera & Camera2 API - missing features & bugs

:information_source: This issue has already been discussed over numerous posts, so I just wanted to make one comprehensive post for wiki purposes.

Here is the Camera2 API report generated using Camera2 API Probe with a complete list of currently available features:

Model:FP4
Manufacturer:Fairphone
Build:11
SDK:30
------------------------------------------
Model:FP4
Manufacturer:Fairphone
Build:11
SDK:30
------------------------------------------
Camera ID: 0
Camera Facing: BACK
Hardware Support Level:LEVEL_3
Manual exposure:1
Auto exposure:1
Auto exposure, always flash:1
Auto exposure, auto flash:1
Auto exposure, auto flash, red eye reduction:0
AE Lock:1
Compensation Range: [-12, 12]
Compensation Step: 1/6
Target FPS  Range: [10, 15]
Target FPS  Range: [15, 15]
Target FPS  Range: [10, 30]
Target FPS  Range: [30, 30]
Manual focus:1
Auto focus:1
Auto focus macro:1
Auto focus continuous picture:1
Auto focus continuous video:1
Auto focus EDOF:0
White balance off:1
Automatic white balance:1
WB: cloudy day:1
WB: daylight:1
WB: fluorescent:1
WB: incandescent:1
WB: shade:1
WB: twilight:1
WB: warm fluorescent:1
AWB Lock:1
RawCapture:1
BurstCapture:1
availableCapability: BACKWARD_COMPATIBLE
availableCapability: CONSTRAINED_HIGH_SPEED_VIDEO
availableCapability: RAW
availableCapability: YUV_REPROCESSING
availableCapability: PRIVATE_REPROCESSING
availableCapability: READ_SENSOR_SETTINGS
availableCapability: MANUAL_SENSOR
availableCapability: BURST_CAPTURE
availableCapability: MANUAL_POST_PROCESSING
Stabilization Mode: Optical
Stabilization Mode: Video
previewSize: 3952 * 1824 (13:6)
previewSize: 3840 * 2160 (16:9)
previewSize: 3264 * 2448 (4:3)
previewSize: 3200 * 2400 (4:3)
previewSize: 2976 * 2976 (1:1)
previewSize: 2880 * 2156 (720:539)
previewSize: 2688 * 1512 (16:9)
previewSize: 2560 * 1440 (16:9)
previewSize: 2340 * 1080 (13:6)
previewSize: 2048 * 1536 (4:3)
previewSize: 1920 * 1440 (4:3)
previewSize: 1920 * 1080 (16:9)
previewSize: 1600 * 1200 (4:3)
previewSize: 1440 * 1080 (4:3)
previewSize: 1280 * 960 (4:3)
previewSize: 1280 * 768 (5:3)
previewSize: 1280 * 720 (16:9)
previewSize: 1080 * 1080 (1:1)
previewSize: 1024 * 738 (512:369)
previewSize: 1024 * 768 (4:3)
previewSize: 864 * 480 (9:5)
previewSize: 800 * 600 (4:3)
previewSize: 800 * 480 (5:3)
previewSize: 720 * 1280 (16:9)
previewSize: 720 * 480 (3:2)
previewSize: 640 * 480 (4:3)
previewSize: 640 * 400 (8:5)
previewSize: 640 * 360 (16:9)
previewSize: 352 * 288 (11:9)
previewSize: 320 * 240 (4:3)
previewSize: 240 * 320 (4:3)
previewSize: 176 * 144 (11:9)
photoSize: 3952 * 1824 (13:6)
photoSize: 3840 * 2160 (16:9)
photoSize: 3264 * 2448 (4:3)
photoSize: 3200 * 2400 (4:3)
photoSize: 2976 * 2976 (1:1)
photoSize: 2880 * 2156 (720:539)
photoSize: 2688 * 1512 (16:9)
photoSize: 2560 * 1440 (16:9)
photoSize: 2340 * 1080 (13:6)
photoSize: 2048 * 1536 (4:3)
photoSize: 1920 * 1440 (4:3)
photoSize: 1920 * 1080 (16:9)
photoSize: 1600 * 1200 (4:3)
photoSize: 1440 * 1080 (4:3)
photoSize: 1280 * 960 (4:3)
photoSize: 1280 * 768 (5:3)
photoSize: 1280 * 720 (16:9)
photoSize: 1080 * 1080 (1:1)
photoSize: 1024 * 738 (512:369)
photoSize: 1024 * 768 (4:3)
photoSize: 864 * 480 (9:5)
photoSize: 800 * 600 (4:3)
photoSize: 800 * 480 (5:3)
photoSize: 720 * 1280 (16:9)
photoSize: 720 * 480 (3:2)
photoSize: 640 * 480 (4:3)
photoSize: 640 * 400 (8:5)
photoSize: 640 * 360 (16:9)
photoSize: 352 * 288 (11:9)
photoSize: 320 * 240 (4:3)
photoSize: 240 * 320 (4:3)
photoSize: 176 * 144 (11:9)
videoSize: 3952 * 1824 (13:6)
videoSize: 3840 * 2160 (16:9)
videoSize: 3264 * 2448 (4:3)
videoSize: 3200 * 2400 (4:3)
videoSize: 2976 * 2976 (1:1)
videoSize: 2880 * 2156 (720:539)
videoSize: 2688 * 1512 (16:9)
videoSize: 2560 * 1440 (16:9)
videoSize: 2340 * 1080 (13:6)
videoSize: 2048 * 1536 (4:3)
videoSize: 1920 * 1440 (4:3)
videoSize: 1920 * 1080 (16:9)
videoSize: 1600 * 1200 (4:3)
videoSize: 1440 * 1080 (4:3)
videoSize: 1280 * 960 (4:3)
videoSize: 1280 * 768 (5:3)
videoSize: 1280 * 720 (16:9)
videoSize: 1080 * 1080 (1:1)
videoSize: 1024 * 738 (512:369)
videoSize: 1024 * 768 (4:3)
videoSize: 864 * 480 (9:5)
videoSize: 800 * 600 (4:3)
videoSize: 800 * 480 (5:3)
videoSize: 720 * 1280 (16:9)
videoSize: 720 * 480 (3:2)
videoSize: 640 * 480 (4:3)
videoSize: 640 * 400 (8:5)
videoSize: 640 * 360 (16:9)
videoSize: 352 * 288 (11:9)
videoSize: 320 * 240 (4:3)
videoSize: 240 * 320 (4:3)
videoSize: 176 * 144 (11:9)
------------------------------------------
Camera ID: 1
Camera Facing: FRONT
Hardware Support Level:LEVEL_3
Manual exposure:1
Auto exposure:1
Auto exposure, always flash:0
Auto exposure, auto flash:0
Auto exposure, auto flash, red eye reduction:0
AE Lock:1
Compensation Range: [-12, 12]
Compensation Step: 1/6
Target FPS  Range: [15, 15]
Target FPS  Range: [8, 30]
Target FPS  Range: [30, 30]
Manual focus:1
Auto focus:0
Auto focus macro:0
Auto focus continuous picture:0
Auto focus continuous video:0
Auto focus EDOF:0
White balance off:1
Automatic white balance:1
WB: cloudy day:1
WB: daylight:1
WB: fluorescent:1
WB: incandescent:1
WB: shade:1
WB: twilight:1
WB: warm fluorescent:1
AWB Lock:1
RawCapture:1
BurstCapture:1
availableCapability: BACKWARD_COMPATIBLE
availableCapability: RAW
availableCapability: YUV_REPROCESSING
availableCapability: PRIVATE_REPROCESSING
availableCapability: READ_SENSOR_SETTINGS
availableCapability: MANUAL_SENSOR
availableCapability: BURST_CAPTURE
availableCapability: MANUAL_POST_PROCESSING
Stabilization Mode: Video
previewSize: 2880 * 2156 (720:539)
previewSize: 2688 * 1512 (16:9)
previewSize: 2560 * 1440 (16:9)
previewSize: 2340 * 1080 (13:6)
previewSize: 2048 * 1536 (4:3)
previewSize: 1920 * 1440 (4:3)
previewSize: 1920 * 1080 (16:9)
previewSize: 1600 * 1200 (4:3)
previewSize: 1440 * 1080 (4:3)
previewSize: 1280 * 960 (4:3)
previewSize: 1280 * 768 (5:3)
previewSize: 1280 * 720 (16:9)
previewSize: 1080 * 1080 (1:1)
previewSize: 1024 * 738 (512:369)
previewSize: 1024 * 768 (4:3)
previewSize: 864 * 480 (9:5)
previewSize: 800 * 600 (4:3)
previewSize: 800 * 480 (5:3)
previewSize: 720 * 1280 (16:9)
previewSize: 720 * 480 (3:2)
previewSize: 640 * 480 (4:3)
previewSize: 640 * 400 (8:5)
previewSize: 640 * 360 (16:9)
previewSize: 352 * 288 (11:9)
previewSize: 320 * 240 (4:3)
previewSize: 240 * 320 (4:3)
previewSize: 176 * 144 (11:9)
photoSize: 2560 * 1440 (16:9)
photoSize: 2340 * 1080 (13:6)
photoSize: 2048 * 1536 (4:3)
photoSize: 1920 * 1440 (4:3)
photoSize: 1920 * 1080 (16:9)
photoSize: 1600 * 1200 (4:3)
photoSize: 1440 * 1080 (4:3)
photoSize: 1280 * 960 (4:3)
photoSize: 1280 * 768 (5:3)
photoSize: 1280 * 720 (16:9)
photoSize: 1080 * 1080 (1:1)
photoSize: 1024 * 738 (512:369)
photoSize: 1024 * 768 (4:3)
photoSize: 864 * 480 (9:5)
photoSize: 800 * 600 (4:3)
photoSize: 800 * 480 (5:3)
photoSize: 720 * 1280 (16:9)
photoSize: 720 * 480 (3:2)
photoSize: 640 * 480 (4:3)
photoSize: 640 * 400 (8:5)
photoSize: 640 * 360 (16:9)
photoSize: 352 * 288 (11:9)
photoSize: 320 * 240 (4:3)
photoSize: 240 * 320 (4:3)
photoSize: 176 * 144 (11:9)
videoSize: 2880 * 2156 (720:539)
videoSize: 2688 * 1512 (16:9)
videoSize: 2560 * 1440 (16:9)
videoSize: 2340 * 1080 (13:6)
videoSize: 2048 * 1536 (4:3)
videoSize: 1920 * 1440 (4:3)
videoSize: 1920 * 1080 (16:9)
videoSize: 1600 * 1200 (4:3)
videoSize: 1440 * 1080 (4:3)
videoSize: 1280 * 960 (4:3)
videoSize: 1280 * 768 (5:3)
videoSize: 1280 * 720 (16:9)
videoSize: 1080 * 1080 (1:1)
videoSize: 1024 * 738 (512:369)
videoSize: 1024 * 768 (4:3)
videoSize: 864 * 480 (9:5)
videoSize: 800 * 600 (4:3)
videoSize: 800 * 480 (5:3)
videoSize: 720 * 1280 (16:9)
videoSize: 720 * 480 (3:2)
videoSize: 640 * 480 (4:3)
videoSize: 640 * 400 (8:5)
videoSize: 640 * 360 (16:9)
videoSize: 352 * 288 (11:9)
videoSize: 320 * 240 (4:3)
videoSize: 240 * 320 (4:3)
videoSize: 176 * 144 (11:9)

Missing features

  • The wide angle camera is accessible only through the stock camera app, not through the API. This prevents its usage in alternative camera apps such as GCam or Open Camera.
  • The full 48MP quality (8000×6000) of the main camera and 24MP quality (5760×4312) of the selfie camera are completely unavailable.
  • For some reason, even the basic 12MP resolution (4000×3000) is inaccessible in the Camera2 mode, though it’s probably fine when using the old camera API. This is problematic for example when taking HDR photos using Open Camera. You simply cannot achieve the full 12MP quality.
  • The same applies to the basic 6MP resolution (2880×2156) of the selfie camera. But funnily enough, this resolution is accessible in preview and video modes. Only the photo mode is missing.
  • There also seems to be no access to FPS values higher than 30, which complicates, for example, slow motion video shooting.
  • Also there is no direct access to the ToF sensor.

Bugs

  • When accessing the selfie camera in video mode using the Camera2 API, it sometimes freezes or straight up crashes apps. The workaround seems to be to set zoom to at least 1.07x, then it is stable. This is reproducible, but not by all users.
  • Trying to access 1/8x slow motion in GCam crashes the app. It works in Open Camera (0.125x speed), but the resulting video is choppy.

Response from support

So far, I’ve only got response regarding the wide angle camera:

the wide-angle camera should be usable in other apps but I can confirm it’s not. I’ve reported this to our Quality team and we’ll likely fix it at some point in the future but for the time being, you will have to use our app for such pictures.

Update (2022-03-30):

The list of camera bugs and feature requests is incredibly helpful and I will take a look right away. Some of these are already being worked on, but should I spot anything unknown to us, I will make sure to flag it :slight_smile:

25 Likes

Just stumbled upon this announcement from the EU Council: Digital Markets Act (DMA): agreement between the Council and the European Parliament - Consilium

The whole announcement is very interesting, but this hit me in the eye:

Gatekeepers will have to:

  • allow app developers fair access to the supplementary functionalities of smartphones (e.g. NFC chip)

I’m fairly sure that Fairphone doesn’t qualify as a gatekeeper, but it is very possible that Google will actually have to force all vendors to expose all the available features in the API. That would effectively prevent any future issues like this.

6 Likes

To add to the list of missing features:
The ToF sensor is currently not exposed through the Camera2 API.
(for reference Working with the 3D Camera on the Samsung S10 5G | by Luke Ma | The Startup | Medium)

1 Like

Yeah, I already have it listed (the last point).

3 Likes

I totally agree with your issues mentioned here! Especially accessing the ToF sensor would be nice to have, so we could have rudimentry night vision.

5 Likes

Thank you @Razem: Great description of the problem. I hope that the Fairphone Team does also a good job by fixing this issues.

1 Like

Are there any new updates from support?

1 Like

Unfortunately not yet. I’ll definitely update the post as soon as I get any update.

4 Likes

Any information on this topic, at least to keep this item alive?

2 Likes

Nothing so far, unfortunately. I’ll try to urge the support again.

2 Likes

Also adding that Info here: Apps need SYSTEM_CAMERA permissions to access the full feature set. This is only possible for apps on the system partition with correct permissions. Therefore app like Camera2 API Probe cannot see all features.
https://source.android.com/devices/camera/system-cameras

Not sure why it was done that way. Most user friendly way would probably be to drop the SYSTEM_CAMERA requirement.

For custom Roms it should still be possible to grant that permission and access all features.

1 Like

It sounds to me like Google is intentionally making the use of alternative camera apps unattractive. This way, the Google smartphones (with stock ROM!) are even better off with their photo quality than they already are. So you have no chance to get the Google quality/functions with a custom ROM and e.g. gcam port on their smartphones. Using gcam port with other manufacturers (with or without custom ROM) of course leads to the same problem. Sometimes people want to use a gcam port although they have a stock ROM, because manufacturers other than Google often cannot match their quality. This might indirectly push one or the other customer to buy a Google smartphone.

Yes, that’s precisely how it’s currently implemented. The point is that it doesn’t have to be this way. And the key is indeed to drop the SYSTEM_CAMERA permission requirement, i.e., make the wide lens camera a regular camera instead of a system camera. Which Fairphone can do.

Also I have a new update from the support team. I hope it will be done soon.

Indeed, we have been working on this request for some time already. I have discussed this again with the relevant department and we have agreed to heighten the priority in order to resolve this faster. As soon as I know more in terms of timeline, I will be happy to let you know.

6 Likes

Yes, dropping the permission would be best.

If it’s not done, at least for custom Roms it would be best to patch Android to just ignore that permission and provide it to all apps - not sure how hard that is. Maybe such a change would make sense for Linage OS in general.

The stock FPCamera app unfortunately is still not working without crashes if integrated in custom ROMs. But it’s able to access all cameras, when installed as SYSTEM_CAMERA app. I decompiled the camera app and now I’m trying to get behind some of the causes with remote debugging in Android Studio. But that’s time intensive and the learning curve for that is quite steep …

7 Likes