[KERNEL][2020-12-01] CRUEL KERNEL S10/Note10 V3.9

Search This thread

doclucas

Senior Member
Jan 10, 2009
294
95
I am currently on stock Android 11, N975FXXS6EUA1_N975FOXM6ETLL firmware
I tried to compile v3.10 (+magisk), which works when I am running my N975F with stock Android 10 (TH7 base), but doesn't boot when I am flashing it on Android 11.
Is this kernel only for Android 10 bases? Or can it be compiled for Android 11 as well?

EDIT: Nevermind. Found it.
 
Last edited:

coey0814

Member
Feb 27, 2016
27
4
Wow, it was updated to v4.0 few hours ago. Can you tell us what has changed?
Always thank you for your hard work.
 

Zeroleak

New member
Apr 12, 2018
2
0
Hello,I currently have a G975F, and just patched into magisk after unlocking the bootloader
however whenever I reboot my phone my root disappears,i have to always boot into recovery i noticed
how do i install TWRP and then flash this kernel? I don't mind resetting or wiping my phone
any help would be appreciated thanks
 

jelbo

Senior Member
Hello,I currently have a G975F, and just patched into magisk after unlocking the bootloader
however whenever I reboot my phone my root disappears,i have to always boot into recovery i noticed
how do i install TWRP and then flash this kernel? I don't mind resetting or wiping my phone
any help would be appreciated thanks
The instructions are there, but I'll help you.
  • Have TWRP, vanilla or Magisk patched, doesn't matter.
  • Flash multidisabler and follow the instructions that come with it, it requires a data wipe.
  • Flash this kernel.
Voila, boot with Magisk root every time.

Easier for you may be to boot your phone with the Power+Bixby+Volume Up combination (and often anything USB other than charging only attached), let go in time and boot Magisk patched Android. This works with Magisk patched stock recovery or Magisk patched TWRP. Both don't require multidisabler.
 

jelbo

Senior Member
I used CruelKernel 3.4 patched to 2099-12 today for the latest CTF3 rom. Kernel works. You don't need to use keycombo but I had a problem with my Samsung account. I have frozen this account and it is ok but I would prefer to have a working account.
It's a long time ago, but did you ever find a way to fix this?

  • You can reboot to TWRP, navigate to data/system and delete 3 files those names starts with 'lock'. Reboot. Login, set a new pin. To fix samsung account login, reinstall the app
I don't know how to 'reinstall the app', because it is part of the system?

/edit: I managed to fix it by clearing the data for the Samsung Account app, I used App Manager. Prior to that, I flashed backtothefuture with the default year/date of 2099-12. I'm not entirely sure if that was needed though.

/edti2: Android keystore was messed up anyway, I had to do a factory reset to get it working well again. No idea what caused it, because CurelKernel patches itself with the os_patch_level it finds of the stock kernel.
 
Last edited:
How is cruelkernel-4.0-25hz different from cruelkernel-4.0-50hz?
I'm not really a geeky person, but as I understood it, this frequency represents the frequency of how often does the CPU check for the interruptions, so the least the value is, the more performance you might get, but the more your power consumption will be. Potentially, it can also bring some stutters with simple tasks, as harder and more important ones will always overshadow easier and interrupt the CPU
 

Mr. BonG

Member
Sep 19, 2012
32
11
Budapest
Failed upgrade to CruelKernel-v4.5

