2

I have a Redmi Note 7 (lavender)

As I was updating between custom ROM versions (Android 11) and the stock ROM (MIUI), I messed up a few things and ended up with broken encryption. The internal storage is showing up as 0MB, possibly due to this. I know the password, and when I enter it into TWRP's password scren, it shows it as being successful, but I'm getting the error: Unable to mount storage

Any ideas on how to fix this?

  • Your device was shipped with Android 9 which means that it is by default encrypted using the hardware security module. This module contains the key required for decrypting the data, therefore off-device encryption is impossible, sorry. – Robert Mar 17 '21 at 10:28
  • https://android.stackexchange.com/q/230892 most likely hopeless your only chance is TWRP – alecxs Mar 17 '21 at 11:09
  • @Robert So how do I decrypt it within the device, then? – JacksonPeterson Mar 17 '21 at 12:47
  • I don't know how to do this manually. Have you tried to install and use a recovery ROM with decryption feature (mostly TWRP should be able to decrypt the user data partition)? – Robert Mar 17 '21 at 12:53
  • @Robert TWRP can decrypt it but the main problem is the password. The 3x3 pattern lock I had can be converted numerically, but there are conflicting sources on how Android arranges those numbers. If it's 123456789 you can easily draw the pattern, but if it's not then I have to figure it out. Is there a tool out there that would brute-force this? I assume with only 9 digits, even if you include 0, it's not that difficult? – JacksonPeterson Mar 17 '21 at 13:11
  • https://twrp.me/faq/openrecoveryscript.html – alecxs Mar 17 '21 at 14:57
  • @alecxs I saw it, but it's kinda greek to me. Not the best with this stuff, since it's probably a mounting issue – JacksonPeterson Mar 17 '21 at 22:17
  • don't be lazy and read, nobody else will solve your issue. if you think its mounting issue you would see Data successfully decrypted, new block device: '/dev/block/dm-0' in recovery.log (and solution to mount read-only as descripted in links). but its more likely you are facing version binding (like JackSlater) – alecxs Mar 17 '21 at 22:33
  • @alecxs I'm not being lazy. The particular question you linked has a different issue than the one I'm facing, as it seems he can't enter his password/pin to begin with. Also, it appears he's brute-forcing it anyway. In my case, I already know the password now, so it wouldn't be of help. – JacksonPeterson Mar 18 '21 at 02:42
  • @alecxs I found the crypto footer but I'm confused which flags I need to look for – JacksonPeterson Mar 21 '21 at 21:32
  • 1
    @alecxs Here's my thread, maybe you can help: https://forum.xda-developers.com/t/how-to-recover-data-from-image.4247673/ – JacksonPeterson Mar 23 '21 at 23:16
  • @alecxs There must have been a misunderstanding, sorry. I've updated it with the footer. – JacksonPeterson Mar 24 '21 at 02:16
  • @alecxs Thanks. I've uploaded the crypto footer file on XDA in the OP. – JacksonPeterson Mar 24 '21 at 14:41

2 Answers2

1

Depends on the type of encryption, if it's only 9 bits, it wouldn't take long to crack the encryption with the right tools, but to be honest, unless it's some REALLY valuable data, just format it. If you messed up the encryption though, it could have some bad sectors I wouldn't trust it for any data handling tasks.

-1

Remember: You don't need to decrypt it using TWRP, just format it on a PC with an SD card reader, format it while being booted into android, and there ya go, you have a new SD card ready to go.