Bricked-Stuck on TWRP /data unable to mount or format - Redmi K20 / Xiaomi Mi 9T Questions & Answers

So, today I was going to flash miui 11 andoid 10 and made a backup of all my files to the pc. weird enough some files size was too big (a zip of a rom was like 12 gb) something was wrong there. anyway, after backup, I updated the twrp to the latest chines and after flashing the twrp I wasn't able to enter twrp, it got stuck on the spalsh screen.
So, I flashed the fastboot stable version for eea mi 9t, as usual, to restore to stock. but again it doesn't boot and it still gets stuck on twrp splash screen but after a while, twrp boots and I see that it's unable to mount data and cache.
I try to format the whole data partitions but it only gets stuck there forever.
you can see it in the screenshot attached.
The file system on data appears as f2fs. I tried converting to ext4 and still no luck, it get stuck there forever.
How long should it take to format a corrupted data partition like this?
Any help, please?
Edit: also tried using the command line to format /data myself and it gets stuck here:
Code:
mke2fs -t ext4 /dev/block/sda32
mke2fs 1.43.3 (04-Sep-2016)
Discarding device blocks: done
Creating filesystem with 13518331 4k blocks and 3383296 inodes
Filesystem UUID: 0ea82001-1ff3-47d3-bf7c-19308852ceb3
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424
Allocating group tables: done
Writing inode tables: done
Creating journal (65536 blocks): done
Writing superblocks and filesystem accounting information:

It looks like :
https://twrp.me/site/update/2019/10/23/twrp-and-android-10.html
and
https://forum.xda-developers.com/android/general/how-to-fix-unable-to-mount-data-t3830897

I don´t know what exactly was the problem, I was trying custom ROMs and they worked fine but then I went back to stock and found my persist broken. So flashed a persist.img from the fastboot images, that broke widevine L1 and messed up the sensor, I had to recalibrate the camera etc. But after a while, the stock rom started acting weird, not receiving email, not syncing contacts, lag and stuttering etc, so I decided to flash the fastboot rom again with the wipe everything .bat. It flashed everything fine but didnt boot anymore and wasn't able to enter stock recovery anymore. Was only able to access fastboot and twrp. Tried locking the bootloader and wiping everything again and it got stuck on 99.99% when it's wiping on stock. I left it all night and in the morning I found it on the boot animation but it stayed there for hours and hours and it never booted.
On twrp I was able to mount system and all the partitions except data and cache. I tried repairing them and formating but it was always failing. I even used parted through adb shell, deleted partitions and created new ones but with the same unsuccessful results.
So, in the end, I sent the phone to the repair service under warranty and they fixed it by replacing the mainboard. So I guess the problem bricked the whole memory and who knows what else.
So be careful guys, flashing custom ROMs and other region stock ROMs isn't safe with this phone. We have people with broken persist partition, broken internal storage, sensors, bricked phones...
Personally speaking, I won't flash any custom ROMs or stock ROMs not meant for my device anymore. Xiaomi has introduced to many measures that are causing problems with flashing, similar to Huawei.

bihariel said:
I don´t know what exactly was the problem, I was trying custom ROMs and they worked fine but then I went back to stock and found my persist broken. So flashed a persist.img from the fastboot images, that broke widevine L1 and messed up the sensor, I had to recalibrate the camera etc. But after a while, the stock rom started acting weird, not receiving email, not syncing contacts, lag and stuttering etc, so I decided to flash the fastboot rom again with the wipe everything .bat. It flashed everything fine but didnt boot anymore and wasn't able to enter stock recovery anymore. Was only able to access fastboot and twrp. Tried locking the bootloader and wiping everything again and it got stuck on 99.99% when it's wiping on stock. I left it all night and in the morning I found it on the boot animation but it stayed there for hours and hours and it never booted.
On twrp I was able to mount system and all the partitions except data and cache. I tried repairing them and formating but it was always failing. I even used parted through adb shell, deleted partitions and created new ones but with the same unsuccessful results.
So, in the end, I sent the phone to the repair service under warranty and they fixed it by replacing the mainboard. So I guess the problem bricked the whole memory and who knows what else.
So be careful guys, flashing custom ROMs and other region stock ROMs isn't safe with this phone. We have people with broken persist partition, broken internal storage, sensors, bricked phones...
Personally speaking, I won't flash any custom ROMs or stock ROMs not meant for my device anymore. Xiaomi has introduced to many measures that are causing problems with flashing, similar to Huawei.
Click to expand...
Click to collapse
Yeah, same thing happened to me buy flashing a EU beta ROM in September but I was lucky and got my phone replaced by Amazon, since It was still in return period since then I have stayed away from miui custom ROMs and betas only Aosp. But I always return to miui. And always with a back up of my entire partition.