Hi guys! I need some help. I have a Samsung S10 (G973F), with Android 10 (stock rom) + OneUI 2.5.
TWRP 3.4.0.1 installed (with wbmeta+multidisabler) + CruelKernel v3.8 with integrated Magisk 21.0.
I use the EdXposed framework (riru 21.3+yahfa 0.4.6), but because of that my SafetyNet is tricked.
This is the main problem.
If I turn off the riru magisk module, the safetynet is ok. (MagiskHide Props and Universal SafetyNet Fix Magisk moduls don't help)
At this moment, all functions (except safetynet) work perfectly.
I want to upgrade the kernel to have newer magisk (v23), this is a prerequisite for me to upgrade edxposed moduls or try LSPosed.
I successfully installed from twrp CruelKernel-v4.5.zip, but after reboot they came problems: the device freezes and restarts automatically at the lock screen, if not then later random restarts. And wifi and camera dont work. (it is the same experience with kernel v4.4, v4.3, ect, only with v3.8 and v3.9 works well)
So, this is my problem.
How can I upgrade to a newer kernel or upgrade the magisk? Thanks for help!
 

Rawdog.dll

Member
Sep 1, 2017
17
2
Hello friend.
Failed upgrade to CruelKernel-v4.5

Hi guys! I need some help. I have a Samsung S10 (G973F), with Android 10 (stock rom) + OneUI 2.5.
TWRP 3.4.0.1 installed (with wbmeta+multidisabler) + CruelKernel v3.8 with integrated Magisk 21.0.
I use the EdXposed framework (riru 21.3+yahfa 0.4.6), but because of that my SafetyNet is tricked.
This is the main problem.
If I turn off the riru magisk module, the safetynet is ok. (MagiskHide Props and Universal SafetyNet Fix Magisk moduls don't help)
At this moment, all functions (except safetynet) work perfectly.
I want to upgrade the kernel to have newer magisk (v23), this is a prerequisite for me to upgrade edxposed moduls or try LSPosed.
I successfully installed from twrp CruelKernel-v4.5.zip, but after reboot they came problems: the device freezes and restarts automatically at the lock screen, if not then later random restarts. And wifi and camera dont work. (it is the same experience with kernel v4.4, v4.3, ect, only with v3.8 and v3.9 works well)
So, this is my problem.
How can I upgrade to a newer kernel or upgrade the magisk? Thanks for help!
Hello friend. I were facing the safety net problem too and I didn't knowing what were the cause.

So, before yesterday I decided to try LSPosed and the issue with SafetyNet was gone.
So that's clear that EdXposed is not passing on SafetyNet anymore.
This is an information that I'm sharing to help.
Good luck
 

Mr. BonG

Member
Sep 19, 2012
32
11
Budapest
Okay, but I can't install LSPosed, because the magisk version on my v3.9 kernel is too old (v21.1).
How can I install the 4.5 kernel?
 

MrDigitalCat

New member
Feb 24, 2021
1
0
can you add drivedroid support to your kernel?
no one android 11 rom or kernel support this feture, im so much needed in this
---------------
trying to build kernel v4.5 for myself with drivedroid support on github and no success, seeing this and no img file in artifacts
about:blank
 

Attachments

  • изображение_2021-09-02_123120.png
    изображение_2021-09-02_123120.png
    173.4 KB · Views: 27
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 29
    Introduction
    Based on samsung sources and android common tree. Supported devices: G970F/N, G973F/N, G975F/N G977B/N, N970F, N975F, N971N, N976B/N. All sources are open on GitHub.

    Continuous integration with GitHub Actions set up. This means you can customize the kernel from browser and build the version suitable for you without leaving the browser (see сustomization section).

    Features
    • Customizable build with config presets
    • Only part of samsung security features disabled (DEFEX, Process Authentification, root restrictions)
    • Switchable SELinux (by default it's locked in "always enforcing" mode in samsung sources)
    • Built-in in Magisk v21.1
    • Various toolchains (cruel,arm,samsung,proton,arter97...) supported
    • Wireguard for VPN
    • CIFS for SMB
    • Iptables TTL and HL editing modules for bypassing tethering restrictions
    • NTFS module for OTG usb drives
    • Moro sound module
    • Boeffla WakeLock Blocker
    • sdfat driver for vfat and exfat filesystems
    • reiser4 filesystem added. reiser4progs (https://github.com/CruelKernel/reiser4progs/releases)
    • DEX cable vendor lock for WQHD resolution removed
    • ZIP installer with XZ compression
    • ZIP installer with automatic os_patch_level patching
    Build commands (configuration presets) used for V3.9 kernel:
    Code:
    $ ./cruelbuild pack model=<MODEL> name=CRUEL-V3.9 +magisk +nohardening +force_dex_wqhd +ttl +cifs +ntfs +sdfat +nodebug +noaudit +noksm +nomodules +wireguard +usb_serial +sched_powersave +sched_performance +morosound +boeffla_wl_blocker +fake_config +dtb
    Where model can be one of G970F/N, G973F/N, G975F/N G977B/N, N970F, N975F, N971N, N976B/N.

    Installation Instructions
    First of all, TWRP Recovery + multidisabler should be installed in all cases. This is a preliminary step. Backup your existing kernel. You will be able to restore it in TWRP Recovery in case of any problems. Download an *.zip file. Reboot to TWRP. Install > Install ZIP > Flash CruelKernel.zip. Reboot to system.

    ChangeLog
    • V3 - Support for G970F, G975F, G977B, N970F, N975F, N976B models.
    • V3.1 - Boeffla wl blocker, BTB5 sources for N10 models.
    • V3.2 - Magisk update v20.4, wireguard update, sdfat for VFAT, exFAT, ntfs module.
    • V3.3 - CTC9 sources. The camera will work only on CTC9 based firmwares.
    • V3.4 - CTE9/CTF1 sources. Small fixes, overall improvements, more customization configs for building on github.
    • V3.7 - Various toolchains added (arm, arter97, samsung, proton, system, default)
    • V3.8 - DTI1 sources added for N971N, N976N.
      DTH7 sources added for G977N model.
      Some debugging flags disabled. performance config fixed (-O3).
      Cruel toolchain added (gcc 10.2 with PGO/LTO and inlining params from gcc 9 branch)
      simple_lmk added (github.com/kerneltoast/simple_lmk)
    • V3.9 - G977N, G973N models added.
      G970F/N, G975F/N, G973F/N updated to DTJA.
      N976B, N970F, N975F updated to DTJ4.
      Magisk updated to v21.1 version.
      Vendor lock for dp cable for DEX removed (thanks, fart1-git).
      Zip installer implemented.
      Automted os_patch_level level patching in installer (https://github.com/CruelKernel/clone_header).

    Downloads
    OS Patch Level: 2020-11
    V3.9 Download folder
    Sources

    If you like the work and want to help me with hosting: https://www.paypal.me/evdenis Hitting star button on GitHub and thanks button on XDA really helps to stay motivated.

    Instructions here could be outdated a bit, one can find the latest version in project's readme at github.
    How to customize the kernel build

    It's possible to customize the kernel and build it from the browser. First of all, create and account on GitHub. Next, fork this repository. Switch to the "Actions" tab and activate GitHub Actions. At this step you've got your own copy of the sources and you can build it with GitHub Actions. You need to open github actions configuration file (.github/workflows/main.yml) and edit it from the browser. For example, to alter the kernel configuration you need to edit lines:

    Code:
        - name: Kernel Configure
          run: |
            ./build config         
                    model=G973F    
                    name="CRUEL-V3.3"
                    +magisk        
                    +nohardening   
                    +ttl           
                    +wireguard     
                    +cifs          
                    +sdfat         
                    +ntfs          
                    +tcp_cibuc     
                    +morosound     
                    +boeffla_wl_blocker

    First of all, you need to change G973F model to the model of your phone. Supported models: G970F/N, G973F/N, G975F/N G977B/N, N970F, N975F, N971N, N976B/N.

    You can change the name of the kernel by replacing name="CRUEL-V3" with, for example, name="my_own_kernel". You can remove wireguard from the kernel if you don't need it by changing "+" to "-" or by removing the "+wireguard" line and "" on the previous line. OS patch date can be changed with os_patch_level=2020-02 argument, the default current date is in build.mkbootimg.G973F file.

    Available configuration presets can be found at kernel/configs folder. Only the *.conf files prefixed with "cruel" are meaningful. For example:
    • +magisk - integrates magisk into the kernel. This allows to have root without booting from recovery. Enabled by default.
    • magisk+canary - integrates canary magisk into the kernel.
    • bfq - enable bfq I/O scheduler in the kernel.
    • sched_... - enable various (conservative, ondemand, powersave, userspace, performance) CPU schedulers in the kernel.
    • ttl - adds iptables filters for altering ttl values of network packets. This helps to bypass tethering blocking in mobile networks.
    • wireguard - adds wireguard VPN module to the kernel.
    • cifs - adds CIFS (SMB) support.
    • tcp_cubic - use CUBIC as default TCP congestion control.
    • tcp_westwood - use WestWood as default TCP congestion control.
    • sdfat - use sdfat for exFAT and VFAT filesystems.
    • ntfs - enable ntfs filesystem support (read only).
    • boeffla_wl_blocker - enable boeffla wakelock blocker module.
    • morosound - enable moro sound control module.
    • +nohardening - removes Samsung kernel self-protection mechanisms. Potentially can increase the kernel performance. Enabled by default. Disable this if you want to make your system more secure.
    • nohardening2 - removes Android kernel self-protection mechanisms. Potentially can increase the kernel performance. Don't use it if you don't know what you are doing. Almost completely disables kernel self-protection. Very insecure.
    • nodebug - remove debugging information from the kernel.
    • noksm - disable Kernel Samepage Merging (KSM).
    • nomodules - disable loadable modules support.
    • noaudit - disable kernel auditing subsystem.
    • 300hz - increases kernel clock rate from 250hz to 300hz. Potentially can improve ui responsiveness.
    • 1000hz - increases kernel clock rate from 250hz to 1000hz. Potentially can improve ui responsiveness.
    For example, you can alter default configuration to something like:
    Code:
        - name: Kernel Configure
          run: |
            ./build config               
                    os_patch_level=2020-12
                    model=G975F          
                    name="OwnKernel"       
                    +magisk+canary       
                    +wireguard           
                    +nohardening         
                    +1000hz

    After editing the configuration in the browser, save it and commit. Next, you need to switch to the "Actions" tab. At this step you will find that GitHub starts to build the kernel. You need to wait about 25-30 mins while github builds the kernel. If the build is successfully finished, you will find your boot.img in the Artifacts section. Download it, unzip and flash.

    To keep your version of the sources in sync with main tree, please look at one of these tutorials:

    Support
    1. This thread. Feature requests accepted.
    2. Telegram (testing and intermediate releases).
    3. GitHub Pull Requests if you want to contribute.

    Credits
    Samsung for kernel sources
    fart1-git for disabling DEX cable vendor lock
    corsicanu for default blocklist of wakelocks for boeffla_wl_blocker driver
    Nico (@NicoMax2012) for porting moro sound module
    bamsbamx for porting boeffla_wakelock_blocker
    thehacker911 for general improvements and advices
    ExtremeGrief for overall improvements, porting maple scheduler
    geiti94 for his advices
    topjohnwu for Magisk
    franciscofranco for FK Kernel Manager
    and testers.
    I'm sorry if I missed someone, just write me and I will update the list.

    XDA:DevDB Information
    [KERNEL] CRUEL KERNEL S10/Note10, Kernel for the Samsung Galaxy S10

    Contributors
    evdenis, evdenis
    Source Code: https://github.com/CruelKernel/samsung-exynos9820

    Kernel Special Features:

    Version Information
    Status:
    Testing
    Current Stable Version: v3.9
    Stable Release Date: 2020-12-01

    Created 2020-03-08
    Last Updated 2020-12-01
    9
    Pin problem

    The problem is not in sources. It's due to os_patch_level mismatch with you current kernel (and/or twrp). CruelKernel uses common security patch date to be in sync with the official twrp and samsung firmwares. You can check the default os_patch_level in build.mkbootimg.* files. However, this date can be lower than other kernels use. When you flash a kernel with an earlier patch date on top of the previous one with a higher date, android activates rollback protection mechanism and you face the pin problem. It's impossible to use a "universal" os_patch_level because different users use different custom kernels and different firmwares. CruelKernel uses the common date by default in order to suite most of users.

    How can you solve the problem? 5 ways:
    • You can restore your previous kernel and the pin problem will gone
    • You can check the os_patch_level date of your previous kernel here https://cruelkernel.org/tools/bootimg/ and patch cruel kernel image to the same date. If your previous kernel is nemesis, patch cruel to 2099-12 date.
    • You can reboot to TWRP, navigate to data/system and delete 3 files those names starts with 'lock'. Reboot. Login, set a new pin. To fix samsung account login, reinstall the app
    • You can rebuild cruel kernel with os_patch_level that suites you. To do it, you need to add the line os_patch_level="<your date>" to the main.yml cruel configuration. See the next section if you want to rebuild the kernel.
    • You can do the full wipe during cruel kernel flashing
    8
    How to build the kernel locally on your PC

    This instructions assumes you are using Linux. Install mkbootimg (AIK tool) from osm0sis, heimdall (if you want to flash the kernel automatically).

    Next:
    Code:
    # Install prerequisites
    # If you use ubuntu or ubuntu based distro then you need to install these tools:
    $ sudo apt-get install build-essential libncurses-dev libtinfo5 bc bison flex libssl-dev libelf-dev
    # If you use Fedora:
    $ sudo dnf group install "Development Tools"
    $ sudo dnf install ncurses-devel ncurses-compat-libs bc bison flex elfutils-libelf-devel openssl-devel
    
    # Install mkbootimg
    $ wget https://github.com/osm0sis/mkbootimg/archive/master.zip
    $ unzip master.zip
    $ cd mkbootimg-master
    $ sed -i -e 's/-Werror//g' Makefile
    $ make
    $ sudo mv mkbootimg /usr/local/bin/mkbootimg
    
    # Get the sources
    $ git clone https://github.com/CruelKernel/samsung-exynos9820
    $ cd samsung-exynos9820
    # List available branches
    $ git branch -a | grep remotes | grep cruel | cut -d '/' -f 3
    # Switch to the branch you need
    $ git checkout cruel-v3
    # Install compilers
    $ git submodule update --init --recursive
    # Compile
    $ ./build mkimg name=CustomCruel model=G973F +magisk+canary +wireguard +ttl +cifs +nohardening
    # You will find your kernel in boot.img file after compilation.
    $ ls -lah ./boot.img
    
    # You can automatically flash the kernel with heimdall
    # if you connect your phone to the PC and execute:
    $ ./build :flash
    
    # Or in a single command (compilation with flashing)
    # ./build flash name=CustomCruel model=G973F +magisk+canary +wireguard +ttl +cifs +nohardening
    4
    Ok here it is. S10 untested, dont own it. S10+ works. Its not a flashable zip, so extract it and flash boot.img via twrp to boot slot. Or use the app "flashify" for example to flash to boot.
    3
    Thanks Dev! Does this kernel work also with LineageOS and AOSP roms?

    As for now, it compatible only with Samsung based firmwares. Works on native samsung firmwares, BeyondROM, on Ambasadii it's better to use Nemesis kernel (you will face pin problem if you try to install cruel). The kernel doesn't work on LOS.