[Xiaomi Redmi Note 4 [Snapdragon] ROMs, Kernels, Re] Demodroid:
In my case, the Snap.apk is visible in the system, and so are the libs, but the actual camera isn't working at all. Trying to access the camera with any app will cause the system to freeze as well.

This is with Selinux set to permissive. Seems to be a problem with the lib. Logcat attached filtered to warnings and errors:

3C All-in-One Toolbox Pro (logcat)

======================

W/23:36:03.446 ServiceManagement( 1902)

Waited one second for android.hardware.camera.provider@2.4::ICameraProvider/legacy/0. Waiting another...

E/23:36:03.140 CameraManagerGlobal( 2335)

Camera service is unavailable

E/23:36:03.065 CameraManagerGlobal( 2335)

Camera service is unavailable

W/23:36:02.446 ServiceManagement( 1902)

Waited one second for android.hardware.camera.provider@2.4::ICameraProvider/legacy/0. Waiting another...

E/23:36:02.139 CameraManagerGlobal( 2335)

Camera service is unavailable

E/23:36:02.064 CameraManagerGlobal( 2335)

Camera service is unavailable

E/23:36:02.027 android.hardware.camera.provider@2.4-service( 7820)

Could not get passthrough implementation for android.hardware.camera.provider@2.4::ICameraProvider/legacy/0.

E/23:36:02.027 CamProvider@2.4-impl( 7820)

HIDL_FETCH_ICameraProvider: camera provider init failed!

E/23:36:02.026 camera_check_event_status( 0)

Line 73 event_data->status 0X10001

E/23:36:02.026 CamProvider@2.4-impl( 7820)

initialize: Camera info query failed!

E/23:36:02.026 camera_check_event_status( 0)

event_data status out of bounds

E/23:36:02.026 QCamera ( 7820)

<HAL><ERROR> initCapabilities: 6402: camera_open failed. rc = -1

E/23:36:02.026 QCamera ( 7820)

<MCI><ERROR> camera_open: 2110: mm_camera_open err = -1

E/23:36:02.026 QCamera ( 7820)

<MCI><ERROR> mm_camera_open: 298: cannot open control fd of '/dev/video2' (Bad address)

E/23:36:02.026 mm-camera( 1946)

<MCT ><ERROR> 525: main: New session [2] creation failed with error

E/23:36:02.026 mm-camera( 1946)

<MCT ><ERROR> 190: server_process_bind_hal_ds: Error in bind socket_fd=15 No such file or directory

E/23:36:02.016 QCamera ( 7820)

<MCI><ERROR> get_num_of_cameras: 1908: num_cameras=2

E/23:36:02.016 QCamera ( 7820)

<MCI><ERROR> get_num_of_cameras: 1890: dev_info[id=1,name='video2']

E/23:36:02.016 QCamera ( 7820)

<MCI><ERROR> get_num_of_cameras: 1890: dev_info[id=0,name='video1']

W/23:36:01.445 ServiceManagement( 1902)

Waited one second for android.hardware.camera.provider@2.4::ICameraProvider/legacy/0. Waiting another...

E/23:36:01.138 CameraManagerGlobal( 2335)

Camera service is unavailable

E/23:36:01.063 CameraManagerGlobal( 2335)

Camera service is unavailable

W/23:36:00.445 ServiceManagement( 1902)

Waited one second for android.hardware.camera.provider@2.4::ICameraProvider/legacy/0. Waiting another...

E/23:36:00.193 ANDR-PERF-MPCTL( 513)

Invalid profile no. 0, total profiles 0 only

E/23:36:00.137 CameraManagerGlobal( 2335)

Camera service is unavailable

E/23:36:00.062 CameraManagerGlobal( 2335)

Camera service is unavailable

W/23:35:59.445 ServiceManagement( 1902)

Waited one second for android.hardware.camera.provider@2.4::ICameraProvider/legacy/0. Waiting another...

E/23:35:59.136 CameraManagerGlobal( 2335)

Camera service is unavailable

E/23:35:59.061 CameraManagerGlobal( 2335)

Camera service is unavailable

W/23:35:58.444 ServiceManagement( 1902)

Waited one second for android.hardware.camera.provider@2.4::ICameraProvider/legacy/0. Waiting another...

E/23:35:58.135 CameraManagerGlobal( 2335)

Camera service is unavailable

E/23:35:58.060 CameraManagerGlobal( 2335)

Camera service is unavailable

W/23:35:57.444 ServiceManagement( 1902)

Waited one second for android.hardware.camera.provider@2.4::ICameraProvider/legacy/0. Waiting another...

E/23:35:57.134 CameraManagerGlobal( 2335)

Camera service is unavailable

E/23:35:57.059 CameraManagerGlobal( 2335)

