I bought a Fairphone 4 as a part of my project of de-googling my life.
Playing with different operating systems, I somehow ended up with a phone where most of the sensors didn’t work, even if they did when I got the phone.
A journey through 4 OS’es
Initially, it had the Fairphone OS — which is a non de-googled Android 13.
A first attempt at installing Ubuntu Touch failed because it wanted to be installed on top of an Android 11. An installation of PostmarketOS went fine, but PmOS supports very little of the hardware of the Fairphone4, so while a nice and smooth interface, it wasn’t usable on the FP4.
I then flashed Fairphone’s Android 11 on the phone, and installed Ubuntu Touch, which this time went fine.
Ubuntu Touch, I found, was too different a system, and the choice of apps too restricted for me. I’m used to Gnome on my computers, and PostmarketOS was close, but Ubuntu Touch was quite another system.
In the end, I wasn’t happy with it, so I flashed Murena‘s /e/OS — a de-googled Android — on the phone. Since I used many apps from F-Droid on my old phone, this wasn’t a difficult change.
The main goal was removing Google from my phone, and while I would have liked a real Linux system on a phone, a de-googled Android like /e/OS still does the job.
No sensors
There was only one problem: the only sensor working on the phone was the GPS. No gyroscope, accelerometer or light sensor.
I was quite sure they worked before, but with /e/OS they didn’t.
Other users of /e/OS on Fairphone4’s confirmed, however, that the sensors worked for them, so I reckoned it was a hardware issue.
Except it wasn’t.
A GitLab issue on UBports (the new name of Ubuntu Touch) indicated that it was a software problem that could survive reflashing the phone.
A Fairphone4, which has had UBports installed, doesn’t show the sensors to a later installation of Android.
Why I don’t know, but there was a fix.
Sensors again
First, enable USB debugging and allow root access through ‘adb’.
Connect the phone to a computer, allow USB debugging for that computer on the phone, and issue the commands (on the connected computer):
$ adb root
restarting adbd as root
$ adb shell
FP4:/ # restorecon -FR /mnt/vendor/persist
SELinux: Loaded file_contexts
FP4:/ # reboot
$
The Linux shell prompt is $ and the phone prompt is FP4:/ #
The phone restarts. Problem fixed.
Leave a Reply