Removing Data Encryption - Android Q&A, Help & Troubleshooting

I have TWRP installed, but when I wipe data, encryption still is active. TWRP is essentially useless if it can't access /data to do a complete backup/restore. Can someone post steps of how to remove encryption?

You need to install a file called TREBLE-Disable-Forceencrypt using TWRP. Here is the link : https://androidfilehost.com/?fid=1322778262904004415
Make sure to FORMAT DATA in TWRP (not a simple /data wipe, a format, where you need to type yes) and then flash your new system and after that this zip.

_cab13_ said:
You need to install a file called TREBLE-Disable-Forceencrypt using TWRP. Here is the link : https://androidfilehost.com/?fid=1322778262904004415
Make sure to FORMAT DATA in TWRP (not a simple /data wipe, a format, where you need to type yes) and then flash your new system and after that this zip.
Click to expand...
Click to collapse
Thanks cab13, that did the trick. Appreciate it. I backed up, and then deleted the /data partition, and TWRP warned "No OS"! Restored my backup, so all is working in both directions with TWRP. Thank You!

No big deal Enjoy your phone.
I've created a thread for the Umidigi One Max modding, check it out : https://forum.xda-developers.com/android/development/umidigi-one-max-custom-rom-modding-t3942521/

Related

flashing basics

hii,
My device is currently running on miui 8.5.4.0 global stable,i want to flash los 14.1,and planned some steps in order to revert back to miui safely.please correct me if i am wrong.
1.boot into twrp recovery.
2.Take full backup of current working rom including system.
3.clear data/system/cache/dalvik.
4.flash firmware-los rom-gapps-reboot.
Steps to revert back:-
1.boot into twrp recovery.
2.clear data/system/cache/dalvik.
3.restore full miui backup including system.
4.flash lazy flasher zip to disable dm-verity and forced encryption.
5.reboot.
i have just learnt basics completely but i had some doubts so i posted the entire procedure i thought to do.
thanks.
After taking backup first go to Wipe menu and "Format Data" , type yes and reboot recovery, it will remove encryption - then you can wipe data/system/cache etc..
/system wipe is never necessary .. You can skip that
Hollow6 said:
/system wipe is never necessary .. You can skip that
Click to expand...
Click to collapse
doesn't it mess up with firmware flash of custom rom?does a custom rom contains a system partition of its own to be flashed?or it just replaces or moves required system files to system partition of stock rom? help me to clear my concept!
k3lcior said:
After taking backup first go to Wipe menu and "Format Data" , type yes and reboot recovery, it will remove encryption - then you can wipe data/system/cache etc..
Click to expand...
Click to collapse
what is the difference between format data and wipe data? isn't it same?i am asking so because i havnt seen such option in recovery before.
sorabhsolanki said:
doesn't it mess up with firmware flash of custom rom?does a custom rom contains a system partition of its own to be flashed?or it just replaces or moves required system files to system partition of stock rom? help me to clear my concept!
Click to expand...
Click to collapse
Every ROM does contains its own system ..
When you flash any ROM (a full fledged ROM not OTAs) , the previous system is replaced by the later one ..
---------- Post added at 05:54 AM ---------- Previous post was at 05:50 AM ----------
sorabhsolanki said:
what is the difference between format data and wipe data? isn't it same?i am asking so because i havnt seen such option in recovery before.
Click to expand...
Click to collapse
You'll have to understand what Format Exactly we are here talking about .. When you go to TWRP/wipe , you are provided with 2 options , Format and Advanced wipe .
The format option is set to "wipe" the partitions, /data /cache /dalvik , that is generally what we require in order to flash ROMs , the wipe Option is hence the same as format , but I think the guy above is talking about Full fledged Wipe that includes the "internal storage" as well which can be selected by twrp/wipe/advanced wipe
Hollow6 said:
Every ROM does contains its own system ..
When you flash any ROM (a full fledged ROM not OTAs) , the previous system is replaced by the later one ..
Click to expand...
Click to collapse
thanks.one more question.
why dont i need to disable dm-verity and forced encryption after flashing custom rom?why kernel doesn't trigger it,because in that case there is a modification in system partition and dm-verity feature of kernel should prevent the rom from booting.
The "kernel" itself also gets replaced by a modified kernel .. But then again , I'm not sure as to why DM verity doesn't kick in , better ask the Developers (Y)
sorabhsolanki said:
hii,
My device is currently running on miui 8.5.4.0 global stable,i want to flash los 14.1,and planned some steps in order to revert back to miui safely.please correct me if i am wrong.
1.boot into twrp recovery.
2.Take full backup of current working rom including system.
3.clear data/system/cache/dalvik.
4.flash firmware-los rom-gapps-reboot.
Steps to revert back:-
1.boot into twrp recovery.
2.clear data/system/cache/dalvik.
3.restore full miui backup including system.
4.flash lazy flasher zip to disable dm-verity and forced encryption.
5.reboot.
i have just learnt basics completely but i had some doubts so i posted the entire procedure i thought to do.
thanks.
Click to expand...
Click to collapse
when you want to revert back you dont need to wipe anything or flash disable dm verify, just restore your previous nandroid backup and thats all

