[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] Kostyan_nsk:
I cannot agree with you. Cameraserver has nothing common with HwCamCfgSvr.

Take a look at the code of mediaserver and cameraserver at these lines:

https://github.com/LineageOS/androi....1/media/mediaserver/main_mediaserver.cpp#L48

https://github.com/LineageOS/androi...camera/cameraserver/main_cameraserver.cpp#L32

Cameraserver does absolutely the same - starts cameraservice. The only difference is when mediaserver dies because of camera crashing, it breaks down all services which was instatiated by him.

Device boots successfully with cameraserver, but the camera is still crashing in the same place, independently of HAL1 flag, in hw::Camera3DeviceImpl::queryCapibility()

pid: 17103, tid: 17112, name: Binder:17103_1 >>> /system/bin/cameraserver <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x6b94c4
r0 00000001 r1 f6a47038 r2 00000000 r3 00000000
r4 006b93c0 r5 00000001 r6 f5e7f208 r7 006b93c0
r8 f61ca901 r9 f61ca0c8 sl 00000000 fp f5c9c010
ip f61c9d78 sp f5e7f1f8 lr f61b7eb9 pc f61b7eb8 cpsr 400f0030
d0 00000f30000014e8 d1 000000d000000003
d2 0000000000000000 d3 00000f3000001400
d4 00000019000003e8 d5 0000001e0000000a
d6 0000000000000000 d7 00000f3000001420
d8 00000417000042cf d9 0000000000000000
d10 0000000000000000 d11 0000000000000000
d12 0000000000000000 d13 0000000000000000
d14 0000000000000000 d15 0000000000000000
d16 2e74736973726570 d17 2e6761742e676f6c
d18 000000000000db38 d19 000000000000c8a0
d20 ffffffff00000000 d21 0000000e00000001
d22 ffffffff00000000 d23 00000000ffffffff
d24 0000000000000000 d25 0000000000000000
d26 0000000000000000 d27 0000000000000000
d28 0000000000000000 d29 0000000000000000
d30 0000000000000000 d31 0000000000000000
scr 80000010

backtrace:
#00 pc 00012eb8 /system/lib/hw/camera.hi3635.so (_ZN2hw17Camera3DeviceImpl15queryCapibilityEv+27)
#01 pc 0001333b /system/lib/hw/camera.hi3635.so (_ZN2hw17Camera3DeviceImpl19initDefaultSettingsEi+38)
#02 pc 00013f73 /system/lib/hw/camera.hi3635.so (_ZN2hw17Camera3DeviceImpl4openEv+186)
#03 pc 00008ed7 /system/lib/hw/camera.hi3635.so (_ZN2hw13Camera3Device4openEPP11hw_device_t+102)
#04 pc 0000bfe5 /system/lib/hw/camera.hi3635.so (_ZN2hw13Camera3Module18camera_device_openEPK11hw_module_tPKcPP11hw_device_t+132)
#05 pc 00062037 /system/lib/libcameraservice.so (_ZN7android12CameraModule4openEPKcPP11hw_device_t+62)
#06 pc 0007fc85 /system/lib/libcameraservice.so (_ZN7android13Camera3Device10initializeEPNS_12CameraModuleE+152)
#07 pc 0005fb61 /system/lib/libcameraservice.so (_ZN7android17Camera2ClientBaseINS_13CameraService6ClientEE10initializeEPNS_12CameraModuleE+72)
#08 pc 00066137 /system/lib/libcameraservice.so (_ZN7android13Camera2Client10initializeEPNS_12CameraModuleE+66)
#09 pc 00054001 /system/lib/libcameraservice.so (_ZN7android13CameraService13connectHelperINS_8hardware13ICameraClientENS0_6ClientEEENS_6binder6StatusERKNS_2spIT_EERKNS_7String8EiRKNS_8String16EiiNS0_8apiLevelEbbRNS7_IT0_EE+1264)
#10 pc 00055b43 /system/lib/libcameraservice.so (_ZN7android13CameraService7connectERKNS_2spINS_8hardware13ICameraClientEEEiRKNS_8String16EiiPNS1_INS2_7ICameraEEE+122)
#11 pc 00034791 /system/lib/libcamera_client.so (_ZN7android8hardware15BnCameraService10onTransactEjRKNS_6ParcelEPS2_j+388)
#12 pc 00058433 /system/lib/libcameraservice.so (_ZN7android13CameraService10onTransactEjRKNS_6ParcelEPS1_j+86)
#13 pc 0003592f /system/lib/libbinder.so (_ZN7android7BBinder8transactEjRKNS_6ParcelEPS1_j+70)
#14 pc 0003d08d /system/lib/libbinder.so (_ZN7android14IPCThreadState14executeCommandEi+576)
#15 pc 0003cd63 /system/lib/libbinder.so (_ZN7android14IPCThreadState20getAndExecuteCommandEv+114)
#16 pc 0003d22b /system/lib/libbinder.so (_ZN7android14IPCThreadState14joinThreadPoolEb+38)
#17 pc 0004f8c9 /system/lib/libbinder.so
#18 pc 0000e41d /system/lib/libutils.so (_ZN7android6Thread11_threadLoopEPv+144)
#19 pc 00047e63 /system/lib/libc.so (_ZL15__pthread_startPv+22)
#20 pc 00019f3d /system/lib/libc.so (__start_thread+6)

