yashsingh1/xdaforums huggingface dataset:
[Razer Phone Guides, News, & Discussion] linuxct:
Yes, it happens sometimes. Let me explain this briefly:

1. This bootloader seems to forget what the active partition was when it was told to reboot the device instead of turning itself off, and I don't know why yet. It happens 1/5 times I press on "Reboot", more or less.

2. You need to re-set the active partition to the one you were using, in my case A, so with a cable and my pc I run

fastboot set_active a && fastboot reboot

Tired of typing, I made myself a script named razer in my /usr/bin

#!/bin/zsh

fastboot set_active a && fastboot reboot

So, be careful when rebooting the device if you don't have a close-by PC with fastboot to make it work again, instead, fully turn it off and turn it back on.
[Razer Phone Guides, News, & Discussion] linuxct:
Just fire up a terminal with ADB and type in

adb reboot recovery

It should be more than enough, no need for root privileges or anything.
[Razer Phone Guides, News, & Discussion] el4nimal:
I'm trying to boot into LineageOS 15.1 but it keeps saying "Decryption Unsuccessful". I followed your guide step by step, and I also tried the pre-built image you provided.

I started over from Oreo DP1 image many times and I've been getting the same error over and over again.

Then, I noticed that [MENTION=5659326]ThatGuy94[/MENTION] mentioned he was able to get it to boot, by flashing stock boot.img and factory reset it that way, and then install the ROM and Magisk.

But I can't figure out how to install Magisk without installing TWRP, is there any fastboot command to install Magisk from the command line?
[Razer Phone Guides, News, & Discussion] SirGoldenTaco:
Resurrection Remix Intensifies
[Razer Phone Guides, News, & Discussion] ThatGuy94:
Unless you have overwritten it, boot to download mode and use fastboot to switch to the other slot which will allow you to boot into TWRP and install Magisk. If you have overwritten TWRP, flash it on the other slot (for example if you have LOS installed in A, flash TWRP into B).
[Razer Phone Guides, News, & Discussion] RUNNERX:
It has happened after a power off also, would putting the same rom in a&b slot stop it? system_other is not bootable so the phone enters download mode? I don't understand the working of the a/b system.

And THANK YOU so much for working on this, so nice to be back on custom roms!
[Razer Phone Guides, News, & Discussion] linuxct:
No. System_other is just dex files in this case, because Razer's rom isn't intended to be fully using A/B capabilities at any time through OTA. If an OTA would kick in, the new system would upgrade the other partition and would become a bootable system.

If you want to install any other rom in there, you should be able to, as well as installing the same you have on partition A.

The problem is that it is the bootloader which loses the current partition that has to be booted up, so that's why you can't boot it up and need to force set it to A or B.

--------------------------------------------------------------

I've just detected a wild bug, audio in calls doesn't work for me, however it does for VoIP or 3rd party apps. I'll need some help here to try to fix this.
[Razer Phone Guides, News, & Discussion] eoghan2t7:
What would happen if you do what it does in the flash_all scripts and say flash a gsi image to system_a and system_b that way on each reboot if the bootloader forgets the active partition it will still boot to say resurrection remix?
[Razer Phone Guides, News, & Discussion] linuxct:
You can do that, but the bootloader won't boot it anyway, because the (I'm talking theoretically here) part of the memory that says which partition should boot is just empty or contains an invalid or null partition name. So until you force it to boot into partition a or b, won't let you get out of 'Download mode'.
[Razer Phone Guides, News, & Discussion] eoghan2t7:
So if that is the case razer need to do some work on there bootloader in order to prevent this happening in the future.
[Razer Phone Guides, News, & Discussion] el4nimal:
Thank you so much for the quick response. I followed your instructions, flashed stock boot.img, factory reset, flashed Resurrection Remix OS on system_a, then, in fasboot switched to partition _b and flashed TWRP, enter TWRP and switch to Slot A, then installed Magisk and reboot.