I don't see my files with TWRP but it is OK with File manager.

Hi
I have a problem with my Mi5s plus.
I have updated my rom.
I can boot with my custom rom I just installed. It is ok. I can browse the directories with the file manager. I can use the stock browser, SMS...ok
But when I want to install GAPPS (That I downloaded before)(I know it's no longer called that) with TWRP, I no longer see the installation file, the ZIP. The directories are empty with TWRP but accessible and with files with the Android file manager.
So I can't install applications without open apps.
Of course, when I want, by example, to delete cache I have theses messages : unable to mount /data (invalid argument), error 8 etc.
Help me?
I hope to be able to recover the data so that when I reinstall my applications. I have the data.
Thank you again.
Djoul33 said:
Hi
I have a problem with my Mi5s plus.
I have updated my rom.
I can boot with my custom rom I just installed. It is ok. I can browse the directories with the file manager. I can use the stock browser, SMS...ok
But when I want to install GAPPS (That I downloaded before)(I know it's no longer called that) with TWRP, I no longer see the installation file, the ZIP. The directories are empty with TWRP but accessible and with files with the Android file manager.
So I can't install applications without open apps.
Of course, when I want, by example, to delete cache I have theses messages : unable to mount /data (invalid argument), error 8 etc.
Help me?
I hope to be able to recover the data so that when I reinstall my applications. I have the data.
Thank you again.
Click to expand...
Click to collapse
In TWRP, go to mount and see if data is mounted.
No, it is not mounted in TWRP (But, in Android, it is OK, il see my datas)
But, I can just check :
DSP
System
Cache
Cust
Persist
But I am not able to check
Data
USB OTG.
it is locked.
Djoul33 said:
No, it is not mounted in TWRP (But, in Android, it is OK, il see my datas)
But, I can just check :
DSP
System
Cache
Cust
Persist
But I am not able to check
Data
USB OTG.
it is locked.
Click to expand...
Click to collapse
I have flashed things that did not properly unmount a partition afterwards so I could not mount it in twrp. Try flashing something that mounts data, if not mounted, then unmounts data properly.
Maybe my TWRP is deprecated ?
I have flashed a ROM 8.x then, my TWRP is old : 3.0.2.x By XM maybe ?
2016...
Djoul33 said:
Maybe my TWRP is deprecated ?
I have flashed a ROM 8.x then, my TWRP is old : 3.0.2.x By XM maybe ?
Click to expand...
Click to collapse
Try that first.
Hi,
My TWRP was too old, deprecated. It is OK now.
Thanks.

[TUTORIAL] HowTo Decrypt the Phone and have a Working Full Backup

Update May 23 2019
Now with new Twrp wzsx150 u dont need to follow this Tutorial to get full Backup to work because twrp can Auto decrypt your files
For all Who followed the guide already and want a encrypted device. Do a Format and dont use remove forceencrypt.
New twrp
https://mega.nz/#!TG4RwCrJ!9E0gOOoDaWjtSIS9GoB0pGvCc2BhRU7rSTNNJbAeUxc
---------------------------
Hello
Many people ask me to make a Tutorial HowTo have a full decrypt phone with full backup working.
Before we start u need to flash the newest Recovery from wzs150 Team https://mega.nz/#!WOZEBCpD!UlyCdDaP-UxuwvzLzDE4yzaqi5qMz-I8iOkseQ5gmP0
Steps to flash recovery should be already known or are available in other Threads on xda
So Now lets begin.
First of all you need to know you need to do format Data through the following process. So Backup your Data on your PC, TWRP NOT working
Lets Start.
1. Boot into TWRP
2. Format Data in Wipe Section (The one you need to type yes) i dont reboot TWRP after that
3. Flash the Rom u want
4. Go Back to the Start Screen of TWRP and Click "Advanced" and "RM Forceencrypt"
5. Uncheck "Remove DM Verity" and check "Remove Forceencrypt"
6. Now youre phone is full decrypted and Backup of all partitions are working
7. If u want Magisk flash it now
Notes:
Dont boot your phone before you did the "RM Forceencrypt" step or your decryption gets lost
If u update ur Rom you ALWAYS need to do Step 4 and 5
If u coming from another Rom and want to restore the Rom u need also to restore "Boot"
If u flashing now another Rom you dont need to do format data,wipe data is enough, but always RM Forceencrypt after Rom Flash
Have a nice day
Greetings from Germany
Nice, thx for that ! =)
Great tutorial thanks. Less frustrated flash rounds.
Verstuurd vanaf mijn MI 9 met Tapatalk
MangoMC said:
If u coming from another Rom and want to restore the Rom u need also to restore "Boot"
Click to expand...
Click to collapse
Was does it mean 'restore BOOT'?
Cheers
Toscha
toscha42 said:
Was does it mean 'restore BOOT'?
Cheers
Toscha
Click to expand...
Click to collapse
Boot is one of the Partitions u can Backup. Its where Ur Kernel is located
I dont uncheck "Remove DM Verity" and working too. I select both. Good guide, thanks.
Thanks for this!
Thanks for the step. I can backup now.
But the next time I update, always need to repeat "Remove Forceencrypt"; otherwise, phone cannot boot.
Assume this is needed until future update twrp version. a bit inconvenient, but ok.
Hello. I now use xiaomi.eu I don't want to format data.
I do a step 4 and 5 and can't backup. When I want to boot system nothing.....
I back to Twrp and make reverse step 5 and flash the same rom I have and system working fine. How to make backup without format data?
Wysłane z mojego MI 9 przy użyciu Tapatalka
Not possible. Maybe only wipe of data works but i didnt tested it. Twrp cant decrypt the data on your Phone it can only prevent the Phone to encrypt it
still no encryption support with twrp beta 10 people call formatting data "decrypt" or "unencrypt" all across board, so it adds to false expectations. would never turn off encryption to get, like, backup?
MangoMC said:
Update May 23 2019
Now with new Twrp wzsx150 u dont need to follow this Tutorial to get full Backup to work because twrp can Auto decrypt your files
For all Who followed the guide already and want a encrypted device. Do a Format and dont use remove forceencrypt.
New twrp
https://mega.nz/#!TG4RwCrJ!9E0gOOoDaWjtSIS9GoB0pGvCc2BhRU7rSTNNJbAeUxc
---------------------------
Hello
Many people ask me to make a Tutorial HowTo have a full decrypt phone with full backup working.
Before we start u need to flash the newest Recovery from wzs150 Team https://mega.nz/#!WOZEBCpD!UlyCdDaP-UxuwvzLzDE4yzaqi5qMz-I8iOkseQ5gmP0
Steps to flash recovery should be already known or are available in other Threads on xda
So Now lets begin.
First of all you need to know you need to do format Data through the following process. So Backup your Data on your PC, TWRP NOT working
Lets Start.
1. Boot into TWRP
2. Format Data in Wipe Section (The one you need to type yes) i dont reboot TWRP after that
3. Flash the Rom u want
4. Go Back to the Start Screen of TWRP and Click "Advanced" and "RM Forceencrypt"
5. Uncheck "Remove DM Verity" and check "Remove Forceencrypt"
6. Now youre phone is full decrypted and Backup of all partitions are working
7. If u want Magisk flash it now
Notes:
Dont boot your phone before you did the "RM Forceencrypt" step or your decryption gets lost
If u update ur Rom you ALWAYS need to do Step 4 and 5
If u coming from another Rom and want to restore the Rom u need also to restore "Boot"
If u flashing now another Rom you dont need to do format data,wipe data is enough, but always RM Forceencrypt after Rom Flash
Have a nice day
Greetings from Germany
Click to expand...
Click to collapse
Is the b17 still good if I want to decrypt ? b17 and follow the rest of the decryption steps you have mentioned ?, or shall I flash b10 if I want decryption ? cheers.
vtec303 said:
Is the b17 still good if I want to decrypt ? b17 and follow the rest of the decryption steps you have mentioned ?, or shall I flash b10 if I want decryption ? cheers.
Click to expand...
Click to collapse
U can use both to decrypt with my tutorial. B17 only can decrypt the Data Partition while its encrypted. So u can Backup All data with b17 without the need of remove forceencrypt
MangoMC said:
U can use both to decrypt with my tutorial. B17 only can decrypt the Data Partition while its encrypted. So u can Backup All data with b17 without the need of remove forceencrypt
Click to expand...
Click to collapse
OK cool, I get it, thanks for the quick reply, cheers
simcold said:
Hello. I now use xiaomi.eu I don't want to format data.
I do a step 4 and 5 and can't backup. When I want to boot system nothing.....
I back to Twrp and make reverse step 5 and flash the same rom I have and system working fine. How to make backup without format data?
Wysłane z mojego MI 9 przy użyciu Tapatalka
Click to expand...
Click to collapse
I've not ried it yet as I don't have the phone yet, but apparently this twrp (mi9-3.3.0-9.0-b17) supports encryption, you can use it to backup your encrypted data partition. Though, I'm probably too late and you've wiped already...
EDIT, just read the rest of the thread, seems I'm a bit late to the party! That twrp is already mentioned!!
I just installed B17 and backed up to SD. Seemed to work fine
picitup said:
I just installed B17 and backed up to SD. Seemed to work fine
Click to expand...
Click to collapse
Is that the twrp full rom backup you are talking about ?, backup has always worked for me its the restore which does't works and always ends up with an error, cheers
vtec303 said:
Is that the twrp full rom backup you are talking about ?, backup has always worked for me its the restore which does't works and always ends up with an error, cheers
Click to expand...
Click to collapse
Ahhh no. I tried to backup with earlier versions of TWRP and they failed with an error message. This version seemed to backup OK, but I've not tried a restore yet.
I'm just playing with Titanium backup so once I've got a good backup with that, I'll try TWRP B17 and report back.
Cheers
@vtec303 I just had a play and restore seems to work fine. My TWRP is:
recovery-mi9-3.3.0-9.0-b17.img by wzsx150.
Here's what I did:
Booted into TWRP and backed up Data, System and Boot to an OTG SD card
In TWRP performed a factory reset.
Booted into System, went through the Android setup (not wifi) and checked that all my 3rd party apps had disappeared, I had no SMS or calendar events.
Booted into TWRP and did a restore of all 3 partitions from the previous backup.
Booted into System and found all my 3rd party apps, SMS, Calendar and could browse the web so wifi was configured.
Hope this helps
Cheers
Just a bit extra....
As we know, TWRP doen't back up media data (photos music etc) but I was interested to spot that a factory reset using TWRP doesn't delete all that data either. Pretty handy for me as I'm testing out some backup packages and I don't have to restore all my media files lol.
Cheers

TWRP extractfork 255 error and Force Encryption

i have two huge problems like i mention in thread title. Whenever i restore my TWRP backup it gives error and says "Extractfork 255 error" and nothing in internet solved my issue.
My other and biggest problem is phone info says "encrypted" how to disable force encrypt?
Not even a single answer??
You can only disable force encrypt by flashing "patch no fde" file available on most rom threads.
But you will have to format data which will wipe your whole phone and flash the file before rebooting.
The reason your getting the other error is most likely twrp can't decrypt your data seeing as force encrypt is enabled.
And don't expect an answer, nobody here on xda is entitled to get questions answered. Alot of this information could have been accessed online if you just researched yourself instead of waiting over a week for a reply. It's not hard to type into a search engine
You haven't provided much information. Which TWRP version, what are you trying to restore, which steps have you tried and failed, what do you see in the TWRP logs etc. We do not have a crystal ball to guess the answers.
To decrypt the data, flash verity disabler and format data partition from TWRP. https://forum.xda-developers.com/android/software/universal-dm-verity-forceencrypt-t3817389
Edit: garylawwd was a bit faster in reply
garylawwd said:
You can only disable force encrypt by flashing "patch no fde" file available on most rom threads.
But you will have to format data which will wipe your whole phone and flash the file before rebooting.
The reason your getting the other error is most likely twrp can't decrypt your data seeing as force encrypt is enabled.
And don't expect an answer, nobody here on xda is entitled to get questions answered. Alot of this information could have been accessed online if you just researched yourself instead of waiting over a week for a reply. It's not hard to type into a search engine
Click to expand...
Click to collapse
Of course i did search of course i didnt sit and wait for a response but as you can clearly see i flashed no fde patch even though it say succesfull but it always getting encrypted by itself again. Thanks for reply by the way
_mysiak_ said:
You haven't provided much information. Which TWRP version, what are you trying to restore, which steps have you tried and failed, what do you see in the TWRP logs etc. We do not have a crystal ball to guess the answers.
To decrypt the data, flash verity disabler and format data partition from TWRP. https://forum.xda-developers.com/android/software/universal-dm-verity-forceencrypt-t3817389
Edit: garylawwd was a bit faster in reply
Click to expand...
Click to collapse
Correct me if im wrong but we have just 1 really working twrp and its 3.3.1.2 by Nikesh and im using it. I was really thinking its very simple question. i didnt get why it looks like so complicated ) i tried to restore my nandroid backup and all of sections are succesfull exept /data partition. when it comes to /data partition it gives "extracttark error 255 ". Im still confused why you didnt get my question
sasukeob said:
Of course i did search of course i didnt sit and wait for a response but as you can clearly see i flashed no fde patch even though it say succesfull but it always getting encrypted by itself again. Thanks for reply by the way
Click to expand...
Click to collapse
What you mean that you flashed patch no fde because no where have you mentioned that you had flashed anything. You won't be able to restore the backup now because your data is encrypted and this twrp can't restore encrypted data.
You need to format data and then flash patch no fde like both of us already said. Then you can make a backup that you can restore later. You can't do anything about your encrypted data now
sasukeob said:
Correct me if im wrong but we have just 1 really working twrp and its 3.3.1.2 by Nikesh and im using it. I was really thinking its very simple question. i didnt get why it looks like so complicated ) i tried to restore my nandroid backup and all of sections are succesfull exept /data partition. when it comes to /data partition it gives "extracttark error 255 ". Im still confused why you didnt get my question
Click to expand...
Click to collapse
You are right, the answer to your question is very simple and obvious, I don't get why do you find it so complicated that you must ask here in such a nice manner.
---------- Post added at 07:18 PM ---------- Previous post was at 07:10 PM ----------
garylawwd said:
What you mean that you flashed patch no fde because no where have you mentioned that you had flashed anything. You won't be able to restore the backup now because your data is encrypted and this twrp can't restore encrypted data.
You need to format data and then flash patch no fde like both of us already said. Then you can make a backup that you can restore later. You can't do anything about your encrypted data now
Click to expand...
Click to collapse
From what I read, once you enter the correct password in TWRP and it can read data correctly, backup of /data is unencrypted. After the restore, data gets encrypted by system upon the first boot. This can be verified easily with Titanium backup app, which can read and use TWRP backups. At least that's the theory, but I'm too lazy to verify it
If you perform data backup with incorrect password (or TWRP doesn't support decryption), then your backup remains encrypted and is useless as you said.
_mysiak_ said:
You are right, the answer to your question is very simple and obvious, I don't get why do you find it so complicated that you must ask here in such a nice manner.
---------- Post added at 07:18 PM ---------- Previous post was at 07:10 PM ----------
From what I read, once you enter the correct password in TWRP and it can read data correctly, backup of /data is unencrypted. After the restore, data gets encrypted by system upon the first boot. This can be verified easily with Titanium backup app, which can read and use TWRP backups. At least that's the theory, but I'm too lazy to verify it
If you perform data backup with incorrect password (or TWRP doesn't support decryption), then your backup remains encrypted and is useless as you said.
Click to expand...
Click to collapse
Ya I apologise this twrp does in fact support data decryption it must have been the older version that didn't support it.
Without twrp logs I doubt there is anything we can do.
But like you suggested it may very well be a password error..but we will never know :silly:
i dont understand what im doing wrong. I installed havocos flashed no fde patch. i tried 3 times installed rom and tried. still encrypted
_mysiak_ said:
You haven't provided much information. Which TWRP version, what are you trying to restore, which steps have you tried and failed, what do you see in the TWRP logs etc. We do not have a crystal ball to guess the answers.
To decrypt the data, flash verity disabler and format data partition from TWRP. https://forum.xda-developers.com/android/software/universal-dm-verity-forceencrypt-t3817389
Edit: garylawwd was a bit faster in reply
Click to expand...
Click to collapse
gary thanks for reply but i flashed it and it caused bootloop
sasukeob said:
gary thanks for reply but i flashed it and it caused bootloop
Click to expand...
Click to collapse
Tell us what actions exactly did you do, step by step, in chronological order.
_mysiak_ said:
Tell us what actions exactly did you do, step by step, in chronological order.
Click to expand...
Click to collapse
Ok. I have twrp 3.3.2.0 by nikesh installed. i format data and wipe dalvik cache and data. and i tried to restore my twrp backup. It restoring good but when it comes to restoring /data partition. it gives "Extracttrakfork Error 255" in red characters. I format data flashed nofde.zip but device encrypts itself again. So i tried to instal HavocOs and flash gapps and flash nofde patch. Havocos install succesfull but gapps flash gives error " Unmounting /vendor update process ended with error 25" :/
i flashed Orangefox recovery problem is still same :/
sasukeob said:
Ok. I have twrp 3.3.2.0 by nikesh installed. i format data and wipe dalvik cache and data. and i tried to restore my twrp backup. It restoring good but when it comes to restoring /data partition. it gives "Extracttrakfork Error 255" in red characters. I format data flashed nofde.zip but device encrypts itself again. So i tried to instal HavocOs and flash gapps and flash nofde patch. Havocos install succesfull but gapps flash gives error " Unmounting /vendor update process ended with error 25" :/
i flashed Orangefox recovery problem is still same :/
Click to expand...
Click to collapse
Oh boy, you're doing too many things at once First of all, what do you want to achieve? Restore stock data? Install custom ROM? Just fooling around?
Data restore -
Are you sure that your data backup is decrypted and functional? Try to restore data from nandroid backup in Titanium backup or simply open the twrp backup files (they are tar archives) and check if you see individual files or just garbage.
You mentioned that you tried "everything", but you haven't mentioned this workaround https://forum.xda-developers.com/oneplus-6/how-to/255-error-twrp-backup-restore-999-t3801632
Provide full twrp.log after failed restore.
Data encryption -
Have you followed steps described here? https://forum.xda-developers.com/android/software/universal-dm-verity-forceencrypt-t3817389
Provide full twrp.log after zip installation.
Custom ROM -
Find support in the specific ROM topic (and provide twrp.log after failed installation).
_mysiak_ said:
Oh boy, you're doing too many things at once First of all, what do you want to achieve? Restore stock data? Install custom ROM? Just fooling around?
Data restore -
Are you sure that your data backup is decrypted and functional? Try to restore data from nandroid backup in Titanium backup or simply open the twrp backup files (they are tar archives) and check if you see individual files or just garbage.
You mentioned that you tried "everything", but you haven't mentioned this workaround https://forum.xda-developers.com/oneplus-6/how-to/255-error-twrp-backup-restore-999-t3801632
Provide full twrp.log after failed restore.
Data encryption -
Have you followed steps described here? https://forum.xda-developers.com/android/software/universal-dm-verity-forceencrypt-t3817389
Provide full twrp.log after zip installation.
Custom ROM -
Find support in the specific ROM topic (and provide twrp.log after failed installation).
Click to expand...
Click to collapse
I dont know how i did but after 1 month of try and fail im not quite sure but it seems i succeed now @_mysiak_ I really appreciate bc you spend time for replying my thread. Thank you so much man When you need help about anything just pm me i will try to help you bc you spend your time for me
my only problem is dm-verity now i guess. i dont know how to solve it but i will try

[GUIDE] Backup / Restore function in Poco X3 recoveries [OrangeFOX / TWRP]

Preliminary guide to BACKUP / RESTORE with
OrangeFox recovery by ManoloRey
LINK
or
TWRP recovery 3.5.X_10-x by brigudav
LINK
! ! ! USE ONLY LINKED VERSIONS OF RECOVERIES ! ! !
Consider this guide for (decrypted vendor (or encryption disabler) + decrypted storage used) as BETA, I don't recommend backup/restore procedures with OrangeFox recovery Beta or TWRP 3.5.0_10-x for actual backups of your data (TRY THIS ONLY AT YOUR OWN RISK) ONLY FOR TESTING / EDUCATIONAL PURPOSES !
Do not ask for help if your data have been lost because they can't be restored, or suddenly your backup - successfully restored several times before - now can't be! This is still buggy and sometimes for unknown reasons restore of your data can fail ! Restore process always worked 100 % for me, but results sometimes differ !
YOU HAVE BEEN WARNED!
​(decrypted vendor (or encryption disabler) + decrypted storage used)
Spoiler: Backup method A (not recommended):
- backup boot and data partition
Restore:
- wipe cache, dalvik, data
- flash ROM + GAPPS that you have installed when you created backup
- restore backup of boot and data partition
- remove Android password (OFOX recovery functionality) restored from backup either directly after restore or later from the menu with OFOX addons (the file PassReset.zip MUST EXIST in this location: /storage/emulated/0/Fox/FoxFiles/ for this to work !) but before reboot!
- in case you lost your OFOX addons thanks to format data or you are using TWRP 3.5.0_10-x, you can also directly delete all file(s) in /data/system which starts with locksettings* = remove password
Reboot
Comment(s):
- if you remove your password/PIN/pattern protection directly before backup you can end up after restore with system where you can't change your password/PIN/pattern anymore
- if you forget to remove your password/PIN/pattern protection AFTER RESTORE you can end up after boot with system demanding to enter your password/PIN/pattern which MAY or MAY NOT BE ACCEPTED even if it is CORRECT and maybe INACCESSIBLE because of that
- Google Pay will never be restored properly (or anything depending on actual password in time of backup), because of the removed password, you will need to set up it again after restore
Spoiler: Backup method B (recommended):
- backup super, boot, dtbo and data partition (metadata partition is optional)
Restore:
- wipe cache, dalvik, data (optional)
- restore super, boot, dtbo and data partition (metadata partition is optional)
Reboot
(everything will be restored to the state in time of the backup) ¹)
- if needed remove Android password (OFOX recovery functionality) restored from backup either directly after restore or later from the menu with OFOX addons (the file PassReset.zip MUST EXIST in this location: /storage/emulated/0/Fox/FoxFiles/ for this to work !)
- in case you lost your OFOX addons thanks to format data or you are using TWRP 3.5.0_10-x, you can also directly delete all file(s) in /data/system which starts with locksettings* = remove password
Comment(s):
¹) your backups will be fully restored along with password/PIN/pattern and fingerprints - this will work until you'll format data (or for something else that needs to be discovered yet), after that you'll loose the ability to use your password to enter the system and depending on ROM features you can either skip password entering with fingerprints (RRemix) or reset your password so you can enter the system (CrDroid), in RRemix everything works, except you can't change your password etc, in CrDroid you need to re-setup your password depending apps
- if you remove your password Google Pay will never be restored properly (or anything depending on actual password in time of backup), you will need to set up it again after restore
x x x​(encrypted vendor and storage used)
Spoiler: Backup method A (OFFICIAL for OrangeFox & UNOFFICIAL for TWRP)
Backup:
- backup boot and data partition
Restore:
If you are restoring a data backup of an encrypted device, there are precautions that you should take before starting the restore process (obviously, your backup must be on MicroSD or other external storage medium - NOT on the internal storage):
Format the data partition (NOTE: format - not just wipe)
Reboot OrangeFox / TWRP
Flash the original zip of the ROM whose backup you are trying to restore
Wipe cache and dalvik
Reboot to system to ensure that the newly-flashed ROM actually boots, and that it re-encrypts the device with its own encryption
Reboot to OrangeFox / TWRP
Tap on the Backup icon
Select the partition(s) that you wish to restore
Swipe to restore
If you do not follow all these steps, you can expect problems with restoring data
Reboot
Comment(s): TBA
Credits: OrangeFox devs as this guide (for encrypted vendor and storage used) is copied directly from OrangeFox wiki slightly modified by me by adding "/ TWRP" to the text
this guide will be updated if I discover new facts or post new, updated steps or how-to's​
reserved
jeryll said:
reserved
Click to expand...
Click to collapse
Thanks for your experiments and hard work in putting this together!
backup super, boot, dtbo and data partition (metadata partition is optional)
Click to expand...
Click to collapse
there is 2 checkboxes for super with the same size in OF. one says (Product, Vendor, System).
which one to select or both?
drahtwurst said:
there is 2 checkboxes for super with the same size in OF. one says (Product, Vendor, System).
which one to select or both?
Click to expand...
Click to collapse
Only one, backup of super from either is identical
Thanks for this flashlight on the darkness.
Let me ask you a help. How can I decrypt my device? Wanna do it just like my old MI8, where I didnt need to do format data ever when go to update a rom.
Ever I go do recovery (OFOX or TWRP) I got this in screenshot.
- download and flash decrypted (hacked) vendor from this thread or
- use encryption disabler zip, but that is a little tricky to use - you need to flash encryption disabler every time you update your MIUI base, or custom rom, if you forget that, on next boot your internal storage will be encrypted
- - to remove encryption from data partition after - you need to do initial format data (yes) - after that you can start to use wipe data if needed (some ROMs still need to use format data (yes) or they'll not boot - RR 8.6.6/8.6.7 for example)
jeryll said:
- use encryption disabler zip, but that is a little tricky to use - you need to flash encryption disabler every time you update your MIUI base, or custom rom, if you forget that, on next boot your internal storage will be encrypted
Click to expand...
Click to collapse
Yep, that fact just bit me today as I was away from the computer and had to reflash the latest Xiaomi.eu...
jeryll said:
- use encryption disabler zip
Click to expand...
Click to collapse
Are there further instructions for first install? I did google but failed to find anything reliable...
pnin said:
Are there further instructions for first install? I did google but failed to find anything reliable...
Click to expand...
Click to collapse
not that I know of, just flash it as last thing before you reboot (either recovery or to system), but you need to format data (yes) to remove encryption
As this [surya] 'encryption-disabler-v1' is basically a shell script (pasted to https://paste2.org/804aemGx, BTW), I took the risk to flash it without formatting 'Data' -- only I disabled any security beforehand, i.e., no pin, password or fingerprint.
It appears to have worked, cause I rebooted into system with no issues. But how to verify?
not sure what do you want to achieve by flashing of encryption disabler without actually disabling encryption by formatting your data partition...
so what do you want to verify?
if you start OFOX, on the initial screen you can see the state of your data partition (encrypted/decrypted)
Thanks for your patience. I was under the impression that if you disable security locks then you had no encryption and the script would just ensure it would remain so. By your reaction I'm assuming I was wrong...
Overall, I am just getting fed up with always having to format data and having to start from scratch.
I not longer have OFox, I'm currently running brigudav's TWRP "v3.5.0_10-5-surya".
pnin said:
Thanks for your patience. I was under the impression that if you disable security locks then you had no encryption and the script would just ensure it would remain so. By your reaction I'm assuming I was wrong...
Overall, I am just getting fed up with always having to format data and having to start from scratch.
I not longer have OFox, I'm currently running brigudav's TWRP "v3.5.0_10-5-surya".
Click to expand...
Click to collapse
As you said, that encryption_disabler.zip is a shell script, which makes the folder in /product/vendor_overlay/29/etc and copies fstab.qcom from vendor to it. Then edits every line using the shell command sed (aka stream editor) that includes the string fileencryption= with the string encryptable=.
The above described process is usually done on the first boot of a newly installed ROM as is with every vendor_overlay entry in product (minus the edited strings ofc). Editing it after the ROM reads vendor fstab.qcom and encrypts the data partition is useless. However, formatting data (deleting keystore essentially) and flashing that .zip should also do the trick. Might as well update your base MIUI and ROM while you're at it
Thanks for the detailed explanation, Slim K. Sadly there's no escaping formatting data, which I'll do next...
Slim K said:
Might as well update your base MIUI and ROM while you're at it
Click to expand...
Click to collapse
I had done so already, hence my reluctance to do it again.
jeryll said:
Preliminary guide to BACKUP / RESTORE with
OrangeFox recovery by ManoloRey
LINK
or
TWRP recovery 3.5.X_10-x by brigudav
LINK
! ! ! USE ONLY LINKED VERSIONS OF RECOVERIES ! ! !
Consider this guide for (decrypted vendor (or encryption disabler) + decrypted storage used) as BETA, I don't recommend backup/restore procedures with OrangeFox recovery Beta or TWRP 3.5.0_10-x for actual backups of your data (TRY THIS ONLY AT YOUR OWN RISK) ONLY FOR TESTING / EDUCATIONAL PURPOSES !
Do not ask for help if your data have been lost because they can't be restored, or suddenly your backup - successfully restored several times before - now can't be! This is still buggy and sometimes for unknown reasons restore of your data can fail ! Restore process always worked 100 % for me, but results sometimes differ !
YOU HAVE BEEN WARNED!
​(decrypted vendor (or encryption disabler) + decrypted storage used)
Spoiler: Backup method A (not recommended):
- backup boot and data partition
Restore:
- wipe cache, dalvik, data
- flash ROM + GAPPS that you have installed when you created backup
- restore backup of boot and data partition
- remove Android password (OFOX recovery functionality) restored from backup either directly after restore or later from the menu with OFOX addons (the file PassReset.zip MUST EXIST in this location: /storage/emulated/0/Fox/FoxFiles/ for this to work !) but before reboot!
- in case you lost your OFOX addons thanks to format data or you are using TWRP 3.5.0_10-x, you can also directly delete all file(s) in /data/system which starts with locksettings* = remove password
Reboot
Comment(s):
- if you remove your password/PIN/pattern protection directly before backup you can end up after restore with system where you can't change your password/PIN/pattern anymore
- if you forget to remove your password/PIN/pattern protection AFTER RESTORE you can end up after boot with system demanding to enter your password/PIN/pattern which MAY or MAY NOT BE ACCEPTED even if it is CORRECT and maybe INACCESSIBLE because of that
- Google Pay will never be restored properly (or anything depending on actual password in time of backup), because of the removed password, you will need to set up it again after restore
Spoiler: Backup method B (recommended):
- backup super, boot, dtbo and data partition (metadata partition is optional)
Restore:
- wipe cache, dalvik, data (optional)
- restore super, boot, dtbo and data partition (metadata partition is optional)
Reboot
(everything will be restored to the state in time of the backup) ¹)
- if needed remove Android password (OFOX recovery functionality) restored from backup either directly after restore or later from the menu with OFOX addons (the file PassReset.zip MUST EXIST in this location: /storage/emulated/0/Fox/FoxFiles/ for this to work !)
- in case you lost your OFOX addons thanks to format data or you are using TWRP 3.5.0_10-x, you can also directly delete all file(s) in /data/system which starts with locksettings* = remove password
Comment(s):
¹) your backups will be fully restored along with password/PIN/pattern and fingerprints - this will work until you'll format data (or for something else that needs to be discovered yet), after that you'll loose the ability to use your password to enter the system and depending on ROM features you can either skip password entering with fingerprints (RRemix) or reset your password so you can enter the system (CrDroid), in RRemix everything works, except you can't change your password etc, in CrDroid you need to re-setup your password depending apps
- if you remove your password Google Pay will never be restored properly (or anything depending on actual password in time of backup), you will need to set up it again after restore
x x x​(encrypted vendor and storage used)
Spoiler: Backup method A (OFFICIAL for OrangeFox & UNOFFICIAL for TWRP)
Backup:
- backup boot and data partition
Restore:
If you are restoring a data backup of an encrypted device, there are precautions that you should take before starting the restore process (obviously, your backup must be on MicroSD or other external storage medium - NOT on the internal storage):
Format the data partition (NOTE: format - not just wipe)
Reboot OrangeFox / TWRP
Flash the original zip of the ROM whose backup you are trying to restore
Wipe cache and dalvik
Reboot to system to ensure that the newly-flashed ROM actually boots, and that it re-encrypts the device with its own encryption
Reboot to OrangeFox / TWRP
Tap on the Backup icon
Select the partition(s) that you wish to restore
Swipe to restore
If you do not follow all these steps, you can expect problems with restoring data
Reboot
Comment(s): TBA
Credits: OrangeFox devs as this guide (for encrypted vendor and storage used) is copied directly from OrangeFox wiki slightly modified by me by adding "/ TWRP" to the text
this guide will be updated if I discover new facts or post new, updated steps or how-to's​
Click to expand...
Click to collapse
Hello
I tried to do a backup with this orfox version including 'super'. At the end it says:
Backing up Super...
Backup Failed, Cleaning Backup Folder
Do you have a idea what happened?
Edit: I guess it's because my phone is encrypted
XtraWater said:
Hello
I tried to do a backup with this orfox version including 'super'. At the end it says:
Backing up Super...
Backup Failed, Cleaning Backup Folder
Do you have a idea what happened?
Edit: I guess it's because my phone is encrypted
Click to expand...
Click to collapse
Make sure you have enough space on the destination. Have a look at the OF log.
I guess this is as good a place as any to ask: what is the advantage of decrypting data?
I don't think running encrypted slows things down (not like it used to in the past when devices weren't as powerful), and there is the huge benefit of having your data secure. Any lost/stolen phone will soon send up in the hands of someone (on either side of the law) who knows adb/fastboot, so just having a password isn't going to protect your data if it's not encrypted.
It's possible to do backups of encrypted data, just the same as unencrypted.
Formatting vs wiping: ends up doing the same - all the data is gone and has to be restored. So that's a non-issue.
So, why should one prefer to decrypt?
temporarium said:
I guess this is as good a place as any to ask: what is the advantage of decrypting data?
I don't think running encrypted slows things down (not like it used to in the past when devices weren't as powerful), and there is the huge benefit of having your data secure. Any lost/stolen phone will soon send up in the hands of someone (on either side of the law) who knows adb/fastboot, so just having a password isn't going to protect your data if it's not encrypted.
It's possible to do backups of encrypted data, just the same as unencrypted.
Formatting vs wiping: ends up doing the same - all the data is gone and has to be restored. So that's a non-issue.
So, why should one prefer to decrypt?
Click to expand...
Click to collapse
From my understanding the only benefit would be to update firmware without format data.
re backup super: There are about 70GB available on the SD card (destination of the backup). I tried to backup it again with the same result. Just looking at the log file but can't see what has failed. The line before Backup failed is:
I:Error writing destination fd(operation not permitted)
XtraWater said:
From my understanding the only benefit would be to update firmware without format data.
re backup super: There are about 70GB available on the SD card (destination of the backup). I tried to backup it again with the same result. Just looking at the log file but can't see what has failed. The line before Backup failed is:
I:Error writing destination fd(operation not permitted)
Click to expand...
Click to collapse
Your card is probably formatted as fat32 which won't allow such big files.

Categories

Resources