Question "Your device is corrupt" error before successful boot (Android 13 May update rooted with Magisk) - Google Pixel 6a

Hey all, I'm not new to this, but I'm looking for some guidance and explanation of the root cause so I don't break my phone worse than it is.
I bought a Pixel 6a last fall, and I have been using it non-rooted since. I have accepted each OTA update since Android 13 was released and as of today I am running on TQ2A.230505.002.
I took the OTA update for May 2023 as soon as it was released before rooting. After it successfully installed, I downloaded the matching factory image zip and extracted the boot.img from the ROM, patched it with Magisk, and then flashed by doing fastboot flash boot magiskboot.img.
It was working fine for a few days, until today when my phone reboot and I was greeted with the "Your device is corrupt" message. If I continue, the phone boots successfully and it works like normal. Magisk says it is loaded and modules are active.
I have reboot my phone several times since I rooted it, and I never received this error. However, the last time I reboot before I received this error was Sunday night. I have not installed any apps since then.
Looking around on this forum and others, I have seen posts from other users who got this error, but their situations are different. In those cases, they received the message only after accepting an OTA on a rooted device or got stuck in a boot loop, but neither of those scenarios apply to me. The solutions in other threads also seem to be a mixed bag of results, so I'm hesitant to do anything until I understand the root cause and ask for guidance.
Since I am unlocked and booting, my hope is that it should be easily recoverable. However, what could cause it to suddenly become "corrupt", and how would I diagnose or remediate the issue with minimal disruption or risk to data? My main concerns at this point are not knowing how it got into this state, and how to quickly recover from it if it happens again.
---- Edit below with more info ----
I found another user with a very similar issue from a month ago. While the issue seems to have been inflicted differently, their symptoms are very similar. The suggested solution is linked here: https://forum.xda-developers.com/t/your-device-is-corrupted-message-on-bootup.4578141/#post-88446647
The other post states the issue is caused by "the bootloader is looking for a new/updated OS without corruption errors so it will go back to restart mode rather than being stuck in the RED eio mode which displays that message."
Since my phone was working, what corruption could I have experienced over the past two days of regular usage? I did not install any updates or make any changes that failed.
Also, what would be the recommended solution in my case? Should I try flashing an older boot.img and then reflash the newest? Or should I do "fastboot --disable verity flash vbmeta vbmeta.img"? Are there any risks with either approach?

Your bootloader is unlocked, hence the message.

dexlemaffo said:
Your bootloader is unlocked, hence the message.
Click to expand...
Click to collapse
This is not the "your bootloader is unlocked" warning. This is the eio message saying the system is corrupt and requires manual intervention to boot.
After doing a bit more research and learning more about the "eio" mode that it was stuck in, I decided to take a stab at it.
Since I have the May update installed, I downloaded the April factory image. I also downloaded platform-tools r33.0.3 because I read there was mixed results with the latest version.
I extracted the boot.img from the bluejay-tq2a.230405.003.e1 April image and flashed it to my phone with fastboot. I then reboot the device. It failed to boot, as expected. However, I immediately noticed the error was gone and I only had the regular unlocked bootloader warning.
I boot into fastboot again and flashed the boot.img from the bluejay-tq2a.230505.002 May image matching my system version. After it flashed successfully, I reboot and the error did not return.
Edit:
I proceeded with rooting again. This time, I did "fastboot boot boot-magisk.img" and flashed from Magisk instead of from fastboot, though I doubt there is any difference.
It reboot successfully. I am back to being rooted without any error message and without any factory reset.
I still don't know what would have caused the bootloader to think there was corruption after it was working for several days. Can anyone reading this can provide some insight?
This whole issue has me very uneasy. I'm worried something else could be wrong - whether it's a bug with Android, or a hardware fault, or a bug in Magisk.

I'm wondering if I should be concerned.
Today, when my phone reboot, it was sudden. I did not initiate the reboot. I thought it was a benign crash as I have experienced many times before. However that was when I saw the "your device is corrupt" message.
I'm reading up on dm-verity and the dm-verity driver here: https://source.android.com/docs/security/features/verifiedboot/dm-verity
I suspect the dm-verity driver is used to hash and verify the system partitions on the fly? If so, could it be that when I was using my phone, it was trying to access some data and the hash failed, the signature mismatched, and it triggered the bootloader to mark the system as corrupt?
If that is what happened, is that cause for concern? Would that be the result of actual system file corruption or bad NAND? Or is it some bizarre Android glitch when running rooted?

