Divest OS: Everything about Divest OS on the Fairphones

No offense, but that’s the point :wink:

Answer from XMPP Chatroom:
FairEmail is a large app and also initializes a webview on start.
the mulch webview recenetly switched from 32-bit to 64-bit processes when possible for greater security.
Only thing I could think of.

1 Like

anyhow, cannot be solved here in Forum anyway.

Some things:

  • people gotta sleep :sleeping_bed:
  • we’re in different timezones
  • I don’t keep email on my phone
  • DivestOS is one of many projects I maintain by myself

I saw @vthejay eventually ask in my chatroom and after I sorted other things out on my plate I did give a response, which I would’ve done here eventually.

Anyone is welcome to ask questions about DivestOS here and I will answer them.
:slight_smile:

12 Likes

That’s probably thousands of times more effort than the enquirers here make. Felt bad just reading a harsh line on what others should do.
:om:

2 Likes

Can maybe crosschecked with another app using webview or webview for itself
or contacting Marcel Bokhorst from FairEmail. He’s a tough guy and reacting very fast with updates of his app…

2 Likes

@SkewedZeppelin thanks for your efforts on DivestOS!
Last evening was fully booked with: changing from LineageOS to DivestOS on my FP3(+). Eventually, I got it working (after almost bricking my device). However, step 8 in the fastboot-installation-process didn’t work exactly as expected. Thus:

  1. A/B devices only without firmware enabled: `$ adb sideload copy-partitions-device.zip

In this stage, adb-commands were “unauthorized”. In order to make this step work I had to cherry-pick this from installation-step 9:

Choose apply update, then via sideload (…)

Furthermore, it wasn’t completely clear to me that step 5 and 6 were sort of “exclusive or’d”, thus: either there is a fastboot image available, or a recovery-image. If that is indeed the case, it would make more sense to me to explicitly mention this in the install steps (e.g. create a step 5a and 5b).

At last: is it expected that the currently installed DivestOS-version-update never disappears? When I go to my settings → system → updater (can’t verify the exact path right now, phone is busy) I still see one update available which I am allowed to download. However, that’s also the currently installed version afaik. Nothing big, just wondering if that’s expected.

I hope this feedback is somehow useful for the project. Don’t hesitate to make me clarify things

1 Like

Welcome to the community :wave:

I’ve moved your post to this more general Divest OS topic since it isn’t directly related to questions about the bootloader.

The Divest OS developer isn’t that active in this forum, maybe try reaching him through one of the other ways of reporting bugs:
https://divestos.org/index.php?page=bug_reporting
There’s also a Matrix bridge available to their XMPP chat:

@Tupperware

unauthorized

Had you enabled adb sideload mode?

5 and 6 were sort of “exclusive or’d”,

Yes, I’ll try to word this better.

currently installed DivestOS-version-update never disappears

This is expected and useful.

feedback

Thanks!

2 Likes

Thx for your quick response.

Had you enabled adb sideload mode?

I wasn’t able to. I somehow rebooted into my bootloader (active slot a) without that option, whereas a moment before I ended op in my bootloader with active slot b, where it was possible to enable adb sideload mode

Perfect, thanks!

Fairphone 4 is reported working on DivestOS as of yesterday.

Please give it a try.

8 Likes

Hello everybody
I would like to install DivestOS on my Fairphone 4 so I unlocked my bootloader including critical partitions and I flashed divested-19.1-20220808-dos-FP4-recovery.img however I am unable to do step 8 because when I input adb sideload “copy-paritions-fp4-release.zip” I get back

adb: sideload connection failed: no devices/emulators found
adb: trying pre-KitKat sideload method…
adb: pre-KitKat sideload connection failed: no devices/emulators found

I also tried in the recovery/sideload mode with the same result.

Should I continue to step 9 anyway and flash “adb sideload divested-version-date-dos-device.zip” ?

@Sliwki
You need to get adb working.

You cannot flash anything until adb devices shows your device.
If you are running Windows you may need some drivers.
If you on Linux you may need some udev rules or can try running sudo adb.

Other things to try are a different cable and a USB 2.0 port or hub instead of USB 3.0.

1 Like

Thank you for your speedy answer.
I use MX Linux and windows in dual boot on a small laptop.
When in MX Linux and the fairphone is booted into FP OS with USB debugging enabled and USB set on data transfer I can run the command “adb devices” and it prompts me back a 8 digit number followed by “device”. Then I run “adb reboot bootloader” and then it also works. However when my Fairphone 4 gets in bootloader menu “adb devices” does not work anymore.

So as you instructed I researched for udev rules and followed this tutorial

I also added another udev rules because my vendor and product IDs given by “lsusb” where different than those provided within the mentionned XDA topic.

Now when I get to bootloader menu with “adb reboot bootloader” and try “adb devices” I get “error: no devices/emulators found”
I tried two USB cables and two USB ports
Is it not strange that I sucessfully flashed DivestOS recovery without adb recognizing my device in bootloader menu?

Also I tried under Windows 10 even if i prefer to avoid using windows if possible.
I installed the official adb driver for windows.
I got the same problem as in MX Linux which is ADB recognize my fairphone when it is booted into FPOS with USB Debugging enabled and USB set to data transfer; then I can command “adb reboot bootloader” and when I am in the bootloader menu “adb devices” does not find my fairphone anymore.

adb is only accessible when the system is booted and usb debugging is enabled OR when booted to recovery and “apply update via sideload” is chosen.

The USB debug option has zero impact on whether or not you can sideload via recovery.

adb is not accessible when in fastboot/bootloader mode.

for FP4 all you need to do is reboot to bootloader, fastboot flash recovery recovery.img, reboot to recovery, choose apply update, adb sideload update.zip, verify success at 94%, format data, reboot into DivestOS.

Is it not strange that I sucessfully flashed DivestOS recovery without adb recognizing my device in bootloader menu?

That isn’t strange at all because recovery is flashed via fastboot and not adb.

3 Likes

So now I got myself inside the “Apply update” section of recovery and there adb worked indeed.

So as per step 8 of the installation guidelines I was following on your exellent website Bootloader - DivestOS Mobile
I ran adb sideload copy-partitions-fp4-release.zip
Then I saw a terminal scrolling on the FP4 without obvious error message and it ended by “OK”

Then as per step 9 I ran adb sideload divested-19.1-20220808-dos-FP4.zip
My linux terminal ran to 100% without error
My fairphone terminal showed

Finding update package…
Verifying update package…
Update package verification took 45.3 s (result 0).
Installing update…
E: logical partitions ar mapped. Please reboot recovery before installing an OTA update.

Then I hit the “back” button to get back to recovery and perform a factory reset
A this precise moment my fairphone’s terminal displayed

Install completed with status 1.
Installation aborted.

I performed the factory reset and my FP4 eventually answered “Data wipe complete”

Then I hit the button in recovery to reboot the system now and got a scary answer from my Fairphone written in scary color orange

Version 19.1 (20220808)
Active slot: b
WARNING: Previous installation has failed.
Your device mail failed to boot if you reboot now.
Confirm reboot?

I confirmed and it rebooted into… FPOS !?

Edit
I got again into recovery and apply update and ran adb sideload divested-19.1-20220808-dos-FP4.zip
My linux console ran to 100% and end up showing “Total xfer: 2.00x” and my Fairphone terminal displayed
“Step 1/2
Step 2/2”

Then I performed a factory reset and format data and rebooted the system.
Then it booted into DivestOS :grinning:

I did another factory reset with data format for testing and could boot again in DivestOS.

Then I tested functionality during my day-to-day activities and found the following functions to be comparable with what I had previously observed with FPOS

Mobile DATA
Send and receive phone call
GPS
Wi-Fi
Wi-Fi thethering
Listening music through bluetooth
Selfie camera for pictures and video recording with sound
Speakers
Touchscreen
Display
Buttons
Torch
USB charge and data transfer

I found the following functions to differ from what I had previously observed under FPOS

Send and receive SMS ------ It looks like I do not receive neither notification nor vibration nor sound alert for SMS and have to manually look for them which does not bother me much since 2FA is almost my only use for them and I do receive notifications and vibrations for WhatsApp and Signal messages

Main camera for pictures and video recording does work normally for my use which is basic; however I did not notice an option to use wide angle camera like on FPOS. Here I show a photo taken with my main camera under DivestOS with default camera application and default settings exept that I selected a 16:9 format instead of 4:3; it has been somewhat compressed in the upload process and originally has a better definition.

Then I got myself in the setting menu and looked for update; there was an update available named divestos-19.1 which looked strange because it was supposed to be the version I had installed however I installed it anyway and rebooted exactly in the same system.

Then I decided to try the backup software SeedVault. It proposed me to backup to nextcloud however I had no server to do it so I chose to back up locally even though the software advised against it because if my phone broke it could do nothing to save itself. In the backup options there was an item “Backup status” which was set to “never” and when I tap on it I see a list of settings and apps which are supposed to be backed up however under each is writtent something like “Waiting for backup” with an orange triangle at their right. So far I would say that SeedVault failed to make a proper backup of my system.

My opinion overall is that I can use this OS which is neat and fits my needs; it is based on android 12 and boasts good privacy compared to others and also hardened security although from what I understand to take security benefit would imply a bootloader relocking which I am currently asking myself whether I should try it or not.

4 Likes

@Sliwki

Thank you for the detailed testing and feedback.

The updater will always show the latest update.
Seedvault requires the first backup to be initiated manually. The best no cloud option for backup is any old flash drive with an adapter and works well. Plug it in once a week, wait 10 minutes, and you have a nice backup.

bootloader relocking

Verified boot is indeed not enforced until the system is locked.

Thank you for the tip I did successfully backup on an USB-C external drive with SeedVault.

Now on the bootloader relocking front I did the following

fastboot erase avb_custom_key >> finished
fastboot flash avb_custom_key avb_pkmd-fp4.bin >> finished

My FP4 status is following
At boot I get a warning about an unlocked bootloader
At the bottom of the bootloader menu is written in red “DEVICE STATE - unlocked”
In developper options the item “OEM Unlocking” is greyed on the off position and not modifiable; under it is written “Bootloader already unlocked”

fastboot flashing get_unlock_ability = 0

I would prefer a locked bootloader than an unlocked bootloader.
Even though I would still prefer an unlocked bootloader than a FairBrick.
I am not an advanced user and would appreciate some insight for my decision making.
I understand that in the end the responsability is only mine.
In the meantime I will read the FairBrick cemetery thread.

As long as

get unlock ability is 0

I wont lock the bootloader, unless there is proof that divest would not brick the phone under no circumstance (unlike all other OSes)…

5 Likes

Thank you for your advice ymuell; it is indeed something I was thinking I had read.
Is there a way to turn it to 1 ?

Also on DivestOS installation guide; before relocking bootloader; there is a warning that say

“On A/B systems firmware in both slots must be in sync/latest! Or else next installed update might be unbootable, and potentially brick.”

Is there a way to know if this condition is satisfied?

I would also not dare to lock the bootloader. On the other hand, if it is already unlocked, isn’t it logical that the unlockability is 0? If already unlocked, it can’t be unlocked any more.