And here's backtrace from [MENTION=7763184]spirtix[/MENTION] with TARGET_HAS_LEGACY_CAMERA_HAL1:

pid: 2971, tid: 2971, name: mediaserver >>> /system/bin/mediaserver <<<

signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x5b94c4
r0 00000001 r1 f6b04038 r2 00000000 r3 00000000
r4 005b93c0 r5 00000001 r6 ffb50e70 r7 005b93c0
r8 f74e3901 r9 f74e30c8 sl 00000000 fp f44bf1d0
ip f74e2d78 sp ffb50e60 lr f74d0eb9 pc f74d0eb8 cpsr 400f0030

backtrace:
#00 pc 00012eb8 /system/lib/hw/camera.hi3635.so (_ZN2hw17Camera3DeviceImpl15queryCapibilityEv+27)
#01 pc 0001333b /system/lib/hw/camera.hi3635.so (_ZN2hw17Camera3DeviceImpl19initDefaultSettingsEi+38)
#02 pc 00013f73 /system/lib/hw/camera.hi3635.so (_ZN2hw17Camera3DeviceImpl4openEv+186)
#03 pc 00008ed7 /system/lib/hw/camera.hi3635.so (_ZN2hw13Camera3Device4openEPP11hw_device_t+102)
#04 pc 0000bfe5 /system/lib/hw/camera.hi3635.so (_ZN2hw13Camera3Module18camera_device_openEPK11hw_module_tPKcPP11hw_device_t+132)
#05 pc 000609cb /system/lib/libcameraservice.so (_ZN7android12CameraModule4openEPKcPP11hw_device_t+66)
#06 pc 0007e1d1 /system/lib/libcameraservice.so (_ZN7android13Camera3Device10initializeEPNS_12CameraModuleE+156)
#07 pc 0005e503 /system/lib/libcameraservice.so (_ZN7android17Camera2ClientBaseINS_13CameraService6ClientEE10initializeEPNS_12CameraModuleE+78)
#08 pc 00064a69 /system/lib/libcameraservice.so (_ZN7android13Camera2Client10initializeEPNS_12CameraModuleE+68)
#09 pc 00052ad7 /system/lib/libcameraservice.so (_ZN7android13CameraService13connectHelperINS_8hardware13ICameraClientENS0_6ClientEEENS_6binder6StatusERKNS_2spIT_EERKNS_7String8EiRKNS_8String16EiiNS0_8apiLevelEbbRNS7_IT0_EE+1258)
#10 pc 00052553 /system/lib/libcameraservice.so (_ZN7android13CameraService22initializeShimMetadataEi+106)
#11 pc 00051a37 /system/lib/libcameraservice.so (_ZN7android13CameraService23getLegacyParametersLazyEiPNS_16CameraParametersE+350)
#12 pc 000564a5 /system/lib/libcameraservice.so (_ZN7android13CameraService19getLegacyParametersEiPNS_8String16E+96)
#13 pc 0002ea23 /system/lib/libcamera_client.so (_ZN7android8hardware15BnCameraService10onTransactEjRKNS_6ParcelEPS2_j+1034)
#14 pc 00056e33 /system/lib/libcameraservice.so (_ZN7android13CameraService10onTransactEjRKNS_6ParcelEPS1_j+86)
#15 pc 00035b73 /system/lib/libbinder.so (_ZN7android7BBinder8transactEjRKNS_6ParcelEPS1_j+70)
#16 pc 0003d2eb /system/lib/libbinder.so (_ZN7android14IPCThreadState14executeCommandEi+578)
#17 pc 0003cfbb /system/lib/libbinder.so (_ZN7android14IPCThreadState20getAndExecuteCommandEv+114)
#18 pc 0003d48b /system/lib/libbinder.so (_ZN7android14IPCThreadState14joinThreadPoolEb+38)
#19 pc 00000d73 /system/bin/mediaserver
#20 pc 00016c8d /system/lib/libc.so (__libc_init+48)
#21 pc 00000c2c /system/bin/mediaserver

https://pastebin.com/G0eY4fLt

As you can see, except of different proccess names, backtraces are almost the same.

So I see no reason in rollback to HAL1 and refuse of using Camera 2 API if vendor blobs support it and actually was designed for it.