Why is flashing Patched boot img causing bootloop?

Search This thread

iamMG

Senior Member
  • Jun 12, 2012
    198
    66
    New Delhi
    I have a OnePlus 7 Pro on Android 11, OOS 11.0.0.2. The bootloader is unlocked. The devices runs absolutely fine unrooted. I have been wanting to root for quite some time. I patched the boot.img file of the ROM using latest Magisk Canary (app-debug.apk) from the GitHub repository. When I flash the .img through ADB, it is flashed successfully.
    But when I reboot the phone, the phone is stuck on OnePlus' 'Two circling dots animation' (bootloop) and never starts. These are the commands that I enter one-by-one in CMD prompt on my laptop:
    adb devices
    adb reboot bootloader
    fastboot flash boot "D:\Downloads\boot_patched.img"
    fastboot reboot
    So, to get out of this issue, I flash the stock boot image using similar commands. Then the phone boots successfully, but, of course, it is unrooted.
    I even tried these commands, still no luck.
    fastboot flash boot_a "D:\Downloads\boot_patched.img"
    fastboot flash boot_b "D:\Downloads\boot_patched.img"
    I also tried patching using the stable Magisk release (Magisk v23.0), still nothing.
    What am I doing wrong?
     

    @soka

    Senior Member
  • Aug 8, 2014
    527
    191
    Glencoe
    I have a OnePlus 7 Pro on Android 11, OOS 11.0.0.2. The bootloader is unlocked. The devices runs absolutely fine unrooted. I have been wanting to root for quite some time. I patched the boot.img file of the ROM using latest Magisk Canary (app-debug.apk) from the GitHub repository. When I flash the .img through ADB, it is flashed successfully.
    But when I reboot the phone, the phone is stuck on OnePlus' 'Two circling dots animation' (bootloop) and never starts. These are the commands that I enter one-by-one in CMD prompt on my laptop:

    So, to get out of this issue, I flash the stock boot image using similar commands. Then the phone boots successfully, but, of course, it is unrooted.
    I even tried these commands, still no luck.

    I also tried patching using the stable Magisk release (Magisk v23.0), still nothing.
    What am I doing wrong?
    I had an issue before, with the Canary APK. Try installing the v23 app and repatch your boot IMG with it. Worth a shot.
     

    BillGoss

    Senior Member
    Sep 2, 2010
    4,555
    3,959
    Sydney
    OnePlus 3T
    OnePlus 8T

    iamMG

    Senior Member
  • Jun 12, 2012
    198
    66
    New Delhi
    This OnePlus 8T thread https://forum.xda-developers.com/t/...in-eu-us-kb2000-kb2001-kb2003-kb2005.4178675/ says to boot, not flash, the patched boot image. In other words, use fastboot boot "D:\Downloads\boot_patched.img" and then do a direct install in Magisk.
    That's the process I used and it worked perfectly.

    Note: my phone is an 8T.
    Thanks, I will try this method and report back.
    Btw, after you booted using this method, for how much time did the boot animation showed up (the two circling white dots around bigger red dot)?

    Edit: I tried this method. No luck. The boot animation goes on 5-10 minutes, at which point I reboot into bootloader and flash the stock boot image.
     
    Our Apps
    Get our official app!
    The best way to access XDA on your phone
    Nav Gestures
    Add swipe gestures to any Android
    One Handed Mode
    Eases uses one hand with your phone