[Treble]Flash some (GSI) on the Razer Phone with wifi fix

bexiu

Member
Mar 14, 2018
18
4
0
How to Flash Any Generic System Image with WIFI 100% working on Razer Phone
You have to follow exactly step by step or it will not work. But don't worry, all these step very easy & work if you don't miss any step.
Here some photos proof proving this all features and WIFI works:










As we know, actually there are some guides how to install any GSI on razer phone such as linuxct's guide (Link: https://forum.xda-developers.com/razer-phone/how-to/treble-install-generic-image-gsi-razer-t3770684) and HO-COOH's guide (link: https://forum.xda-developers.com/razer-phone/how-to/treble-how-to-install-9-0-gsi-razer-t3883586), some of them can't not boot in GSI or wifi not work after root with magisk.
Follow this way, I'm sure after flash GSI, all feature work, special wifi 100% working.
Special thanks and credit to @linuxct, with lots of help from other members.

Working Features: GSI Image for Razer Phone
Almost all the important features are working perfectly fine with the GSI Image for Razer Phone.

- 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


ROMs GSI can be booted & root:

arrowOS - 9.x (crash for the first time)
Lineage OS 15.1 (most stable, recommend)
Resurrection Remix
HO-COOH and linuxct suggested Wifi still not work on these below GSI yet after root, so I'm not sure it
AOSP Android 9.0 Pie (if you choose this, it need flash a ndroid 9.0 Pie Gapps Package or you can download OpenGapps 9.0.)
AOSPExtended ROM (if you choose this, it need flash a ndroid 9.0 Pie Gapps Package or you can download OpenGapps 9.0.)


Pre-Requisite
flash_all.bat back to stock image from razer factory images [url]https://s3.amazonaws.com/cheryl-factory-images/cheryl-o-global-6033.zip[/URL]
SHA-256 Checksum: cf63490e488a49832da861693d070e01f78c62ebe7d0f0aa5568ed83739173bc
When restore original factory images complete. Connect the usb cable, boot into system, enable USB debugging and tick "Always allow from this computer" after pop up "Allow USB debugging?"
1.) Obtain boot.img from the latest Razer factory image. (If you are not already on the latest, best to just flash it using Razers guide to restore using factory image.) https://developer.razerzone.com/razer-phone-dev-tools/factory-images//
2.) Obtain TWRP.img and TWRP.zip from https://dl.twrp.me/cheryl
3.) Obtain Magisk from: https://github.com/topjohnwu/Magisk/
5.) Push 4 files to /sdcard by ensuring all 4 files are inside of your platform-tools folder, and following command: "adb push boot.img /sdcard", then "adb push twrp-installer-3.2.1-0-cheryl.zip /sdcard", then "adb push Magisk-v18.1.zip /sdcard"

Instructions to flash GSI

1.) Type: "adb reboot bootloader "
2.) Type: "fastboot flash boot twrp-3.2.1-0-cheryl.img && fastboot reboot"
3.) Once in TWRP, DO NOT SLIDE to allow modifications, but tap on Read Only. Go into Reboot, then make sure you're on partition A.
Now back, go Install, tap on 'Install Image' choose the boot.img you, and flash it as boot image.
Back into Reboot, move to partition B and repeat the step above.
Set the partition A as active, tap Install, choose the twrp-installer-3.2.1-0-cheryl.zip and flash it.
4.) Go into Reboot, press on Bootloader.
5.) Razer phone, you should choose Image for ARM64 A/B device. Copy file GSI image, paste to folder Platform tools adb and flash the GSI system image onto your system_a partition, example you want flash Lineage 15.1 (system-arm64-aonly-gapps-su.img),
type: "fastboot flash system_a system-arm64-aonly-gapps-su.img "
6.) When flash finished. Type: "fastboot erase userdata && fastboot reboot ". If you skip this step, it will stuck boot into system with decrytion message or force enter password. Wait about 5 ~ 10 minutes, it will boot into system.

Root GSI with wifi 100% work.
After boot into system, you must enable "Android debugging".
You have to reload again 3 files to /sdcard with the following command: "adb push boot.img /sdcard", then "adb push twrp-installer-3.2.1-0-cheryl.zip /sdcard", then "adb push Magisk-v18.1.zip /sdcard"
1.) Type: "adb reboot bootloader " and "adb reboot recovery" or type: "fastboot flash boot twrp-3.2.1-0-cheryl.img && fastboot reboot"
2.) Once in TWRP, DO NOT SLIDE to allow modifications, but tap on Read Only. Go into Reboot, then make sure you're on partition A.
Go back, go in Install, tap on 'Install Image' choose the boot.img , and flash it as boot image.
Back into Reboot, move to partition B and repeat the step above.
Set the partition A as active, tap Install, choose the twrp-installer-3.2.1-0-cheryl.zip and flash it. When finishes, do the same with the Magisk zip file.
3.) Reboot and check wifi, I guaranteed WIFI 100% work, if you stuck in TWRP, just type: "fastboot flash boot_a boot.img && fastboot reboot"
4.) Download newest Magisk direct in the phone, and install it. Don't install through adb.

Bonus how fix ctsProfile: false
1.) Open Magiskmanger, tap on Download, type: " MagiskHide Props Config", tap install".
and also download Busybox by type: "Busybox for Android NDK", tap install wait unstill finish. Now reboot.
2.) Open play store, searching: "Terminal Emulator", install it.
Run it, and
type: "su" enter, "props" enter, "1" enter, "f" enter (choose what kind of your devices from list, example me razer phone) I type "13" enter, "y" enter, "y" enter.
Done, now reboot and recheck SafetyNet status, all passed.
Watch this video more clear:
Now your phone fully Root and all main feature work. Thanks again for a lot help from many other forum's members. Every times, SafeNet status fail or broke,zero just repeat above steps then reboot.
 

