[Mi 3 Android Development] Kai_Jan_57:
I've pulled your latest selinux change, but unfortunately, … sensors are still not working for me. Related logcat:

05-07 11:19:48.330 822 965 E libsensor1: sensor1_open: Error in connect() errno=2 No such file or directory
05-07 11:19:48.331 822 965 E sensor_reg: sensor_reg_sensor1_open: sensor1_open returned 11
05-07 11:19:48.556 634 646 E Sensors : sns_sam.c(4703):SMGR not ready!

and then a bunch of these scattered all over:

05-07 11:19:54.665 634 642 E Sensors : sns_reg_la.c(91):reg_read: reg file not open
05-07 11:19:54.665 634 642 E Sensors : sns_reg.c(403):Received error from sns_reg_read/write 5

Moreover,

05-07 11:19:58.331 822 965 E sensor_reg: sensor_reg_wait_for_response: Registry request timeout
05-07 11:19:58.331 822 965 E sensor_reg: sensor_reg_read: sensor1 not available
05-07 11:19:58.331 822 965 E qcom_sensors_hal: hal_init: Error in sensor_reg_read(): -4
05-07 11:19:58.332 822 965 E libsensor1: sensor1_write: Error getting socket name fd: -1: Bad file descriptor
05-07 11:19:58.332 822 965 E sensor_reg: sensor_reg_write: sensor1_write returned 3
05-07 11:19:58.332 822 965 E qcom_sensors_hal: hal_init: Error in sensor_reg_write(): -4
05-07 11:19:58.560 634 642 E Sensors : sns_reg_la.c(91):reg_read: reg file not open
05-07 11:19:58.560 634 642 E Sensors : sns_reg.c(403):Received error from sns_reg_read/write 5
05-07 11:19:58.560 634 646 E Sensors : mag_cal.c(1603):mag_cal_sam_init: Unknown UUID(1) 00000000-0000-0000
05-07 11:19:58.560 634 646 E Sensors : mag_cal.c(1608):mag_cal_sam_init: Unknown UUID(2) 0000-000000000000
05-07 11:19:58.560 634 646 E Sensors : sns_sam.c(4432):Failed to register algorithm service 16 with SAM

The last few lines about sensors:

05-07 11:19:58.569 634 1029 E Sensors : sns_debug_main.c(436):Debug Config File missing in EFS!
05-07 11:20:00.588 634 1034 E Sensors : sns_smr_util.c(104):Unable to initialize service 259 with QCCI, timed out (2000 ms)
05-07 11:20:00.594 634 1056 E Sensors : sns_smr_util.c(104):Unable to initialize service 272 with QCCI, timed out (2000 ms)
05-07 11:20:00.595 634 1056 E Sensors : sns_acm_mr.c(472):Error getting info for service 16
05-07 11:20:00.609 634 1034 E Sensors : sns_acm_mr.c(472):Error getting info for service 3
05-07 11:20:00.611 822 1005 W sensor_reg: sensor_reg_rcv_msg: received RETRY_OPEN
05-07 11:20:00.615 822 1005 W sensor_reg: sensor_reg_rcv_msg: sensor1_open returned 0
05-07 11:20:00.637 634 642 E Sensors : sns_reg_la.c(91):reg_read: reg file not open
05-07 11:20:00.638 634 642 E Sensors : sns_reg.c(403):Received error from sns_reg_read/write 5
05-07 11:20:00.638 822 1117 E sensor_reg: sensor_reg_process_resp: Error in RESP; result: 5
05-07 11:20:00.638 822 965 E sensor_reg: sensor_reg_read: error processing message
05-07 11:20:00.638 822 965 E qcom_sensors_hal: hal_check_ltcy_ssi_reg_flag: Error in sensor_reg_read() for reg flag: -3
05-07 11:20:00.638 634 642 E Sensors : sns_reg_la.c(91):reg_read: reg file not open
05-07 11:20:00.638 634 642 E Sensors : sns_reg.c(403):Received error from sns_reg_read/write 5
05-07 11:20:00.638 822 1117 E sensor_reg: sensor_reg_process_resp: Error in RESP; result: 5
05-07 11:20:00.638 822 965 E sensor_reg: sensor_reg_read: error processing message
05-07 11:20:00.638 822 965 E qcom_sensors_hal: hal_check_ltcy_ssi_reg_flag: Error in sensor_reg_read() for reg flag: -3
05-07 11:20:00.639 634 642 E Sensors : sns_reg_la.c(91):reg_read: reg file not open
05-07 11:20:00.639 634 642 E Sensors : sns_reg.c(403):Received error from sns_reg_read/write 5
05-07 11:20:00.639 822 1117 E sensor_reg: sensor_reg_process_resp: Error in RESP; result: 5
05-07 11:20:00.639 822 965 E sensor_reg: sensor_reg_read: error processing message
05-07 11:20:00.639 822 965 E qcom_sensors_hal: hal_check_ltcy_ssi_reg_flag: Error in sensor_reg_read() for reg flag: -3
05-07 11:20:00.640 634 642 E Sensors : sns_reg_la.c(91):reg_read: reg file not open
05-07 11:20:00.640 634 642 E Sensors : sns_reg.c(403):Received error from sns_reg_read/write 5
05-07 11:20:00.640 822 1117 E sensor_reg: sensor_reg_process_resp: Error in RESP; result: 5
05-07 11:20:00.640 822 965 E sensor_reg: sensor_reg_read: error processing message
05-07 11:20:00.640 822 965 E qcom_sensors_hal: hal_check_ltcy_ssi_reg_flag: Error in sensor_reg_read() for reg flag: -3
05-07 11:20:00.640 634 642 E Sensors : sns_reg_la.c(91):reg_read: reg file not open
05-07 11:20:00.640 634 642 E Sensors : sns_reg.c(403):Received error from sns_reg_read/write 5
05-07 11:20:00.640 822 1117 E sensor_reg: sensor_reg_process_resp: Error in RESP; result: 5
05-07 11:20:00.640 822 965 E sensor_reg: sensor_reg_read: error processing message
05-07 11:20:00.641 822 965 E qcom_sensors_hal: hal_check_ltcy_ssi_reg_flag: Error in sensor_reg_read() for reg flag: -3
05-07 11:20:00.641 822 965 I MultiHal: Loaded library from libsensors.msm8974.so
05-07 11:20:00.642 634 634 E Sensors : sns_acm_mr.c(734):Request made to disabled service
05-07 11:20:00.642 634 634 E Sensors : sns_main.c(1305):Error writing request. sns_err 3 error 0 qmi_err 0
05-07 11:20:00.642 822 1124 E qcom_sensors_hal: hal_process_sam_mag_cal_resp: Msg 1; Result: 1, Error: 3
05-07 11:20:10.643 822 965 E qcom_sensors_hal: hal_wait_for_response: pthread_cond_timedwait() rc=110 (cond: 0)
05-07 11:20:10.643 822 965 E qcom_sensors_hal: _hal_sensors_get_sensors_list: Request timed out
05-07 11:20:10.744 634 634 E Sensors : sns_acm_mr.c(432):Transport error -1

I however know no way of telling what files the driver is trying to access, and its a great miracle why this issue occurs on my device, but not on yours?