Web installer
This page installs DiamaneOS on a Fairphone 6 over USB. It reads the image set from this computer and sends nothing over the network.
It runs the same steps as the image set's flash-all.sh. If an install fails,
see what to do. To leave DiamaneOS, see
returning to the stock OS.
Prerequisites
- A Chromium-based browser, such as Chrome, Chromium or Edge. Other browsers have no WebUSB.
- At least 2 GB of free memory.
- The image set, unpacked into a folder.
- A good USB-C cable, plugged straight into the computer rather than into a hub.
- Only this phone connected to the computer over USB.
- On Linux, the udev rules for Android devices:
android-sdk-platform-tools-commonon Debian and Ubuntu,android-udevon Arch Linux. - On Linux, stop fwupd, which can take over the phone's USB connection:
sudo systemctl stop fwupd.service
Allowing unlocking
In Android on the phone, turn on OEM unlocking in Developer options, as Fairphone describes. The phone checks online first.
Note the build number in Settings > About phone. The install writes the Fairphone firmware the image set carries, and the phone must not already run a newer Fairphone release.
Connecting the phone
Turn the phone off. Hold Volume down while it starts, until it shows Fastboot Mode. Connect it to this computer and press Connect.
Unlocking the bootloader
The install writes firmware, so the phone needs two unlocks: the bootloader, then its critical partitions. Each one erases all data on the phone.
- Press Unlock bootloader. On the phone, choose to unlock with the volume buttons and press Power.
- The phone erases itself and restarts. Hold Volume down while it restarts, so that it returns to Fastboot Mode before Android starts.
- If Android starts, turn the phone off. Then hold Volume down while it starts.
- Press Connect, then Unlock critical partitions, and confirm on the phone the same way. Return to Fastboot Mode again.
Choosing the image set
Choose the image set's folder. The browser asks whether to upload it, but nothing leaves this computer. Only this page reads the files.
Before the first write, the installer checks every file it writes against the set's
SHA256SUMS. This takes a minute or two.
Installing
The install erases all data on the phone. It writes the firmware to both slots, then DiamaneOS to slot a, then empty data partitions. Leave the phone alone until it is finished.
For the system partitions the phone restarts into fastbootd, then back into Fastboot Mode. After each restart the browser may ask you to choose the phone again.
An image set that can be locked also installs its signing key, and the phone returns to Fastboot Mode for the lock. Any other set restarts into DiamaneOS.
Locking the bootloader
Choose the image set first.
Locking turns on full verified boot with DiamaneOS's key. Lock right after the install, before Android first starts.
- Finish every lock step before starting Android. Android's setup turns OEM unlocking off, and the bootloader can then no longer be locked safely.
- Stop if something fails. Do not repeat a lock command after an error.
- Locking erases all data on the phone.
- Each start then shows a yellow warning screen with the ID of the key the OS is signed with. This is expected: DiamaneOS boots with its own key, not Fairphone's.
- The installer locks only the bootloader, never the critical partitions.
- It never locks an image set that must stay unlocked, such as one signed with public test keys. Anyone can sign images with those keys.
- It locks only while the phone allows unlocking, so that a phone that fails to start can be unlocked again.
- Leave the phone in Fastboot Mode after the install. Do not start Android.
- Press Lock bootloader. The installer checks that the bootloader is still unlocked and that the phone allows unlocking.
- Confirm on the phone with the volume and power buttons. The phone erases all data and restarts.
- Hold Volume down while it restarts, so that it returns to Fastboot Mode. The installer then checks that the bootloader is locked. Choose Start on the phone.
- The last setup screen offers to turn OEM unlocking off, and that choice is selected. Keep it. Turn it on again only to unlock the bootloader.
Returning to the stock OS
See returning to the stock OS. It removes the DiamaneOS key from the phone and installs Fairphone's factory package.
Log
Add this to any report of a failed install. It holds no serial numbers.