I think I lost all my data - Redmi K20 Pro / Xiaomi Mi 9T Pro Questions & Answe

Hi, I want to install custom rom but I think because of encryption I lost my all internal storage :/
Before mi 9t pro, I used an old android phone. Because of that I didn't know too much about encrption.
When I open OrangeFox it asks my password. So I thought remove my password before any rom installation should be enough.
I remove my password. After dirty rom flash my phone didn't boot to system but did boot to recovery.
Guess what? All my file names are random
Before anyone say, I have a backup. But where Yesss it is in internal storage with encryption :angel:
I tried to wipe data, didn't work. I flash my rom mi flash with keeping data, didn't work.
Now my phone boot up, I can see my files with random names.
Why I didn't backup to computer? Because I was lazy.
My big question;
Can I recover my files (~70 gb), I know my old password.

It's a good thing your data wasn't important then, if it was you would have a backup stored on a PC or cloud. First rule of flashing, have a backup. You can't recover it's gone, format data In twrp to remove encryption and wipe your internal storage then flash your rom.

hoopsnake said:
It's a good thing your data wasn't important then, if it was you would have a backup stored on a PC or cloud. First rule of flashing, have a backup. You can't recover it's gone, format data In twrp to remove encryption and wipe your internal storage then flash your rom.
Click to expand...
Click to collapse
Yes, it isn't too much important but I'm a little sad. I just lost few whatsapp message.
I will delete everything now. After that, I will disable this encryption.
Thanks
P.S: Whoever read this don't be lazy like me

Related

[Q] Browsing a TWRP backup?

So, somehow I got my phone into a bootloop, and I made a backup of my data partition with TWRP. I reset it, and tried to restore the data partition, and the corrupted file is in there (was trying to edit settings.db for hotspot on Sprint). Anyways, when I restore the data partition, it bootloops again. So I want to get into the backup, and replace the bad settings.db file so I can restore the partition and have all my data back. How can I browse the backup using my windows 8.1 pc?
i dot imgur dot com/evfiO6Z.png
you cant. why are you restoring your data partition? that wont boot up, since its system that you edited. restore the whole nandroid backup, boot, system, and data. and if you didnt make a backup of boot or system, then reflash your rom to fix it. flash it dirty, as to not lose your data. and if you dont have a rom to flash, then youre stuck having to flash the factory img.
simms22 said:
you cant. why are you restoring your data partition? that wont boot up, since its system that you edited. restore the whole nandroid backup, boot, system, and data.
Click to expand...
Click to collapse
I only did data. The backup was AFTER it was in the bootloop, so I only backed up data.
ilarson008 said:
I only did data. The backup was AFTER it was in the bootloop, so I only backed up data.
Click to expand...
Click to collapse
ahh.. then in no way will it get restored, since its the system partion that you actually messed with. data just holds all your user data, thats all.
simms22 said:
ahh.. then in no way will it get restored, since its the system partion that you actually messed with. data just holds all your user data, thats all.
Click to expand...
Click to collapse
That is EXACTLY what I want to restore. All my apps, settings, pictures, etc etc etc.
I've got the phone factory reset, on and working.
ilarson008 said:
That is EXACTLY what I want to restore. All my apps, settings, pictures, etc etc etc.
I've got the phone factory reset, on and working.
Click to expand...
Click to collapse
now you can try to restore your data. your sd card stugf, like photos, dont get deleted until you wipe or format your storage.
simms22 said:
now you can try to restore your data. your sd card stugf, like photos, dont get deleted until you wipe or format your storage.
Click to expand...
Click to collapse
When i restore the data backup, the phone goes into a bootloop and will not boot.
ilarson008 said:
When i restore the data backup, the phone goes into a bootloop and will not boot.
Click to expand...
Click to collapse
well, unfortunately, it doesnt seem to be a good back up
if you factory rest again, have google restore your stuff. itll restore your apps, and main settings, and even wallpaper. and your photos are in your storage already. unless you didnt have it enabled to back up everything in the main settings.
simms22 said:
well, unfortunately, it doesnt seem to be a good back up
if you factory rest again, have google restore your stuff. itll restore your apps, and main settings, and even wallpaper. and your photos are in your storage already. unless you didnt have it enabled to back up everything in the main settings.
Click to expand...
Click to collapse
I have never had luck with auto backup. It doesn't seem to capture everything. Plus there were things that I stored on internal storage (used to be my SD card on my Samsung phones ) that wouldn't have been backed up, like my Pokemon saved game. I knew I should have copied my internal storage before trying to restore, but I thought the data backup would have done it. Great.
Not sure if this is what your looking for but try nandroid manager: https://play.google.com/store/apps/details?id=com.h3r3t1c.bkrestore
Edit: thats on device only, sorry about that. I had an issue in the past where I didn't have any apps saved via TiBu and had only a TWRP backup. Installed a clean ROM, rooted and then used the app posted to browse the backup on my phone and restore the vital apps that I needed. (Like google authenticator)... Good luck