Camera service is unavailable

E/23:35:57.022 android.hardware.camera.provider@2.4-service( 7816)

Could not get passthrough implementation for android.hardware.camera.provider@2.4::ICameraProvider/legacy/0.

E/23:35:57.022 CamProvider@2.4-impl( 7816)

HIDL_FETCH_ICameraProvider: camera provider init failed!

E/23:35:57.022 CamProvider@2.4-impl( 7816)

initialize: Camera info query failed!

E/23:35:57.021 camera_check_event_status( 0)

Line 73 event_data->status 0X10001

E/23:35:57.022 QCamera ( 7816)

<HAL><ERROR> initCapabilities: 6402: camera_open failed. rc = -1

E/23:35:57.021 camera_check_event_status( 0)

event_data status out of bounds

E/23:35:57.022 QCamera ( 7816)

<MCI><ERROR> camera_open: 2110: mm_camera_open err = -1

E/23:35:57.022 QCamera ( 7816)

<MCI><ERROR> mm_camera_open: 298: cannot open control fd of '/dev/video2' (Bad address)

E/23:35:57.021 mm-camera( 1946)

<MCT ><ERROR> 525: main: New session [2] creation failed with error

E/23:35:57.021 mm-camera( 1946)

<MCT ><ERROR> 190: server_process_bind_hal_ds: Error in bind socket_fd=15 No such file or directory

E/23:35:57.011 QCamera ( 7816)

<MCI><ERROR> get_num_of_cameras: 1908: num_cameras=2

E/23:35:57.011 QCamera ( 7816)

<MCI><ERROR> get_num_of_cameras: 1890: dev_info[id=1,name='video2']

E/23:35:57.011 QCamera ( 7816)

<MCI><ERROR> get_num_of_cameras: 1890: dev_info[id=0,name='video1']

W/23:35:56.444 ServiceManagement( 1902)

Waited one second for android.hardware.camera.provider@2.4::ICameraProvider/legacy/0. Waiting another...

E/23:35:56.134 CameraManagerGlobal( 2335)

Camera service is unavailable

E/23:35:56.057 CameraManagerGlobal( 2335)

Camera service is unavailable

W/23:35:55.443 ServiceManagement( 1902)

Waited one second for android.hardware.camera.provider@2.4::ICameraProvider/legacy/0. Waiting another...

E/23:35:55.133 CameraManagerGlobal( 2335)

Camera service is unavailable

E/23:35:55.056 CameraManagerGlobal( 2335)

Camera service is unavailable

W/23:35:54.443 ServiceManagement( 1902)

Waited one second for android.hardware.camera.provider@2.4::ICameraProvider/legacy/0. Waiting another...

E/23:35:54.132 CameraManagerGlobal( 2335)

Camera service is unavailable

E/23:35:54.055 CameraManagerGlobal( 2335)

Camera service is unavailable

W/23:35:53.442 ServiceManagement( 1902)

Waited one second for android.hardware.camera.provider@2.4::ICameraProvider/legacy/0. Waiting another...

E/23:35:53.131 CameraManagerGlobal( 2335)

Camera service is unavailable

E/23:35:53.054 CameraManagerGlobal( 2335)

Camera service is unavailable

W/23:35:52.442 ServiceManagement( 1902)

Waited one second for android.hardware.camera.provider@2.4::ICameraProvider/legacy/0. Waiting another...

E/23:35:52.130 CameraManagerGlobal( 2335)

Camera service is unavailable

E/23:35:52.053 CameraManagerGlobal( 2335)

Camera service is unavailable

E/23:35:52.019 android.hardware.camera.provider@2.4-service( 7815)

Could not get passthrough implementation for android.hardware.camera.provider@2.4::ICameraProvider/legacy/0.

E/23:35:52.019 camera_check_event_status( 0)

Line 73 event_data->status 0X10001

E/23:35:52.019 CamProvider@2.4-impl( 7815)

HIDL_FETCH_ICameraProvider: camera provider init failed!

E/23:35:52.019 CamProvider@2.4-impl( 7815)

initialize: Camera info query failed!

E/23:35:52.019 camera_check_event_status( 0)

event_data status out of bounds

E/23:35:52.019 QCamera ( 7815)

<HAL><ERROR> initCapabilities: 6402: camera_open failed. rc = -1

E/23:35:52.019 QCamera ( 7815)

<MCI><ERROR> camera_open: 2110: mm_camera_open err = -1

E/23:35:52.019 QCamera ( 7815)

<MCI><ERROR> mm_camera_open: 298: cannot open control fd of '/dev/video2' (Bad address)

E/23:35:52.019 mm-camera( 1946)

<MCT ><ERROR> 525: main: New session [2] creation failed with error