Related

Partition damage? Not sure whats wrong...

Hey all,
I have an S4 i337m model. I've installed a custom ROM that is essentially a rooted stock ROM (I do not remember the exact build/version of the ROM). I realize having this info would be useful, but at the moment, I cannot access this info.
While running this ROM, everything was fine. Last week Friday, I attempted to install FoxHound 1.6. Had to play around with the installation options, but I got FoxHound to work. However, I need to get back on my old ROM as I needed some files that were deleted during the FoxHound install. So I wiped my phone, and restored my nandroid backup of my rooted stock ROM. again, everything was fine. No issues.
Here is where the problem is; after restoring my rooted stock ROM, I could boot into the phone and access the files needed. However, when I reboot/shut down phone, upon restarting/powering up, my phone is stuck at the 'Samsung Galaxy S4' logo right after power on. So, I boot into recovery (the latest version of TWRP) and I navigate to 'file manager' to take a look at my storage/files. And this is where I believe the issue to be; I see virtually no files at all. I can see many folders/partitions, but there are virtually no files anywhere (i.e. the system and data partitions are empty). I am assuming this is the reason why my phone doesn't boot past the Samsung Galaxy S4 logo. Now, when this happens, I wipe my phone again and restore my working nandroid backup. Everything works fine. I can get back into Android without issues. Until I reboot/power off my phone. Then this happens all over again.
I believe I may have damaged(?) the partition(s). When I installed FoxHound, I also installed an option during installation titled 'EXT4'. I know linux uses ext2/3/4 partition tables. Did I damage my storage/partition by installing EXT4 from FoxHound? Do I need to repartition my phone via Odin PIT file or something similar? Am I totally wrong with my analysis? Any help/advise/insight would be very welcomed.
Thanks
Additional info
Baseband: I337MVLUAMG1
Build number: JDQ39.I337MVLUAMG1
ROM: Rooted stock ROM 4.2.2 (with some bloatware removed)
While my phone was in the it's 'logo stuck' state, I entered into TWRP and selected the Wipe option, then Format Data. I must select 'Format Data' in order for my phone to work on it's next boot. Manually formatting System, Data, etc... will not allow my phone to boot up at next boot. And, my phone will only work on the next boot. If I power off/restart phone, it will get stuck at the logo again. So my phone is only good for 1 boot up after a wipe.
And, after I restore a working backup and boot into the phone, everything works until next power down/reboot. Once I power down/reboot phone, I must go into recovery since it will not boot into Android. When I get into TWRP, I see that my Internal Storage has 0MB free and I am unable to see any files. I can see folders/partitions, but there is nothing in any folder/partition. My external SD card shows nothing as well. My external SD card however is unaffected as all the data is still there once I get into Android and look around.
Also, I just restored a backup I had before I was having this issue. After restoring and rebooting, the same thing happens. I get stuck at the 'Samsung Galaxy S4' logo.
So I'm guessing there is some partition troubles here. Maybe I'm wrong, but I'm scratching my head as to the cause of this problem.
It could be some hardware issues too. I'd Odin back to stock and see if the problem persists. If it does its hardware.
jd1639 said:
It could be some hardware issues too. I'd Odin back to stock and see if the problem persists. If it does its hardware.
Click to expand...
Click to collapse
I thought the same thing. I'm downloading the stock ROM now and will give it a try.
One other thing I noticed during my last restore/fix attempt... After I perform a wipe -> Format Data (from TWRP), I notice that it reverts to my rooted stock ROM without me restoring anything. So, after I do a full wipe/format, and reboot my phone immediately after the full wipe/format, my phone will boot into the rooted stock ROM. I thought that wiping/formatting via TWRP totally cleans the internal storage of all data. So how can I be booting into any ROM after a wipe?
Unless I'm mistaken in my thinking and the full wipe/format option in TWRP just reverts back to the stock ROM I had installed prior to installing further custom ROMs?
If you wipe system and data there shouldn't be any rom it would boot. Don't try that though unless you have a nandroid because it shouldn't boot
What version of twrp ate you using?
Do not format data in twrp.
jd1639 said:
If you wipe system and data there shouldn't be any rom it would boot. Don't try that though unless you have a nandroid because it shouldn't boot
What version of twrp ate you using?
Click to expand...
Click to collapse
I hear ya... I have several nandroid backups. All work (minus this 'stuck at logo' issue I am having). I am using the newest TWRP version 2.6. It's very strange... after I perform a full wipe, I am able to boot into my rooted stock ROM that I flashed shortly after acquiring the phone. This was a bit over a month ago now. I do not know how this is possible.
xBeerdroiDx said:
Do not format data in twrp.
Click to expand...
Click to collapse
Why not?
_____________________________________________________________________
**Should I try using CWM instead?
Talabis said:
I hear ya... I have several nandroid backups. All work (minus this 'stuck at logo' issue I am having). I am using the newest TWRP version 2.6. It's very strange... after I perform a full wipe, I am able to boot into my rooted stock ROM that I flashed shortly after acquiring the phone. This was a bit over a month ago now. I do not know how this is possible.
Why not?
_____________________________________________________________________
**Should I try using CWM instead?
Click to expand...
Click to collapse
Use twrp 2.5.0.2 or cwm. The newer twrp has issues.
jd1639 said:
Use twrp 2.5.0.2 or cwm. The newer twrp has issues.
Click to expand...
Click to collapse
Is TWRP 2.5.0.0 ok to use?
Ok... It's really starting to look like my partition table has been damaged. Every time I flash a new ROM or restore a nandroid backup successfully, and then restart my phone, I get stuck at the S4 logo. Upon starting recovery, my internal storage reads 0MB free. It seems like my partition table is becoming corrupt after a reboot, or it has already been corrupted.
I tried flashing the stock ROM for my phone (I337MVLUAMDJ_I337MOYAAMDJ_I337MVLUAMDJ_HOME.tar is the one I used), but that didn't help at all. After installing this stock ROM, and I go into stock recovery, I get an error: E:failed to mount /data (invalid argument).
This really is looking like a partition problem. Is there some way to re-partition my phone? I remember a PIT file was used to partition my old Galaxy S i9000. Is there a PIT file for the S4 i337m?
I would also like to try CWM but I am having a hard time finding a ODIN flashable version.
I wouldn't mess with a pit file and I haven't seen one anyway. It's sounding more and more like your memory is bad. I'd keep it stock and see if you can get an exchange on the phone under warranty.
Further investigation has lead me to the culprit... sorta. It's my /data partition that is screwing everything up. If I format /data and then reboot, I can get into my phone. But if I reboot again, then my /data partition becomes corrupt and my phone hangs at the S4 logo. And then if I go into recovery, I can see that my internal storage is at 0MB free.
However, after formatting/restoring /data partition and rebooting into android successfully, everything works fine. If I reboot from this point and enter recovery, I am still able to see my /data partition and files. At this point, everything seems to be fine. Once I reboot out of recovery and let the phone boot into Android, I get stuck at the S4 logo and my /data partition screws up/becomes corrupt. It looks like my /data partition is only becoming corrupt after the 1st successful boot into Android. If I enter recovery after the 1st successful android load, I am still able to see all files and partitions. It is only trying to load android after the 1st boot that my /data partition becomes corrupt. Very strange...
So, I can always boot into my phone as long as I format my /data partition prior to loading Android. Anyone experience this before? Any ideas? I realize my memory may be damaged, but I'm leaving that as a last resort possibility since my phone was working fine up until I started installing FoxHound with the EXT4 option as well as installing 1 or 2 of the kernel's FoxHound provides. Namely Adam kernel is the one I tried.
All good... I think/hope
Well, I think I got the problem solved. After toying with this thing all day. It seems like TWRP 2.6 was the problem in some sense. Looks like TWRP 2.6 does not format the /data partition correctly. I had to get restore/install a working ROM, boot into my phone and install ClockworkMod Recovery via ROM Manager. I then used CWM to format /data. Once I did this, and loaded back into my phone, and went through the setup process since /data was formatted, everything was working fine. I just rebooted 5 times and shut down twice and my phone booted back up into android without issue.
So as one user in this thread had mentioned, formatting /data with TWRP 2.6 was the problem.
Hope this helps others avoid a similar issue.
Thanks everyone for all the help. It pointed me in the right direction.
Glad you got it fixed.
I'll be giving these steps a try, having somewhat of the same problem!
i've been having this exact same problem but with TWRP 2.5.0.2 since July. Its been driving me insane and I have not been able to find any one else having this issue until now. I think i might finally try CWM instead as a last measure before I finally give up!
Try TWRP 2.6.3.1 version. It works pretty well even though it's unofficial http://forum.xda-developers.com/showthread.php?t=2262996
Sent from my SAMSUNG-SGH-I337 using XDA Premium 4 mobile app

