Web installer
This page installs DiamaneOS on a supported device 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 the device maker describes. The supported devices page links its guide. The phone checks online first.
Note the build number in Settings > About phone. The install writes the device maker's firmware that the image set carries, and the phone must not already run a newer stock release.
Connecting the phone
Turn the phone off and start it in Fastboot Mode with its bootloader keys, which the supported devices page lists. 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. Use the bootloader keys while it restarts, so that it returns to Fastboot Mode before Android starts.
- If Android starts, turn the phone off. Then start it in Fastboot Mode.
- 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. Leave the phone alone until it is finished.
- In Fastboot Mode it writes the device maker's firmware to both slots. It cancels a pending system update, if the phone reports one, and writes DiamaneOS's boot images to slot a.
- The phone restarts into fastbootd, which writes an empty partition layout and then the system partitions.
- The phone returns to Fastboot Mode for the empty data partitions.
- An image set that can be locked also installs its signing key, and the phone restarts into Fastboot Mode for the lock. Any other set restarts into DiamaneOS.
After each restart, press Connect again if the installer asks, and choose the phone.
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 the device maker'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.
- Use the bootloader keys 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 installs the device maker's stock OS, then removes the DiamaneOS key before the lock.
Log
Add this to any report of a failed install. It holds no serial numbers.