I'n not getting "Decryption Unsuccessful" error anymore! But it's been like 20mins already and I'm still on the "android" logo.

I noticed [MENTION=4787101]linuxct[/MENTION] metioned that on first boot the device get encrypted, which takes extra time. But how long?

I would really really like to have LOS or Resurrection Remix on my Phone, but I don't what's causing it to stuck on the logo. Should I try with a different Magisk version? Should I flash system-arm64-aonly.img instead of system-arm64-ab.img?

Edit: I tried with the latest Magisk version and it worked perfect! Thank you guys!
[Razer Phone Guides, News, & Discussion] ThatGuy94:
If it's bootlooping, flash the prebuilt system image on the partition you got the ROM installed on. Once it does it, it'll boot because it disables dm_verity.
[Razer Phone Guides, News, & Discussion] RUNNERX:
RR seems to be battery hungry.
[Razer Phone Guides, News, & Discussion] linuxct:
All of them are, indeed. But it's because they run at 120hz all the time, without any limit. That's why Razer ROMs will be more battery efficient.
[Razer Phone Guides, News, & Discussion] chandler781:
Treble issues with dialer

Am I to assume that all three of the treble roms have trouble with the dialer, specifically any sort of audio? If so, is there a fix? Tough to use without being able to make a call. Lol.
[Razer Phone Guides, News, & Discussion] linuxct:
Read the OP.

I'm already working on bringing a solution to this.
[Razer Phone Guides, News, & Discussion] chandler781:
Sorry, I saw that. Wasn’t sure what 3rd party apps referred to. Thanks a ton for your efforts! Greatly appreciated.
[Razer Phone Guides, News, & Discussion] RUNNERX:
Just an observation, battery seems to have leveled off 38hrs with 5.5 hours screen on.
[Razer Phone Guides, News, & Discussion] Exelios:
nvm
[Razer Phone Guides, News, & Discussion] Exelios:
I flashed your boot image and root seems to work fine, but I cannot install any Magisk modules, it says I have version 15 while I have 16, any ideas?
[Razer Phone Guides, News, & Discussion] linuxct:
Read post #11.
[Razer Phone Guides, News, & Discussion] smreker:
Has anyone been able to get Resurrection Remix up and running with this technique? Because honestly I've been trying for hours now with no success. It's doesn't matter if I install Magisk v16.0 or Magisk v16.3, I always end up failing the SafetyNet check regarding ctsprofile. Also, no matter what I seem to do, after flashing the GSI and rebooting I have problems at the next step: either the system hangs on the android logo and never completes booting, or I'm asked to enter my password (which I never setup) and no matter what I enter I receive a message stating "Decryption Unsuccessful". Under that heading it says my password was correct but my data is corrupt so I need to do a factory reset. At that point I end up back in TWRP. Arrrggghhh! Anyone have any success stories with setting up RR? Would like to know if there's hope lol
[Razer Phone Guides, News, & Discussion] el4nimal:
I was in the same situation when I was trying to install LineageOS 15.1

Since I don't know much about the topic to be honest, I ended up three consecutive days flashing the system over and over again, trying different combinations and different versions of Magisk.

Two things I did different from the instructions by the time I got it to work:

- I used Magisk v16.3 instead of v16.0

- Whenever I switched from Slot A to Slot B (or vice versa) in TWRP, I rebooted my Phone into recovery mode. I read in other thread that by doing this, it would force the phone to have the other partition as the active partition.
[Razer Phone Guides, News, & Discussion] Kimbaroth:
Greetings linuxct, any improvements for the in call audio issues???

Keep up this awesome work!!! =D
[Razer Phone Guides, News, & Discussion] Exelios:
I bought an extra Razer phone and I will send it tomorrow to phhusson, that should improve things.