Youll likely need to do a factory reset to get rid of that message.

That is incorrect. Based on the other reports of users with the same issue, this is a bootloader message and a factory reset has nothing to do with it. Additionally installing a factory image and wiping the phone would not get rid of the image either. Only an upgrade can supposedly remove the message, unless it is caused by something else.

He said it's the device is corrupt message, not the normal unlocked bootloader one.

afaik thats a bug in Android Verified Boot.
what you did is exactly the "normal" method to solve it, e.g. flash boot.img of the prior version, try to reboot and then flash the correct version again.

Related

The interesting story of how an OTA rendered my Z almost-useless

Just for background info, at the time it happened, my Z was running NPL25.86-30 from the following thread;
https://forum.xda-developers.com/moto-z/development/android-nougat-moto-z-versions-t3506342
It was running perfectly fine, then an OTA thing appeared. Well, I made the single big mistake of accepting it, and thus, it encountered an error and while the phone booted fine and even displayed the new build "NPLS-25.86-30-5", it started to randomly reboot when the phone either goes to sleep or when CPU loads are very low.
Well, I was distraught. The phone which was working perfectly fine just a few minutes ago was rendered almost useless as I had to keep turning it off after I used it to avoid it going into a reboot loop. So making calls was difficult enough as the phone would never receive a call as it would be endlessly rebooting anyway.
So, when I returned home, I fired up ADB, connected the Z in Fastboot mode and reflashed the NPL25.86-30 firmware from that link. For a while, it seemed to be fine, but then it started doing it again. I tried again and it still does so.
I was at a loss as I wasn't sure what else to do. Since the OTA update was there, I was afraid that the bootloader may have upgraded and causing me to lose my downgrade. However, when I used the command "fastboot boot xxx", I noticed the Marshmallow boot screen, indicating that the old bootloader was indeed intact and it hasn't changed.
It also happens that I kept the original firmware file which my phone came out of the box with. So I fired up RSDLite, put the entire .zip file in it (including GPT and bootloader) and flashed it right away. After it was done and I did a hasty setup, I left the phone alone to see if it would do so. Over an hour passed, and the phone never rebooted by itself, and would only do so if I was the one doing it.
So, there was light at the end of this very dark tunnel. Fired up ADB yet again and flashed the NPL25.86-30 firmware using the method that does not upgrade the bootloader. I also flashed TWRP and erfanoabdi's TurboZ kernel to disable forced-encryption and dm-verity, along with phh's Superuser for root access as SuperSU somehow does not install right even though the recovery says otherwise.
Booted up and it hasn't rebooted by itself until now. The only time it has rebooted is when I did it. It did necessitate a full data reset, but so far, it has been running well, with the OTA service fully disabled and the processor clocked to its Droid Edition levels.
Only issue I had with it is that the battery drain is a wee-bit high. Though this may be due to the process of installing and optimizing apps over time. If it all goes well, the battery drain should calm itself soon. As of right now, I've downclocked the processor and changed the governor to be as efficient as possible to reduce that battery drain until the phone is fully-set up. The other issue is that after a while, CPU-Z and AIDA64 fails to find the big cores, saying that they're either inactive or "sleeping", but Kernel Adiutor said otherwise. Other than that, I am enjoying it.
Also goes to show that if you have the MM bootloader, you should definitely keep it as it provides a very safe method of returning to a previous build with all your system files intact if anything breaks. It has proved to be extremely useful in this case.
As to the why it all happened,
Did you run the OTA with twrp installed, and/or any other system partition alterations?
Just curious, so others know why this happened to you and Van avoid it themselves. And with either of those things above, the OTA will fail, or worse like in your case.
OTA's are for stock systems, with stock recovery only.
Glad you got it sorted out though! :good:
Darth said:
As to the why it all happened,
Did you run the OTA with twrp installed, and/or any other system partition alterations?
Just curious, so others know why this happened to you and Van avoid it themselves. And with either of those things above, the OTA will fail, or worse like in your case.
OTA's are for stock systems, with stock recovery only.
Glad you got it sorted out though! :good:
Click to expand...
Click to collapse
Stock recovery.
I presume it's either because the build I ran was designed for a different region (same model code, though) or that the Marshmallow bootloader was incompatible with the OTA.
Regardless, it's been working fine for a bit, although one Busybox installer gave me a small scare when it said it was cleaning system/bin, although a later check found that it didn't actually do anything.
Just wanted to share my predicament.

