The Razer Phone is a high-end Android smartphone released in November 2017 – it’s a monster of a gaming device, sporting the world’s first 120Hz screen refresh rate on a 5’7” display, along with 8GB of RAM and the Snapdragon 835 chipset.
However, developers were slow to get custom OS’s running on the Razer Phone, as most were waiting for Razer to release an update to Oreo 8.1 with full Project Treble support. Now that the Razer Phone does indeed have the necessary support with the latest updates, installing LineageOS is quite simple. Just follow this step-by-step guide for installing LineageOS on the Razer Phone.
Alternative custom ROMs that can be installed
- The first step is to install the ADB and Fastboot / Google USB drivers on your PC.
- Now enable Developer Mode on your Razer Phone – go to Settings>About Phone>tap ‘Build Number’ 7 times until “Developer Options” are unlocked. Now go to Settings>Developer Options>enable USB Debugging and OEM Unlock.
- Navigate to your ADB folder on your PC, hold Shift + right click inside the folder and select “Open a Command Window Here”. This will launch a CLI with ADB commands enabled.
- Now connect your Razer Phone to your PC via USB and type into the command window ‘adb devices’ – if your phone’s connection is recognized, the ADB window should display your Razer Phone’s serial number. If nothing happens, you may need to troubleshoot your ADB installation, or USB connection.
- If the connection was successful, type into the ADB window: adb reboot bootloader
- Your Razer Phone will reboot to Download Mode. Now type into ADB window: fastboot -I 0x1532 devices
- When you type that last command, your device should appear in the CLI – if successful, type into ADB: fastboot -I 0x1532 flashing unlock
- A prompt will appear on your Razer phone to unlock the bootloader – use the volume keys to navigate, and power button to confirm. From now on, your Razer phone will display “Your device is unlocked and cannot be trusted” on every boot.
Installing Lineage OS on your Razer phone
- First make sure your Razer phone is updated to at least Android Oreo DP1 – this will not work on Nougat!
- Next we need to install TWRP – follow along closely here, and this may take a few attempts (the Razer bootloader is somehow finicky when switching between A/B slots, which we need to do here).
- Download the TWRP image, TWRP injector, and Magisk .zip and place them in your root ADB folder on your computer.
- Launch an ADB terminal with your Razer phone connected to your PC via USB, and run the following commands:
Adb shell getprop ro.boot.slot_suffix
- This should return: [ro.boot.slot_suffix]: [_a] or [_b]
- So make note of whether it returned A or B, and continue to the next step:
- Disconnect your USB cable, power off your Razer phone, then immediately turn it back on while plugging in the USB cable and holding Volume Down – this is a bit tricky to get right.
- Once you’re in bootloader mode, launch another ADB window and we’re going to switch to the other boot slot from what was returned earlier. So if earlier ADB said you were on boot slot A, we’re going to switch to B. Use this command:
Fastboot –set-active=_b or fastboot –set-active=_a
- The ADB window should output something like “Setting current slot to “a”…OKAY”.
- This is a rather tricky procedure because the Razer bootloader for some reason does not always like to switch boot slots – you may need to run this command multiple times until its successful, or even try forcing the device off by holding the power buttons at least 15 seconds, then re-entering fastboot mode. Just keep trying.
- Once the boot slot has been successfully switched, type this command: fastboot flash boot twrp-3.2.1-0-cheryl.img && fastboot reboot
- This is going to flash TWRP onto your Razer phone and then immediately reboot the device into TWRP. So if successful and you’re in the TWRP screen, do not slide to allow modifications! Tap “Mount as Read Only”.
- Now in the ADB window on your PC, you need to push the Android Oreo DP1 factory image, TWRP injector, and Magisk.zip to your SD card (using ADB push). So run these commands:
adb push twrp-installer-3.2.1-0-cheryl.zip /sdcard
adb push path/to/the/factoryimage/boot.img /sdcard
adb push Magisk-16.0.zip /sdcard
- Now go Install, tap on “Install Image”, and choose the boot.img we just pushed and flash it.
- Now go back to the Reboot menu, switch to the opposite slot (boot slot A or B), then repeat the flash process for the boot.img
- Once both partitions have accepted the boot image flashing, set partition A as the active partition, go to Install, and flash the TWRP installer. After that, repeat with the Magisk.zip file.
- Now you need to go to Reboot > Bootloader and, with a USB connected to your Razer phone and an ADB prompt open on your PC, flash the GSI system image to your system_a partition through ADB:
Fastboot flash system_a system-arm64-ab.img
- If you want, you’re also able to install a different GSI to your system_b partition; you would do so like this:
Fastboot set_active b
Fastboot flash system_b system-arm64-ab-gapps-su.img
- The above is just an example, you do not need to run those commands as part of this guide, but its there if you want.