yashsingh1/xdaforums huggingface dataset:
[Samsung Galaxy Note 20 Ultra ROMs, Kernels, Recove] Hargriv:
The kernel is built on the official source code from Samsung

Based on the source code (N986BXXU6HWCC)

( https://opensource.samsung.com/uploadSearch?searchValue=SM-N986B )

About the kernel for OneUI Android 13 ( EXYNOS )​

Changelog​

-- Add KernelSu support

-- Disabled samsung drivers debug

-- Fix yylloc

-- NTFS add read write

-- NTFS-3 add driver

-- Disable Samsung SECURITY DEFEX

-- Add Wireguard support

-- Disable Samsung KNOX

-- Add Boeffla wakelocks

-- Disable Samsung mor security

-- Kernel integrity notification disabled

-- Update NTFS driver

-- Enable I/O Schedulers and Governors

-- Enable p2p mac randomization

-- Remove samsung secyrity drivers

-- Usb gadget fix

-- Add fsync on/off support

-- Fix force loading of modules

-- Add switchable crc control

-- Lock TCP size to 64K

-- Remove Fstab Vbmeta

-- Small battery fixes

Changelog V4.1​

-- Patch leavel 2024-05

-- Update KernelSU to 0.9.3

-- KernelSU version: 11804

( KernelSU Changelog )​

[Kernel]: Let the kernel choose who is qualified to be the manager, avoiding potential side-channel attacks.​

[Manager]: Support uninstall permanently and restore stock boot in Settings. You can restore stock boot before OTA to avoid download the full firmware.​

[Module]: Fix the issue of the App Profile template page not opening.​

[Manager]: Fix scroll issues in Settings.​

[Manager]: Support choose kmi manually for installation.​

[Manager]: Fix dark mode not working in Splash Screen.​

[WebUI]: Allow opening multiple modules simultaneously on WebUI.​

[Manager]: Add module shrink in Settings.​

[Manager]: Fix "grant root failed" in some cases.​

[Manager]: Allow to use other su to install LKM mode.​

installation guid​

1. Clear the Magisk cache and data, then delete the Magisk application itself

2. Reboot the phone into Recovery mode

3. Install H-K-Systems-Kernelsu-for-Note20U-N985F-N986B.zip

4. Reboot the phone into the system

5. Install KernelSU.apk

DONATIONS LINK PAYPAL

Donate to Anton Tsekhmistrov

Help support Anton Tsekhmistrov by donating or sharing with your friends.

www.paypal.com

​

DOWNLOAD LINK --

MediaFire

MediaFire is a simple to use free service that lets you put all your photos, documents, music, and video in a single place so you can access them anywhere and share them everywhere.

www.mediafire.com

​

support group https://t.me/kernelSUnote20ultra

SOURCE CODE --- https://gitlab.com/Hargriv/note-20u-n985f-n986b

Status: stable for OneUI Android 13

Current stable version: H-K-Systems-Kernelsu-for-Note20U-N985F-N986B

Stable release date: 17/09/2023
[Samsung Galaxy Note 20 Ultra ROMs, Kernels, Recove] ZG_DEV:
noiceeeeeeeeeeee
[Samsung Galaxy Note 20 Ultra ROMs, Kernels, Recove] Jhfreeze:
Anyone try this yet besides dev/op?
[Samsung Galaxy Note 20 Ultra ROMs, Kernels, Recove] Hargriv:
If you look at downloads from the downloads folder, 30 people have tried it but there are no reviews yet, you can also ask this question to the group members in Telegram
[Samsung Galaxy Note 20 Ultra ROMs, Kernels, Recove] draroka:
Invite te

Telegram invite link was expired.
[Samsung Galaxy Note 20 Ultra ROMs, Kernels, Recove] big6boss9:
confirmed. tried to join today too
[Samsung Galaxy Note 20 Ultra ROMs, Kernels, Recove] Hargriv:
Already fixed, you can join the group
[Samsung Galaxy Note 20 Ultra ROMs, Kernels, Recove] draroka:
Link still doesn't work
[Samsung Galaxy Note 20 Ultra ROMs, Kernels, Recove] Hargriv:
H-K-Systems-KernelSU_SUPPORT

t.me
[Samsung Galaxy Note 20 Ultra ROMs, Kernels, Recove] Raeshabu:
Works well with N985F on WL1 Bit 9. I think I prefer this over Magisk for now, since my I don't have to do anything special to get my banking apps to work. Thanks @Hargriv
[Samsung Galaxy Note 20 Ultra ROMs, Kernels, Recove] Hargriv:
Glad to hear it, enjoy using it
[Samsung Galaxy Note 20 Ultra ROMs, Kernels, Recove] L22EEW:
Managed to get this flashed today, after a clean install.

My Barclays banking app working fine.

Halifax and Google wallet won't work (detect root).

Any suggestions? I would have previously used Magisk, but wanted to give this a shot.

Cheers
[Samsung Galaxy Note 20 Ultra ROMs, Kernels, Recove] legolgel:
Someone knows if with this kernel can I modify my battery capacity with a custom one? I just changed my note 20 ultra battery with a higher capacity one.
[Samsung Galaxy Note 20 Ultra ROMs, Kernels, Recove] applesucksLmao:
Higher battery capacity? caution there friend, we don't wanna repeat the note 7's explosiveness...

I don't think you need a custom kernel for that, battery voltages and percentages are managed by the BMS which is soldered directly to the Lithium-Ion battery... if anything, rebooting the phone will make the percentage go up if it goes down even if the higher capacity battery is not discharged yet
[Samsung Galaxy Note 20 Ultra ROMs, Kernels, Recove] legolgel:
Just 5000 mah battery, I don't plan to play with voltages, just want the system to recognize the 5000 instead of the 4500 mah, thing that hasn't been achieved by me yet.
[Samsung Galaxy Note 20 Ultra ROMs, Kernels, Recove] applesucksLmao:
how did you even get this battery? you soldered a higher capacity one to the original battery's BMS or you bought one? if you bought one, please send me the link so I can verify
[Samsung Galaxy Note 20 Ultra ROMs, Kernels, Recove] legolgel:
This is the link from Amazon:

DDONG Reemplazo de batería para Samsung Galaxy Note 20 Ultra, [5000mAh actualizado] Batería EB-BN985ABY https://a.co/d/eOsCuZs.
[Samsung Galaxy Note 20 Ultra ROMs, Kernels, Recove] applesucksLmao:
The battery seems okay, the voltages are correct and so is the Wh number informed there.

First of all, install a burner stress test from the Play Store to see if this battery delivers good performance because generally higher capacity batteries have a higher electrical resistance and can drop their voltage too much or just do not deliver enough power.

After that, nothing is needed to be done, no kernel modifications, etc, the number Android is informing won't change anything at all. If the battery percentage drops too quickly, you can just reboot the phone and it will get back to normal
[Samsung Galaxy Note 20 Ultra ROMs, Kernels, Recove] legolgel:
Nah mine doesn't drop that quick, is just a minor detail
[Samsung Galaxy Note 20 Ultra ROMs, Kernels, Recove] applesucksLmao:
if you have a rooted phone you could modify build.prop
[Samsung Galaxy Note 20 Ultra ROMs, Kernels, Recove] Hargriv:
The kernel is in no way responsible for the number of milliamp hours that is displayed in your battery information, the firmware is responsible for this and where you need to fix the file, I can’t tell you exactly, but is the game worth the candles spent on it, I I don’t see the point in tinkering with the phone to get a difference of 500 milliamps because it won’t add a significant increase in autonomy
[Samsung Galaxy Note 20 Ultra ROMs, Kernels, Recove] sezall:
Hello! Can I use the kernel for the January firmware?
[Samsung Galaxy Note 20 Ultra ROMs, Kernels, Recove] Hargriv:
Please check PM
[Samsung Galaxy Note 20 Ultra ROMs, Kernels, Recove] sezall:
Firmware N986BXXSAHXB1 January
[Samsung Galaxy Note 20 Ultra ROMs, Kernels, Recove] endolith:
What does this mean? Is KernelSU causing slowness of the entire phone? Installing a module fixes it and then I can uninstall the module? Which module? How do I install it?
[Samsung Galaxy Note 20 Ultra ROMs, Kernels, Recove] Hargriv:
It’s better for you to ask the KernelSU developers this question; if you carefully read the description, it says that this is a list of changes to KernelSU itself
[Samsung Galaxy Note 20 Ultra ROMs, Kernels, Recove] endolith:
I have, no response: https://github.com/tiann/KernelSU/issues/1381#issuecomment-1974819973
[Samsung Galaxy Note 20 Ultra ROMs, Kernels, Recove] Hargriv:
Why did you duplicate this for me?
[Samsung Galaxy Note 20 Ultra ROMs, Kernels, Recove] endolith:
I don't know what you mean?
[Samsung Galaxy Note 20 Ultra ROMs, Kernels, Recove] Hargriv:
I mean I have nothing to do with the changes in the KSU project and have no idea what they are talking about in their changelogs in the release versions
[Samsung Galaxy Note 20 Ultra ROMs, Kernels, Recove] endolith:
Then … don't respond? 🤷‍♂️
[Samsung Galaxy Note 20 Ultra ROMs, Kernels, Recove] Hargriv:
It’s better to ask the developers of the KSU project if you have a question about the KSU project and their list of changes
[General Questions and Answers] Akidthatlovetech:
Hi,i managed to compile an kernel for my sm-a035f,now i have to make a boot.img. The compile output file is image and image.gz. But when unpacking the stock boot.img with abootimg i got these file: bootimg.cfg, initrd.img and zimage. What the next step? I'm really new to this. Thank you.
[General Questions and Answers] Renate:
How are you unpacking the stock boot.img? That seems like weird stuff.

Post the stock image.
[General Questions and Answers] Akidthatlovetech:
Oh sorry, i unpacked it with abootimg. Unpack with mkbootimg give a different result.
[General Questions and Answers] Renate:
I see a pretty normal Android image, version 2.

I'm not familiar with the signing at 01774800.

C:\>imgutil boot.img /v /l
Name: SRPUH31A003
Header2: 1,660 (0000067c)
Kernel: 23,717,904 (0169e810) 00000800
Ramdisk: 690,606 (000a89ae) 0169f800
DTB: 179,505 (0002bd31) 01748800
Padding: 42,514,432 (0288b800) 01774800
Command: console=ttyS1,115200n8
Read ramdisk, 7 files
drwxr-xr-x debug_ramdisk
drwxr-xr-x dev
-rw-r----- 1311 fstab.ums9230_25c10
-rwxr-x--- 1501928 init
drwxr-xr-x mnt
drwxr-xr-x proc
drwxr-xr-x sys
[General Questions and Answers] Akidthatlovetech:
So uh,can i replace the kernel with the one i compiled?And how?
[General Questions and Answers] Renate:
First copy or rename your generated kernel to "kernel".

C:\>copy boot.img new.img
C:\>imgutil /r /v new.img kernel

You'll end up with something ~25 MB without any signing.

You should probably play it safe with fastboot boot new.img instead of flashing.

Note also that if something is supported by kernel modules (*.ko) a different kernel will break that.

(imgutil is in my sig)
[General Questions and Answers] Akidthatlovetech:
Yeah i did repack(with mkbootimg)before and it really about 25mb, flashing it just cause bootloop. But even though I have patched my recovery to have fastboot support cause i have a samsung phone, fastboot boot just doesn't work. It said something like command boot not recognised idk.
[General Questions and Answers] Renate:
Do a sanity check on your generated kernel.

Your stock kernel is some bytes in 0x00 - 0x3f, then all zeroes to 0x800

Yeah, you may need to defeat AVB (vbmeta), I don't know.

Yes, they are removing fastboot (in favor of fastbootd) and even commands like "boot".

Since your kernel is uncompressed, you might want to start simple.

You can modify the stock boot image (no need to unpack/pack).

Browse through a dump, find a warning message and change the spelling.

"No more dragons available" -> "No more dragons "aZailable"

See if you can get this to boot.
[General Questions and Answers] Akidthatlovetech:
Sorry but what is the "dump"? It's kernel crash dump or something? Where is it located? Im a very beginner...
[General Questions and Answers] Renate:
Just a hex editor/viewer on your boot.img
[General Questions and Answers] Akidthatlovetech:
Hi im back, here what i did:

1.Made the boot.img like what u say

2.Get stock vbmeta.img and disable verification with this

2.Flash both new.img and disabled-vbmeta and got bootloop(can't get to recovery,only download mode is accessable)

3.Flash stock vbmeta.img

4.Phone asked to factory reset and i did and it boot normaly

So vbmeta is not necessary? And when compile my kernel i add some cpu gorvernor with make menuconfig but i dont see any of them.
[General Questions and Answers] Renate:
The question is whether the problem is the signing or your kernel.

That's why I suggested making a trivial modification to the stock boot image to see if you can boot that.

Do uname −a, then find that in the dump and change it so you can notice.
[General Questions and Answers] Akidthatlovetech:
Ok, i will try everything.
[General Questions and Answers] Akidthatlovetech:
Hi,I'm back again,here what i did:

1.Make change in stock boot.img with notepad++

-From

[JDTP][ERROR] %s: Not supported command:<%s>
[JDTP][ERROR] %s: Not supported command, set to 0

-To

[JDTP][ERROR] %s: Not supported cemmand:<%s>
[JDTP][ERROR] %s: Not supported cemmand, set to 0

2.Flash the image,got asked to factory reset

3.Reset then the phone boot normal

When get root with magisk i patched that boot.img and do the same and it boot like normal. Now how do i make change to the kernel like edit local version and overclock the cpu? Thank you.
[General Questions and Answers] Renate:
Say what? You edited a 64 MB binary image with Notepad++???

Did you do a binary compare afterwards to make sure that you really only changed two bytes?

C:\>fc /b old.img new.img
1234 6f 65
5678 6f 65
[General Questions and Answers] Akidthatlovetech:
No i didn't...

What could happen? I thought Notepad++ just display those data like hex editor.
[General Questions and Answers] Renate:
Anything.

It could convert illegal UTF-8 sequences. It could change EOL sequences. It could stop processing after ctrl-Z. It could remove extraneous BOM sequences.

We don't know.
[General Questions and Answers] Akidthatlovetech:
Hi, this time i used an proper hex editor(HxD) and changed only one character(Failed to Faileb). Still boot like normal. Here the fc command(Window 7)output:

Comparing files old.img and NEW.IMG
00F67A50: 64 62

Now can i look into modify the kernel?
[General Questions and Answers] Akidthatlovetech:
How can i find the value that needed to be changed though. Most of it is just random characters.
[General Questions and Answers] Renate:
There's three different things and I'm not much of an authority on any of them:

AVB - you defeat this by getting rid of verify in the dtb or the fstab

vbmeta - you replace with a vbmeta with the flags set to ignore

FEC - error correction footer is in the last 4096 of a partition

You don't have FEC.

Which Android version is this anyway?
[General Questions and Answers] Akidthatlovetech:
Android 13,if i remember correctly i was able to install an gsi before and don't need vbmeta to be disabled.
[General Questions and Answers] Renate:
Didn't that GSI include its own vbmeta?

If you had UART you could see the boot and possibly see where the problem is.

Post what you're calling the empty vbmeta.

Post the dtbo.
[General Questions and Answers] Akidthatlovetech:
That gsi don't have any vbmeta included. And the vbmeta is forgotten. I will try flashing the gsi again to see if vbmeta is required. But you want the stock dtbo?
[General Questions and Answers] Akidthatlovetech:
The gsi is Project Elixir,there aren't any vbmeta included and the installation guide don't have too.
[General Questions and Answers] Renate:
That still doesn't explain why you didn't post what I requested.
[General Questions and Answers] Akidthatlovetech:
Let me be honest. Im still a secondary student,and I working with this on my mom laptop so all the files are here. My mom,she a teacher an she work remotely from home, so i have to wait until weekend. But I will download the stock firmware and extract the files for you later.
[General Questions and Answers] Renate:
Your age is no problem.

It's just that everything in modern Android gets more complicated and troubleshooting by remote control is always difficult.

I'm not really interested in what is in the stock firmware.

It's more important what is on your device.

If you are doing these sort of things it's better to be rooted or have EDL working so that you can just pull a partition.

Relying on what some distro says is just a source of errors.
[General Questions and Answers] Akidthatlovetech:
Oh yeah with root and a terminal i can pull those file,but that vbmeta is not empty or some things its just stock. But there are four different vbmeta file: vbmeta_bak,vbmeta_system,vbmeta_vendor,vbmeta_efs. Is it important?
[General Questions and Answers] Renate:
I meant the vbmeta that you wrote to plain "vbmeta".

Or pull "vbmeta".

Here is a real empty vbmeta.

I don't see anything in dtb or dtbo.

Probably my knowledge is obsolete.

I defeated AVB in Android 10 by patching dtb.
[General Questions and Answers] Akidthatlovetech:
No i don't wrote them,i download them from the internet and i don't think i still keeping it
[General Questions and Answers] Renate:
As I said, what do you have in vbmeta?
[General Questions and Answers] Akidthatlovetech:
I don't know,never check what inside before...

But all of the vbmeta i found online just make my phone bootloop.
[General Questions and Answers] Renate:
Jeez. Pull vbmeta (not vbmeta-whatever) and post it.
[General Questions and Answers] Akidthatlovetech:
Yeah it that vbmeta i attached upper
[General Questions and Answers] Renate:
That vbmeta is still enabled and trying to verify.

I thought that you said that you had replaced it?

Flash the boot image with the spelling mistake.

Flash my vbmeta_empty.img to vbmeta only.
[General Questions and Answers] Akidthatlovetech:
Ok,will do
[General Questions and Answers] Akidthatlovetech:
Hi,im back. Here what i did:

1. Enter fastboot

2. Flash boot.img then vbmeta.img(Didn't format data)

3. Phone badly bootloop, can't even get to the unlocked bootloader warning, doing some system dump, can't get to recovery too.

4. Enter download mode to flash stock vbmeta and factory reset.

Then the phone boot normally again. Just like those vbmeta on the internet,made my phone bootloop. What could be the reason??
[General Questions and Answers] Renate:
I dunno. You're going to have to do some experimenting.

Try stock boot and vb_empty.

Try chopping the AVB0 off boot, then erase boot, flash the 25MB trimmed boot.
[General Questions and Answers] Akidthatlovetech:
This been taking a lot of time and no results. Anyway i found people having problems with vbmeta too: this,this and this. It's interesting to read. Maybe a custom vbmeta is not compatible with samsung device, or something to do with recovery cause when i flash a wrong recovery the phone badly bootloop just like flash a empty vbmeta.
[General Questions and Answers] Akidthatlovetech:
Hi,I found avb0 and avbtool inside the recovery.img. Look like there is a vbmeta inside recovery, am i right?
[General Questions and Answers] Renate:
This AVB stuff with footers really annoys me.

A 32 MB boot image placed in a 128 MB partition has a stupid footer at the end.

So if you want to keep things exactly as they were you have to transfer 128 MB instead of 32 MB.

Ok, you could do something with sparse files, but why do they make life so difficult?

Recovery images will often have AVB signatures but sometimes there is no checking.
[General Questions and Answers] Akidthatlovetech:
Hi, i got it flashed and booted, turn out I was flashing it the wrong way I think.

I followed this tutorial:

-Step 1:already done

-Step 2:the partition is read-only so i can not change anything

-Step 3:meh

-Step 4:reboot and that file got revert so not important

-Step 5:before this I used to flash only AP or USERDATA. Now i flashed both of the slots with his attached vbmeta.tar

-Step 6: ok i done it

-Step 7:the phone boot but kernel panic before it can show the bootanimation, the kernel panic says something like "attempted to kill init".

After that i found this theard and decided to use the vbmeta inside that vbmeta disable.tar to flash like step 5 and factory reset again and it boot like normal. Idk why because the two vbmeta only one number different (i will show in screenshot)

I dont see the samsung_vbmeta file so i skipped those steps below

I pulled the vbmeta and it was blank,but vbmeta_bak,vbmeta_system,vbmeta_vendor isn't blank

So am i disabled it? Now i dont have the unsigned boot anymore so i can not check.
[General Questions and Answers] Renate:
Sorry, I missed your last response.

I've seen 0x03 at location 0x7b.
[General Questions and Answers] Akidthatlovetech:
Thank you for keeping on helping me, i really appreciate it. So I'm still trying, now the first situation is that it wont boot but will just:

Kernel panic: attempted to kill init!

Im not really sure, i saw the panic line like that. I factory reset and flashed stock rom so recovery log probably gone. The second situation is it would just bootlooping in a weird way: it doesn't get to the bootanimation, but the screen faded away( Like when "reboot" command is processed) then repeat the process. I see inside the boot image, the same line doesn't end at the same offset.
[General Questions and Answers] Renate:
When attempting changes that result in kernel panics or bootloops it's helpful if you have access to the hardware console over UART.

Ok, that is a luxury and often not accessible.

Android is a moving target. Advice for other models, other versions often will not work.
[General Questions and Answers] Akidthatlovetech:
Im interested in UART. I wanna try to find the rx, tx and gnd and hook them to a usb to serial adapter and connect to pc. Is it really just that or am i missing something else?
[General Questions and Answers] Renate:
You'll need a DVM (voltmeter) to determine what voltage logic level a device is using.

$10 will cover the basics, but buying something better than the cheapest will make life more fun.

Make sure that it has "diode test".

You'll probably need a UART that handles 1.8V levels.

You have to backtrack over your changes and find what breaks things.

Sometimes the problem is your tools.

For instance, when modifying apps with apktool and running into problems you should check that "round-tripping" the apk without modification works.

Try making a trivial spelling change in an error message, something noticeable,
[General Questions and Answers] Akidthatlovetech:
This is what I think is the UART point

And here is my measurement result:

So now how can i know which pin is which? Or can you point it out for me?
[General Questions and Answers] Renate:
First, don't measure "diode test" if you see any "real" voltage on it.

"Real" voltage is voltage that is steady and doesn't change if you touch the metal of the red probe with your finger.

Bouncy voltage going 0 0.1 0 0 0.2 0 is an open circuit, possibly a logic input.

Always measure to ground. An alligator clip to tin shield or the shell of the USB connector is nice.

You can probably see just by experimenting which of those test points are buttons.

Just push a button.

Useful things (EDL test points, UARTs) can be anywhere.

Don't short things.

Watch out for high voltage for the LED backlight (it could be as high as 40V!)
[General Questions and Answers] Akidthatlovetech:
Those three pin and the GND is connected to the button, so i assume those three on the right are for uart? The top pin is rx, and to identify the vcc pin i have to find the one with "real" voltage right? So the last pin will be the tx.
[General Questions and Answers] Renate:
Mmm, probably not good to assume.

RX seems compelling, but I've never seen one all by itself.

If you have a 1.8V USB UART you can connect ground up and what you think is TX to the RX on the USB UART.

This may only spit out stuff when you reboot - or never.
[General Questions and Answers] Akidthatlovetech:
Hi will this work?
[General Questions and Answers] Renate:
Yes, that's a nice one.

It's got 3 voltages and an FTDI232RL, which is the most standardized, least hassle one.

The price is reasonable for multi-voltage.
[General Questions and Answers] Akidthatlovetech:
It's working! Now i need to build the kernel, last time i was building my kernel on that phone using chroot environment on Termux, now we got real Ubuntu on computer :D
[General Questions and Answers] Akidthatlovetech:
Ok i'm back with the UART console log. Yet it still bootlooping. I flashed that vbmeta.
[General Questions and Answers] Renate:
I dunno anything about Samsung.

modfile vbmeta.img 7b 03
[0000007b] 01 => 03