Newb help - unable to mount storage? - Xiaomi Mi CC9 / Mi 9 Lite Questions & Answers

Hi all,
I'm having trouble flashing a custom ROM on my Mi 9 Lite. After formatting, TWRP is unable to mount storage, probably due to encryption/decryption issues! Here's what I've done so far:
- unlock boot loader (with Mi Unlock after wait time)
- flash TWRP recovery with fastboot (mauronofrio)
- boot to TWRP worked fine
- followed the OP by gringo80 to install LineageOS 16.0 - as was said there, to do FORMAT once after flashing TWRP
Now TWRP can't mount/find internal storage, says "failed to mount data (no such device)" - can't format or wipe data anymore. All I found so far is that this will be an encryption/decryption issue due to the formatting, but no clue on how to undo this!
Any ideas? Flashing new system or restoring backup always results in bootloop, probably because the ROM can't write on internal storage either?!
Please help :crying:

.M.D. said:
Hi all,
I'm having trouble flashing a custom ROM on my Mi 9 Lite. After formatting, TWRP is unable to mount storage, probably due to encryption/decryption issues! Here's what I've done so far:
- unlock boot loader (with Mi Unlock after wait time)
- flash TWRP recovery with fastboot (mauronofrio)
- boot to TWRP worked fine
- followed the OP by gringo80 to install LineageOS 16.0 - as was said there, to do FORMAT once after flashing TWRP
Now TWRP can't mount/find internal storage, says "failed to mount data (no such device)" - can't format or wipe data anymore. All I found so far is that this will be an encryption/decryption issue due to the formatting, but no clue on how to undo this!
Any ideas? Flashing new system or restoring backup always results in bootloop, probably because the ROM can't write on internal storage either?!
Please help :crying:
Click to expand...
Click to collapse
The current twrp has issues with data try to change filesystem to f2fs and after that change back to ext4 (it forces a full data partition wipe). i've done this always on my mi9 lite AND watch out for the right firmware for lineage os that causes issues too

Layer_DE said:
The current twrp has issues with data try to change filesystem to f2fs and after that change back to ext4 (it forces a full data partition wipe). i've done this always on my mi9 lite AND watch out for the right firmware for lineage os that causes issues too
Click to expand...
Click to collapse
Changing file system to ext4 and back to f2fs did the trick - thank you so much!
Was able to install LOS 17.1 going forward. Thanks again! :good::fingers-crossed:

Need help again :crying:
I flashed the original firmware as instructed, but now all I get is fastboot - NO RECOVERY!
If I flash a recovery with fastboot, all I can to is boot to fastboot again... what can I do now? :crying::crying::crying:

.M.D. said:
Need help again :crying:
I flashed the original firmware as instructed, but now all I get is fastboot - NO RECOVERY!
If I flash a recovery with fastboot, all I can to is boot to fastboot again... what can I do now? :crying::crying::crying:
Click to expand...
Click to collapse
You may have bricked your phone. Did you tick the 'clean all and lock' option in miflash rather than 'clean all'? If so your phone is bricked and needs EDL flashing by an authorized technician to fix it.

Lucky enough, not bricked - I flashed a firmware update in the middle of all of it, one which, of course, replaced almost everything I had done so far. Forgot to flash custom vbmeta when trying to re-flash TWRP, doing so solved the issues I've had. Close call though, as the firmware update could have re-locked bootloader in a worst case scneario, so really lucky to be using my phone with MiuiMiX now, all working perfectly!
Thanks for the help though!!!

Related

[OP3T] From stock to Nougat then flash TWRP & root

