RetroFed Forums
Your home away from modern life.
Weird bootloop after flashing magisk
Post Reply
AuthorMessage
pixeldaemon
sh.itjust.works

pixeldaemon@sh.itjust.works
Joined: 2026-05-07
Posted: · edited   Subject: Weird bootloop after flashing magisk Quote

Today I installed Lineage OS on my phone. Afterwards, I decided to use root with magisk.

Due to my ignorance, I flashed patched recovery into the boot partition, which resulted in a bootloop. I realized my mistake, proceeded with installing Lineage again, and then flashed patched boot image to the corresponding partition. After that, I got a bootloop again, but it can be overriden by holding Volume up + Power while booting.

All the changes I make in the phone (e.g. installed apps, settings) persist.

Probably, my ROM is goofed, but it is still able to boot from recovery.

I think I should reflash everything from scratch, but I'm not sure about the order. Should I reinstall Lineage first and then reflash the boot image?

UPD: This did NOT work.

SOLVED: I flashed a non-patched boot.img provided by Lineage, now the bootloop is solved. The actual problem was that I have patched boot.img NOT right on the target device. Flashing non-patched image provided by Lineage fixed the bootloop.

15   Original
Finadil
lemmy.world
Finadil@lemmy.world
Joined: 2023-07-04
#2 Posted:   Subject: Re: Weird bootloop after flashing magisk Quote Reply

Have you tried swapping back to the inactive slot? Then maybe start over again from scratch.

4
pixeldaemon
sh.itjust.works

pixeldaemon@sh.itjust.works
Joined: 2026-05-07
#3 Posted:   Subject: Re: Weird bootloop after flashing magisk Quote Reply

Have you tried swapping back to the inactive slot? Then maybe start over again from scratch.

What is this?

1
Onomatopoeia
lemmy.cafe
Onomatopoeia@lemmy.cafe
Joined: 2025-01-02
#4 Posted: · edited   Subject: Re: Weird bootloop after flashing magisk Quote Reply

I assume you used the boot.img from your phone, copied that to the phone, patched it with Magisk on the phone, then copied the patched image to your pc and flashed that to boot. (I know, it's such a clumsy process anymore thanks to Google).

What I do is flash the phone, copy the boot.img from the source zip to the phone, then do the rest. That way I know I'm working with the right version of boot.img. I also save the patched boot.img with the source zip, properly named (device name, version, etc) so I never mix it up with other device images.

I also do this as one of my first steps setting up a phone, before installing anything else. Not sure that makes any difference, but I also use some root apps (firewall, etc) that I want in place before installing apps.

0
Onomatopoeia
lemmy.cafe
Onomatopoeia@lemmy.cafe
Joined: 2025-01-02
#5 Posted: · edited   Subject: Re: Weird bootloop after flashing magisk Quote Reply

What is this?

Not all phones use them. Important to know if yours does to ensure you're always flashing to the correct partition/slot.

https://xdaforums.com/t/guide-the-noobs-guide-to-a-b-partitions-and-other-op6-idiosyncrasies.3816123/

4
Finadil
lemmy.world
Finadil@lemmy.world
Joined: 2023-07-04
#6 Posted: · edited   Subject: Re: Weird bootloop after flashing magisk Quote Reply

What is this?

Most phones have an A and B slot partitions. This makes OTA updates possible. Say your phone is running on A slot boot/recovery/rom partitions, when you do an update it writes the new firmware to the B slot, once it's determined that it was successful it reboots the phone and swaps the active slot to B and boots up. Next update would write to slot A. You can check the active slot by doing

fastboot getvar current-slot

Then swap the active slot by doing

fastboot set_active a

(or b, whichever isn't active)

6
pixeldaemon
sh.itjust.works

pixeldaemon@sh.itjust.works
Joined: 2026-05-07
#7 Posted:   Subject: Re: Weird bootloop after flashing magisk Quote Reply

I assume you used the boot.img from your phone, copied that to the phone, patched it with Magisk on the phone, then copied the patched image to your pc and flashed that to boot. (I know, it's such a clumsy process anymore thanks to Google). What I do is flash the phone, copy the boot.img from the source zip to the phone, then do the rest. That way I know I'm working with the right version of bo...

I actually patched it on another phone. Does host machine make difference on how Magisk patched the boot.img?

2
brachypelmide
lemmy.zip
brachypelmide@lemmy.zip
Joined: 2025-06-15
#8 Posted:   Subject: Re: Weird bootloop after flashing magisk Quote Reply

For any boot loop related issues on Lineage, flashing the boot partition with the boot.img provided by Lineage for your system will almost always fix the problem (as you found out just now). If not, then re-doing all the steps in the installation guide for your device should do the trick. I was also getting a bootloop on my rooted phone, but I was running Kitsune Magisk. Switching to regular Magisk did not cause any bootloops. Not sure what caused the bootloop considering I was running Kitsune just fine for a couple months until the bootloop happened. Maybe some system update screwed things up?

2
Post Reply Page 1