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

Enabling OEM unlocking

In the stock OS on the phone:

  1. Open Settings > About phone and tap Build number seven times. This turns on Developer options.
  2. Open Settings > System > Developer options and turn on OEM unlocking. The phone needs an internet connection for this.
  3. 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.

  1. Press Unlock bootloader. On the phone, select the unlock choice with the volume buttons and confirm with the power button.
  2. The phone erases itself and restarts. Hold its bootloader keys while it restarts, so that it returns to Fastboot Mode before Android starts.
  3. 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.

  1. 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.
  2. The phone restarts into fastbootd, which writes an empty partition layout and then the system partitions.
  3. The phone returns to Fastboot Mode for the empty data partitions.
  4. 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.

  1. Leave the phone in Fastboot Mode after the install. Do not start Android.
  2. 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.
  3. 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.
  4. 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.
  5. 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.

Log

Add this to a report on the issue tracker when an install fails. It holds no serial numbers.