Hi all,
What happens if you take a stock 3T, upgrade it all the way to Nougat the normal way, then proceed to unlock the bootloader, flash TWRP and supersu?
Does the TWRP 3.0.3.0 build have an issue with decrypting and mouting the sdcard? Is that even a problem in the sense of waiting until a fixed version of TWRP is released? The point is to just flash supersu for the moment. No other need to access that partition from recovery, is there? Or does it directly impact my ability to upgrade TWRP in the future?
And another question: would decrypting the phone after the stock to Nougat update, and only then flashing TWRP&root be of any use? Is this even possible at the moment? I can hold on without encryption until there's a proper version of TWRP, kernel sources are released etc.
I don't seem to find any info on these scenarios. Has anyone tried any of this?
Thank you!
Good questions.
Does the TWRP 3.0.3.0 build have an issue with decrypting and mouting the sdcard?
Click to expand...
Click to collapse
I can confirm 3.0.3.0 has problems with decrypting and mounting sdcard. A new version of TWRP should fix this.
No other need to access that partition from recovery, is there?
Click to expand...
Click to collapse
Well, the need to access partition from recovery depends. You won't be able to flash anything from TWRP. I could sideload different recoveries without decrypting but had to decrypt (with the format userdata command from cmd prompt) to revert to 3.5.4 from TWRP. In the end I mostly downgraded due to bluetooth issues.
I am having the same decryption issue... TWRP shows 0MB as the storage
What should be done now..?
you can get past encryption by formating data in twrp, though that deletes all your data, back ups and everything, but with that you have the phone completely rooted and then you can download or transfer data via mtp to storage, flash super su and verity.
Amar97 said:
you can get past encryption by formating data in twrp, though that deletes all your data, back ups and everything, but with that you have the phone completely rooted and then you can download or transfer data via mtp to storage, flash super su and verity.
Click to expand...
Click to collapse
Did that already but did not work.. Even tried the setting up of pattern method.. that too did not work...
Also force decrypted with Toolkit but still the same
just to make sure. flash twrp via fastboot( I flashed the 3.0.2.0 version) then when booting to twrp you get get the screen where it asks you for a password, skip that , just swipe to continue then go to wipe, then format data, type "yes" to confirm, the at the next booting it shouldn't​ ask you for the password anymore. That did it for me. Maybe you should try adb sideload to flash verity.img and supersu
Amar97 said:
just to make sure. flash twrp via fastboot( I flashed the 3.0.2.0 version) then when booting to twrp you get get the screen where it asks you for a password, skip that , just swipe to continue then go to wipe, then format data, type "yes" to confirm, the at the next booting it shouldn't​ ask you for the password anymore. That did it for me. Maybe you should try adb sideload to flash verity.img and supersu
Click to expand...
Click to collapse
why not use 3.0.3.0?
Solnir said:
why not use 3.0.3.0?
Click to expand...
Click to collapse
Don't really know, probably tried solving the problem by trying with the older version and then didn't feel like upgrading to the newer 3.0 after fixing the problem.

p9 twrp 3.0.2-0 /data failed to mount

