[Magisk] kugland:
Same problem here: “can’t connect to camera” on Mi A1.

I have the same problem. Using Mi A1 with LineageOS 16, installed this package in Magisk and also the fix recommended in the README.md of the repo, and I got can’t connect to camera and a crash when I try to use portrait mode. I grabbed this from logcat:

03-25 04:27:50.944 1088 10202 I mm-camera: <MCT >< INFO> 1021: mct_controller_handle_SOF_proc: (sofdelay, curr_sofdelay) = (0, 0) kptr 241
03-25 04:27:50.945 1088 10178 I mm-camera: <MCT >< INFO> 1021: mct_controller_handle_SOF_proc: (sofdelay, curr_sofdelay) = (0, 0) kptr 241
03-25 04:27:50.958 9267 10211 D QCameraFOVControl: processResultMetadata: Obj Dist: Main cam: 72, ori: 72
03-25 04:27:50.958 9267 10211 D QCameraFOVControl: processResultMetadata: Obj Dist: Aux cam: 63, ori: 63
03-25 04:27:50.968 1088 10171 I mm-camera: <STATS_AF >< INFO> 439: af_util_done: af->af_mode.mode = 3, af->caf.state=4
03-25 04:27:50.968 1088 10171 I mm-camera: <STATS_AF >< INFO> 469: af_util_done: MainCamera=0 final lens pos 325, status=1
03-25 04:27:50.981 9267 9267 W CAM_defrdWrk: type=1400 audit(0.0:11762): avc: denied { write } for name="camera" dev="mmcblk0p49" ino=1671214 scontext=u:r:hal_camera_default:s0 tconte
xt=u:object_r:camera_data_file:s0 tclass=dir permissive=0
--------- beginning of crash
03-25 04:27:50.986 9267 10148 F libc : FORTIFY: fwrite: null FILE*
03-25 04:27:50.986 1088 10202 I mm-camera: <MCT >< INFO> 1021: mct_controller_handle_SOF_proc: (sofdelay, curr_sofdelay) = (0, 0) kptr 242
03-25 04:27:50.986 9267 10148 F libc : Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 10148 (CAM_defrdWrk), pid 9267 (provider@2.4-se)
03-25 04:27:50.986 1088 10178 I mm-camera: <MCT >< INFO> 1021: mct_controller_handle_SOF_proc: (sofdelay, curr_sofdelay) = (0, 0) kptr 242
03-25 04:27:51.008 9267 10211 D QCameraFOVControl: processResultMetadata: Obj Dist: Main cam: 72, ori: 72
03-25 04:27:51.008 9267 10211 D QCameraFOVControl: processResultMetadata: Obj Dist: Aux cam: 63, ori: 63
03-25 04:27:51.007 10364 10364 W crash_dump32: type=1400 audit(0.0:11763): avc: denied { noatsecure } for scontext=u:r:hal_camera_default:s0 tcontext=u:r:crash_dump:s0 tclass=process permissive=0
03-25 04:27:51.024 1088 10202 I mm-camera: <MCT >< INFO> 1021: mct_controller_handle_SOF_proc: (sofdelay, curr_sofdelay) = (0, 0) kptr 243
03-25 04:27:51.027 1088 10178 I mm-camera: <MCT >< INFO> 1021: mct_controller_handle_SOF_proc: (sofdelay, curr_sofdelay) = (0, 0) kptr 243
03-25 04:27:51.039 9267 10211 D QCameraFOVControl: processResultMetadata: Obj Dist: Main cam: 72, ori: 72
03-25 04:27:51.039 9267 10211 D QCameraFOVControl: processResultMetadata: Obj Dist: Aux cam: 63, ori: 63
03-25 04:27:51.061 10365 10365 I crash_dump32: obtaining output fd from tombstoned, type: kDebuggerdTombstone
03-25 04:27:51.062 1103 1103 I /system/bin/tombstoned: received crash request for pid 10148
03-25 04:27:51.063 10365 10365 I crash_dump32: performing dump of process 9267 (target tid = 10148)
03-25 04:27:51.066 1088 10202 I mm-camera: <MCT >< INFO> 1021: mct_controller_handle_SOF_proc: (sofdelay, curr_sofdelay) = (0, 0) kptr 244
03-25 04:27:51.068 1088 10178 I mm-camera: <MCT >< INFO> 1021: mct_controller_handle_SOF_proc: (sofdelay, curr_sofdelay) = (0, 0) kptr 244
03-25 04:27:51.076 10365 10365 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
03-25 04:27:51.076 10365 10365 F DEBUG : LineageOS Version: '16.0-20190322-NIGHTLY-tissot'
03-25 04:27:51.076 10365 10365 F DEBUG : Build fingerprint: 'xiaomi/tissot/tissot_sprout:8.0.0/OPR1.170623.026/8.1.10:user/release-keys'
03-25 04:27:51.076 10365 10365 F DEBUG : Revision: '0'
03-25 04:27:51.076 10365 10365 F DEBUG : ABI: 'arm'
03-25 04:27:51.076 10365 10365 F DEBUG : pid: 9267, tid: 10148, name: CAM_defrdWrk >>> /vendor/bin/hw/android.hardware.camera.provider@2.4-service <<<
03-25 04:27:51.076 10365 10365 F DEBUG : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
03-25 04:27:51.076 10365 10365 F DEBUG : Abort message: 'FORTIFY: fwrite: null FILE*'
03-25 04:27:51.076 10365 10365 F DEBUG : r0 00000000 r1 000027a4 r2 00000006 r3 00000008
03-25 04:27:51.076 10365 10365 F DEBUG : r4 00002433 r5 000027a4 r6 e5c7f484 r7 0000010c
03-25 04:27:51.076 10365 10365 F DEBUG : r8 e6343180 r9 e5ceae88 r10 e5ceae84 r11 00000000
03-25 04:27:51.076 10365 10365 F DEBUG : ip e6331680 sp e5c7f470 lr ec768ea9 pc ec760cfa
03-25 04:27:51.080 10365 10365 F DEBUG :
03-25 04:27:51.080 10365 10365 F DEBUG : backtrace:
03-25 04:27:51.080 10365 10365 F DEBUG : #00 pc 0001ccfa /system/lib/libc.so (abort+58)
03-25 04:27:51.080 10365 10365 F DEBUG : #01 pc 0005e5e7 /system/lib/libc.so (__fortify_fatal(char const*, ...)+26)
03-25 04:27:51.080 10365 10365 F DEBUG : #02 pc 000603a9 /system/lib/libc.so (fwrite+176)
03-25 04:27:51.081 10365 10365 F DEBUG : #03 pc 003935c8 /system/vendor/lib/libarcsoft_dualcam_refocus.so (BuildKernelBin+288)
03-25 04:27:51.083 9267 10211 D QCameraFOVControl: processResultMetadata: Obj Dist: Main cam: 72, ori: 72
03-25 04:27:51.083 9267 10211 D QCameraFOVControl: processResultMetadata: Obj Dist: Aux cam: 63, ori: 63
03-25 04:27:51.104 1088 10202 I mm-camera: <MCT >< INFO> 1021: mct_controller_handle_SOF_proc: (sofdelay, curr_sofdelay) = (0, 0) kptr 245
03-25 04:27:51.106 1088 10178 I mm-camera: <MCT >< INFO> 1021: mct_controller_handle_SOF_proc: (sofdelay, curr_sofdelay) = (0, 0) kptr 245