[Sony Xperia 5 Questions & Answers] grisu59964:
Current state: cacaoserver is now able to start. I went through a lot of missing files and then segfaults. Unfortunately, the cacaoserver does somehow not survive the boot phase and is not running any more when the camera app starts. When I start the binary manually, it stays alive.

If SELinux is not enforcing, the camera app will start, connect to the cacaoserver and then crash:

10-09 10:24:50.660 860 860 D Zygote : Forked child process 12098
10-09 10:24:50.660 1639 1743 I ActivityManager: Start proc 12098:com.sonyericsson.android.camera/u0a64 for pre-top-activity {com.sonyericsson.android.camera/com.sonyericsson.android.camera.CameraActivity}
10-09 10:24:50.691 12098 12098 E .android.camer: Not starting debugger since process cannot load the jdwp agent.
10-09 10:24:50.694 12098 12098 D ProcessState: Binder ioctl to enable oneway spam detection failed: Invalid argument
10-09 10:24:50.702 12098 12098 D CompatibilityChangeReporter: Compat change id reported: 171979766; UID 10064; state: DISABLED
10-09 10:24:50.712 12098 12098 W .android.camer: ClassLoaderContext shared library size mismatch. Expected=0, found=1 (PCL[] | PCL[]{PCL[/product/framework/com.sonymobile.camera.addon_impl.jar*1938205956]})
10-09 10:24:50.719 12098 12098 V GraphicsEnvironment: ANGLE Developer option for 'com.sonyericsson.android.camera' set to: 'default'
10-09 10:24:50.720 12098 12098 V GraphicsEnvironment: ANGLE GameManagerService for com.sonyericsson.android.camera: false
10-09 10:24:50.720 12098 12098 D NetworkSecurityConfig: No Network Security Config specified, using platform default
10-09 10:24:50.721 12098 12098 D NetworkSecurityConfig: No Network Security Config specified, using platform default
10-09 10:24:50.801 12098 12119 I CameraManagerGlobal: Connecting to camera service
10-09 10:24:50.816 630 630 E SELinux : avc: denied { find } for pid=12098 uid=10064 name=cacao scontext=u:r:platform_app:s0:c512,c768 tcontext=u:object_r:default_android_service:s0 tclass=service_manager permissive=1
10-09 10:24:50.866 1318 27514 W ServiceManager: Permission failure: android.permission.SYSTEM_CAMERA from uid=10064 pid=12098
10-09 10:24:50.885 12067 12070 D CacaoService: client create - pid:12098
10-09 10:24:50.885 12067 12070 I cacao : 2079724329205 pal.cpp (2611) 12070 I [INF] PAL_Create
10-09 10:24:50.888 12098 12122 E .android.camer: BypassCameraBurst_changeToPhotoMode: stop cacao ret=-111
10-09 10:24:50.888 12098 12122 D .android.camer: [Debug] BypassCameraBurst_changeToPhotoMode: burstNum=4
10-09 10:24:50.890 12098 12122 E AndroidRuntime: FATAL EXCEPTION: CameraAccess
10-09 10:24:50.890 12098 12122 E AndroidRuntime: Process: com.sonyericsson.android.camera, PID: 12098
10-09 10:24:50.890 12098 12122 E AndroidRuntime: android.app.BackgroundServiceStartNotAllowedException: Not allowed to start service Intent { act=com.sonymobile.cameracommon.action.CAMERA_STATUS_UPDATE pkg=com.sonymobile.cameracommon (has extras) }: app is in background uid null
10-09 10:24:50.890 12098 12122 E AndroidRuntime: at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1870)
10-09 10:24:50.890 12098 12122 E AndroidRuntime: at android.app.ContextImpl.startService(ContextImpl.java:1826)
10-09 10:24:50.890 12098 12122 E AndroidRuntime: at android.content.ContextWrapper.startService(ContextWrapper.java:776)
10-09 10:24:50.890 12098 12122 E AndroidRuntime: at com.sonyericsson.cameracommon.status.CameraStatusPublisher.publish(CameraStatusPublisher.java:96)
10-09 10:24:50.890 12098 12122 E AndroidRuntime: at com.sonyericsson.cameracommon.status.CameraStatusPublisher.publish(CameraStatusPublisher.java:86)
10-09 10:24:50.890 12098 12122 E AndroidRuntime: at com.sonyericsson.android.camera.device.BypassCameraController$OpenBypassCameraTask.doCameraDeviceAccess(BypassCameraController.java:1166)
10-09 10:24:50.890 12098 12122 E AndroidRuntime: at com.sonyericsson.android.camera.device.CameraDeviceHandler$CameraDeviceAccessTask.run(CameraDeviceHandler.java:4017)
10-09 10:24:50.890 12098 12122 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:938)
10-09 10:24:50.890 12098 12122 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:99)
10-09 10:24:50.890 12098 12122 E AndroidRuntime: at android.os.Looper.loopOnce(Looper.java:201)
10-09 10:24:50.890 12098 12122 E AndroidRuntime: at android.os.Looper.loop(Looper.java:288)
10-09 10:24:50.890 12098 12122 E AndroidRuntime: at android.os.HandlerThread.run(HandlerThread.java:67)
10-09 10:24:50.892 12098 12149 E CameraApp: [PlatformCapability] CameraInfo cannot be retrieved. Because PlatformCapability is not prepared.
10-09 10:24:50.894 12098 12149 E CameraApp: [PlatformCapability] CameraInfo cannot be retrieved. Because PlatformCapability is not prepared.
10-09 10:24:50.896 12098 12149 E CameraApp: [PlatformCapability] CameraInfo cannot be retrieved. Because PlatformCapability is not prepared.
10-09 10:24:50.900 1639 12166 I DropBoxManagerService: add tag=system_app_crash isTagEnabled=true flags=0x2
10-09 10:24:50.900 12098 12098 I DynamicAreaFilter: .init sSmoothFactor=0.9 screenSize.x=1080 screenSize.y=2520 mScreenHeight=2520 mLimitScale=71 mDynamicFilterType=2 mValidScreenHeightMin=252 mValidScreenHeightMax=1789
10-09 10:24:50.900 12098 12149 E CameraApp: [PlatformCapability] CameraInfo cannot be retrieved. Because PlatformCapability is not prepared.
10-09 10:24:50.902 1639 4547 W ActivityTaskManager: Force finishing activity com.sonyericsson.android.camera/.CameraActivity
10-09 10:24:50.911 12098 12098 D SYMPHONY: Detected Symphony running as an Android application, using logcat for all debugging output
10-09 10:24:50.911 12098 12098 I SYMPHONY: [36mA t794df074f8 /local/mnt/workspace/pcgbait/docker.ci.tmp/build/aarch64-android-clang6.0/SecondParty/symphony/src/symphony/src/lib/internal/soc/topology.c:674 Could not resolve a cluster for cpu 7. The cluster may be offline. Power request will be ignored.[0m
10-09 10:24:50.920 12098 12122 I Process : Sending signal. PID: 12098 SIG: 9
10-09 10:24:50.920 1639 1742 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras) } to com.google.android.gms/.stats.service.DropBoxEntryAddedReceiver
10-09 10:24:50.920 1639 1742 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras) } to com.google.android.gms/.chimera.GmsIntentOperationService$PersistentTrustedReceiver
10-09 10:24:50.921 1639 1742 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras) } to com.google.android.gms/.stats.service.DropBoxEntryAddedReceiver
10-09 10:24:50.921 1639 1742 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras) } to com.google.android.gms/.chimera.GmsIntentOperationService$PersistentTrustedReceiver
10-09 10:24:50.944 957 2454 D vendor.qti.bluetooth@1.0-wake_lock: Release wakelock is released
10-09 10:24:50.973 12067 12067 D CacaoService: client delete - pid:12098
10-09 10:24:50.974 1639 1944 I ActivityManager: Process com.sonyericsson.android.camera (pid 12098) has died: fg TOP
10-09 10:24:50.974 1639 1746 I libprocessgroup: Successfully killed process cgroup uid 10064 pid 12098 in 0ms

The short life of the camera app process. 255 ms. Any hint solving those problems will massively improve my development speed, so please get in touch if you have a clue.