so firstly, let me make this clear, i had Android 6 stock rom working initially, i installed TWRP and rooted the phone with SU
All was working fine until i decided to try and wip the phone to test either a lineage os build or the new EMUI 5
However after performing factory reset, the /data partition is now broken.
I know i'm not the only one that has encountered this issue, but i would at least like a straight forward answer in order to resolve the problem.
Stock recovery now doesn't seem to be an option as when i send it to the phone, i reboot and TWRP still exists.
i have tried via fastboot and from within TWRP, i still get the /data partition error if trying in TWRP to flash recovery.
surely there is a proper solution for this, as this is a software issue not a hardware issue.
i would appreciate your assistance and can provide whatever required information necessary.
i did not pay $500 for this phone for it to be a useless brick
I noticed something here about modaco-rc3 recovery, which i am downloading to try, if it flashes properly, as i suspect this /data partition issue is preventing much of anything from being modified now.
i look forward to your responses and will reply to this with an update after trying to flash modaco recovery if successful
The data partition of the EMUI roms are different than what for example lineageos needs (I think because of encryption).
You need to flash the stock recovery via fastboot, then wipe and format data from there, then TWRP should be able to mount the partition again. In TWRP you can format the partition again to the format according to what is necessary for the rom you want to install.
christopherpfister said:
You need to flash the stock recovery via fastboot, then wipe and format data from there, then TWRP should be able to mount the partition again. In TWRP you can format the partition again to the format according to what is necessary for the rom you want to install.
Click to expand...
Click to collapse
I am just downloading 4.1 stock rom i found finally on Huawei website after much buggering around last night, clearly it was a long day.
Will get this flashed with the stock recovery that I was able to put back on thanks to SRKTool
Will update again shortly, thank you for the reply.
failed to mount system for rom install
now this is just getting silly...
so i was able to restore stock rom with the dload folder procedure and EMUI recovery restored with SRKTool
successfully then unlocked bootloader, put on twrp-3.0.2-0-eva-modaco-rc3, did the data wipes and tried to install lineage os zip.
(the original problem of going back to stock rom is solved, but this is still ongoing as to now why a custom rom will not load)
now i get the infamous ERROR: 7
after
could not detect filesystem for /dev/block/bootdevice/by-name/system, assuming ext4
mount: failed to mount /dev/block/bootdevice/by-name/system at system: no such file or directory
....this is all seeming far too difficult to install any custom rom on this unit, what is happening?
same issue
I'm having a similar issue, any updates?

Bootloader problem!

Hello all!
I am having an issue with my Leeco Le2 x52x where it relocks bootloader automaticly and does not alow me to flash any other rom properly.
I have used fastboot oem unlock-go which allows me to flash twrp but not much else. Can not even format boot partition.
Anyone has any peace of info is greatly apriciated
Edit> I get an error in TWRP - E:Unable to wipe '/boot' -- uknown file system 'emmc
Unable to wipe /boot.
scudteshka said:
Hello all!
I am having an issue with my Leeco Le2 x52x where it relocks bootloader automaticly and does not alow me to flash any other rom properly.
I have used fastboot oem unlock-go which allows me to flash twrp but not much else. Can not even format boot partition.
Anyone has any peace of info is greatly apriciated
Edit> I get an error in TWRP - E:Unable to wipe '/boot' -- uknown file system 'emmc
Unable to wipe /boot.
Click to expand...
Click to collapse
Boot partition in le2 cannot be wiped. As for your bootloader relocking problem, flash twrp and then allow it to perform system modifications. Then wipe data. Then wipe system. If that doesn't work, then format data to ext2 using mkef2s and then for mat data again using ext4. Then format data ,system , cache and dalvik cache only. Your bootloader will not relock by itself again. If it still does, then flash lazyflasher to disable dm-verity and unencrypt phone
RandomDelta said:
Boot partition in le2 cannot be wiped. As for your bootloader relocking problem, flash twrp and then allow it to perform system modifications. Then wipe data. Then wipe system. If that doesn't work, then format data to ext2 using mkef2s and then for mat data again using ext4. Then format data ,system , cache and dalvik cache only. Your bootloader will not relock by itself again. If it still does, then flash lazyflasher to disable dm-verity and unencrypt phone
Click to expand...
Click to collapse
Tried it and no budge. Now i am at different problem cause i wanted to return it to stock with "flash all" fastboot rom. Not this thing does random reboots. Not sure if i should open another tread about it. All in all its still usefull phone and i would like to fix it eather way
scudteshka said:
Tried it and no budge. Now i am at different problem cause i wanted to return it to stock with "flash all" fastboot rom. Not this thing does random reboots. Not sure if i should open another tread about it. All in all its still usefull phone and i would like to fix it eather way
Click to expand...
Click to collapse
Are you able to boot to recovery(twrp)?
If yes, try flashing the latest twrp image using twrp on your phone. Then repeat steps mentioned. Finally, flash stock ROM Zip
Ive bricked the bastard but will continue
Is the red LED flashing or stuck when you let it charge?