See https://xdaforums.com/android/software-hacking/offer-free-razer-phone-to-developer-t3773253
[Razer Phone Guides, News, & Discussion] linuxct:
Thank you. I've been already working with him on bringing a solution (with no luck up until now) to the audio issue, as well as with Alex, but better he has the device for himself to keep it and experiment with it as much as he wants.

Let's see how this goes now.
[Razer Phone Guides, News, & Discussion] Exelios:
I'm DroidAlex... on GitHub :P
[Razer Phone Guides, News, & Discussion] linuxct:
I meant [MENTION=5986135]TheCrazyLex[/MENTION] :p

I hope we can bring up a solution to the only bug we are facing soon, together :)
[Razer Phone Guides, News, & Discussion] Exelios:
Too many Alex around haha

I tried to look into it and just said screw this, phh can do it himself lol

(Joking)
[Razer Phone Guides, News, & Discussion] RUNNERX:
Just in case it hasn't come up, could the sound be related to the network. Had an HTC desire that would only take call when the network was set correctly.
[Razer Phone Guides, News, & Discussion] linuxct:
Very well noted, if we get to fix the H+ only instead of getting the full LTE+ may help the issue a bit.
[Razer Phone Guides, News, & Discussion] Haithamraid:
finally! would have installed it right away but that sound on call issue got me worried, thanx for all the hard work guys and can't wait to install this once the bugs are abit ironed.
[Razer Phone Guides, News, & Discussion] linuxct:
Deleted.
[Razer Phone Guides, News, & Discussion] linuxct:
In-call audio fix for Android O DP1

After a lot of effort, I've got in-call audio to work.

Just download the following attached zip file which you need to flash on top of an existing GSI set up you should have done, or use the Magisk Module attached too.

If you want an in-depth explanation of what has been going on, check out this thread I've posted in the general section in hopes it'll be useful for some other devices out there.

Thanks to everyone who has helped me on this.

NOTE: ONLY FOR OREO DP1, DO NOT TRY ON LATER VERSIONS!!!
[Razer Phone Guides, News, & Discussion] Kimbaroth:
OMG!!! IMMA TRY AOSP TOMORROW!!!

Thank you for all your effort linuxct!
[Razer Phone Guides, News, & Discussion] el4nimal:
I can confirm it's working on both, Lineage OS 15.1 and Resurrection OS. Thank you so much!!!!
[Razer Phone Guides, News, & Discussion] kirschdog1:
Does anyone have working gapps for RR?
[Razer Phone Guides, News, & Discussion] el4nimal:
I have two little issues:

- there's a delay for the screen to turn on after being off for a while

- every time I restart the phone says "Overlay Picker has stopped" or something like that

Is there any way to fix this or can someone explain me why it happens
[Razer Phone Guides, News, & Discussion] linuxct:
1. Can't reproduce, works fine.

