Automated Magisk patching for OnePlus Open firmware. This repository automatically checks for new firmware releases daily, downloads them, extracts the boot image, patches it with Magisk, and publishes the patched images as GitHub releases.
Download the latest patched boot image from the Releases page and flash it:
# Boot into fastboot
adb reboot bootloader
# Flash the patched image
fastboot flash init_boot magisk_patched_init_boot.img
# Reboot
fastboot rebootThen install the Magisk app on your device.
A GitHub Actions workflow runs daily to:
- Check for new OnePlus Open (India) firmware via the OxygenOS Updater API
- Download the firmware if a new version is available
- Extract
payload.binfrom the firmware ZIP - Extract
init_boot.img,boot.img, andvendor_dlkm.imgfrom the payload - Patch the boot image with the latest Magisk
- Create a GitHub release with stock and patched images
# Human-readable output
python download_firmware.py --check-only
# JSON output (for scripts)
python download_firmware.py --check-only --json# Download with 8 parallel connections
python download_firmware.py -n 8
# Skip if already downloaded
python download_firmware.py --no-clobber# List available partitions
python extract_payload.py payload.bin -l
# Extract init_boot, boot, and vendor_dlkm
python extract_payload.py payload.bin -p init_boot boot vendor_dlkm -o .# Download Magisk APK first
wget https://github.com/topjohnwu/Magisk/releases/latest/download/app-debug.apk -O magisk.apk
# Patch the boot image
./patch_boot.sh init_boot.img magisk.apkIf you need to restore the stock boot image:
fastboot flash init_boot init_boot.img- OnePlus Open (India) - variant 14 (default)
To check other variants manually:
python download_firmware.py --variant 11 # NA/Global
python download_firmware.py --variant 13 # EUGPL