Take Oneplus 13 as an example
- Get the factory image of the current system version
- Confirm the modified partitions,
init_boot/boot/dtbo/recovery?- If you are unsure, you can use md5 comparison or apply the new version using the Full OTA or flash the new factory images, then enter the standard root process
- Get the factory images of these partitions
- Can use
payload-dumperto extract it from the stock Full OTA package of the current system version
- Can use
- Confirm the modified partitions,
- Restore the current system to stock
- Run the following command in
Termuxon your phone oradb shellon your computer:
- Run the following command in
# Execute as root user
su
# Get the active slot suffix (e.g., _a or _b)
ACT=$(getprop ro.boot.slot_suffix)
# Restore to stock
dd if=/sdcard/<factory init_boot>.img of=/dev/block/bootdevice/by-name/init_boot${ACT} # init_boot_a or init_boot_b if you need restore
dd if=/sdcard/<factory boot>.img of=/dev/block/bootdevice/by-name/boot${ACT} # boot_a or boot_b if you need restore
dd if=/sdcard/<factory dtbo>.img of=/dev/block/bootdevice/by-name/dtbo${ACT} # dtbo_a or dtbo_b if you need restore
dd if=/sdcard/<factory recovery>.img of=/dev/block/bootdevice/by-name/recovery${ACT} # recovery_a or recovery_b if you need restore
exit-
Apply the system update in Settings > System & Update > Software Update, but don't restart
- If this fails, apply the new version using the Full OTA or flash the new factory images, then enter the standard root process
-
Install root to inactive Slot
- Launch your root manager (e.g., Magisk, KSU, or Apatch)
- Select the top option (this may be
Installor something similar) - Choose "Install to inactive slot", but don't restart
-
Final Restart
- Go back to the Software Update app from step 3 and hit the
Restartbutton
- Go back to the Software Update app from step 3 and hit the
ref:
How to install incremental update on all variants rooted NA, IN, EU, GLO & CN **UPDATED 12/23/2024
Root installation with Apatch and OTA update + Root detection fixes