yashsingh1/xdaforums huggingface dataset:
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] x0xDJSx0x:
I am getting a weird bug were my razerphone 2 will turn off the display when the battery is low. the phone itself does not shutdown my rgb still works I have been in the middle of a phone call and I couldn't hang up I could still use my volume buttons my fingerprint scanner will still work I just can't see anything I am using the latest r14 arter97 kernel it wasn't doing this before. Any help here?

Also the only way to get out of it is to reboot been dealing with this for months
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] stephenobe:
So I was having this exact issue. I seemed to get it both with Arter's kernel and the stock build, so I assumed it was just something wrong in Razer's main ROM. I tried battery calibration and have an app that monitors the battery charge and reported that it is still in decent health. I am far enough along with this phone now that I went ahead and took the plunge into Havoc OS after reading a few of the devs have finally stabilized it for Razer Phone 2. It is day two now and haven't had the hang up problem, but I will let you know after a week if this is still the case.
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] vulcanrvn:
Swap

I can't seem to get swap to work, I get an error saying that swap isn't enabled on this device? Is this kernel based? Has anyone else had this problem?
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] bloodsmack:
Im on Pie . Mr1 rooted and with unlocked bootloader ,Magisk is working without any problems. The question is can i just flash this Kernel over or do i need pre version of kernel or mr3 ? Since i don't have twrp i can't backup complete firmware ... :(
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] MajicDroidPirate:
I too have this bug on mr3 pie, I've also spoke to several other Razer phone two users on arter who are experiencing this very bug as well.. hoping there will be an update to resolve eventually

---------- Post added at 07:16 AM ---------- Previous post was at 07:14 AM ----------

Is havoc a GSI? If so can I ask if your phone carrier is an American company? I'm asking because there's a known GSI bug that seems to make SMS not work on any GSI ROM on specifically only American carriers if LTE is enabled and I had this bug personally when I tried Resurrection remix so I'm wondering if havoc has this bug as well? but again if you're not on an American Carrier you'll never even know it existed, it only effects the US
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] pitchblackhat:
I am also getting this bug, for me it started after installing custom recovery, like you said the only way I found to fix it is to reboot by ADB or holding down the power button for about 13 seconds, for me it's progressed to where if the phone Powers off by itself it gets stuck in a boot loop, doesn't charge, and cant enter recovery. I have to go to the bootloader menu by holding volume down and Power, then selecting the grayed out option so I can hold the power button down and force a hard reset, otherwise it never gets to the green flame animation.
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] rrusek:
Just a quick question.. Has anyone been successful using r14 with MR5?

Thanks,

RJR
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] Cjkeenan:
MR5? When did MR4 come out? I am on an unlocked RP2 with no available updates and am running Build #: P-SMR3-RC002-RZR-200226.3141. I also checked for the factory images and that is the latest release on their website. What is your build number and do you have a carrier version? Is me being on the non-stock kernel and being rooted making the check for updates fail? I get that the update process should fail since the non-stock recovery is gone, but I could have sworn previous updates showed up and downloaded but just failed to install with this kernel.
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] DeathToy:
I used the factory image for MR3 and then took all the updates and ended up with MR5 before installing this kernel and switching over to a GSI rom.
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] rrusek:
Can someone confirm that they are on MR5 using this kernel?

When I attempted I would always get a boot loop..
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] Ryus71:
Doesn't work on MR5 there are other boot imgs avail for that build in the forms. My personal recommendation would be to just run a GSI with f2fs.
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] Ty1507:
is there a way to root MR6? I tried using r14 and didn't work.
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] rrusek:
Try using Trinity and let us know. Trinity works on rooted MR5..

Install Trinity then install Magisk.

To install Trinity you first need to install r14 that has TWRP. Then use TWRP to install Trinity.
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] Ty1507:
Update: I couldn't use r14 to flash mr6, so I downgraded to mr3. After that I used Trinity kernel and it worked.

Thx rrusek for the info.
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] BILLYB187:
I did a clean flash of MR6 the other day, then used r12 without any issue. Trinity is more than I am really looking for, but it's good to know that it's not required to run mr6
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] HyperFirez:
I was told that if I install this Kernal, LineageOS won't install because of TWRP. I'd really rather use TWRP instead of Lineage Recovery. I also learned that the RP2 apparently is a bit weird as it doesn't have a "real recovery" and it's actually apart of the Kernal. And this Kernal is the only way to install TWRP.

So that being said, is there a method to install Lineage with this particular Kernal, or am I just SOL?
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] LSS4181:
Unless TWRP somehow understands how to install "payload.bin", and how to correctly decrypt an encrypted /data, there's really no good way. (Lineage Recovery, on the other hand, does not support accessing /data, thus avoiding the problem entirely)

Not to mention Magisk being another problem. Without access to /data, you now have to install modules directly from the Manager after initial installation, and this won't work for modules that explicitly expect to be installed via recovery.

I'm still following the process and haven't actually flashed LOS yet, as there are still some ongoing issues (namely camera-related), plus that exFAT is explicitly unsupported (since it's not supported on stock, either).

As for exFAT, I don't know if a toggle in the device tree is needed to include support for it, or just building another ROM known to have support of it would do. Also, I'm still looking for documentations on how to build a different recovery for a given ROM build environment, instead of Lineage or AOSP's recovery.
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] HyperFirez:
Thanks for the info. I did find this thread https://xdaforums.com/t/wip-kernel-...fat-module-twrp-device-tree-and-more.3898732/

But seems like it's still WIP and not really a good idea to try it out just yet.

I've also yet to install LOS because of the issues with the camera and other stuff like you said.

From what you said, it sounds like I can't use Magisk at all with the RP2 because of the encryption on the /data folder?

Would you recommend any other ROMs (that are Android 11/10 based) that I can use this Kernal with for the RP2?

I'm not looking for anything too fancy, just want a newer version of Android.
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] LSS4181:
Pretty much all devices now encrypts /data by default for security concerns, but only some implementations can be accessed by TWRP after providing correct credentials.

Actually you can use Magisk, as nowadays initial Magisk installation (by flashing the Manager apk file, you may need to rename it to a zip first) no longer requires access to /data. It's just the modules can be a problem as without the help of Recovery, you can only install modules from the Manager, that some may not have support for such (though most of the actively-developed ones can already be installed via the Manager).

An additional issue would be that you'll have to use another way to backup your data, as without TWRP, you cannot make Nandroid backups like before anymore.

With this kernel you can choose from a wide range of GSIs. Personally most things would work fine on GSIs, just that NFC and WPA3/SAE are currently not working on Android 11 GSIs (these can be used on Android 10 GSIs from what I remember).
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] HyperFirez:
I'm gonna avoid GSIs as much as possible because I heard that Verizon doesn't like them very much.

I usually don't backup my data anyway since I don't really store any files on my phone. Everything is mainly on my PC. My Phone is essentially for YouTube, occasional gaming, and of course just being a phone.

Good to know I can install Magisk though. I did hear however that there is a way to decrypt the /data drive to allow you to install modules properly. Though with that being said, I have no idea what the modules even do as I haven't done much research into that.
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] MoPhoMike:
Quick, dumb "noob" question here: Some time ago, I updated Magisk to v23. It patched the factory boot image to be able to install it. Consequently, I've lost TWRP with the Arter Kernel. Is it safe to patch the Arter boot img file, and which version is the most stable to use on MR3? I've been considering flashing to a more updated version like MR5 or MR6, but not sure of the ramifications of what works and doesn't work. Any advice, info or links would be greatly appreciated. I'm mainly just looking to get TWRP back and working.
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] LSS4181:
Sadly yes, GSI is no-go for Verizon...

For me, everything except NFC and WPA3/SAE works fine. Bluetooth audio can be buggy but that's mostly an issue with stock vendor audio policies. Most Qualcomm devices ship with two sets of audio policies for some reasons (with stock ROM using an alternative one that could be switched to within Phh-Treble options). In this device's case, both sets of policies have their own flaws and neither is perfect. I've audio devices that only work with default policies, and some that only work with the alternative ones, with no way to get all of them work at the same time.

On the other hand, exFAT is supported out-of-box on GSIs.

I recall having the same issue myself before, TWRP broken after Magisk update.

My issue was fixed by flashing original arter97 r14 kernel then flash the latest Magisk again. Guess there might be regressions in the update mechanism that could cause recovery to break.
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] edison:
Razer recently replaced my RP2 under warranty, and I've spent more than a few hours trying to get root/Magisk with TWRP. I also had the no-screen issue, so I'd like to run MR7 if possible, in the hopes it fixes that issue.

Rooting was easy with the Magisk-patched MR7 image. However, I can't boot when I flash the r14 kernel.

I'd like to have TWRP, but I don't know how to get it working on MR7. Any suggestions?

Specifically, I'd like to be able to make nandroids. But I don't even know if that is even possible on a modern phone/android version? i.e., Is /data always encrypted, and if so, is it possible to make a nandroid?

There's also some zips that expect to be installed via recovery, so I'd like that ability, too. It appears that the factory recovery image will only install signed zips.

Lastly, does anyone know if the TWRP in the r14 image is the stock Cheryl TWRP image? The version is listed as 3.2.3-arter97, but I can't find any repos with that code. I'm also not able to boot from the latest TWRP.img.

I attempted to extract the TWRP recovery ramdisk from the r14 image and repack with the patched MR7, but that failed to boot recovery or system.
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] LSS4181:
Maybe something changed in MR7 that prevented old code from working (sadly the security patch model is indeed adding some hassle with booting current kernels that hasn't been updated for a while).

Don't know if our device's kernel image can be used with this tool. Try changing the kernel's security patch level to match MR7's and see if it can boot.

By the way, the TWRP used in arter97's kernel has his own modifications so it's not the same as stock ones. Note this in the OP:

"It is crucial to use my kernel's TWRP as it includes an older version of mkfs.f2fs and passes an incorrect parameter to mkfs.f2fs."

You'll probably need to ask arter97 directly if the changes is not already out somewhere.

It's just that I'm not sure if it's possible to make TWRP able to decrypt /data for this device. The TWRP for a Sony device I previously used could at one point decrypt /data (ext4 only) but encryption on custom ROMs/TWRP can sometimes be unstable that at one point it got messed up after OTA (prompted a text password while I used a PIN, and is impossible to get it correct, even though decryption continued to work in TWRP), that only after reverting to the previous build was I able to get it back working.

After all the trouble I had to go through with an encrypted /data I eventually gave up and left /data unencrypted. I don't think I'd re-enable encryption until I can find a hassle-free means to manage stuffs while encrypted from both system and recovery, and without any potential risk of myself being deprived access of my own data.
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] rrusek:
The issue is not with the install but that Lineage will encrypt the data partition with FBE. So there is no point in using TWRP. The version of TWRP with Arter97 kernel does not understand FBE (file based encryption)..
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] LSS4181:
Ugh... FBE. Guess I'm totally SOL to use TWRP while keeping the data encrypted. Sometimes it's just impossible to both keep the data encrypted while making maintenance work remain as straightforward as it used to.

I don't fully understand how encryption works for Android devices but I always feared that the data would always have to be wiped entirely when clean flash, whereas without encryption /data/media can be preserved (so I don't always have to backup everything, and TWRP by default doesn't backup /data/media), unless I want to format /data to another filesystem type.
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] edison:
I'll try that when I have a spare moment and report back.

I reached out to arter97 via PM a few days ago, but no response as of yet. Of course, he's not obligated to get back to me, but I'd love some more info.

And for what it's worth, I think I've been able to extract his specific TWRP (3.2.3-arter97) from the r14 image, and while I can get the phone to boot into TWRP, it doesn't see any of the partitions, so I'm assuming MR7 made some filesystem updates.

I don't know how to not encrypt the RP2. I've gone through the OBE about a dozen times and even if I skip the pattern/PIN, the device still says it's encrypted.

Maybe I should just be content with a rooted MR7 and use OS-level backups. The OCD hacker part of me hates to give up, though.
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] edison:
Perhaps you were responding to an earlier post, but in my case, I'm trying to get TWRP going on the stock (well, Magisk-patched) MR7, not LOS. Do you have any indication the Razer factory MR7 image is using FBE?
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] rrusek:
I was responding to another post.

Not sure that MR7 is using FBE, most likely using FDE (Full Disk Encryption). By installing f2fs_fstab.zip and formatting in f2sf, encryption is disabled in MR7.

To get TWRP working with MR7 I did the following:

1. Fresh install of MR7

2. Fastboot flash arter97-kernel-r14-20200428.img

3. Go into TWRP

4. Install TrinityKernel-kernel-r4-20200512.zip (could not get arter97 kernel working under MR7)

5. Reboot back into TWRP

6. Install f2fs_fstab.zip

7. Reboot back into TWRP

8. Factory wipe

9. Optional, install latest Magisk.zip

10. Reboot into SYSTEM
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] edison:
Awesome. I'll try that. I didn't even think about flashing different kernel from TWRP.

And now I'm curious if I could extract and flash the Magisked stock kernel that way.
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] rrusek:
No need to flash Magisked kernel. Just install magisk zip from TWRP once you have done factory wipe. It will patch the trinity kernel with root..
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] edison:
Oh, yeah, I get that. I'm just musing that the stock kernel may be more bug-free than the trinity kernel. The fact that several other users have reported the dead-screen-but-live-phone issue makes me wonder. That was an extremely annoying problem that occurred multiple times a day with no workaround except a hard boot.

Either way, I'll try the trinity kernel and report back. Thanks for the help, man.
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] rrusek:
I have been running on the trinity kernel since March without any issue. Not sure if there is any real benefit of going through the effort to extract the stock kernel.
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] LSS4181:
Trinity kernel is indeed a bit unstable compared to arter97's. I once had issues like the phone soft reboots if I unlock the phone too soon upon system startup (likely some kind of race condition is going on). The issue can be avoided by waiting a few minutes before unlocking the phone, and the issue is not present in arter97's.

As for the dead-screen-but-live-phone issue... I don't know what you mean, but I have an issue that the phone may freeze completely when the screen is off and the battery is below 30%. This issue is present in both Trinity and arter97's. When it happens, the phone is actually dead as it stopped communicating with my bluetooth accessories (like my earbuds and smartwatch).

A hard reboot would bring the phone to recovery when the phone is frozen, but when I hard reboot the phone while it's operating normally, it'll reboot straight to the system. Maybe something sleep-related went wrong and caused the system to hang in this case.
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] DRMMR144:
The guide to load Android 11 GSI says to use the trinity kernel r4 in one of the steps, but the link to download it is broken. Is it possible to use arter97 in its place? Would that be preferable anyways if it had fewer issues?
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] LSS4181:
You can always use arter97's latest kernel. It's more stable.
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] DRMMR144:
Cool, I wasn't sure if there was something special about trinity that made it required for the Android 11 GSI install. Thanks.
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] edison:
arter97's kernel doesn't appear to work with the latest official Razer MR7 ROM, but it looks like it works fine with other distros.
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] Docence:
I tried flashing r14 on MR3 with success, but I keep flashing f2fs/exFAT support and always get the bootloop.

Anyone could help me？ I am troubled😭
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] Docence:
@arter97
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] blackknightavalon:
I don't see an option for it...
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] arter97:
Can everyone do a simple

uptime; dmesg | grep alloc

from the terminal(app on the play store) and post the screenshot?

I'm debugging some memory issues on the OnePlus 6 and since the Razer Phone 2 shares a lot from my OP6 kernel,

I'm wondering whether the Razer Phone 2 suffers from the same issues.

Thanks.
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] blackknightavalon:
This is all it does on mine

Same results from the Command Line using adb shell
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] arter97:
Thanks. Can you tell me how long has it been since you last rebooted your phone?
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] blackknightavalon:
It's been over 16 hours since my last reboot...

...until now. Give me a minute and I'll run it again
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] arter97:
Great, thanks for letting me know.

I actually need ones that lasted a bit of time after a reboot so 16 hrs is fine.
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] blackknightavalon:
Just finished boot so here's the readout from an adb shell
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] Ventigo:
This is what I get
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] striked0wn:
4 days

Gesendet von meinem Phone 2 mit Tapatalk
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] arter97:
r3 is up.

r3

Linux v4.9.166 merged

LE.UM.3.2.1-11600-SDX24 merged

Various changes made to f2fs rapid GC to make it more efficient

dirty_expire_centisecs set to 30 seconds to reduce flash wearouts and power consumption

Wi-Fi drivers downgraded to 5.1.1.70J to fix hotspot and signal strength issues
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] capxcom:
This is great! I was thinking about selling this peace of shiit ,after I finally install this kernel,I am falling love with it.I have to charge it 3 time a day before ,I even doubt that this battery is not 4000mah at all.Now it can last a whole day under my havey use.I still can't believe that Razer is such a big company and the RP2's software is so bad ,even a small team in XDA can easily beat them.

Anyway thank you so much for making this kernel.
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] DarkestSpawn:
I literally just finished setting up r2 lol. Thanks [MENTION=4898097]arter97[/MENTION] for sharing your time and work. Will install r3 dirty over r2 and see if I have issues.

FYI those having issue when installing f2fs, remember to FORMAT /data, the right of the two options above the Swipe to Factory Reset. I believe that is whats causing many errors.

Edit: So far so good. Is there anyway to enable NTFS support as well with that custom VOLD? I see they did something similar here https://xdaforums.com/pixel-2-xl/development/mod-ext4-exfat-ntfs-support-stock-pie-t3881473 If not, I'll wait for the magisk vold to support PIE. Thanks again
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] alawiggle:
What advantages does this have over the the stock?
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] blackknightavalon:
Decryption failed in TWRP on r3, reflashed my Magisk mr1 boot image
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] w00tnezz:
R3 working great. No issues. Had the same decryption issue as blackknightavalon, I would put in the pass but it'd say it wasn't right.

I skipped it and rebooted. Ever since, decryption is working good.
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] Warrior1988:
I second this the reboot fix some issues with TWRP also.
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] grv00711:
i can flash r3 in twrp and f2fs will remane intact from previous setup?>> all good
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] blackknightavalon:
Tried the reboot trick and it now works just fine on my end. Thanks!
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] Nomyth:
Have the possible memory issues been examined for the RP2? I haven't flashed your kernel yet and I'm also curious about whether or not the same issues exist from the OP6.
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] arter97:
r4 is up and everyone must upgrade.

r4

Linux v4.9.168 merged

Fixed a major memory management regression

Linux CMA pool size increased for better CMA efficiency

Improved memory allocation from the Wi-Fi drivers to reduce memory fragmentation

Fixed occasional kernel crashes(entering dumpmode) on shutdowns
[Razer Phone 2 ROMs, Kernels, Recoveries, & Other D] Nomyth:
Can't seem to locate it on arter97.com