[Razer Phone Guides, News, & Discussion] linuxct:
Hello everyone,

I've been tinkering around with Generic System Images since the Oreo Developer Preview 1 came out for the Razer Phone. I'm glad to say I got it to work, with lots of help from [MENTION=7050182]MishaalRahman[/MENTION], [MENTION=5567986]P4Block[/MENTION] and indirect help of [MENTION=1915408]phhusson[/MENTION] and [MENTION=5986135]TheCrazyLex[/MENTION].

What's working as of right now:

- GPS

- Rear Camera (only one of the lenses, needs further testing/pulling the Razer camera app apk)

- Front camera

- Microphones

- Sensors, each and every of them

- Speakers, sound playback, videoplayback (needs further testing)

-

Fingerprint scanner

- WiFi, Bluetooth,

NFC

-

120Hz screen features

- Color adjustments from the Oreo DP1 by Razer

-

4G LTE

-

In-Call audio

What needs further testing:

- 4G/LTE FIXED check out post #77!

- Once the above is confirmed to work => VoLTE on any carrier, and also testing on certain carriers like 3 UK (since they sold a version with different software).

What's broken:

- Audio in phone calls (works properly in VoIP/3rd party apps) FIXED check out post #48!
​

What ROMs can be booted with this (as of 30-03-2018):

AOSP 8.1

Lineage OS 15.1

Resurrection Remix

More to come...

Setting up your device:

You'll need:

To [URL="https://xdaforums.com/razer-phone/how-to/guide-to-unlocking-bootloader-t3706462"]fully unlock your bootloader[/URL] and [URL="https://xdaforums.com/showpost.php?p=74607352&postcount=8"]unlock flashing capabilities[/URL] on your device.
[URL="https://eu.dl.twrp.me/cheryl/twrp-3.2.1-0-cheryl.img.html"]TWRP image[/URL] + [URL="https://eu.dl.twrp.me/cheryl/twrp-installer-3.2.1-0-cheryl.zip.html"]TWRP injector[/URL]
[URL="http://tiny.cc/latestmagisk"]Magisk flashable zip[/URL]
A GSI of your preference from the ones listed [URL="https://xdaforums.com/project-treble/trebleenabled-device-development"]here[/URL]. PS: Use the Gapps+SU one if you choose AOSP ;)

0. Make sure you're running the Android O DP1 from Razer, or any future update to it.

THIS WON'T WORK ON NOUGAT

1. Properly install TWRP on your device: (I'll be using [MENTION=912474]Dees_Troy[/MENTION]'s guide with a few modifications to make very sure everything will work as intended)

- fastboot flash the twrp image as explained by him, in your currently active boot partition. PS: After flashing the Android O DP1, it will always be A.

2. Once you're in TWRP, DO NOT SLIDE to allow modifications, but tap on Mount as Read Only. Plug in your USB cable, and adb push the boot image from the Android O DP1 factory image to your sdcard, as well as the TWRP injector and the Magisk zip. That can be done with the following 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

3. Go into Reboot, then make sure you're on partition A. Else, tap on the button to set A as the active partition.

Now go back, tap Install, then tap on 'Install Image' then choose the boot.img you just pushed, and flash it as boot image.

Now go back, into Reboot, and move to partition B and repeat the step above.

Once you're sure both partitions only contain the unmodified boot images, set the partition A as active, go into Install, choose the twrp-installer-3.2.1-0-cheryl.zip and flash it.

Once it finishes, do the same with the Magisk zip file.

4. Go into Reboot, press on Bootloader.

5. Connect the usb cable, and flash the GSI system image onto your system_a partition through fastboot from your pc. This can be done with the command:

fastboot flash system_a system-arm64-ab.img

5.b If you wish, you can install a different GSI onto your system_b partition, and that can be done with the following commands:

fastboot set_active b

fastboot flash system_b system-arm64-ab-gapps-su.img

5.c If you wish to go back to the system_a partition, you can execute:

fastboot set_active a

6. Reboot and enjoy.
​

Prebuilt boot image:

If doing the steps from 1-4 seems messy or you don't get it to work properly, I've published the image I made following them with the latest Magisk and TWRP versions available as of April 20th 2018.

You can download it from here. You can then flash it from fastboot by using the commands:

fastboot flash boot_a boot_linuxct_20180420_cheryl_omr0.img

fastboot flash boot_b boot_linuxct_20180420_cheryl_omr0.img

SHA-2: 2f0c7348ac906f2f81fa39df7b24b69392783bd2379d5da357777be444c67d97​

Old version (from ODP1 - may experience the bootloader issues):

You can download it from here. You can then flash it from fastboot by using the commands:

fastboot flash boot_a boot_linuxct_20180330_cheryl_odp1.img

fastboot flash boot_b boot_linuxct_20180330_cheryl_odp1.img

SHA-2: 8f763162415167b2e919a450654f9a46f69b81f6853013bcabf362dfeb2a115e

Many thanks to everyone that helped me today to get this to work properly!