Magisk icon indicating copy to clipboard operation
Magisk copied to clipboard

Bootloop after ODIN flash (update)

Open RV7PR opened this issue 2 years ago • 20 comments

Device: Samsung Galaxy A53 (SM-A536B) Android version: 12 Magisk version name: 38325e7 Magisk version code: 25203

logs.zip

error

RV7PR avatar Aug 30 '22 09:08 RV7PR

make sure you patch the boot image in magisk manager through A53 itself. i.e install magisk manager on A53, patch the boot image and flash it. also what region is your phone from?

Exynos-nibba avatar Aug 31 '22 17:08 Exynos-nibba

make sure you patch the boot image in magisk manager through A53 itself. i.e install magisk manager on A53, patch the boot image and flash it. also what region is your phone from?

I have for the past 3 years with 2 different phones, never a problem. I use a usb flash drive to transfer de patched tar file and then flash with odin, i always check if file is corrupted. I'm using EUX, its the european union version

RV7PR avatar Aug 31 '22 17:08 RV7PR

2022-08-31 20:35 غرينتش+03:00, RV7PR @.***>:

make sure you patch the boot image in magisk manager through A53 itself. i.e install magisk manager on A53, patch the boot image and flash it. also what region is your phone from?

I have for the past 3 years with 2 different phones, never a problem. I use a usb flash drive to transfer de patched tar file and then flash with odin, i always check if file is corrupted. I'm using EUX, its the european union version

-- Reply to this email directly or view it on GitHub: https://github.com/topjohnwu/Magisk/issues/6230#issuecomment-1233225431 You are receiving this because you are subscribed to this thread.

Message ID: @.***>

zonestc1 avatar Aug 31 '22 18:08 zonestc1

I probably have the same problem with my Samsung Galaxy S22. With the current firmware (S901BXXU2AVH9 EUX, security patch level 01.09.2022) I get a bootloop after flashing the patched firmware. I patched the firmware like I always do (transfer AP file via ADB patch on my S22, pull the patched file via ADB and then flash the complete firmware with the patched file instead of AP). I tried with magisk 25200 and 25203. Flashing the old patched firmware (S901BXXU2AVG6, security patch level 01.08.2022) works and the phone boots normally

nemesis03 avatar Sep 03 '22 08:09 nemesis03

In case it helps, I'm also using a Galaxy S22 from the same region, and I did a full initial install of Magisk with the same latest firmware (S901BXXU2AVH9 EUX), and did not experience any boot loops. So, if what you're exeriencing is a bug or incompatibility issue with Magisk (and not an incorrect flashing procedure from the user), the problem is likely only related to upgrading the OS for an existing Magisk install.

One thing that came to my mind: the Odin release version might affect the results, so could you tell which version did you use, @nemesis03? I did the initial install with Odin v3.14.1 (original/unpatched).

When the next official firmware version arrives, I'll be doing the OS upgrade for the first time on my device, and report here about the results.

Igetin avatar Sep 04 '22 12:09 Igetin

make sure you patch the boot image in magisk manager through A53 itself. i.e install magisk manager on A53, patch the boot image and flash it. also what region is your phone from?

I have for the past 3 years with 2 different phones, never a problem. I use a usb flash drive to transfer de patched tar file and then flash with odin, i always check if file is corrupted. I'm using EUX, its the european union version

did you flash the disabled vbmeta image? and seems like your device already has a version of twrp available, have you tried flashing magisk through twrp?

Exynos-nibba avatar Sep 04 '22 17:09 Exynos-nibba

I flashed patched tar created with magisk manager. then the boot got stuck and tried many times again without success so i flashed twrp to get logs and had to flash stock + wiping all data to boot again and after initial boot I flashed patched tar again for root and now it works but I did lose all my data.

RV7PR avatar Sep 05 '22 13:09 RV7PR

I used an Odin v3.14.4 from somewhere, now I also tried Odin v3.14.1 (original and patched) from xda-developer forum. With these two version also the same result: bootloops with the newest firmware version. I don't want to do a full wipe and will wait for the next firmware or a solution. If this problem persists for future firmware updates we need some kind of fix, because a full data wipe with every firmware update is not very convenient. In this issue (https://github.com/topjohnwu/Magisk/issues/6136) a user had a similar problem and solved it by removing the avb flags from the fstab. I did not try this yet, because I am not accustomed to patching the boot image manually, but I might try when I have some time. On the other hand I am not sure if this solves the problem, because I would expect this problem to persist even after a data wipe.

nemesis03 avatar Sep 06 '22 10:09 nemesis03

I just tried to update to the recent firmware (S901BXXS2AVHD) with magisk, but again bootloops. Has anyone tried the update from a patched S901BXXU2AVH9 to a patched S901BXXS2AVHD without wiping all data? Does anyoune have further information about manually patching the avb flags in the boot image?