Need expert help: Is it possible to decrypt userdata?

I need some help.
Not sure which is the best place in the forums, so I try it here.
My problem: unlock pattern is not accepted, at boot stage, after fastboot flashing_all_except_storage, so it cannot decrypt userdata, therefore it doesn't boot. Not to say I cannot access my data.
Device: Xiaomi MiA2 Lite. Bootloader unlocked. Magisk rooted
What I did:
- "Justification": I just came from a trip with no connectivity, too tired (without giving a second thought), resolved several family tech issues, and as I've had not problem upgrading the same device from a relative with the same configuration, I made no backup of mine.
- I was trying to upgrade from 10.0.10.0 to 10 10.0.12.0, but OTA was sistematically failing, despite I'd followed the same recommended procedure than in my relatives':
the Magisk uninstall - OTA_update - Magisk install_on_empty_slot procedure.
- I first tried flashing stock boot, in order to override the OTA error. What I got is the system destroy message!
- At that moment I only new about the fastboot file from xiaomi, that only shows 10.0.9.0.
Downloaded it, and ran (downgraded) the flash_all_except_storage.sh of this version.
It seemed to work well until I got stuck in "incorrect pattern" (previous to the full boot)
What I tried:
- I repeated the flashing, just in case, with no success.
- Also tried to access userdata with twrp-3.3.0-0 and 3.3.1-dees_troy. No success.
- Then, too late (don't know why this xiaomi doesn't upload the latest), I found at xda-dev newer fastboots images (10.0.10.0 and 10.0.12.0). Tried to flash_all_except_storage, but not changes at all.
- Almost forgotten: I have no doubt on my pattern, and I got the warning of 9 attempts left (hope that the ones within TWRP do not count).
So my "request":
- The most important: any help on how could I regain access to my userdata partition?
Let me add that I have a previous unencrypted TWRP userdata backup (only that partition), from a few months before.
Could I get any file from it that is part of the encryption process?
In this case, what should I do?
- and, secondly, (I guess you have a good level, obviously not me): what could have broken the access to the userdata? In my previous mobiles, flashing boot, system or vendor caused not problems to me. I ask it because it's not my first problem rooting this 2 slot device.
Thanks in advance
It seems it wasn't the best place to rise the question, but I don't know where address it to.
Is there any admin/moderator reading Q&A that could kindly point me where should I ask?
Thanks
xabier

Failed OTA managed to still update

