Razer - Phone 2 - aura - Documentation Suggestions

…Enter suggestions to improve documentation in this category. Do not raise bugs or issues here…

Drivers - Windows USB: Latest USB Drivers For Windows (.zip)
Software - ADB and Fastboot: Latest Android Platform Tools For Windows (.zip)

The Razer Phone 2 uses an A/B partitioning scheme to facilitate OTA updates seamlessly. If you boot from slot A, and install an OTA update, it will install it to Slot B, then reboot to Slot B. If booting from Slot B fails, it will automatically recover by booting from Slot A. Each Slot, A and B, have their own boot, system, radio, and other vendor partitions. The User partition is separate from these (there is only one, so back this up externally!).

I have installed many custom ROMs on the RP2 and my personal opinion is that you must flash the new OS (in this case, e/OS) to both slots at the same time (including the boot/recovery partitions). This way, an OTA update won’t try to install on top of whatever ROM you had previously loaded in the inactive slot.

It’s pretty easy. First, find out which slot your phone is currently set to boot from:
fastboot getvar current-slot

If the current slot says “b”, then run this command:
fastboot --set-active=a

Now we’re gonna flash the boot/recovery partition to slot b:
fastboot flash boot_b recovery-aura.img

Reboot the bootloader to make sure everything went well:
fastboot reboot bootloader

Next we’ll flash the same boot/recovery partion, this time to slot a:
fastboot flash boot_a recovery-aura.img

And reboot to the bootloader once more:
fastboot reboot bootloader

Always good to double-check which slot you’re on:
fastboot getvar current-slot

Assuming you’re back on Slot A, select recovery mode with the volume buttons and click the power button. After the e/os recovery loads, it will also tell you which slot is active. Now choose apply update, apply from adb, and then from your PC run:
adb sideload e-aura.zip

After it finishes flashing, go back to the main recovery menu, select advanced, and then reboot to the bootloader. Verify the current slot:
fastboot getvar current-slot

So you can see that flashing or updating the system causes the phone to switch active slots automatically. With that in mind, we are going to choose recovery mode again, wait for the e/os recovery to finish loading, then confirm that the active slot is B. Now choose apply update, apply from adb, and install e/os to the other slot:

adb sideload e-aura.zip

When this finishes, go back to the recovery’s main menu, select advanced, and reboot to the bootloader. Verify that you’re back on Slot A:

fastboot getvar current-slot</code

Finally, select Power Off and unplug your phone. Wait a few seconds, and then turn your phone back on. It will boot to e/OS on Slot A by default. Then, whenever you receive an OTA update, it will install it to Slot B and make that the active boot. If anything goes wrong during an update, the phone’s firmware counts the number of times a slot fails to boot successfully, and after (I think) 3 failed attempts, the phone will switch back to the last successfully booted slot.

Here are the instructions again, in simplified form:

Commands:
fastboot devices
fastboot getvar current-slot
fastboot --set-active=a
fastboot --set-active=b
fastboot flash boot_a recovery.img
fastboot flash boot_b recovery.img
fastboot reboot bootloader
adb devices
adb reboot bootloader
adb reboot recovery
adb sideload rom.zip

Steps: (phone=RP2, Windows computer=PC1)
RP2 - [System Settings] Enable developer options and USB debugging in
RP2 - Connect USB cable to PC1
RP2 - Trust PC1 when popup appears
PC1 - [cmd] adb devices (should show phone’s serial number)
PC1 - [cmd] adb reboot bootloader
PC1 - [Windows] Device Manager > Install Android Bootloader Interface USB Driver
PC1 - [cmd] fastboot devices (should show phone’s serial number)
PC1 - [cmd] fastboot getvar current-slot
PC1 - [cmd] fastboot --set-active=a (only necessary if you are on B)
PC1 - [cmd] fastboot flash boot_b recovery-aura.img
RP2 - [fastboot menu] Reboot bootloader
PC1 - [cmd] fastboot flash boot_a recovery-aura.img
RP2 - [fastboot menu] Reboot bootloader
PC1 - [cmd] fastboot getvar current-slot (should be A)
RP2 - [fastboot menu] Select recovery mode
RP2 - [recovery menu] Choose apply update, then apply update from ADB Sideload
PC1 - [cmd] adb devices (sideload authorized)
PC1 - [cmd] adb sideload e-aura.zip (and let it complete fully)
RP2 - [recovery menu] Select Advanced and Reboot bootloader
PC1 - [cmd] fastboot getvar current-slot (should be B)
RP2 - [fastboot menu] Select recovery mode
RP2 - [recovery menu] Choose apply update, then apply update from ADB Sideload
PC1 - [cmd] adb devices (sideload authorized)
PC1 - [cmd] adb sideload e-aura.zip (and let it complete fully)
RP2 - [recovery menu] Select Advanced and Reboot bootloader
PC1 - [cmd] fastboot getvar current-slot (should be A)
RP2 - Power off phone and unplug USB
RP2 - Power on phone
RP2 - Set up e/os and enjoy! Your phone will now switch between Slots A and B seamlessly after OTA updates.