yashsingh1/xdaforums huggingface dataset:
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] Freak07:
Update to 3.1.3

Hey guys and girls,

Alright here´s the next update :) Latest Asus Source is merged. Make sure to successfully update to firmware 17.0240.2012.65 before flashing the kernel. The zip won´t flash otherwise on stock rom.

I removed this check for the custom rom version. Please note that the custom rom version is still provided with no active support from my side.

Detailed changelog below and on github.

Kernel backend PSI-Support and PSI-Enable Magisk-Module:

2.6.0 introduced kernel-backend PSI support .Asus enabled the userspace low memory killer in the stable firmware update. However they do not use it with PSI like the Pixel 4 and google intends, but with vmpressure levels.

If you´re interested in this topic here is more information.

I personally like the PSI-approach way better and I think google did some excellent work there.

If you want to enable this feature just flash the PSI-Enable Magisk-Module via Magisk Manager, when you´re on 2.6.0 or higher and reboot.

If you say I like the approach from Asus just don´t flash it.

I´d advise everybody to read the instructions in the OP and follow them. They are written for a reason, because they ensure everything will be working as expected.

Kernel is made for the latest stock rom from Asus, you must update your phone to the most recent Asus update, before flashing the kernel.

Enjoy!

Changelog:

- Linux-Stable Upstream to 4.14.212

- merge latest Asus Source 17.0240.2012.65 (make sure to update your phone to latest firmware before flashing!)

- enable netfilter as was requested by a user

I wish you all a nice day/evening!

Download is below :)

Download:

Disclaimer/Important:

Kernel for the Stock Firmware by Asus (make sure you´re always on the latest firmware)

Kernel: https://www.androidfilehost.com/?fid=17248734326145689543

Kernel for Custom Roms (please note vibration only works properly on omni based custom roms)

Kernel: https://www.androidfilehost.com/?fid=17248734326145689541

Instructions how to flash the kernel can be found in the OP!

But look at this post too :)

PSI-Enabler-Magisk-Module: https://www.androidfilehost.com/?fid=4349826312261798764

Only for Android 10 Stock Rom running a custom kernel with PSI enabled! Flashable via Magisk Manager!

Brightness Module (reduces minimum brightness):https://www.androidfilehost.com/?fid=4349826312261766808

Only for Android 10 WW Stock Firmware ! Flashable via Magisk Manager.

The module is offered without any form of support. Please do not discuss it here in the thread.

If you face issues, it´s probably because you accidentally use any form of tweak, app, script, module or some other conflicting mod.

It´s optional and can be used standalone without the kernel.

Have fun, enjoy the kernel and your phone.

If you like my work please consider a donation.

Donations are not mandatory but very welcome.

If you like my work and want to buy me a coffee/green tea: http://paypal.me/freak07
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] reg66:
@Freak07 First off, many thanks for continuing to maintain this kernel (y).

I'm trying to configure AccA (Advanced Charging Controller App) to apply on boot but I have no idea of the correct path to type in the config field (see screenshot). Could you advise, please...

Basically the app is just a front end UI for the script that allows better control over battery charge rates etc, but by default it doesn't apply on boot. Any ideas? BTW, I have lowered Voltages/mA for slow charge overnight and only until 90%, so as with the screenshot I'm not really looking to fastcharge.

Oh, BTW, I'm running latest stock rom

Cheers
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] vaidhy2007:
Flashed the kernel today along with the low brightness mod. My phone is getting hotter and the battery drain is higher. Can somebody help out here..??

How do I go back to stock kernel ? Factory reset is sufficient ??
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] Freak07:
Your question regarding the kernel is answered in the FAQ in the second post. :)

As for the module just remove it in magisk manager and reboot.
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] vaidhy2007:
Hi Thanks for the quick response. Can I get the stock kernel for the latest update.? This is answer in the FAQ right ?

Removed the module from Magisk. And any specific reason for phone getting hot ?
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] vaidhy2007:
Have gone back to stock kernel. Thanks. Stock kernel share in telegram global group if anybody needs it.
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] Freak07:
here´s a fixed kernel.zip so root is not lost on latest magisk stable
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] Freak07:
I dont have it. You can extract it from the full firmware via payload extractor. But I see you got it already elsewhere.

No I don´t know why your phone gets hot. Everything is fine here.

It´s most likely some mod/magisk module/tweak conflicting with either the brightness module or the kernel.
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] vaidhy2007:
Hi. Any method to find out ?
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] Freak07:
Do you have CN firmware on your device? It might be that the brightness module does not work well with CN phones.

