/e/OS Fairphone 4 — Sensor SELinux Labeling Bug

Symptom

All motion sensors (accelerometer, gyroscope, magnetometer) non-functional. Camera does not detect rotation. Screen auto-rotate does not work.

adb shell dumpsys sensorservice reports:

No Sensors on the device
devInitCheck : 0

Root Cause

SELinux labels are missing on the sensor persist partition. Qualcomm’s sensor RPC daemon (sscrpcd) cannot read its own calibration files.

Audit log from boot:

avc: denied { read } for comm="sscrpcd" name="default_sensors"
    dev="sda3" scontext=u:r:vendor_sensors:s0
    tcontext=u:object_r:unlabeled:s0 tclass=file permissive=0

avc: denied { read } for comm="sscrpcd" name="lsm6dso_0_platform.gyro"
    dev="sda3" scontext=u:r:vendor_sensors:s0
    tcontext=u:object_r:unlabeled:s0 tclass=file permissive=0

avc: denied { read } for comm="sscrpcd" name="lsm6dso_0_platform.gyro.fac_cal.bias"
    dev="sda3" scontext=u:r:vendor_sensors:s0
    tcontext=u:object_r:unlabeled:s0 tclass=file permissive=0

avc: denied { read } for comm="sscrpcd" name="sns_dynamic_sensors"
    dev="sda3" scontext=u:r:vendor_sensors:s0
    tcontext=u:object_r:unlabeled:s0 tclass=file permissive=0

The persist partition (/dev/block/sda3, mounted at /mnt/vendor/persist) has seclabel mount option, but files under /mnt/vendor/persist/sensors/ carry no SELinux context (unlabeled).

Sensor chip identified as ST LSM6DSO (6-axis IMU: accelerometer + gyroscope).

Expected Fix

Run restorecon -Rv /mnt/vendor/persist/sensors/ to relabel the persist files. The SELinux policy likely already has the correct contexts — the files just weren’t labeled after the initial flash or an OTA update.

Workaround (requires root)

restorecon -Rv /mnt/vendor/persist/sensors/

Additional Notes

  • vendor-sensor-sh init service shows as stopped (normal for oneshot service)
  • Sensor calibration HAL (sensorscal-hal-1-0) is running
  • Main sensor HAL (vendor.sensors-hal-2-0-multihal) never starts because sscrpcd fails to read calibration
  • lshal shows both android.hardware.sensors@2.0::ISensors/default and vendor.qti.hardware.sensorscalibrate@1.0::ISensorsCalibrate/default as unavailable
  • Sensor privacy manager has stale entries for sensors that never initialized
  • accelerometer_rotation setting is 1 (auto-rotate enabled) — not a settings issue

What version are you on? Camera & auto rotation is working on v4.1.1 official.

This user’s public profile is hidden.

4.1.1-a14-20260719651758-official-FP4
But phyphox stil does not see the gyro. So no it’s not working.

Hmmm … if you are an experimenter using https://phyphox.org/ as a new user you should include human context. This forum is expected to shut down threads which look like pure AI generated content.

2 Likes

Well alright, backstory. I bought the phone in 2023. Sensors dit not work. With every update I was hoping they would work. Recently I hooked my hermes to my phone and asked it to find if I had any sensors at all and if so why they were not working. It found that and so I pasted the bug report.
I found a similar bug from two years ago. So it has been know for years now. Just never fixed. I can “fix” it myself but that would mean opening root and that would mean wiping the phone which I would rather not do. Hence this post. Supposedly “you” can fix it through an update :slight_smile:

Gosh, you have been patient. Thank you for the explanation.

From what I read and understand persist is not touched by /e/OS update.

Were the sensors originally or ever tested on Fairphone’s Android?

I would personally be inclined to accept

Does the phone have locked or unlocked bootloader?

1 Like

@aibd Do you mean instead “pure AI garbage” or “pure AI harassment”?

As you know I am getting sick of it. It must be illegal too.

Good news, at least for me ;- ) All sensors working

@aibd Well… I just didn’t care really. It was that I hooked up the AI and had it look at the hardware and software that I realized it could be a small fix. To be honest I don’t know if the sensors were tested on fairphone android. But I am pretty sure it works, because otherwise people would be returning their phones. What happened in my case is that I did not want to buy e/os pre installed. Because that was more expensive and I could do it myself. I think the similar bug was a similar situation where we bought a fairphone with android and installed e/os ourselves. My guess is that the problem only arises in that situation. And not many people do that. So the question remains. Is it possible to fix it in an update or should I reset / root my phone and do it myself? Rooting the phone would delete it. Obviously I prefer the first one over the second one. :slight_smile:


Oh great an AI hater, thank you for your non contribution to my question. Please go somewhere else, I am trying to get my phone fixed. Also, to let you know it identified and proposed the right solution for the problem.


Good for you. Again, I can fix it if I just install e/os fresh. But I would rather not do that.

Is there anyone here working on the actual updates?

My personal opinion is that there was something “unlucky” about your flashing procedure and it is more of a one off than something that will be fixed easily by “expert intervention”

Personally I would test the sensors on Fairphone’s Android after a full backup.

However there is a potential extra hazard if the bootloader is locked. Please search or ask if you have to unlock the bootloader. [1]

  • Please be aware of the outside possibility that if you take the wrong path then reimaging by Fairphone’s contractor might arise.

I think that there are many fp4 “self installers” who have not seen the issue.

[1] please follow this before unlock bootloader if required

2 Likes