nemesis03 avatar Sep 18 '22 07:09 nemesis03

same problem with my Samsung galaxy M31

rajarshikhatua100 avatar Oct 04 '22 18:10 rajarshikhatua100

2022-08-31 21:36 غرينتش+03:00, خيطي بيطي @.***>:

2022-08-31 20:35 غرينتش+03:00, RV7PR @.***>:

make sure you patch the boot image in magisk manager through A53 itself. i.e install magisk manager on A53, patch the boot image and flash it. also what region is your phone from?

I have for the past 3 years with 2 different phones, never a problem. I use a usb flash drive to transfer de patched tar file and then flash with odin, i always check if file is corrupted. I'm using EUX, its the european union version

-- Reply to this email directly or view it on GitHub: https://github.com/topjohnwu/Magisk/issues/6230#issuecomment-1233225431 You are receiving this because you are subscribed to this thread.

Message ID: @.***>

zonestc1 avatar Oct 11 '22 09:10 zonestc1

I just tried an update to the latest firmware (S901BXXS2AVI7) and again had bootloops. I even tried repatching the ramdisk with magiskboot with KEEPVERITY=false, but again bootloops. On the other hand I am not experienced with the process of manually patching with magiskboot. Now I am back on the last working firmware from July.

@RV7PR @Igetin Did you manage to upgrade to newer magisk-patched firmwares without having to wipe the data partition?

Does anyone know how to disable KEEPVERITY in magisk without having to manually patch the files? I tried "echo KEEPVERITY=false>>/cache/.magisk" and "echo KEEPVERITY=false>>/data/.magisk", but that did not change anything.

Or any other idea why the bootloops happen and how to update to a newer firmware without having bootloops? Maybe @osm0sis has some ideas?

nemesis03 avatar Oct 22 '22 14:10 nemesis03

@RV7PR @Igetin Did you manage to upgrade to newer magisk-patched firmwares without having to wipe the data partition?

I haven’t tried yet, I’m still on the initial Magisk install (firmware S901BXXU2AVH9, released on August 31). I’ll try to find the time to test an upgrade next weekend.

Igetin avatar Oct 22 '22 18:10 Igetin

@nemesis03

Alright, I have now tried the upgrade for the Magisk-patched firmware, and I was able to successfully boot the new firmware after the flash. I upgraded from version S901BXXU2AVH9 to version S901BXXS2AVHD (EUX region). The user data is intact, and I did not have to perform a full wipe.

As described in the documentation, I did the flashing process exactly the same as with my initial install, except for the fact that I used the HOME_CSC tar archive for the "CSC" option in ODIN. I used ODIN version v3.14.1, and I have not touched anything in the options tab, i.e. I am using the default settings.

This is how ODIN looked after the flashing completed. The phone rebooted to the normal "bootloader unlocked" warning screen, after which it went to the Galaxy logo screen, after which it showed "Erasing…" for a while (not sure what that means here) and rebooted again. Then it eventually went from the Galaxy logo screen to the "Optimizing apps…" screen and to the lock screen. The whole startup took a few minutes at most.

My Magisk version is 25.2. Looking at your posts, you've used the same ODIN and Magisk version, have the same region model as I do, and also tried the same upgrade path that I did just now (*U2AVH9 → *S2AVHD). Our setup seems to be very similar, so I don't really have an idea why it's not working for you. 🙁 I can only suggest to triple-check the correct file selection in ODIN, but I suppose you have already done that.

I hope you are able to find a solution!

Igetin avatar Oct 30 '22 10:10 Igetin

Device: Samsung Galaxy A53 (SM-A536B) Android version: 12 Magisk version name: 38325e7 Magisk version code: 25203

logs.zip

error

I had the exact issue on my Samsung Galaxy A03

hyperio546 avatar Nov 05 '22 08:11 hyperio546

Alright, I have now tried the upgrade for the Magisk-patched firmware, and I was able to successfully boot the new firmware after the flash. I upgraded from version S901BXXU2AVH9 to version S901BXXS2AVHD (EUX region). The user data is intact, and I did not have to perform a full wipe.

That sounds promising. I will probably do a full back up, then give it another try with the latest firmware (S901BXXU2BVJA, Android 13) and if that does not work wipe all data and restore from backup after upgrading to android 13. Might not be a bad idea to start with a wiped phone on android 13.

It still bothers me that there is no real solution to this problem...

nemesis03 avatar Nov 07 '22 11:11 nemesis03

Just did the upgrade with success with my Samsung Galaxy A53 (SM-A536B) Went from: A536BXXU3AVGA Android 12 2022-08-26 To: A536BXXU4BVJG Android 13 2022-11-09

PS: I'm getting OTA updates from samsung for about 3 months even though my bootloader is unlocked and I'm rooted, you guys get them too?

RV7PR avatar Nov 12 '22 08:11 RV7PR