As I already put in the OP, the brightness module comes without any form of support really. It doesn´t cause issues on my end.

For troubleshooting:

Remove all other magisk modules, tweaks, addons, magic improvement kernel apps from your phone. If you used mods that didn´t work systemless, but "hard-edited" the firmware, you might want to reflash the stock rom for troubleshooting.

First flash the brightness module only. Check if the device gets hot. If not remove it again before doing the same with the kernel.

If your device gets hot, connect the phone to the pc and run the following commands:

adb shell

su (grant superuser rights on your phone, beginning of next line will change into #)

top

in terminal. Paste the output to somewhere like:

dogbin

The sexiest pastebin and url-shortener ever

del.dog

And take logs via terminal or exkm. dmesg and logcat when it gets hot.

otherwise no clue what´s happening.
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] vaidhy2007:
Thanks. Will let you if there are any updates.
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] Freak07:
There will be a new update soon :) Stay tuned.
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] killerdvd:
Thanks for not forgetting about us.
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] royalframe89:
May i ask This kernel Kirisakura 3.1.5 work with this resurrection remix custom rom on rog 2?
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] royalframe89:
sorry to spaming
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] dvijetrecine:
this will be a long post, so i apologize in advance.

hey @Freak07 , i'm wondering if you'd be willing to look into one thing. it's about charging speed.

i managed to trigger "hypercharge" by editing "force_max_icl" in /sys/devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-02/c440000.qcom,spmi:qcom,pm8150b@2:qcom,qpnp-smb5/power_supply/main

our phones charge at around 1750 mA and 9/12 volts (depends on charger).

now, when you look at main_fcc_max, it shows 5800000, which is actually 5800 mA. most numbers have 3 zeros behind and when you remove them you get somewhat correct mA.

it bugged my mind when i saw that with 18w charger i get around 24w shown in franco kernel manager.

always thought something is wrong with the app, but it seems our dear phone is showing mA multiplied by two (more or less).

i asked on reddit if someone could check what numbers they get while charging with hypercharger and sure enough, i got a guy telling me. franco kernel manager told him that his phone is charging at 5444 mA and 51 watts.

if you divide that by two, you get 25 something watts, which is more than believable.

when i altered force_max_icl to 5800, i got about 40 watts instead of 26. and yeah, it definitely charged quicker. even ampere app wrote "turbo" as charge type. but no hypercharge icon.

if anyone wants to try that, be aware of your charger's max amperage. i have 65w charger that can output 3 amps so i gave it a go. also, root is needed.

my question for you is: could you find, or maybe you know, what part figures out which charger you connect so we can stop asus from blocking us from using other fast chargers that are capable of the same charging speeds as their "hypercharger" (are charging drivers even included in the kernel source code?).

also, for any folks that think asus has some "proprietary" cable that charges at 6 amps or some other wild number... check their hypercharger specs: it's standard qc 4.0+/pps/pd3.0 supporting charger. it can output maximum of 11 volts and 3 amps.
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] uriii13:
How much are Smart Kernel modifications recommended? Are they compatible/not destroying Kirisakura job?
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] uriii13:
It seems amazing! I would not use that W for my daily, but for some moments it would be a saviour. I'm now searching a low-charging (or W-A software control) to charge the phone in the night. As long as this last will be complicated or impossible to get, I will go for the low noise/low amperage charger.
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] Freak07:
thank you very very much! it´s greatly appreciated!
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] Freak07:
I cant answer that question, as I only run stock firmware.

Give it a try. backup your boot.img on RR rom with TWRP. FLash the kernel.zip for custom roms.

In case it doesnt work, you can fastboot boot twrp.img and restore your backed up boot.img.
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] Freak07:
you´re free to experiment, but if you change too much, you might sooner or later change something, that´s tuned shortly after booting the kernel.

If you run into issues that way, don´t complain ;)
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] dvijetrecine:
you can also limit charging speed by changing it to lower mA. say 1000 or 850 mA. instead of putting 5800 in force max icl, you can put any lower number you want.
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] uriii13:
I'm just quite sceptic about how much this would affect the battery, but I like the idea. Some opinions? Did someone try it with Kirisakura flashed?
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] dvijetrecine:
i can answer you that also: it works with kirisakura
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] uriii13:
Just to be clear for the community: this is totally parallel stuff to the dev work and it's nothing to do with the dev. Everybody that does this, does this at their own risk :)
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] Freak07:
yes it should just work as it does on stock. The charging driver is not changed in any way.