A fix for Cache and Data partition mount issues

Hi,
I'm just going to go through my experience with this as the symptoms seem to be the same for a number of people but the fixes seem to be quite different.
Having just recently re-purchased a Nexus 10 replacement for a faulty unit sent to me a few months ago (still waiting for the company to give me a refund on that!) I decided to go ahead and root the device.
Yes according to the documentation this should be quite easy!, however several people have been experiencing issues after flashing the boot loader with CWRM.
I tried both CWRM and TWRP however, none of them managed to solve my issue which in turn was the infamous "boot loop".
Google'ing around a little I found a few links which were helpful:
http://forum.xda-developers.com/showthread.php?t=2588236
https://developers.google.com/android/nexus/images
http://www.androidegis.com/how-to/install-official-clockworkmod-recovery-for-nexus-10-guide/
http://www.droidforums.net/threads/stock-recovery-red-triangle.205716/
http://xda-university.com/as-a-user/how-to-recover-from-a-bootloop
http://forum.xda-developers.com/nexus-4/help/unable-to-mount-cache-twrp-t2393833
http://www.teamw.in/OpenRecoveryScript
http://forum.xda-developers.com/goo...iring-corrupted-data-partition-t2577447/page3
http://forum.xda-developers.com/showthread.php?t=2265817
So before anyone starts screaming Arrrrggghh! How to get through all those links, this was the issue with my device:
Basically it seems that somehow for whatever reason the /cache and /data partitions including the /data/sdcard mount was corrupted.
Using TWRP first of all I managed to find that the a fore mentioned partitions where showing up as having no capacity. This scared the heeby jeebies out of me as the tablet only arrived on the same day, and my first thought was "not again!". Could this be flash memory gone bad?
After a bit of digging and error messages showing up regarding to corrupted links with the /dev partition, it seemed obvious that I needed to somehow do a linux esque:
Code:
fdisk -l
fisk /<partition>
e2fsck -t <type> /<partition>
finally stumbling across Philz Recovery in one of the links I decided to test my theory. I recreated the /data and /cache partitions using the "Format" tool then mounted them. It worked pretty nicely.
The next stage was to get the OS installed and bootable.
Using the Google ROM recovery script I re-flashed the original 4.2.2 ROM and tested to see if I got boot. I was unlucky, as this went straight into another "boot loop".
Reflashing Philz Recovery I again rebuilt the /cache and /data... /data/sdcard partitions using the format tool and tested with mounting. All was good!
Now booting into the OS with fingers crossed, I managed to achieve boot again and all partitions where/are fine. I then went through the series of updates and finally rooted the device and now all is good.
I don't understand why the:
Code:
fastboot erase cache
fastboot erase data
commands messed things up during the ROM Reflash but at least the tablet is back to a stable and usable state.
It's a really odd but interesting issue....
So hopefully someone will find this useful next time they get into a boot loop and errors crop up about the /data and /cache partitions not being mountable......

