Android NEED URGENT HELP IN RECOVERING DATA FROM CUSTOM ROM

MadAxe

Adept
I was using Evo X 4.7 on Redmi K20 Pro and OrangeFox Recovery and Magisk v25.2. One fine day I don’t know how but I lost my recovery (the phone would get stuck at Redmi boot animation when I would boot into recovery) so I uninstalled Magisk using the Magisk app itself and installed Ofox recovery using fastboot.

After that my phone won’t boot into OS and would always boot to recovery. Since I urgently needed to use my phone so I gave it to my close friend who is an Android dev and lives close by. The mf deleted some misc. and OTA files from system folder without telling me and said that my phone would boot into OS post this. But my phone still did not boot into OS and now my storage got encrypted too.

After all this, I tried to dirty flash the same Evo X 4.7 ROM but the phone was stuck at Evo X boot animation.

How do I recover my data now? I have very important data in storage and did not take backup as I didn’t feel that just flashing a recovery would lead to this.

Need your help guys, I need to recover the data anyhow. If you know any guy who can help me in recovering my data, I can pay him as well.

The OS is not corrupted since I see all my installed apps, in the Ofox App Manager. And the OS is doing the encryption right since the recovery doesn’t encrypt.

It’s been more than a week that I’ve searched the entire web trying to find a way to recover my data but haven’t been successful.

I’m getting the following error on Ofox Recovery.

E: error making /sdcard/fox directory: Required key not available

TLDR: Lost recovery. Uninstalled Magisk. Flashed Recovery using fastboot. Phone won’t boot into OS and would always boot into recovery. Deleted misc. and OTA files from system folder. Storage got encrypted. Phone still won’t boot into OS. Dirty flashed same ROM. Stuck at Evo X boot animation. Need to recover my data.

Solutions I have tried till date:

  • Using TWRP
  • Using Unofficial OrangeFox Recovery
  • Dirty flashed Evo X 4.7 ROM
My last resort is following this video

 
... now my storage got encrypted too.

Simply put there seems no way to recover the based on this. You could make a dd image of the storage but that still won't get you far unless you are somehow able to decrypt it.

But before you lose hope entire, make it absolutely certain that the storage is indeed encrypted.
 
Simply put there seems no way to recover the based on this.
If I am somehow able to boot into OS, I can enter the PIN and storage would get decrypted. But what is causing the bootloop?
You could make a dd image of the storage but that still won't get you far unless you are somehow able to decrypt it.
How do I make a dd image?
But before you lose hope entire, make it absolutely certain that the storage is indeed encrypted.
How do I confirm?
 
If I am somehow able to boot into OS, I can enter the PIN and storage would get decrypted. But what is causing the bootloop?

The very likely reason it won't boot into the ROM is coz of the change in encryption status.

How do I make a dd image?

For now, this is kinda moot because what do you do with a disk image without being able to decrypt it.
How do I confirm?
Does your recovery show garbled up names? and what does it say in ofox when you boot into it? It should either read "storage is encrypted" or "storage is not encrypted".
 
First do tell us, do those recoveries you tried support encryption?

If not, I'll suggest you flash recovery that supports encryption then decrypt the storage from the recovery itself using your pin and copy paste your data from there.
 
Does your recovery show garbled up names? and what does it say in ofox when you boot into it? It should either read "storage is encrypted" or "storage is not encrypted".
It shows 'storage is encrypted'.
First do tell us, do those recoveries you tried support encryption?

If not, I'll suggest you flash recovery that supports encryption then decrypt the storage from the recovery itself using your pin and copy paste your data from there.
I've tried OrangeFox Unofficial recovery, which supports encryption but still can't decrypt my storage.
 