Exactly. That’s also why I won’t give much input to this topic. I don’t like to play with these things as I’m no expert on the topic of batteries nor do I have any means to do long term testing with the batteries/charging method as on OEM does.
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] dvijetrecine:
thanks for the answer. i looked a bit into charging driver but oh boy, that was a lot of code. thought maybe you could help a bit but i understand your concerns
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] reg66:
You little beauty, cheers!!
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] shorbah:
is it working on omin a11 ?
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] 533y4:
Im wondering the same thing. lol Once i get Omni 11 working, I'll experiment.

Does not work!!!

Can we get R support with this beast of a kernel?
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] Santhonius:
What is the panel model of the rog 2? Is it the same as rog 3? Wanted to do some self research before trying 144hz
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] 533y4:
I will say this much, tho I believe this is more SOC based than panel based... The phone struggles to keep 144hz unless x mode is activated. This goes system wide. Chrome would shuffle between a range of 118-144hz/fps. X mode makes everything solid now. Just found that interesting. 120hz barely had any fluctuation at all no matter what.
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] ausaras:
> You can fine tune the lowest brightness value via /sys/module/msm_drm/parameters/bl_min. Default value is now "3".

I modified the value to "2" but it always resets back to "3" after reboot. Is it because the value cannot be lower than "3"?

Or, it is a problem with my text editor? I use MiXplorer's built-in code editor to modify the value.

thank you!
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] Freak07:
The value defaults to 3 on every reboot. I don't think it will make a difference if set lower than 3 anyway.

If you want the value to stick across reboots, either create a script or create a "user setting" in exkm that sets it to your desired value on each boot :)
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] chindu.rs68:
Air triggers work in this rom ?
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] killerdvd:
This is only a kernel, not a rom. Air triggers work great with stock rom and this kernel.
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] Arthuer:
This fine with latest update stock rom ? .75
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] muadeepmuadeep:
Dear Sir,

I've got some Questions:

1.- Can I install without Rooting?

2.- Works with the latest Stock Rom (17.0240.2103.75- 25-MAR-2020)?

3.- What are the exactly steps to do it if yes without rooting

Looking Forward To,

Muadeep
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] Freak07:
you probably won´t find any documentation about the panel as there´s basically nothing available. if you find anything interesting let me know.

the panels are probably very similar.

yes indeed you´re right. The phone seems to can´t keep up rendering chrome at 144fps when the screen is not touched and no interaction with the phone is happening, thus the powerhal is not boosting the frequencies.

X-Mode raises the minimal cpu frequenices a bit, so the phone can´t idle on the lower frequencies hence it consistently renders chrome at 144fps.

Question 1 and 3 are answered if reading the first post.

It works for me with the latest stock rom on the .75 update. But if you want to avoid random issues that I might not yet have faced, it´s generally recommended to wait until I publish an update with the new source code merged.

Asus has not yet uploaded the source code for the .75 firmware.
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] ausaras:
I think the .75 firmware has been pulled.

I saw it last week on ASUS website. But today, it is not there anymore.
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] Freak07:
No it's still there on the server. The website just hasn't been updated yet, it was never visible on the website for me.

https://dlcdnets.asus.com/pub/ASUS/ZenFone/ZS660KL/UL-ASUS_I001_1-ASUS-17.0240.2103.75-1.1.229-user.zip
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] Freak07:
update for new firmware soon :)
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] Arthuer:
Thank you for all u doing for ROG phone, 😻 going to test Armoury Unleashed 🔥
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] asskriss:
thanks a alot for the update... i am still using this phone cz the performance is still awesome
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] killerdvd:
I just want to thank you for another awesome update, the phone is buttery smooth. 🙏🙏

Best kernel out there, highly recommended if you are new to ROG phone 2.
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] Zeus Hai:
Excellent job!

My sensors are all dead (except heat sensors), but I don't think it's related to the kernel 😂
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] htctouchelfin:
wrong theard
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] Allen_Walker:
https://dlcdnets.asus.com/pub/ASUS/ZenFone/ZS660KL/UL-ASUS_I001_1-ASUS-17.0240.2105.90-1.1.229-user.zip

Update firmware rog 2.
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] Zeus Hai:
Super fast kernel, love it 😍 👍
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] maicol07:
Hi @Freak07, do you plan to do an Android 11 version of your kernel?

Thank you
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] zx4636313:
Deleted
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] andywalker:
Gimana cara install nya?saya takut hardbrick
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] ausaras:
@Freak07

The source code for the latest version 17.0240.2107.100 is on Asus website.