[BRICK][TWRP][I9505]/system is 0mb in TWRP

Yesterday I tried to install Imperium LL ROM (latest). It kept giving me errors about being unable to mount /system while installing (with Aroma). In the rom's thread I saw that someone had similar issues and he fixed it by deleting /dev/block/platform/msm_sdcc.2. I tried renaming it, but it just kept coming back. I the deleted it, rebooted to recovery and tried to install it again. The installer got stuck on formating /system (for about 5 minutes). I rebooted and tried to restore a nandroid backup. It also got stuck on formating /system. In TRWP log I saw 'Failed to mount /system (invalid argument). I went to Wipe->Advanced-> selected system-> Repair or change File System. It shows : Present: Yes; Removable: No; Size: 0MB; Used: 0MB; Free: 0MB; Backup Size: 0MB.
I have full access to recovery and download mode. Is there anything I can do to fix it, or do I have to send it for repair to the shop I bough it in (I have an insurance that covers any damage, even if I caused it)?
I would suggest trying to flash a stock firmware with Odin. Maybe flash it together with a PIT file too.
I flashed Stock, latest Lollipop firmware (without flashing PIT). It seemed to work fine. It did the usual "Optimizing apps" thing, then it rebooted. Right now it seems to be bootlooping. I'm going to try and flash TWRP and see what I can do from there.
EDIT: I flashed recovery and did a factory reset. When rebooting it asked if I want to root and I chose to do so. After about 10 minutes it booted up into the welcome screen (the one where you choose language, wifi etc.). I need to flash the latest modem and bootloader, and then install a ROM.
Thanks @Pwnycorn for help.
If you flash the phone with the latest stock firmware, the phone will be running the latest modem and bootloader.

