How to Root OnePlus 13s using KernelSU

This guide will show you how to root OnePlus 13s by modifying the stock boot image with a KernelSU-enabled kernel. KernelSU only allows approved apps to use su, so other apps won’t detect root access.

Important: Rooting can void your warranty and may brick your device if done wrong. Make sure you have the correct files for OnePlus 13s and back up your data first.

Requirements

Overview

We will unpack the stock boot.img, replace the kernel with a KernelSU-enabled kernel, repack it, and then flash it with fastboot. After that, KernelSU will be active and su will only be available to apps you approve.

Steps

  1. Get the stock boot.img for OnePlus 13s and keep a backup of it.
  2. Unpack the boot image (Linux example):
    magiskboot unpack boot.img
  3. Download and extract the correct KernelSU build for OnePlus 13s.
  4. Replace the kernel in the unpacked files with the KernelSU Image:
    mv -f Image kernel
  5. Repack the boot image:
    magiskboot repack boot.img
  6. Flash the new boot image:
    fastboot flash boot boot.img
    fastboot reboot

After flashing

  • If the phone doesn’t boot, flash back your original boot.img.
  • Once booted, check KernelSU is working and set up your preferred root manager.
  • Only upgrade KernelSU from trusted sources.
Tip: Keep your stock boot.img safe so you can recover it if something goes wrong.

You follow this guide at your own risk. The author is not responsible for any damage.