Attachments

Last edited:

HO-COOH

Member
Jul 20, 2018
35
13
0
I don't know whether it's my guide's flaw or something, there are indeed some GSIs just won't boot following my guide. (But some others boot just fine)
I will be very appreciate it if you can help testing the Pixel Experience Pie GSI here: https://github.com/EnesSastim/Downloads/releases

And sorry, I followed your guide exactly from stock, and latest Magisk v18.1 still breaks wifi on Android Pie. You can test it out yourself. (Because I see your post are the screenshots of Android Oreo with Magisk) linuxct replied to the issue in my guide by the way.
 
Last edited:

bexiu

Member
Mar 14, 2018
18
4
0
I tested Lineage 15.1 (system-arm64-aonly-gapps-su.img), ArrowOS 9.x, it worked like charm both of them with WiFi fix and not stuck logo boot or force enter passwords
 

HO-COOH

Member
Jul 20, 2018
35
13
0
I tested Lineage 15.1 (system-arm64-aonly-gapps-su.img), ArrowOS 9.x, it worked like charm both of them with WiFi fix and not stuck logo boot or force enter passwords
So is it rom specific issue? I can get Pixel Experience booted but rooting it with Magisk breaks wifi. I am testing out ArrowOS now.
 

bexiu

Member
Mar 14, 2018
18
4
0
So is it rom specific issue? I can get Pixel Experience booted but rooting it with Magisk breaks wifi. I am testing out ArrowOS now.
don't forget this command after flash arrowOS, you have to type exactly "fastboot erase userdata", don't try
Code:
fastboot format:ext4 userdata
fastboot format:ext4:0xc72dd3000 userdata
fastboot format:ext4:0xC72DD7000 userdata
, becuase it's not work in this case.
Rom Lineage 15.1, I tried this (system-arm64-aonly-gapps-su.img) from https://forum.xda-developers.com/pr...evice-development/lineage-phh-treble-t3767690
 
Last edited:

HO-COOH

Member
Jul 20, 2018
35
13
0
don't forget this command after flash arrowOS, you have to type exactly "fastboot erase userdata", don't try
Code:
fastboot format:ext4 userdata
fastboot format:ext4:0xc72dd3000 userdata
fastboot format:ext4:0xC72DD7000 userdata
, becuase it's not work in this case.
Rom Lineage 15.1, I tried this (system-arm64-aonly-gapps-su.img) from https://forum.xda-developers.com/pr...evice-development/lineage-phh-treble-t3767690
No luck. I followed the exact same steps on Arrow OS. Still breaks Wi-Fi. Can you post a screenshot with Magisk working on any Android Pie roms? I believe it's really like what linuxct said.
Oh, Arrow OS has serious bugs too. System UI is always crashing. And the NFC icon on the status bar seems fake.
 

bexiu

Member
Mar 14, 2018
18
4
0
So is it rom specific issue? I can get Pixel Experience booted but rooting it with Magisk breaks wifi. I am testing out ArrowOS now.
No luck. I followed the exact same steps on Arrow OS. Still breaks Wi-Fi. Can you post a screenshot with Magisk working on any Android Pie roms? I believe it's really like what linuxct said.
Oh, Arrow OS has serious bugs too. System UI is always crashing. And the NFC icon on the status bar seems fake.
I'm not try on Pixel Experience, just tried on Lineage 15.1 and arrowOS.
 

bexiu

Member
Mar 14, 2018
18
4
0
Yes I am talking about ArrowOs. I can't get Wi-Fi with Magisk on it. It's Android Pie and I think you can't install Magisk with any Android Pie roms.
Yes, I'm not try AOSP Android 9.0 Pie, as you said, I think wifi will not work on them.
I think you should clean first by WIPE advanced, tick: Dalvik/ ART Cache; System; Data; Internal Storage before rom back factory images. After finish flash factory images. you follow from this step: Instructions to flash GSI and Now root GSI with wifi 100% work..
 
Last edited:

HO-COOH

Member
Jul 20, 2018
35
13
0
Yes, I'm not try AOSP Android 9.0 Pie, as you said, I think wifi will not work on them.
I think you should clean first by WIPE advanced, tick: Dalvik/ ART Cache; System; Data; Internal Storage before rom back factory images. After finish flash factory images. you follow from this step: Instructions to flash GSI and Now root GSI with wifi 100% work..
Then you should really change the title, because you still can't use Magisk to root Android Pie, but only Oreo. I would be very excited if Magisk could root Android Pie on Razer Phone, but still no.
 

bexiu

Member
Mar 14, 2018
18
4
0
sorry about that. I'm not try on Pixel Experience, just tried on Lineage 15.1 and arrowOS both work.
Ok, I changed title. I'm just happy, enjoy and share something when I can still custom flash some GSI 9 pie base on factory images razer phone. thank you anyway.
 
Last edited:

raenii

New member
Feb 16, 2019
4
0
0
thank you so much!
this works great! however, i have an issue with my date and time when i reboot. whatsapp complains my date and time is incorrect (and microg crashes on boot, but i'm not sure it's related). sometimes it stays wrong and the date is set to 2018 (i then have to correct it manually because the internet doesn't work if the date is drastically wrong), but sometimes it corrects itself. it's not a major issue, but it's still annoying. and no, i do not have gapps installed and will not install gapps. thanks!