Skip to content
This repository was archived by the owner on Jun 8, 2022. It is now read-only.

entr0pia/XPatch

Repository files navigation

XPatch

English | 中文

Remove the system_ext partition in boot.img of Android (such as Sony Xpeira 5II) firmware.

Scenes

The Magisk v25 is already compatible with Sony Xperia, just need to patch boot.img normally.

If your Android (especially Android 11) bootloop after patched magisk, as described in Issue #3752 · topjohnwu/Magisk, it may be caused by the system_ext partition in boot.img. Try the script to fix bootloop.

Instructions

  1. Clone this repo:

    git clone --recurse-submodules https://github.com/entr0pia/XPatch.git
  2. Get the boot.img file from wherever you can get boot.img. For Sony Xperia firmware, it's possibly named as boot_X-FLASH-ALL-xxxx.sin.

  3. Connect Android device with adb enabled.

  4. Use this script to modify the stock boot.img, both Sony Xperia's .sin and regular .img files supported:

    • Linux
    sudo ./run.sh path_to_boot_img_file
    • Windows
    .\run.bat path_to_boot_img_file
    • Outs: image-new.img
  5. Diasble all Magisk modules -- Optional but recommended

  6. Flash Magisk:

    Reboot your phone to the bootloader, use fastboot to flash the image-new.img into the boot partition, then reboot.

    Fix: Sometimes, such as after an OTA update, you must use the stock boot.img to boot system regularly before flashing the image-new.img.

About

Remove the system_ext Partition to Fix Bootloop while Patching Magisk on some Android 11 Devices

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors