Flashing Issues (Fastboot, TWRP and MAGISK) - Xiaomi Mi 10T / 10T Pro Questions & Answers

Hey. So I've unlocked the device and had Lineageos running on the device but decided I wanted to access google pay functionality and read up on installing magisk and TWRP to circumvent the safetynet issue. I managed to flash TWRP through fastboot perfectly fine, but then when I tried to push + install magisk is when the problems started. I received the error "Failed to mount system_root (device or resource busy)" on attempting to install, which I could not resolve. I decided to use TWRP to format data and factory reset and try again, which is when I ran into "failed to mount /data" when trying that.
At this point I tried flashing an older TWRP, thinking maybe the old guide doesn't work for the newer TWRP I was using. Following the same steps of fastboot flash recovery ..." which I used previously, I now have this problem
"Writing 'recover' FAILED (remote: '(recover) No such partition')"
and the device no longer boots back into lineageos, although I am able to run the fastboot boot filename command, and using that I was able to reinstall a working lineagos so the phone isn't entirely useless. A whole sleuth of fastboot commands I've seen suggested as solutions to some of these issues now no longer work however, such as 'fastboot format userdata'.
The mounting of the data folder is resolved... or at least I haven't seen it crop up again, however I still can't install magisk due to the system_root mount problem. Another weird thing is that I can install lineageos from TWRP recovery without running into the system_root problem, but using the same process for magisk results in system_root mount failure. Also, when I installed lineageos through it's own recovery image it referenced magisk (i believe it said it failed to install but I didn't copy the log).
I briefly tried the mi flash tool but ran into a Not catch checkpoint (\$fastboot -s .* lock),flash is not done problem which I haven't really delved too deeply into yet but might tomorrow after work.
Is my phone screwed?

Related

How to repair Wileyfox Swift when I can get into TWRP but not bootloader

Hi. I've just updated CM13 to the latest nightly using TWRP, but now the system just boots into TWRP - that's whether I select boot system, recovery, or bootloader. I tried restoring from a TWRP backup or another copy of the nightlies zip - it all seems to work fine but doesn't solve the problem. I can connect to the 'recovery' device using adb but adb restart bootloader just loads TWRP again. I've tried wiping first the dalvik/cache, then everything but the internal card, then finally everything but nothing seems to work.
I did get something a little bit like this a few days ago because SuperSU was complaining that I needed to update the binary. I let it do it the way that it suggested one does when TWRP is installed and afterwards couldn't reboot into system, but after a few minutes of frustration sorted things by wiping various partitions.
I attempted to load the full system restore files (cm-13.1-ZNH2KAS29G-crackling-signed-fastboot-74bb753396.zip) using TWRP but that didn't work (I imagine because they're designed to be run via fastboot). I tried loading them via the ADB sideloader option included in TWRP but it failed after a few seconds (I think the message was 'transmitting 0.0x'
I opened that zip and copied the various files to the external card, but I then baulked at installing the image files manually because the only partition option I'm given is boot and my understanding is that each image file should go into its own partition.
The only other potentially pertinent information I can think of:
TWRP keeps reporting "E: Unable to find partition size for '/recovery'"
Has anyone got any ideas please? I had been musing that my next phone would have OTG and NFC, but I wasn't planning to upgrade just yet if I don't absolutely have to.
Have you got it fixed? And if yes - how? I am stuck in a similar situation and can't find a solution for it. Tnx in advance.

Soft bricked Nexus7 can't get through "Can't mount" errors

Hey guys,
I was googling for the past few days who else might experience such problem, but I haven't stumbled upon such case. The problem is, I'm stuck on the bootloader part.
The initial goal was to root the device, so:
- I unlocked the bootloader,
- installed clockwork-touch-6.0.4.7
- wiped everything
- when I try to install SuperSU & new ROM I'm getting errors like
Code:
Can't mount /cache/recovery
Can't open /dev/block/platform/msm_sdcc.1/by-name/misc (No such file or directory)
Can't mount /cache/recovery/log
and a few other errors in this fashion about cache.
When I actually run the
Code:
abd sideload aicp_flo_n-12.0-UNOFFICIAL-20161020.zip
the installation tries to mount folders like /data but gets an error.
Finally it says
Code:
E1001: Failed to update system image
Installation aborted
Is there a way to re-format everything to FAT using fastboot and then begin everything from scratch? I have a feeling this is filesystem problem that it can't read properly or something... Maybe I'm wrong? What would be your suggestions?
Thanks!
I had a similar issue on mine a few days ago. I was completely stock and wanted to unlock bootloader, flash a custom recovery and then finally a custom ROM. I was successfully able to unlock the bootloader and flash the recovery (latest TWRP). But, when I tried to boot into recovery, it went past the recovery logo and then showed me errors like yours inside the recovery and rebooted. It then automatically booted into the recovery, showed the same errors and rebooted again. I wasn't able to do anything apart from booting into bootloader by sending an adb command.
Now coming to the part which fixed my errors. What I did was used the "fastboot -w" command (without the quotes) while I was in bootloader to wipe everything and after that, flashed the recovery again. Then I was able to successfully boot into recovery and everything has been fine since then.

[SOLVED] TWRP does not decrypt /sdcard; 'fastboot boot recovery' doesn't work

Hi everyone. I hope this is the right forum for this question.
Edit: I found the thread for TWRP and it says there is a known issue with decryption for Android 10. I think that is the root of my problems. I'm going to try to downgrade to Android 9 since I hate Android 10 anyway. It was causing all sorts of problems with my phone...random reboots, etc.
I have a Pixel 3 XL running the latest version of Android (image-crosshatch-qp1a.191005.007). I want to root it, but am having problems with TWRP.
I have the google usb drivers and adb and fastboot. I downloaded them all through the latest version of Android Studio.
I then used the official guide from twrprecovery.me (slash) google-pixel-3-xl/ to try to install TWRP. When I follow that guide I have 2 issues.
First, the '.\fastboot boot recovery recovery.img' command does not work. I get this error:
Code:
fastboot: error: cannot load 'recovery': No such file or directory
I am able to use .\fastboot boot recovery.img. When I do that I encounter the second problem.
Second, if I boot into TWRP using the command .\fastboot boot recovery.img, the file system is encrypted. It shows no data in the /sdcard folder and it shows the available storage space in Internal Storage as 0MB.
I've seen a lot of threads about that, but none of the suggestions work (I.e., setting a pin, setting a password, disabling home screen security all together, setting the phone to require a password or pin on boot (that option isn't available on the Pixel 3 XL), etc).
What I have been able to do is use TWRP to chmod 755 the /sdcard folder and then use adb push to transfer the recovery.img file. This was more of a test since I didn't expect it to actually be able to flash it. To my surprise, that worked, even though it couldn't mount any of the partitions. Of course, doing it that way removed the OS because it was flashing it to System not Recovery (I think...this is the first Pixel I've installed TWRP on).
That wasn't an issue since unlocking the bootloader had already wiped all my data. I just reinstalled the stock OS. After reinstalling the stock OS I just see a dead Android when I boot to recovery. I think that's either because A) TWRP was never installed to the recovery partition, or B) the stock OS overwrote it.
To summarize, I need to 1) boot into recovery so I can install recovery.img without wiping the OS, and 2) decrypt the file system.
Can anyone help me out?
Thanks

LG F400S/K Kitkat unable to install TWRP recovery / unable to install Gapps (solved)

Now the phone is unable to boot to system, I have no idea what I could do to fix it as there is no way to use adb or fastboot command…
I remember that the stock rom version is S11a, it have some problems when I tried to root it, and failed to flash recovery even I've got the root permission (response "write error: no space left")
------↑solved by using LG flashtool↑------
Now I am facing the problem that unable to install TWRP recovery using dd, it responds “ write error: No space left on device” I’ve reinstall the LG drivers, reboot the phone, reboot the computer, unroot and root again, but the problem still occurs.
----- update ------
solved by using flashify, and TWRP version 3.3.1 instead of latest 3.6.1, so that it won’t have “secure boot error” warning, and boot to recovery successfully.
But there is a new problem now, when I tried to sideload MindTheGapps after installed LOS 18.1 successfully, it warns me “could not mount /mnt/system! Aborting”. This is the third phone that having this warning for me, and I still couldn’t figure out which step goes wrong.
Nothing goes wrong after flashed to lineage recovery, installed MindTheGapps now.
--update--
I also tried to flash lineage recovery from TWRP on my D855, it also works, I installed MindTheGapps and everything works fine. So this is the problem of TWRP? Or reinstall the recovery is the solution? Maybe I would have a test later.

Question P6P Raven Recovery Error: "system/bin/tune2fs is missing"