probably the cause of the problems could be some module, because I really uninstalled all after failing and then it worked.

rootback123 avatar Dec 04 '22 20:12 rootback123

Well.. I did use Magisk Bootloop Protector with patched boot image so I changed that to "basic function" (without patched boot image) just to be sure and then it worked but I'm not sure if it has anything to do with it. @HuskyDG is it an possibility?

RV7PR avatar Dec 04 '22 20:12 RV7PR

I finally solved this by wiping all my data. I did an upgrde to S901BXXU2BVJA (Android 13) and had bootloops. I then wiped the data and after that the device booted again. After setting up magisk I was able to upgrade to S901BXXU2BVKB without any issues. Unfortunately I had difficulties to restore my titanium backup, so I decided to downgrade to the last working firmware (S901BXXU2AVG6) and wipe data again. That was a bad decision, because I again was unable to update to a newer firmware. In the end I installed S901BXXS2AVHD and wiped data again, then restored my backups and then upgraded to S901BXXU2BVKB (Android 13) without issues. So even a freshly setup S901BXXU2AVG6 was not able to upgrade.

probably the cause of the problems could be some module, because I really uninstalled all after failing and then it worked. I only use zygisk with safetynetfix. So in my case it was either safetynetfix or something entirely different

nemesis03 avatar Dec 05 '22 19:12 nemesis03

I solved this for my device by only flashing boot.img in AP slot in Odin. Rooted now.

hyperio546 avatar Feb 01 '23 11:02 hyperio546

Hi, i'm using a G975 (S10+) and experienced a similar boot loop without installing any update recently. Could this have the same cause as https://github.com/topjohnwu/Magisk/issues/6136 (that nemesis mentioned also)?

Also @Igetin - you mentioned you successfully upgraded, did you ever experience a boot loop?

@hyperio546 - you just used the same patched boot.img?

nettnikl avatar Feb 07 '23 08:02 nettnikl

Hi, i'm using a G975 (S10+) and experienced a similar boot loop without installing any update recently. Could this have the same cause as https://github.com/topjohnwu/Magisk/issues/6136 (that nemesis mentioned also)?

Also @Igetin - you mentioned you successfully upgraded, did you ever experience a boot loop?

@hyperio546 - you just used the same patched boot.img?

I patched the boot.img of the new firmware and then flashed stock ap + bl + cp + home_csc and then boot.img separately.

hyperio546 avatar Feb 07 '23 09:02 hyperio546

@hyperio546 Thanks for the quick answer! So, just to confirm for dummys like me: So, you

  • had a rooted device
  • flashed a new firmware
  • had the boot loop
  • flashed stock ap + bl + cp + home_csc (keeping your data intact)
  • the boot loop was gone (or did you not try and restart then?)
  • patched boot.img with a recent magisk version on another, unrelated device
  • flashed the patched boot.img (keeping your data intact once again)
  • had a rooted, boot loop free system again

nettnikl avatar Feb 07 '23 16:02 nettnikl

Also @Igetin - you mentioned you successfully upgraded, did you ever experience a boot loop?

Nope, not once on this device.

Igetin avatar Feb 07 '23 16:02 Igetin

@hyperio546 Thanks for the quick answer! So, just to confirm for dummys like me: So, you

  • had a rooted device
  • flashed a new firmware
  • had the boot loop
  • flashed stock ap + bl + cp + home_csc (keeping your data intact)
  • the boot loop was gone (or did you not try and restart then?)
  • patched boot.img with a recent magisk version on another, unrelated device
  • flashed the patched boot.img (keeping your data intact once again)
  • had a rooted, boot loop free system again

I did not have a bootloop. After flashing the stock firmware it seemed to boot and operate just fine. Then I flashed patched boot.img. I patched it on the same device before upgrading.

hyperio546 avatar Feb 07 '23 18:02 hyperio546

I did not have a bootloop. After flashing the stock firmware it seemed to boot and operate just fine. Then I flashed patched boot.img. I patched it on the same device before upgrading.

It did not boot at all then, failing with the mentioned error message?

nettnikl avatar Feb 07 '23 22:02 nettnikl

I did not have a bootloop. After flashing the stock firmware it seemed to boot and operate just fine. Then I flashed patched boot.img. I patched it on the same device before upgrading.

It did not boot at all then, failing with the mentioned error message?

It booted. Flashing patched AP files bootlooped it.

hyperio546 avatar Feb 08 '23 02:02 hyperio546

If you haven't flashed a patched vbmeta image after unlocking your bootloader you must format your data partition in recovery mode in order to be able to boot again.

salvogiangri avatar Feb 12 '23 12:02 salvogiangri

you must format your data partition in recovery mode in order to be able to boot again

@BlackMesa123 Could you elaborate on that? I'm not an expert and would be very interested, under which circumstances you would say this is the case.

nettnikl avatar Feb 12 '23 19:02 nettnikl