[r14] arter97 kernel for Razer Phone 2

Search This thread

arter97

Recognized Developer
Oct 14, 2012
3,881
34,635
26
Seoul
arter97.png

arter97 kernel for Razer Phone 2 with TWRP and exFAT support​

/* Details */

Latest CAF msm-4.9 kernel fully merged
This kernel contains more cutting-edge changes from Qualcomm than the regular sdm845 tag
Latest Linux 4.9 subversion merged
Use CONFIG_HZ = 300
- This changes context switching interval from 10ms to 3.33ms
- Pixel used this for years and Google recommends other vendors to do the same for fewer jitters
Memory management improved(from Pixel 2 & 3)
Pixel's lowmemorykiller used
DM-verity fully disabled (you can remount /vendor to R/W properly)
Scheduler commits cherry-picked from Pixel 3
Timer optimizations
RTL8152/8153 USB LAN adapter support
TWRP support with proper f2fs support (see below)
Permissive SELinux
Passes SafetyNet
Built with -O3 speed optimizations
Built with latest GCC
Westwood as default TCP network congestion control
UFS optimizations
Entropy hook on storage removed
Latest mainline f2fs support with GC fixes
CFQ I/O scheduler backported from mainline
Systemless installation (the kernel itself doesn't touch /system or /vendor)
Modules support disabled for lighter kernel
WireGuard support
Additional exFAT support with modified vold
Removed RTB(interrupt) logging entirely

/* f2fs */

This kernel fully supports f2fs for /data and I encourage everyone to use f2fs with my kernel for better performance.
See here as to why you might want f2fs.

Use the integrated TWRP to format /data to f2fs.
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.

1. Boot to the integrated TWRP and flash f2fs_fstab.zip
2. Reboot to recovery again
3. Wipe /data by entering Wipe > Format data > "yes"

After formatting, or flashing a new ROM or an OTA, /vendor’s fstab needs to be changed.
Flash f2fs_fstab.zip to convert fstab to f2fs again. f2fs_fstab.zip won’t format your /data partition.

/* exFAT support */

This kernel fully supports exFAT via sdfat drivers from Samsung.
You must use the provided vold to use exFAT as the stock vold doesn't support exFAT.

You must decrypt your phone before using this vold mod as it doesn't support FDE implementation with Razer Phone 2.
Following the f2fs guide above is the easiest method.

Flash vold_mod_arter97.zip from TWRP and you're done.
Screenshot

/* Disclaimer */

Your warranty is now void.
I am not responsible for bricked devices, dead SD cards,
thermonuclear war, or you getting fired because the alarm app failed. Please
do some research if you have any concerns about features included in this kernel
before flashing it! YOU are choosing to make these modifications, and if
you point the finger at me for messing up your device, I will laugh at you. Hard. A lot.

/* Warning */

Redistribution, modifying files used within this project's file or integrating with other projects are prohibited with no exceptions other than my projects.

Making mirrors, re-uploading to another servers are also prohibited with no exceptions.

/* Thanks to */

TheCrazyLex
xboxfanj
Tim Murray
RenderZenith
nathanchance - for android-linux-stable

/* Instructions */

You can use the zip file to flash the kernel from your existing TWRP recovery.
If you don't have TWRP installed already, you can use the img file to flash the kernel directly from your PC via fastboot.

Both methods will install both kernel and modified TWRP recovery.
You can check if the modified TWRP is installed by looking at TWRP's version name.
It should say "arter97".

/* Downloads and links */

arter97.com
Kernel source

XDA:DevDB Information
arter97 kernel for Razer Phone 2, Kernel for the Razer Phone 2

Contributors
arter97
Kernel Special Features:

Version Information
Status: Stable

Created 2019-03-25
Last Updated 2020-04-27
 

arter97

Recognized Developer
Oct 14, 2012
3,881
34,635
26
Seoul
/* Changelog */

r14
Reverted SELinux back to permissive to fix recovery

r13
img file updated for P MR3
SELinux is now set to enforcing
Minor patch to improve responsiveness

r12
LA.UM.8.3.r1-06300-sdm845.0 merged
Linux v4.9.196 merged
Wi-Fi drivers updated to 5.1.1.74O
Latest f2fs-stable merged
Diag USB interface enabled for QPST

r11
Linux v4.9.189 merged
Wi-Fi drivers updated to 5.1.1.73W
LA.UM.7.3.r1-08200-sdm845.0 merged
LA.UM.7.8.r1-06900-SDM710.0 merged (includes various scheduler improvements)

r10
Linux v4.9.186 merged
LA.UM.7.3.r1-07900-sdm845.0 merged
LE.UM.3.2.1-00910-SDX24 merged
Faulty Low Memory Killer fixed to work better and resolve wake-up delays
General scheduler improvements backported
Virtual memory allocator performance improved
Task scheduler debugging disabled properly for lower overheads
Many parts of the kernel converted to use hotplug state machine
WireGuard updated to 20190702
Bunch of memory allocations from various subsystems were reworked to perform much better (thanks to Sultan) (total of 46 patches)
Debugging features disabled for Adreno GPU drivers to improve performance
Rewritten IOMMU by Sultan reverted to resolve screen flickerings

r9
Linux v4.9.180 merged
Wi-Fi drivers updated to 5.1.1.72J
Fixed several memory management issues from previous releases
- This fixes multiple issues including performance regressions(wake-up delays, etc) and radio malfunctions
- Thanks to @habylab for testing multiple builds prior to release)
Latest f2fs-stable merged
LA.UM.7.8.c3-06800-QCS605.0 merged
LE.UM.3.2.1-18400-SDX24 merged
Removed f2fs debug tracing codes added by Qualcomm
qseecom performance improved
Re-enabled kernel tracers for avoiding janks
32-bit vDSO added for improving performance on arm32 programs
Audio kernel updated LA.UM.7.3.r1-07800-sdm845.0

r8b1
Linux v4.9.175 merged
Wi-Fi drivers updated to 5.1.1.71H
Latest f2fs-stable merged
LA.UM.7.3.r1-07400-sdm845.0 merged
LA.UM.7.8.r3-01400-SDM710.0 merged
Fixed a Qualcomm issue that prevented audio-app stune creation
Merged various patches from Proton kernel by kdrag0n to lower overheads and improve responsiveness (thanks to kdrag0n, sultanxda and ab123321)
Now VLA-free
RCU boost enabled for better responsiveness
New patches made to f2fs for more efficient GC and trim
FBE(File Based Encryption) now works with f2fs

r6
Reverted a problematic Wi-Fi drivers optimization causing Wi-Fi to not turn on after some period of time

r5
Reverted a minor Wi-Fi drivers improvement causing kernel panics

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

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

r2
Fixed data decryption with ext4 on TWRP

r1
Initial release
 
Last edited:

jonchance_84

Senior Member
If you don't have TWRP installed already, you can use the img file to flash the kernel directly from your PC via fastboot.
Obviously this is the first TWRP, so am I flashing boot with img file. And am I flashing a and b partitions? Correct? This is my first phone with this dual partition setup, so it's still new to me. Last phone was a Nexus 6.
 
  • Like
Reactions: iBrowse

Warrior1988

Senior Member
Jun 28, 2015
332
262
35
Obviously this is the first TWRP, so am I flashing boot with img file. And am I flashing a and b partitions? Correct? This is my first phone with this dual partition setup, so it's still new to me. Last phone was a Nexus 6.

Steps I did.

I renamed it to boot.img to keep it simple.

fastboot flash boot_a boot.img

fastboot flash boot_b boot.img
 
  • Like
Reactions: iBrowse

CalebQ42

Senior Member
Jan 4, 2014
168
129
OnePlus 7 Pro
Obviously this is the first TWRP, so am I flashing boot with img file. And am I flashing a and b partitions? Correct? This is my first phone with this dual partition setup, so it's still new to me. Last phone was a Nexus 6.
You only need to flash your currently active boot partition. The other one will probably be overwritten on your next update anyway.
 
  • Like
Reactions: iBrowse

jonchance_84

Senior Member
Steps I did.

I renamed it to boot.img to keep it simple.

fastboot flash boot_a boot.img

fastboot flash boot_b boot.img
Alright so that worked, realized no root afterwards. So I was able to get to TWRP to try and flash magisk's zip to get root back. Ended up with a soft brick, so reflashed my patched boot.img (vendor and system too just because why not) and I'm back. I guess I'm missing something so I'm off to do some reading and open to suggestions.
 
  • Like
Reactions: moshe_lm

Trippyy Doee

Senior Member
Nov 10, 2015
111
23
Alright so that worked, realized no root afterwards. So I was able to get to TWRP to try and flash magisk's zip to get root back. Ended up with a soft brick, so reflashed my patched boot.img (vendor and system too just because why not) and I'm back. I guess I'm missing something so I'm off to do some reading and open to suggestions.


I ended up with a boottloop to twrp . I managed to get the kernel working on with boot but I was having failure to mount /data/ errors. I even backup my boot and system up before I wiped data as instructed and I always ended up with bootloop
 

Trippyy Doee

Senior Member
Nov 10, 2015
111
23
Flash back factory image and then follow instructions in the OP if you want to use f2fs. (flash fstab, reboot, wipe data)

Gesendet von meinem Phone 2 mit Tapatalk

No matter I do it always ends up saying encryption unsuccessful . And then I have no choice but to restore factory image. I will try your steps again. But I always end up with same result . I am on 9.0.0 instead of 9.0.1 because I looked in the GitHub and it said 9.0.0 so I thought that was why it didn't work. But I'm just a lil slow .


EDIT: worked without a hitch thanks alot
 
Last edited:

Twiggy000b

Senior Member
Oct 27, 2015
407
159
tried flashing gapps and got errors with system partition. tried magic gapps and said the boot method was invalid.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 35
    arter97.png

    arter97 kernel for Razer Phone 2 with TWRP and exFAT support​

    /* Details */

    Latest CAF msm-4.9 kernel fully merged
    This kernel contains more cutting-edge changes from Qualcomm than the regular sdm845 tag
    Latest Linux 4.9 subversion merged
    Use CONFIG_HZ = 300
    - This changes context switching interval from 10ms to 3.33ms
    - Pixel used this for years and Google recommends other vendors to do the same for fewer jitters
    Memory management improved(from Pixel 2 & 3)
    Pixel's lowmemorykiller used
    DM-verity fully disabled (you can remount /vendor to R/W properly)
    Scheduler commits cherry-picked from Pixel 3
    Timer optimizations
    RTL8152/8153 USB LAN adapter support
    TWRP support with proper f2fs support (see below)
    Permissive SELinux
    Passes SafetyNet
    Built with -O3 speed optimizations
    Built with latest GCC
    Westwood as default TCP network congestion control
    UFS optimizations
    Entropy hook on storage removed
    Latest mainline f2fs support with GC fixes
    CFQ I/O scheduler backported from mainline
    Systemless installation (the kernel itself doesn't touch /system or /vendor)
    Modules support disabled for lighter kernel
    WireGuard support
    Additional exFAT support with modified vold
    Removed RTB(interrupt) logging entirely

    /* f2fs */

    This kernel fully supports f2fs for /data and I encourage everyone to use f2fs with my kernel for better performance.
    See here as to why you might want f2fs.

    Use the integrated TWRP to format /data to f2fs.
    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.

    1. Boot to the integrated TWRP and flash f2fs_fstab.zip
    2. Reboot to recovery again
    3. Wipe /data by entering Wipe > Format data > "yes"

    After formatting, or flashing a new ROM or an OTA, /vendor’s fstab needs to be changed.
    Flash f2fs_fstab.zip to convert fstab to f2fs again. f2fs_fstab.zip won’t format your /data partition.

    /* exFAT support */

    This kernel fully supports exFAT via sdfat drivers from Samsung.
    You must use the provided vold to use exFAT as the stock vold doesn't support exFAT.

    You must decrypt your phone before using this vold mod as it doesn't support FDE implementation with Razer Phone 2.
    Following the f2fs guide above is the easiest method.

    Flash vold_mod_arter97.zip from TWRP and you're done.
    Screenshot

    /* Disclaimer */

    Your warranty is now void.
    I am not responsible for bricked devices, dead SD cards,
    thermonuclear war, or you getting fired because the alarm app failed. Please
    do some research if you have any concerns about features included in this kernel
    before flashing it! YOU are choosing to make these modifications, and if
    you point the finger at me for messing up your device, I will laugh at you. Hard. A lot.

    /* Warning */

    Redistribution, modifying files used within this project's file or integrating with other projects are prohibited with no exceptions other than my projects.

    Making mirrors, re-uploading to another servers are also prohibited with no exceptions.

    /* Thanks to */

    TheCrazyLex
    xboxfanj
    Tim Murray
    RenderZenith
    nathanchance - for android-linux-stable

    /* Instructions */

    You can use the zip file to flash the kernel from your existing TWRP recovery.
    If you don't have TWRP installed already, you can use the img file to flash the kernel directly from your PC via fastboot.

    Both methods will install both kernel and modified TWRP recovery.
    You can check if the modified TWRP is installed by looking at TWRP's version name.
    It should say "arter97".

    /* Downloads and links */

    arter97.com
    Kernel source

    XDA:DevDB Information
    arter97 kernel for Razer Phone 2, Kernel for the Razer Phone 2

    Contributors
    arter97
    Kernel Special Features:

    Version Information
    Status: Stable

    Created 2019-03-25
    Last Updated 2020-04-27
    16
    /* Changelog */

    r14
    Reverted SELinux back to permissive to fix recovery

    r13
    img file updated for P MR3
    SELinux is now set to enforcing
    Minor patch to improve responsiveness

    r12
    LA.UM.8.3.r1-06300-sdm845.0 merged
    Linux v4.9.196 merged
    Wi-Fi drivers updated to 5.1.1.74O
    Latest f2fs-stable merged
    Diag USB interface enabled for QPST

    r11
    Linux v4.9.189 merged
    Wi-Fi drivers updated to 5.1.1.73W
    LA.UM.7.3.r1-08200-sdm845.0 merged
    LA.UM.7.8.r1-06900-SDM710.0 merged (includes various scheduler improvements)

    r10
    Linux v4.9.186 merged
    LA.UM.7.3.r1-07900-sdm845.0 merged
    LE.UM.3.2.1-00910-SDX24 merged
    Faulty Low Memory Killer fixed to work better and resolve wake-up delays
    General scheduler improvements backported
    Virtual memory allocator performance improved
    Task scheduler debugging disabled properly for lower overheads
    Many parts of the kernel converted to use hotplug state machine
    WireGuard updated to 20190702
    Bunch of memory allocations from various subsystems were reworked to perform much better (thanks to Sultan) (total of 46 patches)
    Debugging features disabled for Adreno GPU drivers to improve performance
    Rewritten IOMMU by Sultan reverted to resolve screen flickerings

    r9
    Linux v4.9.180 merged
    Wi-Fi drivers updated to 5.1.1.72J
    Fixed several memory management issues from previous releases
    - This fixes multiple issues including performance regressions(wake-up delays, etc) and radio malfunctions
    - Thanks to @habylab for testing multiple builds prior to release)
    Latest f2fs-stable merged
    LA.UM.7.8.c3-06800-QCS605.0 merged
    LE.UM.3.2.1-18400-SDX24 merged
    Removed f2fs debug tracing codes added by Qualcomm
    qseecom performance improved
    Re-enabled kernel tracers for avoiding janks
    32-bit vDSO added for improving performance on arm32 programs
    Audio kernel updated LA.UM.7.3.r1-07800-sdm845.0

    r8b1
    Linux v4.9.175 merged
    Wi-Fi drivers updated to 5.1.1.71H
    Latest f2fs-stable merged
    LA.UM.7.3.r1-07400-sdm845.0 merged
    LA.UM.7.8.r3-01400-SDM710.0 merged
    Fixed a Qualcomm issue that prevented audio-app stune creation
    Merged various patches from Proton kernel by kdrag0n to lower overheads and improve responsiveness (thanks to kdrag0n, sultanxda and ab123321)
    Now VLA-free
    RCU boost enabled for better responsiveness
    New patches made to f2fs for more efficient GC and trim
    FBE(File Based Encryption) now works with f2fs

    r6
    Reverted a problematic Wi-Fi drivers optimization causing Wi-Fi to not turn on after some period of time

    r5
    Reverted a minor Wi-Fi drivers improvement causing kernel panics

    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

    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

    r2
    Fixed data decryption with ext4 on TWRP

    r1
    Initial release
    13
    12
    12