Is "tune2fs is missing" normal on the Pixel 6 Pro in recovery? The error is persistent when I try to wipe data or mount system in recovery mode. I have tried reflashing stock OTA, full image, betas, and Lineage.
It doesn't seem to cause problems, but it's worrisome. The same error doesn't happen on a Pixel 7 Pro.
Before that, what have you done to your pixel 6 pro ?
Hi @Kris Chen, thanks for the reply! It was fully stock and purchased directly from Google about a year ago. I took the phone over from my wife when she upgraded.
I was thinking if the /system partition was corrupted, a full flash should resolve it? I've searched around for the error, and have found a handful of people that have came across it. Mostly Samsung device, and a Pixel 6a that can't enable OEM Unlocking. (Works find for me).
https://forum.xda-developers.com/t/...in-august-update.4480839/page-2#post-87457753
Here's the full error from a data wipe in recovery: ERROR: recovery: [libfs_mgr] Unable to enable ext4 verity on /dev/block/platform/14700000.ufs/by-name/metadata because /system/bin/tune2fs is missing.
Make sure that you have enough free disk space and the newest adb on your computer before flashing the factory update
Thanks for the reply, @Sui77. I don't receive any errors during the flashing process itself. I've used PowerShell as admin for OTA/full image .bat script, and Lineage flashes. I used the Android flash site in Chrome to try out a beta just in case it was a problem with the public image itself provided by Google. I'm using the newest version of Android Studio with no updates available. I have the user App Data SDK platform-tools set in my environment variable for calling the binary. I also have minimal apps installed. (Over 100 GB of space available).
I am completely stumped! I would expect others receive the error trying to factory reset or mount /system in the Recovery menu. I think I did it twice in a row. However, I wouldn't expect the first wipe to wipe /system partition with tune2fs.
MathewCNichols said:
Hi @Kris Chen, thanks for the reply! It was fully stock and purchased directly from Google about a year ago. I took the phone over from my wife when she upgraded.
I was thinking if the /system partition was corrupted, a full flash should resolve it? I've searched around for the error, and have found a handful of people that have came across it. Mostly Samsung device, and a Pixel 6a that can't enable OEM Unlocking. (Works find for me).
https://forum.xda-developers.com/t/...in-august-update.4480839/page-2#post-87457753
Here's the full error from a data wipe in recovery: ERROR: recovery: [libfs_mgr] Unable to enable ext4 verity on /dev/block/platform/14700000.ufs/by-name/metadata because /system/bin/tune2fs is missing.
Click to expand...
Click to collapse
Yes, trying to do fully wipe and rebuild system from the ground:
1. Entering recovery to wipe data and its titan m2 data.
2. Rebooting to fastboot mode.
3. Downloading factory img and extracting files ... then full flash system...
God bless on your phone
Kris Chen said:
Yes, trying to do fully wipe and rebuild system from the ground:
1. Entering recovery to wipe data and its titan m2 data.
2. Rebooting to fastboot mode.
3. Downloading factory img and extracting files ... then full flash system...
God bless on your phone
Click to expand...
Click to collapse
Couldn't have put it simpler. And @MathewCNichols thanks a bunch for this report. If ur issue still isn't resolved I'll be interested in helping out. You need to do a Factory image flash as well. If no other image flashing methods are working, you need to load some dynamic libs on a linux kernel and load some modules manually
@Kris Chen and @NonStickAtom785 , it's the craziest thing. I am able to successfully flash the full image using fast boot or the Android flash tool, or the OTA, or other betas, or even LineageOS. Afterward, the tune2fs missing error remains in Recovery when trying to mount /system or wipe data again before setting the device back up. Wiping data in Recovery before setup was a habit of mine. Everything else appears to work fine.
I think this would indicate there's a problem with the Raven system.img provided by Google? I wonder how many other people have a missing tune2fs and don't know.
I have an Ubuntu dualboot and I'm fairly familiar with terminal. I haven't compiled anything in a while, but I'm willing to accept the offer for help.
I don't know why I receive the tune2fs is missing error, when I can confirm it exists in the system.img from Google's factory image. After flashing, I can confirm my /system/bin files system does have "tune2fs" in the /system/bin directory with adb terminal too.
I flashed the latest full factory image again. This time I made sure to flash it to both slots. I used "--set-active=a" then "flash-all.bat" script, then "--set-active=b" and flash-all.bat script again. Both flashes were successful. Using "mount /system" or wipe data in the recovery menu printed the same "tune2fs is missing" error, although I know it's there.
I'm willing to bet this is a benign error everyone on a Pixel 6 Pro receives when mounting /system or wiping data in recovery.
Just installed the Jan 2023 security update (TQ1A.230105.002). I can now mount /system without the "tune2fs is missing" error.
Update: A recovery wipe triggered the error again. I guess it is what it is. If it isn't causing problems, then so be it.
The error was fixed in lineage recently. Maybe some day Google will fix it in the stock recovery too: https://github.com/LineageOS/android_build/commit/dd97cd639f892b5de650a1fb2a30de0f46016e46
As far as I can understand, everyone using Pixel 6 will receive the same error in recovery during /system mount or data wipe. To support the General Kernel Image (GKI), devices that were launched with Android 12 and earlier have to use a "ramdisk variant" of tune2fs and other modules at boot time. They were removed from the the boot image and placed in a separate init_boot image for newer devices:
Generic Boot Partition | Android Open Source Project
source.android.com
Updated to LoS 20 with their recovery just now and i get the tune2fs is missing error no matter what i do.. Seems to flash alright but it feels fishy.
zosina said:
Updated to LoS 20 with their recovery just now and i get the tune2fs is missing error no matter what i do.. Seems to flash alright but it feels fishy.
Click to expand...
Click to collapse
So you did flash both the Lineage recovery .img and sideload the .zip and it's still doing it? If so maybe I'll wait for upside down cake. I don't think the error really seems to matter so I've done my best to forget about it.
It looks like vbmeta might have lost its verity integrity protection, you could reflash the vendor vbmeta.img and see if it skips trying to fix it(tune2fs) when you format via recovery menu.
Bash:
fastboot flash vbmeta vbmeta.img
Android13 P6P the image is created with verity enabled and tune2fs is not supposed to be needed, anymore(?). But I've seen a hack that does the same but also disables verity so if you have done this and now you are getting this error...
crypto_ said:
It looks like vbmeta might have lost its verity integrity protection, you could reflash the vendor vbmeta.img and see if it skips trying to fix it(tune2fs) when you format via recovery menu.
Bash:
fastboot flash vbmeta vbmeta.img
Android13 P6P the image is created with verity enabled and tune2fs is not supposed to be needed, anymore(?). But I've seen a hack that does the same but also disables verity so if you have done this and now you are getting this error...
Click to expand...
Click to collapse
Thanks for the suggestion @crypto_. If this was true in my case, I think the factory image flash after full wipe would have resolved it. vbmeta.img is one of many .img files contained in the full factory zip (image-raven-tq1a.230105.002.zip). I've tinkered around doing many wipes and then factory and OTA flashes.
zosina said:
Updated to LoS 20 with their recovery just now and i get the tune2fs is missing error no matter what i do.. Seems to flash alright but it feels fishy.
Click to expand...
Click to collapse
Had this also when I did factory reset/ wipe via LineageOS 20 recovery (Pixel 6a).
Still works. I hope it stays like this.
Still feels fishy that there was an error. However, I have read that it is more of a harmless hint which can be ignored and not a bug.
ephemunch said:
Had this also when I did factory reset/ wipe via LineageOS 20 recovery (Pixel 6a).
Still works. I hope it stays like this.
Still feels fishy that there was an error. However, I have read that it is more of a harmless hint which can be ignored and not a bug.
Click to expand...
Click to collapse
Thanks for the reply, @ephemunch. It's oddly reassuring to know it's happening to everyone.
having the same issue after trying to install stock feb os
Code:
ERROR: recovery: [libfs_mgr]Unable to enable ext4 verity on /dev/block/platform/14700000.ufs/by-name/metadata because /system/bin/tune2fs is missing
ERROR: recovery: Open failed: /metadata/ota/snapshots/system_b: No such file or directory
ERROR: recovery: Open failed: /metadata/ota/snapshots/product_b: No such file or directory
ERROR: recovery: Open failed: /metadata/ota/snapshots/vendor_b: No such file or directory
ERROR: recovery: Open failed: /metadata/ota/snapshots/vendor_dlkm_b: No such file or directory
ERROR: recovery: Unable to unmap all parittions; fastboot may fail to flash.
ERROR: cutils-trace: Error opening trace file: No such file or directory (2)

Categories

Resources