Xiaomi Mi A2 (jasmine) can I update stock ROM via TWRP

Good Morning, I want to upgrade brother device to new version of android (because he can`t install security updates for unknow reasons), but I affraid that he loose all apps and settings (he is a firefighter and have app from firefighter station which signals dangerous traffic etc.) So my question is can I update downloaded stock ROM via TWRP (adb sideload) without fears that he loose everything?
iHusky said:
Good Morning, I want to upgrade brother device to new version of android (because he can`t install security updates for unknow reasons), but I affraid that he loose all apps and settings (he is a firefighter and have app from firefighter station which signals dangerous traffic etc.) So my question is can I update downloaded stock ROM via TWRP (adb sideload) without fears that he loose everything?
Click to expand...
Click to collapse
The only thing that will take your fear, is a backup of all important partitions (boot, system, data, vendor, efs, persist), stored externally, plus a copy of the internal storage content, also stored externally.
With that you should be able to restore everything to the exact point it is at right now, so you'll really need to mess up hard to not come out of basically any situation with those partitions saved.
As for your inital question:
Why don't you just update via ota if you wanna stay on stock?
Phil_Smith said:
The only thing that will take your fear, is a backup of all important partitions (boot, system, data, vendor, efs, persist), stored externally, plus a copy of the internal storage content, also stored externally.
With that you should be able to restore everything to the exact point it is at right now, so you'll really need to mess up hard to not come out of basically any situation with those partitions saved.
As for your inital question:
Why don't you just update via ota if you wanna stay on stock?
Click to expand...
Click to collapse
Because, brother have error, while try install security updates, but he have from March this year
And this is not possible to make update, because after click backup (Data partition) I get error "cannot create data/media/0/TWRP
iHusky said:
Because, brother have error, while try install security updates, but he have from March this year
And this is not possible to make update, because after click backup (Data partition) I get error "cannot create data/media/0/TWRP
Click to expand...
Click to collapse
Okay, so maybe first copying internal storage content to your PC and backup important apps would be sufficient then.
For apps you can use Titanium Backup (good, but makes troubles on android 10 at the moment), Swift Backup (recommend by many others) and more.
These backup solutions save apps and app data on your phone, so copy that to an external place, or you might lose them if you need to format data (which I'll suggest).
After your "backups" are made, I would wipe every partition in each slot, which you can also achieve with a "fastboot -w", and then also format data - the one where you need to type "yes" (which will also erase all internal storage content, but most probably will also solve your troubles).
From here there are tools like miflash or fastboot images to reflash stock (inform yourself about them, before you start all that!).
Be sure to flash the latest one right away, so you won't be in the need of "dirty" updates immediately again.
Afterwards, you can copy back the internal storage content and the folder of the backup app, and restore the previously saved apps.
Phil_Smith said:
Okay, so maybe first copying internal storage content to your PC and backup important apps would be sufficient then.
For apps you can use Titanium Backup (good, but makes troubles on android 10 at the moment), Swift Backup (recommend by many others) and more.
These backup solutions save apps and app data on your phone, so copy that to an external place, or you might lose them if you need to format data (which I'll suggest).
After your "backups" are made, I would wipe every partition in each slot, which you can also achieve with a "fastboot -w", and then also format data - the one where you need to type "yes" (which will also erase all internal storage content, but most probably will also solve your troubles).
From here there are tools like miflash or fastboot images to reflash stock (inform yourself about them, before you start all that!).
Be sure to flash the latest one right away, so you won't be in the need of "dirty" updates immediately again.
Afterwards, you can copy back the internal storage content and the folder of the backup app, and restore the previously saved apps.
Click to expand...
Click to collapse
I tried MiFlash, but without wipe anything, and it don`t upgrade version of system
But if I must, flash 2 slots A/B using MiFlash or one slot (A) is for system?
You can just download the zip file with version u want from the site below and flash it via TWRP making cache and dalvik cache wipes and changing slots at the end.
https://mifirm.net/model/jasmine.ttt#zip-mif
pfss said:
You can just download the zip file with version u want from the site below and flash it via TWRP making cache and dalvik cache wipes and changing slots at the end.
https://mifirm.net/model/jasmine.ttt#zip-mif
Click to expand...
Click to collapse
So, I don't need
to flash second slot?
iHusky said:
So, I don't need
to flash second slot?
Click to expand...
Click to collapse
Just if u want. It's not necessary.
In october I updated mine this way but forgot to change the slot before rebooting to the system and realized that was in the old Android version. I just went to TWRP again and changed slot. After rebooting, the phone was in the updated Android One.
pfss said:
Just if u want. It's not necessary.
In october I updated mine this way but forgot to change the slot before rebooting to the system and realized that was in the old Android version. I just went to TWRP again and changed slot. After rebooting, the phone was in the updated Android One.
Click to expand...
Click to collapse
I tried using fastboot and MiFlash but after all it stuck on bootloader
iHusky said:
I tried using fastboot and MiFlash but after all it stuck on bootloader
Click to expand...
Click to collapse
I just updated mine to November patch downloaded from here: https://mifirm.net/downloadzip/4197
I entered fastboot mode, executed
Code:
fastboot boot my_twrp_image_file.img
In TWRP made de wipes, flashed the ROM, changed slot and rebooted phone. It looks like it's normal.

After wiping data, TWRP no longer asks to descypt storage. Cant access files.

I switched over from xiaomi.eu to MI Room. Seemed to work fine until a magisk module uninstall screwed up my ROM and caused a bootloop.
Figured I would do a factory reset, however now Orangefox recovery no longer asks for a decryption password. I know the password, so how do I decrypt my storage?
Thanks
It doesn't ask for a password because the encryption files were deleted so twrp would not know what the encryption data is. But miui encrypts your data when you set your pin/pattern and the userdata remains encrypted when the encryption keys get deleted. The only way is to format userdata.
I also want to know a workaround for this. If you format userdata and flash recovery version of your rom, will your data get encrypted again when you set a password? Because then, any backup made with your data encrypted is unusable. Is data encrypted only on official roms but not for lineageOS etc?
editheraven said:
It doesn't ask for a password because the encryption files were deleted so twrp would not know what the encryption data is. But miui encrypts your data when you set your pin/pattern and the userdata remains encrypted when the encryption keys get deleted. The only way is to format userdata.
I also want to know a workaround for this. If you format userdata and flash recovery version of your rom, will your data get encrypted again when you set a password? Because then, any backup made with your data encrypted is unusable. Is data encrypted only on official roms but not for lineageOS etc?
Click to expand...
Click to collapse
My encryption files actually weren't deleted. I did a factory reset and reinstalled the previous ROM I was encrypted on a few times and somehow it decided to allow me to decrypt my storage again... So I managed to back things up, then format and wipe all storage and flash the new ROM. Working fine since.
Thanks for the help though.

Soft bricked phone after trying to restore backup after LineageOS flash

I flashed the lineageOS 17 roms that is available and it worked but then i realized that gapps was not complete so i went into TWRP to restore my old Backup of ColorOS 6.1 (A.08 version), also it had magisk installed, but it then would show the first boot logo then restart and go into the recovery. I then tried formating everything except internal storage and also factory wipe and now my backup is gone and everything else on my phone. I can still boot into recovery and such but now it wont even ask me for the decryption password. File manager in TWRP shows 3 folders in the internal storage (in sdcard 0, obb and TWRP).
Any help? i dont wont to break things even more.
Edit: I just noticed that in the 0 folder in sdcard there is 65 gb of folders and files. Im assuming that are my old files but they are encrypted. Any way to undo that?
I guess you have to install a rom and set everything up from scratch. You lost all your files when you formated data, including backups, etc.
If you want to update or change your recovery, now it's the time - since there's no rom or files to lost.
johnnyjoe said:
I guess you have to install a rom and set everything up from scratch. You lost all your files when you formated data, including backups, etc.
If you want to update or change your recovery, now it's the time - since there's no rom or files to lost.
Click to expand...
Click to collapse
I didnt format the internal storage only data and i edited the post saying that i think i found all the data but still encrypted. Im guessing TWRP wont automatically decrypt it.
For anyone with a similar problem. I reinstalled LineageOS and it decrypted all the files.

How to prevent data/internal storage encryption after ROM switch?

Yesterday i flashed xiome eu stable ROM from weekly beta but couldn't boot as all my data was encrypted with strange random folder name. I had to format data to boot into ROM. I am using orange fox kwrnel 11.0. How can i prevent this from happen in future when flashing other ROM?
shoeseat said:
Yesterday i flashed xiome eu stable ROM from weekly beta but couldn't boot as all my data was encrypted with strange random folder name. I had to format data to boot into ROM. I am using orange fox kwrnel 11.0. How can i prevent this from happen in future when flashing other ROM?
Click to expand...
Click to collapse
When switching ROM you have to Format Data in TWRP. Not just because of strange folder names but to avoid all kinds of troubles. New ROM will encrypt Data and Internal storage, you will have protection and everything will properly work as originally
New TWRP versions know how to read encryption, when booting to TWRP you will have to enter your Android Pin/Pattern (same as when you boot to Android or you use to unlock the screem in Android) and TWRP will then also work properly
That's the price of switching ROMs. Backup your Data to PC, backup things (WA and so) to Google and cloud, etc, and restore upon installing the new ROM (btw, I use also Mi Cloud and it restores automatically my apps and other things)
Otherwise, you had to Forrmat Data originally and flash DFE = Disable Forced Encryption (I never used, old school from the times when TWRP did not know to work with encrypted Data and Internal storage) with all your ROMs to prevent them to encrypt. However, you would have no protection then (in Android and TWRP).
Furthermore, after switching the ROM, you could expect then various troubles since new ROM trying to work with settings saved by the old ROM.
Hence, you would still have to Wipe Data upon that ROM switch - therefore, what do you get then by avoiding formatting and proper encryption to automatically happen when booting to the newly installed ROM
Thanks for the explanation but this encryption of data and formatting data partition was never the problem in my past devicea like nexus 5 and oneplus 3 roms. I freely flashed many roms in those devices without formatting my internal storage. Wiping data and system were the only thing i did in past to flash new rom. Is this the xiome phones only restriction?
Also if i have to backup all my data in PC Everytime i want to switch to new rom then it's very troublesome and time consuming aa i have 200GB of data in my internal storage. Isn't their any easy way to flash ROMS without entirely formatting my personal data?
shoeseat said:
Thanks for the explanation but this encryption of data and formatting data partition was never the problem in my past devicea like nexus 5 and oneplus 3 roms. I freely flashed many roms in those devices without formatting my internal storage. Wiping data and system were the only thing i did in past to flash new rom. Is this the xiome phones only restriction?
Also if i have to backup all my data in PC Everytime i want to switch to new rom then it's very troublesome and time consuming aa i have 200GB of data in my internal storage. Isn't their any easy way to flash ROMS without entirely formatting my personal data?
Click to expand...
Click to collapse
Things change with the evolution of Android. In the old times rooting was simple, just run King(o) root and then flash CM recovery by flashify, and flash the ROM you wanted - but it doesn't apply anymore
zgfg said:
When switching ROM you have to Format Data in TWRP. Not just because of strange folder names but to avoid all kinds of troubles. New ROM will encrypt Data and Internal storage, you will have protection and everything will properly work as originally
New TWRP versions know how to read encryption, when booting to TWRP you will have to enter your Android Pin/Pattern (same as when you boot to Android or you use to unlock the screem in Android) and TWRP will then also work properly
That's the price of switching ROMs. Backup your Data to PC, backup things (WA and so) to Google and cloud, etc, and restore upon installing the new ROM (btw, I use also Mi Cloud and it restores automatically my apps and other things)
Otherwise, you had to Forrmat Data originally and flash DFE = Disable Forced Encryption (I never used, old school from the times when TWRP did not know to work with encrypted Data and Internal storage) with all your ROMs to prevent them to encrypt. However, you would have no protection then (in Android and TWRP).
Furthermore, after switching the ROM, you could expect then various troubles since new ROM trying to work with settings saved by the old ROM.
Hence, you would still have to Wipe Data upon that ROM switch - therefore, what do you get then by avoiding formatting and proper encryption to automatically happen when booting to the newly installed ROM
Click to expand...
Click to collapse
I agree with you point here but i have been using decrypted storage since i go this phone..Mostly i delete my android folder and other folder which might be created by rom itself after flashing any rom with dfe and never had any issue on new roms.

Categories

Resources