2. Happens here too but it's happening because it's included in the GSI itself, doesn't worry me. Delete that apk or disable it if you wish.
[Razer Phone Guides, News, & Discussion] el4nimal:
1. I forgot to mention it happens mostly when I modified nav bar or when I use expanded desktop mode. (I'm currently running Resurrection Remix)

2. Can that be the reason I'm not able to change the theme? When I go to "Settings>Configuration>Interface>Theming" and try to apply dark theme, nothing changes
[Razer Phone Guides, News, & Discussion] Kimbaroth:
Greetings, quick question:

What version of a rom works on Cheryl???

A only or A/B??? (I suposse it's A/B, but i'll better ask).

Best regards!
[Razer Phone Guides, News, & Discussion] linuxct:
I can't tell then, maybe it's a specific bug attached to that ROM? I enabled expanded desktop here, locked and unlocked just fine...

For the themes, the prebundled dark theme doesn't do anything (at least in LineageOS), and I needed to extract the apks from an official Lineage compilation and paste them into my vendor partition.

A/B.
[Razer Phone Guides, News, & Discussion] el4nimal:
I'll keep looking in the settings, it might be something I change.

Thank you very much for pointing me in the right direction.
[Razer Phone Guides, News, & Discussion] kirschdog1:
I'm running reserection remix and flased magisk in call audio and my sound always comes through speaker phone when making a call. Does anyone have audio in call volume working correctly on RR. If so what steps did you take to get it working?
[Razer Phone Guides, News, & Discussion] linuxct:
Just fyi, the 'earpiece' and the 'speakers' are literally the same but just with low or high volume. It sounds as in stock Oreo ROM.
[Razer Phone Guides, News, & Discussion] kirschdog1:
Ok, however the sound was Soo loud on low I don't believe the volume up or down was working at all. I'll try again with flashing through twrp after gapps and see if that helps any.
[Razer Phone Guides, News, & Discussion] linuxct:
It will be literally the same. I didn't go into fine-tuning this and I don't intend to as of right now. If you don't feel comfortable with it, edit the GSI's Mixer Paths or the Mixer Paths in the /vendor partition until it suits your needs.
[Razer Phone Guides, News, & Discussion] kirschdog1:
Ok thanks man I really appreciate all you have done. Do you Know if there is a guide on how to do this?
[Razer Phone Guides, News, & Discussion] linuxct:
Maybe something like this would help. Try in both /system and /vendor to be sure (and if files doesn't exist, then jump to the other location).

Of course, needless to say you want to decrease the volume instead of making it go higher, so try decreasing the numbers that guide mentions.
[Razer Phone Guides, News, & Discussion] Exelios:
Phh should be getting the Razer phone I shipped him by the end of the week, expect fine tuning and more fixes then, if you can wait a week.
[Razer Phone Guides, News, & Discussion] RUNNERX:
A few things not working correct...

The reboot bug that gets you stuck on bootloader

Volume buttons adjusting media instead of ring

Network stays on wcdma

Works really well for something this new.
[Razer Phone Guides, News, & Discussion] linuxct:
1. Razer's issue.

2. Volume buttons work as they should? I'm adjusting my ring button when I press them, you must have a background service that is using the multimedia one, like Snapchat.

3. Okay, same.
[Razer Phone Guides, News, & Discussion] el4nimal:
Ir you are using lineageOS or RR, there's an option to choose which volume is adjusted when volume buttons are pressed. I think is set to media by default, which I prefer
[Razer Phone Guides, News, & Discussion] RUNNERX:
El4nimal my good man are correct, I am on rr and just found the setting of which you were referring.

May I make another query, has anyone asked if you had them on speaker phone?
[Razer Phone Guides, News, & Discussion] el4nimal:
No, but I wouldn't be surprised. It sounds loud when in call, even if I have the volume set to minimum. I even had the impression that adjusting the volume does not actually adjust it.
[Razer Phone Guides, News, & Discussion] kirschdog1:
I can't get magisk to pass safety net check.. I get a double false. Running Magisk v16.3. Any ideas how to fix it?
[Razer Phone Guides, News, & Discussion] linuxct:
Flash magisk 16.3 again, mounting your system partition as read-writtable in TWRP, and then follow this https://xdaforums.com/showpost.php?p=76067245&postcount=11
[Razer Phone Guides, News, & Discussion] iliais347:
What else other than magisk are you running? Any modules? Root is recognized properly?
[Razer Phone Guides, News, & Discussion] Exelios:
Can someone open this issue on GitHub Treble Experimentations?

Phh received the Razer phone from me the other day and can now fix stuff directly.
[Razer Phone Guides, News, & Discussion] linuxct:
https://github.com/phhusson/treble_experimentations/issues/22
[Razer Phone Guides, News, & Discussion] Haithamraid:
Guys magisk still wont work with me it keeps giving me "magisk is not installed" despite installing twrp on slot b and switching to a then installing the latest beta (16.3) any help or can someone point out what mistake i have done?
[Razer Phone Guides, News, & Discussion] linuxct:
Can you just follow the steps in the first post and the ones described a few posts above you? Magisk is extremely picky and you need to perform the steps as described for it to work properly...
[Razer Phone Guides, News, & Discussion] linuxct:
LTE issue solved!

Thanks to [MENTION=1915408]phhusson[/MENTION] for noticing why the Hardware Overlay Picker was faulty (and [MENTION=5930599]Exelios[/MENTION] for giving him the phone), the LTE overlay now gets enabled properly and it's working as intended in the Razer Phone.

With future compilations of GSIs from him, this issue will be solved.

- - - - - - - - - - - -

However, if you do require to solve this in your current set up, just like I did, get the /system_root/system/priv-app/HardwareOverlayPicker apk, decompile it, open the AndroidManifest.xml and add this right after the package=".........." part:

android:sharedUserId="android.uid.system"

Now recompile the apk and download a copy of SignAPK and sign the apk with the platform keys (platform.*) from Android AOSP.

You can do so by using the following command:

java -jar /path/to/signapk.jar /path/to/platform.x509.pem /path/to/platform.pk8 NameOfTheApk.apk NameOfTheApk_signed.apk

After that, push it to your system_root/system/priv-app/HardwareOverlayPicker folder, delete the old apk if needed and reboot. You should be able to choose LTE now as network mode.

Or... If you're too lazy, use this version I modded (extracted from a GSI from the 26-03-2018, so be careful since it's a bit old).

BE WARNED, NONE OF THESE STEPS ABOVE IS NEEDED IN UPCOMING VERSIONS SINCE IT'S ALREADY FIXED!!!

- - - - - - - - - - - -

Enjoy your bug-free GSIs! [MENTION=7050182]MishaalRahman[/MENTION]
[Razer Phone Guides, News, & Discussion] Exelios:
Nice, that was fast.
[Razer Phone Guides, News, & Discussion] eoghan2t7:
So if I've been keeping up correctly the only issues left is the reboot bug and the 120Hz refresh rate contently on?
[Razer Phone Guides, News, & Discussion] kirschdog1:
I'm running Xposed module and magisk hide props config currently and am still getting the double false message. Im not sure how to mount twrp in read write mode so I can flash magisk again.
[Razer Phone Guides, News, & Discussion] linuxct:
The reboot bug is only on Razer's hand to be fixed, since it's on the bootloader.

The screen on 120hz mode, well, it has the same behavior as the stock ROM if you chose that option in it (this means, when the screen is static lowers down it's fps, and when you move it, goes all the way up), so I really don't see it as a bug(?)
[Razer Phone Guides, News, & Discussion] Exelios:
Could you please elaborate a bit on the reboot bug?

I didn't encounter it yet.
[Razer Phone Guides, News, & Discussion] RUNNERX:
Some of the time when I reboot or turn power off then on again I get stuck in bootloader mode. The only way to get booted again is fastboot set_active a && fastboot reboot.
[Razer Phone Guides, News, & Discussion] fivearcosstheeye:
Which gapps work with the resurrection remix GSI? I've tried the open gapps pico with FC's. Do I have to change the file system for more storage? Any help would be much appreciated.
[Razer Phone Guides, News, & Discussion] Exelios:
If you have to go back to stock here is the link to the official Oreo OTA

https://android.googleapis.com/pack.../c4337e944cfacaff9033adf518ef08148f0b4477.zip
[Razer Phone Guides, News, & Discussion] RUNNERX:
I used nano, can't remember if I booted before I installed them. You may have to flash img, boot system, reboot recovery, flash gapps, wipe, reboot.
[Razer Phone Guides, News, & Discussion] iliais347:
From my experience, i was not able to get safetynet to fully pass when having a magisk module on any phone above 7.0. i believe you have to mount system to R/W and flash magisk.
[Razer Phone Guides, News, & Discussion] kirschdog1:
How do I mount system as R/W?
[Razer Phone Guides, News, & Discussion] RUNNERX:
If you boot to TWRP and you don't have to swipe to allow changes it is r/w
[Razer Phone Guides, News, & Discussion] iliais347:
I meant to say xposed magisk module.
[Razer Phone Guides, News, & Discussion] linuxct:
I've updated this thread's OP with a new boot image, based on Oreo MR0 release, for anyone who needs it.

And btw, those of you who were experiencing the bootloader going to Download mode on its own after some reboots, Oreo MR0 seems to fix it so I recommend going for it.
[Razer Phone Guides, News, & Discussion] RUNNERX:
That's good news!!
[Razer Phone Guides, News, & Discussion] eoghan2t7:
Would it be possible to pull the required Dolby files from the stock Oreo Ron and add them to the gsi images or magisk module? I'm asking before I jump into the gsi world.
[Razer Phone Guides, News, & Discussion] linuxct:
Already tried, made my device bootloop... Not very recommended. Or maybe I just did wrong or dropped the ball on something.
[Razer Phone Guides, News, & Discussion] eoghan2t7:
Think I might take a stab at it when I'm free and see what's what. You probably had the right files just maybe something needed it's permissions set in a particular way or something.
[Razer Phone Guides, News, & Discussion] leapfrog2:
I did everything as stated but when it boots to the GSI, a message prompts to enter my password. When I put in something random, it says it was correct but the data is corrupt. Not sure where to go from here.
[Razer Phone Guides, News, & Discussion] game_guy:
I'm also getting this error. I've tried flashing Remix and LOS and both give the same results.
[Razer Phone Guides, News, & Discussion] leapfrog2:
Yep, I tried flashing LOS and same thing. I'm now trying to flash LOS on B and RR on A. We'll see..
[Razer Phone Guides, News, & Discussion] leapfrog2:
I solved this. In adb i reboot into recovery. It should boot to stock recovery, I then chose the option to wipe and rebooted. It loaded the splash screen, then another screen with andy mascot picture and "encrypting" status. Then booted. Tried it with both LOS and RR.
[Razer Phone Guides, News, & Discussion] game_guy:
It doesn't boot into stock recovery for me, goes straight to TWRP. Just do a normal factory reset in TWRP then?
[Razer Phone Guides, News, & Discussion] leapfrog2:
No, I tried that and TWRP factory reset doesn't do anything. Try flashing boot.img from Razer's website for Oreo onto both A then B, then switch back to A (in twrp) and just reboot to recovery.
[Razer Phone Guides, News, & Discussion] game_guy:
I gave up on LOS and RR but I got AOSP running. Two questions though, and I dunno if you know this but maybe someone else can answer.

1) How do I change the refresh rate? OP says 120hz features were working. Dunno if I need a separate app or if its hidden somewhere in the settings I'm not seeing.

2) I flashed the AOSP + Gapps + SU and I don't see SU anywhere.

Appreciate the help leapfrog, I did what you said and it did get me AOSP up and running, ideally I'd like to get a different ROM running (preferably RR) but I'll play around with AOSP for now.

EDIT: I have an issue with AOSP. Its not picking up my SIM card at all. I've tried hotswapping it in and I've tried rebooting. Any help on this would be appreciated.

EDIT 2: Got SIM card working, however, its only giving me 3G and no option to switch to 4G.
[Razer Phone Guides, News, & Discussion] RUNNERX:
If you have aosp running you can get rr or los going the same way you did aosp. Honestly the easiest way I have done it is to switch the boot.img and the system.img in the Razer Oreo build and run flash_all. To me it has been a total PITA getting around the encrypted data partition, as far I have seen you can't get around it in twrp. If anyone has a better way let me know.

BTW aosp has sound patch and mobile data patch on the latest gsi. I believe aokp does as well, but RR and los don't as of this post.