FORUMS
Remove All Ads from XDA
H10 Turbo

[TREBLE][Oreo][How-To] Install any Generic System Image (GSI) on the Razer Phone

1,934 posts
Thanks Meter: 5,188
 
By linuxct, XDA Ad-Free Recognized Contributor & Social Contributor on 30th March 2018, 01:19 AM
Post Reply Email Thread
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 @MishaalRahman, @P4Block and indirect help of @phhusson and @TheCrazyLex.
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):
Setting up your device:
You'll need:
Code:
To fully unlock your bootloader and unlock flashing capabilities on your device. 
TWRP image + TWRP injector
Magisk flashable zip
A GSI of your preference from the ones listed here. 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 @Dees_Troy'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.
Quote:
Originally Posted by Dees_Troy

Once you have adb working, run this command: adb shell getprop ro.boot.slot_suffix

It should say: [ro.boot.slot_suffix]: [_a] Or: [ro.boot.slot_suffix]: [_b]

Make note of whether you are currently using slot A or B. Next power off the device and boot to the bootloader using your USB cable and volume down. You want to switch to the other boot slot. If you are currently on slot A, type this: fastboot --set-active=_b Or on slot B type this: fastboot --set-active=_a

You should see something like this: Setting current slot to 'a'... OKAY [ 0.042s] finished. total time: 0.042s

I found the bootloader on the Razer Phone to be extremely finicky and I had to run the command multiple times until I got it to run successfully. You may have to hold the power button for 15 seconds to force power off the device and then re-enter fastboot mode. Keep trying until it works. Once it's on the right boot slot, type this: fastboot flash boot twrp-3.2.1-0-cheryl.img && fastboot reboot

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:
Code:
adb push twrp-installer-3.2.1-0-cheryl.zip /sdcard
Code:
adb push path/to/the/factoryimage/boot.img /sdcard
Code:
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:
Code:
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:
Code:
fastboot set_active b
Code:
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:
Code:
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:
Code:
fastboot flash boot_a boot_linuxct_20180420_cheryl_omr0.img
Code:
fastboot flash boot_b boot_linuxct_20180420_cheryl_omr0.img
SHA-2: 2f0c7348ac906f2f81fa39df7b24b69392783bd2379d5da357 777be444c67d97
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:
Code:
fastboot flash boot_a boot_linuxct_20180330_cheryl_odp1.img
Code:
fastboot flash boot_b boot_linuxct_20180330_cheryl_odp1.img
SHA-2: 8f763162415167b2e919a450654f9a46f69b81f6853013bcab f362dfeb2a115e


Many thanks to everyone that helped me today to get this to work properly!
The Following 16 Users Say Thank You to linuxct For This Useful Post: [ View ] Gift linuxct Ad-Free
 
 
30th March 2018, 01:27 AM |#2  
linuxct's Avatar
OP Recognized Contributor & Social Contributor
Flag BCN
Thanks Meter: 5,188
 
Donate to Me
More
Want some screenshots?
Attached Thumbnails
Click image for larger version

Name:	Screenshot_20180329-234803.png
Views:	1836
Size:	164.2 KB
ID:	4461268   Click image for larger version

Name:	Screenshot_20180329-234837.png
Views:	1794
Size:	152.4 KB
ID:	4461269   Click image for larger version

Name:	Screenshot_20180329-234849.png
Views:	1782
Size:	133.2 KB
ID:	4461270   Click image for larger version

Name:	Screenshot_20180329-235233.png
Views:	1674
Size:	126.3 KB
ID:	4461271   Click image for larger version

Name:	Screenshot_20180330-003423.png
Views:	1616
Size:	76.3 KB
ID:	4461272   Click image for larger version

Name:	Screenshot_LineageOS_Settings_20180330-010816.jpg
Views:	1598
Size:	67.7 KB
ID:	4461273   Click image for larger version

Name:	Screenshot_Settings_20180330-010443.png
Views:	1582
Size:	187.5 KB
ID:	4461274   Click image for larger version

Name:	Screenshot_Settings_20180330-010701.png
Views:	1534
Size:	131.5 KB
ID:	4461276  
The Following 3 Users Say Thank You to linuxct For This Useful Post: [ View ] Gift linuxct Ad-Free
30th March 2018, 02:24 AM |#3  
Junior Member
Thanks Meter: 5
 
More
Thanks for all the hard work!

I've followed the guide but after flashing the GSI I get stuck at the Android logo and the system never boots?
Any help would be appreciated
30th March 2018, 02:33 AM |#4  
linuxct's Avatar
OP Recognized Contributor & Social Contributor
Flag BCN
Thanks Meter: 5,188
 