AFAIK there's 2 types of encryption used by ROM developers. Full disk (FDE) and File based (FBE). You need to have a recovery that supports the one you're using or both to access internal storage in recovery.
You also need to know the password/PIN for the device to decrypt the partition in the recovery (you'll be asked immediately on boot by a supporting recovery for this information).

Better go into some telegram group for your device for help. They'll have information on unofficial custom recoveries supporting these types of encryption.

PS: There are ROMs which mandate the use of certain recoveries like new LineageOS with FBE requires you to use LineageOS recovery only otherwise you'll be stuck in a bootloop. You maybe in such a situation also.
 
The very likely reason it won't boot into the ROM is coz of the change in encryption status.
How do I proceed then? The data is very important.
Are you sure you are using correct system_ext, NSE recovery as needed by your ROM?
I'll flash whichever ROM you tell me to, I just want to recover my data.
AFAIK there's 2 types of encryption used by ROM developers. Full disk (FDE) and File based (FBE). You need to have a recovery that supports the one you're using or both to access internal storage in recovery.
I've tried all the supported recoveries listed on ROM group, but no luck.

You also need to know the password/PIN for the device to decrypt the partition in the recovery (you'll be asked immediately on boot by a supporting recovery for this information).
The thing is , before my mf friend deleted the misc. and OTA files, the recovery used to ask for PIN for decryption but after deleting those files my files the recovery wouldn't ask for PIN and my storage got encrypted.

Better go into some telegram group for your device for help. They'll have information on unofficial custom recoveries supporting these types of encryption.

PS: There are ROMs which mandate the use of certain recoveries like new LineageOS with FBE requires you to use LineageOS recovery only otherwise you'll be stuck in a bootloop. You maybe in such a situation also.
Already asked for help in ROM's Telegram group but no response.
 
How do I proceed then? The data is very important.

I'll flash whichever ROM you tell me to, I just want to recover my data.

I've tried all the supported recoveries listed on ROM group, but no luck.


The thing is , before my mf friend deleted the misc. and OTA files, the recovery used to ask for PIN for decryption but after deleting those files my files the recovery wouldn't ask for PIN and my storage got encrypted.


Already asked for help in ROM's Telegram group but no response.
From my past experience, the boot loop occurs because the data partition was encrypted and the recovery didn't support the decryption. A data partition flash always resolves the bootloop. However, if it has now been corrupted by the unsupported recovery, then there is no way to get it back.
 
I'll flash whichever ROM you tell me to, I just want to recover my data.
I don't know your ROM is system_ext or NSE. You'll have to find it out yourself.


The thing is , before my mf friend deleted the misc. and OTA files, the recovery used to ask for PIN for decryption but after deleting those files my files the recovery wouldn't ask for PIN and my storage got encrypted
Your storage was always encrypted. Your friend probably deleted the files needed to unlock the encryption. I don't think there's any way to recover your data now. I could be wrong. You may take a full nandroid backup for a possibility to decrypt the data in the future then wipe your phone completely and start using it normally.
 
I always say this... If you feel your data was so important why was not it backed up?
There's no sane answer to this question. The only answer is carelessness.

Learn from your mistake and move on if it's taking too much time. As suggested a full Nandroid backup for future experimental use can be taken.

Also remember to take regular backups if you use Custom ROMs and do such experiments with your primary device. It's not like I don't understand what you're going through. I use Custom ROM on my primary device since years but I don't keep very sensitive information primarily on the device with no backups. Know the risk that comes with such things.
 
I'm confused; if your storage is encrypted, how is OrangeFox showing your app list? AFAIK that shouldn't be possible, but I could be wrong. As for getting your data back... All I can think of is taking an image backup of your data partition via dd or Nandroid, finding out what the encryption protocol used by the Evo X ROM is, and trying to manually decrypt it on your PC using your PIN, but that would take days at a minimum, and more likely weeks without any guarantee of success. Plus, if your encryption troubles started after the deletion of some system files, it's likely that there were some key files required for decryption that are now permanently lost. You can try doing it manually by entering a terminal in OrangeFox (or using adb shell) and using this command from the OrangeFox wiki:
Code:
twrp decrypt <password/PIN>

By the way, you really should have taken a backup of your data via OrangeFox or at least a Nandroid backup before giving it to your friend; you still had access to your storage at the time even if you couldn't boot into the OS, and backups should be the first thought on your mind the moment it looks like things are going wrong - ideally before as well, but especially then. I know it's probably frustrating to hear that now when you're trying to find a solution, but it looks like a solution may not be possible, and it needs to be said either way.
 
I don't know your ROM is system_ext or NSE. You'll have to find it out yourself.
How do I verify that?

I always say this... If you feel your data was so important why was not it backed up?
There's no sane answer to this question. The only answer is carelessness.

Also remember to take regular backups if you use Custom ROMs and do such experiments with your primary device. It's not like I don't understand what you're going through. I use Custom ROM on my primary device since years but I don't keep very sensitive information primarily on the device with no backups. Know the risk that comes with such things.
I wouldn't call it carelessness. My mistake was trusting my friend blindly since he was an Android dev and was into custom ROMs since quite a long. I admit I should have taken regular backups but I have never experimented with my device. I'm a flash and forget guy. 4.7 is Android 10 build that I flashed in October 2020 and never tinkered with it. Since having a recovery is very essential, it was necessary to flash recovery.

Learn from your mistake and move on if it's taking too much time.
I have been scouring the entire web for a solution since a week. Would try for another and finally give up.

As suggested a full Nandroid backup for future experimental use can be taken.
Would take a full backup in case we have decryption tools in the future that can help me recover my data.

I'm confused; if your storage is encrypted, how is OrangeFox showing your app list? AFAIK that shouldn't be possible, but I could be wrong.
That should mean the OS is fine right? What could be preventing the phone to boot into OS?
twrp decrypt <password/PIN>
I'll try this in the evening and revert back.
 
That should mean the OS is fine right? What could be preventing the phone to boot into OS?
The OS might be fine, but that's irrelevant to the current discussion since it's on an entirely different partition - the reason it doesn't boot likely has to do with the data partition's encryption. My question is, are you able to see the apps on your phone through OrangeFox? Not the apps that come with the ROM, I mean your personal apps (like Spotify or something). If yes, that would indicate that your /data partition is readable, which means that your /data/media partition (where your internal storage and files are) should be as well. At least, according to my understanding of the system, which is admittedly somewhat out of date as I haven't seriously tinkered with this stuff in years. Have you tried accessing your storage through the OrangeFox file manager? What do you see when you try?
 
How do I verify that?
Check the download page for your ROM or ask in the telegram support group. Such crucial things aren't written upfront in custom rom industry. End user is meant to suffer and fail a few times before he could have a working custom rom.
 
Back
Top