Is it possible to update your wonderful kernel?

Thank you!
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] ausaras:
Thank you so much!
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] alvinrs:
Its fix notification delay? I have problem on the last update, plus massager delay notification
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] Freak07:
Not related to the kernel. It's userspace/framework managing background usage of apps.
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] doctorzeromd:
I'm not sure if it's just me, since I don't know anyone else with the same device, but on Kernel 3.2.3 and Firmware WW-17.0240.2107.100, my phone will restart when connecting 2 of my 3 USB-C dongles, which was not the case on Kernel 3.2 and Firmware WW-17.0240.2103.75.

I restored the /boot partition of a TWRP backup from a few weeks ago (when I was on Kernel 3.2 and Firmware WW-17.0240.2103.75) and the issue went away, so I'm currently on Kernel 3.2 and Firmware WW-17.0240.2107.100 and not experiencing the issue.

Not sure if it's just me, something specifically with my /boot partition when I was on Kernel 3.2.3, or what. Any thoughts would be greatly appreciated :)
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] ausaras:
@Freak07

Just to let you know, V17.0240.2108.103 is released. Will there be an update to your kernel?

Really enjoy your work. Thank you!
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] Freak07:
yes, once I find time to update the kernel :)
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] ausaras:
Thank you for replying so quickly.

I will update the ROM after you have updated kernel. Can't imagine using the phone without your kernel. Thanks, again!
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] dsfm81:
I am testing kernel 3.2.3 on WW-17.0240.2108.103 and everything work good at this moment. 😅
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] ausaras:
Thank you for letting me know! We have a long weekend coming up in October. If I have nothing to do, I might update ROM and flash the .100 Kirisakura kernel.

But I still prefer matching ROM and kernel versions. So far, the .100 version has been working great.
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] Freak07:
@ausaras and everybody else

no kernel changes in 17.0240.2108.103 that we don´t already have by CAF and Linux-Stable upstream.

So the current release can be used just fine with that firmware.
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] Bonk3rs:
Thanks for this fantastic kernel. I have been using the latest 103 update with the 3.2.3 kernel for the last week and everything seems to work. Instagram however seems to be crashing. It works after cache is reset but continues to crash after 1st login. It seemed to work ok with the original 103 kernel. Is anyone else facing this as well?
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] Freak07:
I managed to replicate the bug also on 3.2.2.

I think the Instagram app was updated at some point recently and is trying to access something that's restricted by a recent Linux stable updated from a security perspective. At least that's what I think by looking at the logs.

Nobody reported the issue on 3.2.2 for a few months, so that's the most likely scenario.

I'm not sure when I find the time to look into this( what exactly is causing it) as it can be very time intensive, but I'll take a look at it.
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] Bonk3rs:
Thanks for taking the time to replicate the bug. Yes the issue did not exist on 3.2.2. And neither on 3.2.3 with .100 build. The Instagram app also worked fine after I upgraded to .103 with it's stock kernel. I did notice that the latest update on Instagram was constantly being flagged for background battery consumption. Not sure if that helps in anyway. As you mentioned, seems like Instagram is trying to do something in the background that gets interfered and crashes. For anyone facing the same issue, I'm using Instagram lite as a workaround, hoping it gets fixed with next instagram update. This kernel is a must use for me, so hopefully you are able to find a fix for this @Freak07 . Thanks for your work.
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] doctorzeromd:
Is anyone else experiencing the issue I noticed where the phone will restart when connected to a USB c dongle that has HDMI and Ethernet?

It seems if the dongle just has USB all is fine.
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] H0Ly_bLaSt0R:
I am on 17.0240.2108.103, and I've unlocked bootloader specially for this kernel. I did everything according to instructions flashing this kernel, and air triggers, auto rotation and other sensors except gps are not working, any ideas how to fix this not loosing again all my data?
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] H0Ly_bLaSt0R:
Reflashed back to stock 17.0240.2108.103 to slot B in recovery and air triggers same as auto rotation and auto brightness and other sensors work fine.
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] AevaStyleLol:
Hi Freak07! Can we expect a new kernel version for anrdoid 11?
[ASUS ROG Phone II ROMs, Kernels, Recoveries, & Oth] Krishan Avtar Singh:
Greeting Mr. Dev,

We are eagerly waiting for the kernel for A11. Please please tell us if you will be giving us the ultimate blessing of this kernel for a11 users too? 🥺🥲

I can't imagine using a11 without your kernel. Specially the 144hz refresh rate attracts me so much that I am addicted to it.