Cannot boot into recovery (TWRP)

As the title suggest, I fail to boot into TWRP.
I have unlocked the phone and flashed TWRP (https://dl.twrp.me/raphael/twrp-3.3.1-0-raphael.img).
I could boot into TWRP using Power + Volume Up , wiped everything (except vendor) and pushed a custom rom to the internal storage.
I restarted the phone for some reason and cannot boot into TWRP anymore. Whatever I do, I end up in fastboot. Tried to flash various versions of TWRP with the same result.
Can you guys help me out?
Edit: I flashed the corresponding Xiaomi fastboot image and repeated the process, same problem.
Edit: Solved by repeating again.
flel said:
As the title suggest, I fail to boot into TWRP.
I have unlocked the phone and flashed TWRP (https://dl.twrp.me/raphael/twrp-3.3.1-0-raphael.img).
I could boot into TWRP using Power + Volume Up , wiped everything (except vendor) and pushed a custom rom to the internal storage.
I restarted the phone for some reason and cannot boot into TWRP anymore. Whatever I do, I end up in fastboot. Tried to flash various versions of TWRP with the same result.
Can you guys help me out?
Edit: I flashed the corresponding Xiaomi fastboot image and repeated the process, same problem.
Edit: Solved by repeating again.
Click to expand...
Click to collapse
In future, don't wipe everything. You should only need to do the factory reset in TWRP, which will automatically wipe data, cache and dakvik. If you are flashing over MIUI then you will also need to format data.
There is almost never any need to wipe anything else in TWRP when doing normal custom ROM flashing.

Question How do i get Stock recovery to not replace TWRP when rebooting???

Tried a bunch of things to make the TWRP installation persistent, but it just goes back to MIUI recovery when i reboot from the system.
I'm using TWRP 3.5.2 by Nebrassy.
USB debugging turned on
Correct drivers installed
fastboot devices work Using minimal ADB and fastboot
I have the file renamed as TWRP.img.
Steps i followed:
fastboot boot "TWRP.img" - Correctly boots into TWRP
install the TWRP image to the recovery partition - Happens with no errors
Reboot to system - No errors there as well
Reboot to recovery - Goes back to MIUI recovery.
Can someone please tell me what i should do?
PS: Tried with TWRP 3.6.0 as well just now. Same issue.
Helhound0 said:
Tried a bunch of things to make the TWRP installation persistent, but it just goes back to MIUI recovery when i reboot from the system.
I'm using TWRP 3.5.2 by Nebrassy.
USB debugging turned on
Correct drivers installed
fastboot devices work Using minimal ADB and fastboot
I have the file renamed as TWRP.img.
Steps i followed:
fastboot boot "TWRP.img" - Correctly boots into TWRP
install the TWRP image to the recovery partition - Happens with no errors
Reboot to system - No errors there as well
Reboot to recovery - Goes back to MIUI recovery.
Can someone please tell me what i should do?
PS: Tried with TWRP 3.6.0 as well just now. Same issue.
Click to expand...
Click to collapse
Try again to flash TWRP dirty and if it's started don't boot with software. You have to boot TWRP again by pressing volume + and power button until you'll get vibration , afterwards you'll be in TWRP again, clear dalvik and cache and restart system via TWRP menu
Laptapper said:
Try again to flash TWRP dirty and if it's started don't boot with software. You have to boot TWRP again by pressing volume + and power button until you'll get vibration , afterwards you'll be in TWRP again, clear dalvik and cache and restart system via TWRP menu
Click to expand...
Click to collapse
Sorry mate that didn't work. Still going back to stock recovery...
Since i didn't find a solution to make the installation presistant, i went ahead and flashed Elixir with the temporarily booted TWRP. Then wiped cache and dalvik, flashed the TWRP image, formatted data and then rebooted. Now it works.
Edit: This method did something to my recovery. I can boot to system and recovery fine but TWRP isn't able to mount the data partition. So i'm not able to flash anything or root the device anymore.
I tried formatting data, no luck.
Then tried repairing the data partition. No luck.
Changed the file system to EX2 and then EX4... Nothing.
Anyone know a solution for this?
Helhound0 said:
Sorry mate that didn't work. Still going back to stock recovery...
Click to expand...
Click to collapse
Then you've got to do a flash with stock ROM and miflash via pc
Laptapper said:
Then you've got to do a flash with stock ROM and miflash via pc
Click to expand...
Click to collapse
Would that re-lock the bootloader? And if so do i have to wait 7 more days for it to be unlocked?
I used the Disable-Dm-Verity-Zip directly in TWRP after installation. Worked without a problem.
romuser87 said:
I used the Disable-Dm-Verity-Zip directly in TWRP after installation. Worked without a problem.
Click to expand...
Click to collapse
I read that somewhere too but that didn't help me at all... Maybe i have a bad zip file..
Can you share the zip you flashed?
Also, any idea how i could get this fixed:
Helhound0 said:
Since i didn't find a solution to make the installation presistant, i went ahead and flashed Elixir with the temporarily booted TWRP. Then wiped cache and dalvik, flashed the TWRP image, formatted data and then rebooted. Now it works.
Edit: This method did something to my recovery. I can boot to system and recovery fine but TWRP isn't able to mount the data partition. So i'm not able to flash anything or root the device anymore.
I tried formatting data, no luck.
Then tried repairing the data partition. No luck.
Changed the file system to EX2 and then EX4... Nothing.
Anyone know a solution for this?
Click to expand...
Click to collapse
Helhound0 said:
I read that somewhere too but that didn't help me at all... Maybe i have a bad zip file..
Can you share the zip you flashed?
Also, any idea how i could get this fixed:
Click to expand...
Click to collapse
The attached file worked for me
Helhound0 said:
Would that re-lock the bootloader? And if so do i have to wait 7 more days for it to be unlocked?
Click to expand...
Click to collapse
1. With MiFlash there is an option at the bottom of the screen to lock bootloader. Just make sure it is NOT checked, and you will be safe to use MiFlash without relocking bootloader.
2. When installing TWRP for first time, it is essential that your first reboot is straight back to TWRP - then it becomes persistent, and future reboots to recovery will be to TWRP. If you do not do the first reboot back to TWRP, the stock MIUI ROM recovery reinstalls itself.
HiQual said:
1. With MiFlash there is an option at the bottom of the screen to lock bootloader. Just make sure it is NOT checked, and you will be safe to use MiFlash without relocking bootloader.
2. When installing TWRP for first time, it is essential that your first reboot is straight back to TWRP - then it becomes persistent, and future reboots to recovery will be to TWRP. If you do not do the first reboot back to TWRP, the stock MIUI ROM recovery reinstalls itself.
Click to expand...
Click to collapse
The first ever twrp install i did, i rebooted to system by mistake but i reflashed twrp and made sure to reboot to recovery.... That was the second try. I think i may have tried at least two dozen times since that but it just kept booting back to stock recovery...
I think I'll run with this until the end of Jan and then redo everything from scratch...
Helhound0 said:
Since i didn't find a solution to make the installation presistant, i went ahead and flashed Elixir with the temporarily booted TWRP. Then wiped cache and dalvik, flashed the TWRP image, formatted data and then rebooted. Now it works.
Edit: This method did something to my recovery. I can boot to system and recovery fine but TWRP isn't able to mount the data partition. So i'm not able to flash anything or root the device anymore.
I tried formatting data, no luck.
Then tried repairing the data partition. No luck.
Changed the file system to EX2 and then EX4... Nothing.
Anyone know a solution for this?
Click to expand...
Click to collapse
I'm stuck at this stage. Have you found any solution yet?

Categories

Resources