Was sideloading my Pixel 4a to the december update, was getting the common failed to read command (closest I got was 94%) and decided to reboot. I expected to get stuck booting or reboot into bootloader, but surprisingly I booted into the new update. Never saw this before so just wanted to ask if this is something I should be warry of (e.g potential crashes and bootloops because I haven't re-rooted yet).
Thanks!

(FIXED) Bootloader Locked but Device Won't Boot

I recently ran into the issue during custom rom work. I reflash the stock android ZIP, it starts booting, then I hard reset it with the power button and try to reach bootloader again. This, as it turns out, is terrible to do if you want a fast setup. The moment it starts and you reboot it, the boot image is corrupted (that's my guess) because escaping the boot screen during a clean flash bricks your phone. If you're reading this, it happened to you as well.
The answer is so flipping obvious and it took me an hour to figure it out - nowhere on the internet is there a "solution" for this problem, no matter how frequent it is. But there are lots of people who deal with this, whether still on their factory images (like the Pixel 3 EDL issue) or like me bouncing from custom to stock. So here's the answer:
ALL YOU HAVE TO DO IS SIDELOAD THE CURRENT SOFTWARE OTA OR A BETA OTA FROM ANOTHER FUTURE VERSION.
It doesn't recognize timestamps before your current software, so you'll need to assume you're on the latest of whatever you're on and do that. Future versions work as well, so if you wanted to reach 12 in one shot, your phone's bootloader would fully accept it as long as the file isn't corrupted. If you need a sideloading or flashing guide, here you go.
For me, I flashed the latest build of Android 11 (August patch) and rebooted during the boot up. What I did was download the OTA of the same exact file to my laptop, and entered adb sideload coral.xxx.x.zip. (The name of the file) It ran all the way through and it started up perfectly normal.
I hope this helps someone!
P.S. I don't have any pictures or tutorials, I only wrote this to help others understand what happened and how to fix it. Probably wouldn't have needed to say it if the forum for it existed.

I super messed up, need suggestions. [I fixed it like the chad I am :) ]

Cant flash twrp nor the patched magisk boot img to both slot a and b.
Bootloader is unlocked.
Flashing scripts via .bat files for stock zips of both android 10 and 12 results in "FAILED (remote: Partition product not found)" or "FAILED (remote: variable not found)" respectively.
I have no recovery.
When I had twrp, I've made the mistake of wiping my whole android 12 data, storage, and system and flashing an android 10 rom without reading up of the separate a and b boot slots nor the effects of my actions leading to bootlooping. (I've done with this other devices before with no problems). This in turn wiped the twrp recovery I had flashed and left me only fastboot commands and a twrp version up to 3.3 and 3.2 with no hope of getting usb otg to work as it was only available with the later versions of twrp and since I and now technically on an android 10 bootloader, any attempt at that time to flash twrp 3.6 was met with a (remote: Error calling AvbLoadAndVerifyBootImages Load Error) or some kind of other error I have no logs for. Now I cant even tetherboot to twrp 3.2 nor 3.3 and I get that error regardless.
[Boots to bootloader no matter what. Shows as UFS:Micron, Error reason - reboot bootloader - bootloader version is b1c1-0-4-7617406]
I believe I can get access to internal storage to flash these updates once I get a recovery tethered from the bootloader. I do not know if its possible to boot to fastbootd or whatever its called (used for write permissions/sideload update zips) even if I hadn't gotten into this predicament. I will be buying another Pixel 3 in the meantime as I have money to burn and like to hurt myself financially, and emotionally to get to my goal with this device. ( Didn't buy another one, I was committed to the cause!)
I am not a noob nor a pro, but somewhere in between. My biggest point of failure is not reading up on how the partitions are set up and the various issues others had when flashing android 10 and 11 roms. Any suggestions other than "uPdAtE tHe fAsTbOoT aNd AdB dRiVeRs" are not welcomed. Thank you. I will update once I find a soluton to my problem Which I Will.
Again, my main concern right now is getting tethered twrp to work again and need suggestions. I have older versions of platform tools and the latest so please non of those comments I see on literally every other thread.
Edit: I didn't mention this before, but I did have the ability yo sideload when I had twrp at the time before crapping everything out the window, but nothing would work and gave up. Just wanted to add if anyone was wondering.
First update, I used the propriatary "Tool All In One Tool" and I was able to boot to fastbootd, and wipe my data and storage, while updating my stock zip to android 12. Now I can tetherboot twrp 3.6.1_11-0 with the option for usb otg, wish me luck boys. I'm in.
Second update. Still stuck on first update, but weighing my options in the meantime. I flashed twrp via the flash current twrp option, but when I boot to it, touch is disabled so thats great... I can fast boot to only the twrp versions after 3.6+, so not so bad. I have no os installed, but I will try my hand again at that tool all in one tool again. I'll update tomorrow if anything comes of it.
3rd update. FROM THE BRINK OF DEATH!!! WHOOOOOOOOOO!!!!! I got the pixeldust rom flashed and working like a BOSS!!!!! You won't believe the 2 days I've had trying to get this thing to work. All in all 1 out of my 3 flashdrives finally worked with otg. I had a windows recovery drive premade on it so I just copied and pasted the files there without a hitch! Thank you Google for having to make me miss work and actually do research to get this thing working again! Thank you for the guys at Tool All In One Tool for making this recovery possible, I will shout out your thread. If anyone who's in a similar situation needs any help from me or any info, I'll be glad to help. This will be the second to last update. I can also make phone calls and use data so Pixel Dust rom is good to go if that was one of your concerns. See ya!
Final update, I got crdroid flashed with root and safetynet passed, I just found out that google Pay was imbedded in gapps so now I don't need the pay app anymore to do transactions! My banking app also works, got vanced finally installed (couldn't do it on regular stock ROM) some glitches with the ROM here and there but no worries. For who ever reads this. There's hope. I fd up as bad as you can get shy of a hard brick. I still don't know too much but learned near twice as much as I knew just a few days ago. If you need help just DM me and I'll work my hardest to bring the light. This phone is absolutely amazing and on god wished google was a better company to praise. I have more plans for these phones and hope more Roms come out to support it.
I have one question however, how do I make a backup of my system/system_ext partitions? I can make a back up of everything else but that with these two Roms... I have a backup of it with my stock ROM, but it resumed to mount when I used otg... Didn't try internal yet but I'll assume the same, is it a glitch with current twrp?

Categories

Resources