E/23:35:52.019 mm-camera( 1946)

<MCT ><ERROR> 190: server_process_bind_hal_ds: Error in bind socket_fd=15 No such file or directory

E/23:35:52.009 QCamera ( 7815)

<MCI><ERROR> get_num_of_cameras: 1908: num_cameras=2

E/23:35:52.009 QCamera ( 7815)

<MCI><ERROR> get_num_of_cameras: 1890: dev_info[id=1,name='video2']

E/23:35:52.009 QCamera ( 7815)

<MCI><ERROR> get_num_of_cameras: 1890: dev_info[id=0,name='video1']

W/23:35:51.441 ServiceManagement( 1902)

Waited one second for android.hardware.camera.provider@2.4::ICameraProvider/legacy/0. Waiting another...

E/23:35:51.129 CameraManagerGlobal( 2335)

Camera service is unavailable

E/23:35:51.052 CameraManagerGlobal( 2335)

Camera service is unavailable

W/23:35:50.441 ServiceManagement( 1902)

Waited one second for android.hardware.camera.provider@2.4::ICameraProvider/legacy/0. Waiting another...

E/23:35:50.129 CameraManagerGlobal( 2335)

Camera service is unavailable

E/23:35:50.051 CameraManagerGlobal( 2335)

Camera service is unavailable

W/23:35:49.441 ServiceManagement( 1902)

Waited one second for android.hardware.camera.provider@2.4::ICameraProvider/legacy/0. Waiting another...

E/23:35:49.128 CameraManagerGlobal( 2335)

Camera service is unavailable

E/23:35:49.050 CameraManagerGlobal( 2335)

Camera service is unavailable

W/23:35:48.440 ServiceManagement( 1902)

Waited one second for android.hardware.camera.provider@2.4::ICameraProvider/legacy/0. Waiting another...

E/23:35:48.127 CameraManagerGlobal( 2335)

Camera service is unavailable

E/23:35:48.048 CameraManagerGlobal( 2335)

Camera service is unavailable

W/23:35:47.440 ServiceManagement( 1902)

Waited one second for android.hardware.camera.provider@2.4::ICameraProvider/legacy/0. Waiting another...

E/23:35:47.126 CameraManagerGlobal( 2335)

Camera service is unavailable

E/23:35:47.051 android.hardware.camera.provider@2.4-service( 7812)

Could not get passthrough implementation for android.hardware.camera.provider@2.4::ICameraProvider/legacy/0.

E/23:35:47.050 CamProvider@2.4-impl( 7812)

HIDL_FETCH_ICameraProvider: camera provider init failed!

E/23:35:47.050 camera_check_event_status( 0)

Line 73 event_data->status 0X10001

E/23:35:47.050 CamProvider@2.4-impl( 7812)

initialize: Camera info query failed!

E/23:35:47.050 camera_check_event_status( 0)

event_data status out of bounds

E/23:35:47.050 QCamera ( 7812)

<HAL><ERROR> initCapabilities: 6402: camera_open failed. rc = -1

E/23:35:47.050 QCamera ( 7812)

<MCI><ERROR> camera_open: 2110: mm_camera_open err = -1

E/23:35:47.050 QCamera ( 7812)

<MCI><ERROR> mm_camera_open: 298: cannot open control fd of '/dev/video2' (Bad address)

E/23:35:47.050 mm-camera( 1946)

<MCT ><ERROR> 525: main: New session [2] creation failed with error

E/23:35:47.049 mm-camera( 1946)

<MCT ><ERROR> 190: server_process_bind_hal_ds: Error in bind socket_fd=15 No such file or directory

E/23:35:47.047 CameraManagerGlobal( 2335)

Camera service is unavailable

E/23:35:46.993 QCamera ( 7812)

<MCI><ERROR> get_num_of_cameras: 1908: num_cameras=2

E/23:35:46.992 QCamera ( 7812)

<MCI><ERROR> get_num_of_cameras: 1890: dev_info[id=1,name='video2']

E/23:35:46.992 QCamera ( 7812)

<MCI><ERROR> get_num_of_cameras: 1890: dev_info[id=0,name='video1']

W/23:35:46.439 ServiceManagement( 1902)

Waited one second for android.hardware.camera.provider@2.4::ICameraProvider/legacy/0. Waiting another...

E/23:35:46.125 CameraManagerGlobal( 2335)

Camera service is unavailable

E/23:35:46.046 CameraManagerGlobal( 2335)

Camera service is unavailable

W/23:35:45.439 ServiceManagement( 1902)

Waited one second for android.hardware.camera.provider@2.4::ICameraProvider/legacy/0. Waiting another...

E/23:35:45.124 CameraManagerGlobal( 2335)

Camera service is unavailable