In that case I would suggest extracting and patching the boot.img
that’s shipped with DivestOS, just to be safe.
Edit: I had an extracted one lying around already, here you go
In that case I would suggest extracting and patching the boot.img
that’s shipped with DivestOS, just to be safe.
Edit: I had an extracted one lying around already, here you go
Thank you, but I just did it myself, a great learning experience. Downloaded yours and it has the exact same md5sum as mine even, so I think I did it right
AND IT WORKED!
So in summary:
As people have mentioned here and elsewhere MESSING WITH THE PERSIST IMAGE CAN BRICK YOUR DEVICE, so do this at your own risk!
I’m not sure if or how I could get into contact with the right people, but maybe this is something the default OS package should fix automatically? I won’t make a very hard argument for this, as it will probably only affect people who should be able to fix it themself now that this thread exist.
Thank you very much everyone in this thread!
If there’s any interest from fairphone developers or others, I extracted an image of my persist partition before and after the restorecon operation, so one could see exactly what changed to make it work again. (This is after a DivestOS install, but from my understanding “persist” should be the same for all Android installations?)
Even if I probably won’t know what to do with that information, I would love to have a look and see the difference
Not sure if there’s privacy-sensitive data in there (somebody knowledgeable should answer that)
If there isn’t, please upload it somewhere
That is exactly what I would like to know as well, if not I could just upload the files. I have to go out for a few hours, but I’ll look into it.
A quick diff shows me the only differences are in these (binary) files:
/hvdcp_opti/soh_info.txt
/time/ats_1
/time/ats_12
/time/ats_13
/time/ats_15
/time/ats_16
/time/ats_2
(yes the .txt also contain both text and binary data)
A low hanging fruit method would be to run the command strings
on those files and see if you notice anything personal there. But this is just a very basic check.
Be aware that the persist partition is unique per device and using someone others persist will result in wrong sensor calibration and you will also have wrong DRM keys and MAC-addresses as those are stored in persist as well.
Its not the content of the files itself that has changed but just the labeling that is wrong… you could check those with ls -Z
If I remember correctly what has changed is that atleast one file was mislabeled in a previous android version (sensors_persist_file ← → persist_sensors_file). That is one thing I found while skimming through some commits.
As far as I’m aware some partitions are automatically relabeled, but the persist partition only gets relabeled under certain specific conditions which are not triggered by a reboot/flash but only by some specific changes.
Hello, Florian from UBports here. This happens, unexpectedly for us to say, for the following reasons:
We will work with Fairphone to see if this can be fixed in a better way. Until then, please use the manual workaround psoted a few comments above.
Are there plans to use SELinux? I only have advanced experience with SELinux (Fedora/RHEL user) and some regular experience with AppArmor (OpenSUSE/Debian). But from what I can tell is that SELinux is, when enabled, really strict. While AppArmor, when enabled, it could only be just protecting a CUPS service. That sort of gives me the impression that SELinux is more like a firewall where you have the default rule to drop traffic, and then allow selective traffic. While AppArmor feels more like a firewall where the default is to allow everything, and you specify some behavior you don’t want.
This may be a topic of it’s own though. But just wondering if Ubuntu Touch is considering SELinux. Fedora Silverblue shows how a Linux environment can be quite locked down in terms of security at the level of iOS/Android, by using SELinux (and some other stuff).
I had the same exact problem and it worked for me too. Thanks
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
I’m having the same issues and have now successfully installed Magisk. Probably missing something and it’s late so gonna go bed! Root is now working and tries to get restorecon -FR /mnt/vendor/persist to work via termux
I suspect reading further I need to use the command via adb in windows
Hey. this solution worked for me thank you!. i want to note that i couldnt find the magisk app on the appstore so you have to google it and got it myself from magiskmanager.com and installed the apk.
For other people you can find the fairphone 4 rom on the official website which contains the boot.img also when patched it will look a little like this “magisk_patched-26100_qXhxI.img”
If someone is technical enough to do this but is strugging to get it working ill offer my assistance for a short while.
Never download Magisk from some random 3rd party site, this is software that can do everything on your phone, you can’t be sure that it hasn’t been tampered with!
The only safe place to get it is from Magisk’s GitHub releases, the official instructions are here.
Oh and welcome to the community BTW
argh ok i have exactly the same problem and now i know how to fix it if i dare try it
I bought my FP4 from murena with e/OS, installed Android 11, Ubuntu Touch, PostmarketOS and then Android 13. The magnet and proximity sensors didn’t seem to work and the app SatStat confirmed this: no data.
I followed this procedure of using magisk to root and restorecon -FR /mnt/vendor/persist
and things work again! Hooray!
Oh dang… I did an ls -lZ /mnt/vendor/persist/ before and after restorecon but don’t see a change. I guess it was a change on the directory itself.
Regardless. I am fixed. Good work.