Donate to Me
More
Quote:
Originally Posted by PupPupG

Thanks for all the hard work!

I've followed the guide but after flashing the GSI I get stuck at the Android logo and the system never boots?
Any help would be appreciated

Did you follow all the steps carefully? Did you make sure you flashed Magisk?
Magisk is needed since it disables DM-Verity, which is what IMO gets the device stuck at first boot.
Oh, and also, sometimes during first boot your device gets encrypted. Mine took a bit extra that time (specifically booting the LineageOS image).

If you can't still get it to work, try with the prebuilt boot image.
The Following User Says Thank You to linuxct For This Useful Post: [ View ] Gift linuxct Ad-Free
30th March 2018, 02:35 AM |#5  
Kimbaroth's Avatar
Senior Member
Flag Monterrey
Thanks Meter: 314
 
More
This is awesome!!!

I'd love to have a fully working resurrection remix build working on my cheryl!!!!! =D <3

KEEP UP THIS AWESOME WORK!!!!!!!!!
30th March 2018, 03:18 AM |#6  
Junior Member
Thanks Meter: 5
 
More
Quote:
Originally Posted by linuxct

Did you follow all the steps carefully? Did you make sure you flashed Magisk?
Magisk is needed since it disables DM-Verity, which is what IMO gets the device stuck at first boot.
Oh, and also, sometimes during first boot your device gets encrypted. Mine took a bit extra that time (specifically booting the LineageOS image).

If you can't still get it to work, try with the prebuilt boot image.

I tried again using all of the info but they closest I've gotten to a boot is the Android logo and then a prompt to decrypt but no matter what I enter I get "Decryption Unsuccessful" and it just brings me back to TWRP
30th March 2018, 04:13 AM |#7  
linuxct's Avatar
OP Recognized Contributor & Social Contributor
Flag BCN
Thanks Meter: 5,188
 
Donate to Me
More
Quote:
Originally Posted by PupPupG

I tried again using all of the info but they closest I've gotten to a boot is the Android logo and then a prompt to decrypt but no matter what I enter I get "Decryption Unsuccessful" and it just brings me back to TWRP

Flash the Oreo DP1 image and start over.
30th March 2018, 05:02 AM |#8  
ThatGuy94's Avatar
Senior Member
Flag Atlanta
Thanks Meter: 56
 
More
Quote:
Originally Posted by linuxct

Flash the Oreo DP1 image and start over.

From what I can tell, TWRP cannot format the data partition properly which is what causes LOS to appear as encrypted and won't finish booting. I was able to successfully able to get it to boot by flashing the stock boot.img and booting to stock recovery and factory reset that way. After doing that, flash your ROM of choice and Magisk and it should be usable.
The Following User Says Thank You to ThatGuy94 For This Useful Post: [ View ] Gift ThatGuy94 Ad-Free
30th March 2018, 10:01 AM |#9  
linuxct's Avatar
OP Recognized Contributor & Social Contributor
Flag BCN
Thanks Meter: 5,188
 
Donate to Me
More
Quote:
Originally Posted by ThatGuy94

From what I can tell, TWRP cannot format the data partition properly which is what causes LOS to appear as encrypted and won't finish booting. I was able to successfully able to get it to boot by flashing the stock boot.img and booting to stock recovery and factory reset that way. After doing that, flash your ROM of choice and Magisk and it should be usable.

Flashing the Oreo DP1 image actually flashes an empty, non-encrypted userdata image. That's why I requested to start over.
That can also be another solution, bit messier than starting over but it's good.
30th March 2018, 12:09 PM |#10  
M1cky's Avatar
Member
Flag Dublin
Thanks Meter: 17
 
More
Does anyone have Magisk fully working with this? I still get ctsprofile:false

Aside from this, excellent work!
30th March 2018, 01:44 PM |#11  
linuxct's Avatar
OP Recognized Contributor & Social Contributor
Flag BCN
Thanks Meter: 5,188
 
Donate to Me
More
Quote:
Originally Posted by M1cky

Does anyone have Magisk fully working with this? I still get ctsprofile:false

Aside from this, excellent work!

I do. Try installing the latest beta of Magisk and then, if that didn't solve it, try setting a new Build fingerprint with a tool like MagiskHide Props Config (PS. Just to be sure, set the Google Pixel 2 XL one since that's the only 8.1.0 build fingerprint provided by that tool).
The Following User Says Thank You to linuxct For This Useful Post: [ View ] Gift linuxct Ad-Free
Post Reply Subscribe to Thread

Tags
generic, gsi, oreo, phone, razer

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes