FORUMS

[r14] arter97 kernel for Razer Phone 2

3,725 posts
Thanks Meter: 33,670
 
Post Reply Email Thread

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
The Following 32 Users Say Thank You to arter97 For This Useful Post: [ View ]
25th March 2019, 06:27 PM |#2  
arter97's Avatar
OP Recognized Developer
Flag Seoul
Thanks Meter: 33,670
 
Donate to Me
More
/* 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
The Following 15 Users Say Thank You to arter97 For This Useful Post: [ View ]
25th March 2019, 06:27 PM |#3  
arter97's Avatar
OP Recognized Developer
Flag Seoul
Thanks Meter: 33,670
 
Donate to Me
More
Reserved 2
The Following 12 Users Say Thank You to arter97 For This Useful Post: [ View ]
25th March 2019, 06:27 PM |#4  
arter97's Avatar
OP Recognized Developer
Flag Seoul
Thanks Meter: 33,670
 
Donate to Me
More
Reserved 3
The Following 13 Users Say Thank You to arter97 For This Useful Post: [ View ]
25th March 2019, 06:27 PM |#5  
arter97's Avatar
OP Recognized Developer
Flag Seoul
Thanks Meter: 33,670
 
Donate to Me
More
Reserved 4
The Following 12 Users Say Thank You to arter97 For This Useful Post: [ View ]
25th March 2019, 07:00 PM |#7  
Warrior1988's Avatar
Senior Member
Thanks Meter: 261
 
More
Thank you! Didn't see this coming especially from you. I remember using your kernel for the S3 and Note 3.
The Following 2 Users Say Thank You to Warrior1988 For This Useful Post: [ View ] Gift Warrior1988 Ad-Free
26th March 2019, 02:12 AM |#8  
jonchance_84's Avatar
Senior Member
Flag East Texas
Thanks Meter: 114
 
More
Quote:
Originally Posted by arter97

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.
The Following User Says Thank You to jonchance_84 For This Useful Post: [ View ] Gift jonchance_84 Ad-Free
26th March 2019, 02:21 AM |#9  
Warrior1988's Avatar
Senior Member
Thanks Meter: 261
 
More
Quote:
Originally Posted by jonchance_84

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
The Following User Says Thank You to Warrior1988 For This Useful Post: [ View ] Gift Warrior1988 Ad-Free
26th March 2019, 02:38 AM |#10  
CalebQ42's Avatar
Senior Member
Thanks Meter: 126
 
More
Quote:
Originally Posted by jonchance_84

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.
The Following User Says Thank You to CalebQ42 For This Useful Post: [ View ] Gift CalebQ42 Ad-Free
26th March 2019, 03:44 AM |#11  
jonchance_84's Avatar
Senior Member
Flag East Texas
Thanks Meter: 114
 
More
Quote:
Originally Posted by Warrior1988

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.
The Following User Says Thank You to jonchance_84 For This Useful Post: [ View ] Gift jonchance_84 Ad-Free
Post Reply Subscribe to Thread

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

Advanced Search
Display Modes