Web installer
This page installs DiamaneOS on a supported device over USB. It
downloads the release from releases.diamaneos.de, or reads an image set from this
computer. It sends nothing about the phone over the network.
It runs the same steps as the image set's flash-all.sh, which the
command-line installation uses, and checks every file before it writes
anything. While a phone is connected, the browser asks before leaving this page.
Before you start
- A supported device whose bootloader can be unlocked.
- A Chromium-based browser, such as Chrome, Chromium or Edge. Other browsers have no WebUSB.
- At least 2 GB of free memory, and free disk space for the release download and its unpacked files, or the image set unpacked into a folder.
- A USB-C data cable, plugged straight into the computer rather than into a hub. Connect no other phone.
- A backup of your data. Unlocking, installing and locking each erase the phone.
- 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
Enabling OEM unlocking
In the stock OS on the phone:
- Open Settings > About phone and tap Build number seven times. This turns on Developer options.
- Open Settings > System > Developer options and turn on OEM unlocking. The phone needs an internet connection for this.
- Note the build number under 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.
OEM unlocking allows the bootloader to be unlocked. It does not unlock it.
Booting into the bootloader
Turn the phone off. Hold its bootloader keys, which the supported devices page lists, until the bootloader screen appears. This page calls that screen Fastboot Mode.
Connecting the phone
Connect the phone to this computer, press Connect and choose the phone in the browser's dialog. The installer shows whether the bootloader and the critical partitions are unlocked, and whether unlocking is allowed.
The phone restarts several times. After each restart the installer reconnects on its own. If it asks, press Connect again and choose the phone. Steps the phone reports as done are greyed out.
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, select the unlock choice with the volume buttons and confirm with the power button.
- The phone erases itself and restarts. Hold its bootloader keys while it restarts, so that it returns to Fastboot Mode before Android starts.
- Once the installer shows the phone back in Fastboot Mode, press Unlock critical partitions and confirm on the phone the same way. Return to Fastboot Mode again.
Android must not start between the two unlocks. Its first start turns OEM unlocking off, and the critical partitions can then not be unlocked. If Android starts, turn the phone off, start it in Fastboot Mode and press Connect.
Getting the image set
Download release gets the latest stable release for the connected phone. Before anything
reads it, the installer checks its signature with DiamaneOS's factory key. Then it checks every
file it writes against the release's SHA256SUMS. This takes a few minutes.
Or choose an image set on this computer: its folder, or all of its files. The browser asks
whether to upload them, but nothing leaves this computer. The installer checks every file it
writes against the set's SHA256SUMS.
Installing DiamaneOS
The install erases all data on the phone. Do not touch the phone or the cable, and keep this page open, until the installer reports the end.
- 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 the slot the image set names.
- 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. Do not start Android, and lock straight away. Any other set restarts into DiamaneOS.
fastbootd is a new USB device to the browser. If the installer shows Connect again, wait until the phone shows fastbootd, press it and choose the phone. Press it too if the phone is back in Fastboot Mode and the installer does not go on.
The installer names the firmware release the image set carries. Compare it with the build number you noted. If the phone runs a newer stock release, do not install.
Locking the bootloader
Get 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.
- The installer offers the lock only straight after its install, while the phone stays connected. If the phone restarts or is unplugged in between, install again and lock straight after.
- The critical partitions are locked first, then the bootloader. This is the device maker's order.
- The installer 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 critical partitions. The installer checks that the bootloader is still unlocked and that the phone allows unlocking. On the phone, choose to lock with the volume buttons and press Power. The phone erases all data and restarts.
- Hold the bootloader keys while it restarts, so that it returns to Fastboot Mode. Android must not start before the bootloader is locked. If the phone does not return, the installer stops and leaves the bootloader unlocked.
- Once the phone is back, the installer checks that the critical partitions are locked and that the phone still allows unlocking. Then press Lock bootloader and confirm on the phone the same way.
- The phone erases all data and starts DiamaneOS.
If the critical partitions are already locked, only Lock bootloader is offered.
From then on, each start 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. An orange warning screen means the bootloader is still unlocked. Start the phone in Fastboot Mode, install again and lock straight after.
Disabling OEM unlocking
The last setup screen offers to turn OEM unlocking off, and that choice is selected. Keep it. With OEM unlocking off, the bootloader refuses to unlock. Turn it on again only to unlock the bootloader, for example to return to the stock OS.
If a step fails
The installer shows the error and a link to what to do, which covers each case. Do not start Android, and never lock the bootloader to fix a failed install. Add the log below when you ask for help.
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.