I installed the microg-edition of LineageOS 20 on my Fairphone 4, pulled the stock camera app
FPCamera.apk
(
com.fp.camera
,
v2.0.039(06301600-01)
) out of the latest firmware update file and installed it on the phone. I also rooted it via Magisk.
Whenever I start the stock camera app, I get a “Permissions denied” message:
Permissions denied. You can change them in Settings > Apps.
I have given it all permissions it asked for and that are selectable: Camera, Microphone, Location.
adb logcat
looks like it wants to have storage permissions, but I do not get asked for them:
CAM_PermissionUtils: checkPermissions, [android.permission.WRITE_EXTERNAL_STORAGE]
ActivityTaskManager: START u0 {act=android.content.pm.action.REQUEST_PERMISSIONS pkg=com.android.permissioncontroller cmp=com.android.permissioncontroller/.permission.ui.GrantPermissionsActivity (has extras)} from uid 10190
CompatibilityChangeReporter: Compat change id reported: 174042980; UID 10190; state: DISABLED
CAM_QuickActivity: onCreate return, by permission check!
What can I do to get the stock camera app working on my Fairphone4?
(I read the 2022-02 stock camera thread, but that one seems outdated by now since OpenCamera is able to access the wide angle lens. And according to Gallery Proxy for FPCamera (stock camera app) it must be possible somehow.)
It seems as if the WRITE_EXTERNAL_STORAGE
permission is of no help anymore on Android 13:
Behavior changes: Apps targeting Android 13 or higher | Android Developers
READ_EXTERNAL_STORAGE: Manifest.permission | Android Developers
WRITE_EXTERNAL_STORAGE: Manifest.permission | Android Developers
Note: If your app targets Build.VERSION_CODES.R
(Android 11) or higher, this permission has no effect.
So the stock camera on the stock OS probably only works because the default permissions xml file declares the permission 
I managed to get the camera app working by manually giving the permission via adb
:
adb shell pm grant com.fp.camera android.permission.WRITE_EXTERNAL_STORAGE
To view the taken photos I had to install the gallery proxy app (forum thread)
I would like to try the stock camera app on my Lineage FP4.
I wanted to follow these insctructions but i’m stuck at the first point…
How do you manage to pulled the stock camera app from the firmware update file ?
From my understanding it should be in system partition that should be in “super.img” ?
I tried some tools but i’m not enough used to android…
Thanks
Kendoulou:
How do you manage to pulled the stock camera app from the firmware update file ?
See the instructions at Fairphone 4: Stock camera on LineageOS
adb is a bit more verbose in its output:
adb: failed to install FPCamera.v7.00.04.0007.4.0.apk: Failure [INSTALL_FAILED_MISSING_SHARED_LIBRARY: Reconciliation failed...: Reconcile failed: Package com.fp.camera requires unavailable native shared library libtctcameraalgo_jni.tct.so; failing!]
Seems like they shipped a new library that’s obviously (probably) not in any of the custom ROMs yet. I’ll retest once Calyx pulls in the latest blobs. If that doesn’t fix it the other possibilty would be t…