Stuck at LG logo after flashing any Kernel

So I'm having a weird issue. Whenever I flash any kernel other then stock it stays stuck at the LG logo. I have to pull battery and then restore the stock kernel backup. I have no idea why I'm having this issue. I've also noticed that TWRP sometimes says cannot mount system (probably not the culprit but just adding more info).
Model: T-Mobile (h918)
When I had the "cannot mount" issue, a system partition format was needed from within TWRP. I took a backup of system (not a system.img backup), then formatted system only, then restored the system. It's been fine ever since.
I'm not sure if any special pocedure is needed for the h918 in order not to brick anything. I'm on US996.
I hope that made sense. Please wait for a second opinion before trying anything.
pistacios said:
When I had the "cannot mount" issue, a system partition format was needed from within TWRP. I took a backup of system (not a system.img backup), then formatted system only, then restored the system. It's been fine ever since.
I'm not sure if any special pocedure is needed for the h918 in order not to brick anything. I'm on US996.
I hope that made sense. Please wait for a second opinion before trying anything.
Click to expand...
Click to collapse
Yea. Seems like I have to format system all the time. Also have to format my internal storage all the time. My backups never seem to restore correctly. I can't flash a new ROM because it wont boot with a different kernel. I might just flash KDZ and root all over again.

Treble ROMs and flashing, on a Oneplus 6 (Treble A/B), my constant fight

First I have a One Plus 6 (so Treble A/B) configuration, been using it since 5.1.5 (as I bought it the first day)
TWRP 2.3.3.0 currently being used.
Note as stated the partitions are decrypted, AKA no need to decrypt when entering TWRP.
1. The foremost issue I have is that flashing a new pair of system's system_a, system_b should not result in being unable to boot every time (now I have decrypted internal storage so that is not what is the cause of the failures), there is simply no chance of upgrading when encrypted which I can understand.
2. Re-flashing the previous working System_a and System_b should boot even if the newer flash failed (assuming you clear cache), it will not do so.
3. Restoring TWRP (system and data) should also work, to restore a working state (heck as nothing here has touched data, but restoring it anyways to be safe) we should be able to simply restore system (again it will not boot after restore). Simply put restoring system via TWRP seems nearly impossible.
4. I've never seen this device boot after installing TWRP to the system partition using custom ROM, (I got it to work once and only once with Oxygen), so the only way to safely boot twrp is via fastboot.
Basically on my OnePlus 6 the only way I can update from v1 to v2 say for a monthly security update is to wipe restore the phone to the default OS (Oxygen in this case), this destroys all Data, then flash my way back to the custom ROM. In my case normally this means re-flashing system_a and system_b, formatting data (again), flashing no encrypt, then magisk and finally restoring backups made in Titanium Backup (zip's), this takes me hours and is not something one can just do.
While at it all Treble instructions say flash system_a and system_b , but upgrading from v1 to v2 should only require updating the system currently in not use (say system_b if booting from system_a) and clearing data then switching to system_b as the boot from TWRP. If the boot fails on upgrade I should then simple be able to switch back to booting from system_a, clear cache and boot as if nothing changed, why is this nor supported or even commented on? Is this not the reasoning behind treble?
Basically I think Treble has much promise, but at least my experience with the Oneplus 6 is that is it is not safe for use, far too often I simply find I have no way to upgrade to even restore the phone on failure (a computer which is what a phone is) without a restore-able backup is untrustworthy, and not even being able to flash TWRP makes it worse (or would if TWRP backups actually worked).
This post is the result of 3 months of fighting with the phone and Treble and trying many different ways to ensure clean upgrades and backups all without any success. Simply put I'm tried and unable to come up with a valid method which works with this phone and Treble to allow for upgrades (for security fixes, something I've done for years prior to Treble without issue) or even backups I can safely restore using TWRP.
Thanks,
ERIC
I have the same issues. I also did another mistake and updated to pie beta 3. Now everytime I do something wrong, it goes directly to qualcomm crash dump mode and to be able to revert it back, I need to flash all partitions from fastboot once again to make it work... I don't like A/B partitions... It seems to cause more issues than what it offers.
twrp restore
I am having the same issues you described also when simply restoring from TWRP, even if I have been thinkering with my phones for a while.
Do you have any suggestion about restoring?
Thank you
Fabio

Categories

Resources