In this guide I will show you how to decrypt this phone
You might be asking:
(What are the advantages of decrypting?)
Well, it is much easier to switch between custom roms when you are decrypted and you don't have to wipe internal storage everytime you flash a new rom and there may be a performance increase (Maybe).
(What are the disadvantages of decrypting?)
If your phone gets stolen.. The stealer can access all of your data and can even remove the pattern by just rebooting to twrp and deleting a few files so your phone will not have any protection whatsoever.
Downloads:
Disable Dm-Verity
Magisk
Instructions:
1- You have to be on clean oos without any mods or kernels.
2- Reboot Recovery
3- Format data (Go to wipe - Format data and click yes)
4- Reboot Recovery
4- Flash No Verity Mod
5- Flash Magisk
6- Reboot System
Now you are decrypted!!
Keep Decrypt between OS updates:
-Reboot Recovery
-Flash FULL ZIP in TWRP
-Without booting the OS: Flash TWRP Recovery, reboot recovery, Flash No Verity Mod, Flash Magisk, Reboot System.
Keep Decrypt between Roms:
-Wipe Data only in twrp!!! (NEVER WIPE SYSTEM OR - VENDOR ON OP7P)
-Flash Rom
-Flash TWRP
-Reboot Recovery
-Flash any other zips you want like Gapps-Kernels- ex.....
-Flash No Verity Mod
-Flash Magisk
-Reboot System
Credits:
@topjohnwu
@Zackptg5
How would I know if I'm decrypted or not?
mlock420 said:
How would I know if I'm decrypted or not?
Click to expand...
Click to collapse
Settings, security, down towards the bottom it tells you
OK so I'm encrypted... Am I secured somewhat from theft correct? And yes I know it's not 100% but it is safer than decrypted?
Another question let's say I don't mind being encrypted because I have a flash drive with otg and all that... Is that good enough? Or should I go decrypted all the way so I can start backing up on twrp and restoring twrp without errors which would mean no use for flash drive...
I know it's my choice just trying to make things easier and to understand a little more
mlock420 said:
OK so I'm encrypted... Am I secured somewhat from theft correct? And yes I know it's not 100% but it is safer than decrypted?
Another question let's say I don't mind being encrypted because I have a flash drive with otg and all that... Is that good enough? Or should I go decrypted all the way so I can start backing up on twrp and restoring twrp without errors which would mean no use for flash drive...
I know it's my choice just trying to make things easier and to understand a little more
Click to expand...
Click to collapse
If you are really concerned about your data and you are OK with wiping internal storage, then I don't recommend decrypting and just leave it encrypted.
I have oos decrypted via disable force encrypt!
Today I went through the following process to update to the latest version of OOS.
1. Flash full oos & twrp
2. reboot to recovery
3. Flash magisk
4. flash disable force encrypt
5. reboot
rebooted, but back to TWRP,,,
there was a "0" directory in sdcard and inside it my data was in it.
Do you know the solution?
thx
download link is not working for the file.
cylent said:
download link is not working for the file.
Click to expand...
Click to collapse
XDA thread:
https://forum.xda-developers.com/android/software/universal-dm-verity-forceencrypt-t3817389
Downloads:
https://zackptg5.com/android.php#disverfe
https://zackptg5.com/downloads/Disable_Dm-Verity_ForceEncrypt_12.27.2019.zip
Hi omar2005
May i ask you a quetion?
I just will get my oneplus 7 pro.
Under android 10.
During first time rooting and twrp install. Should i reboot recovery and flash decrypter or first finishing rooting than rebooting system and than do the steps like you said in your Instructions?
Thank you for orientation and greetings ivifly
You have to flash dfe before booting system. Once system boots, you'll be encrypted
Avril09 said:
You have to flash dfe before booting system. Once system boots, you'll be encrypted
Click to expand...
Click to collapse
What is DFE?
Sent from my OnePlus7Pro using XDA Labs
---------- Post added at 09:18 AM ---------- Previous post was at 09:17 AM ----------
Is there a way I could reencrypt(due to security concerns) without having to wipe my data? The option in security is greyed out :/.
Thank you
Sent from my OnePlus7Pro using XDA Labs
fp1707 said:
What is DFE?
Sent from my OnePlus7Pro using XDA Labs
---------- Post added at 09:18 AM ---------- Previous post was at 09:17 AM ----------
Is there a way I could reencrypt(due to security concerns) without having to wipe my data? The option in security is greyed out :/.
Thank you
Sent from my OnePlus7Pro using XDA Labs
Click to expand...
Click to collapse
DFE is Disable Force Encryption also known as dmverity in some cases.
And yea you can reencrypt without losing data but it takes time depending on the size of files you have.
omar2005 said:
In this guide I will show you how to decrypt this phone
You might be asking:
(What are the advantages of decrypting?)
Well, it is much easier to switch between custom roms when you are decrypted and you don't have to wipe internal storage everytime you flash a new rom and there may be a performance increase (Maybe).
(What are the disadvantages of decrypting?)
If your phone gets stolen.. The stealer can access all of your data and can even remove the pattern by just rebooting to twrp and deleting a few files so your phone will not have any protection whatsoever.
Downloads:
https://zackptg5.com/downloads/Disable_Dm-Verity_ForceEncrypt_05.21.2019.zip
https://forum.xda-developers.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445
Instructions:
1- You have to be on clean oos without any mods or kernels.
2- Reboot Recovery
3- Format data (Go to wipe - Format data and click yes)
4- Reboot Recovery
4- Flash No Verity Mod
5- Flash Magisk
6- Reboot System
Now you are decrypted!!
Keep Decrypt between OS updates:
-Reboot Recovery
-Flash FULL ZIP in TWRP
-Without booting the OS: Flash TWRP Recovery, reboot recovery, Flash No Verity Mod, Flash Magisk, Reboot System.
Keep Decrypt between Roms:
-Wipe Data only in twrp!!! (NEVER WIPE SYSTEM OR - VENDOR ON OP7P)
-Flash Rom
-Flash TWRP
-Reboot Recovery
-Flash any other zips you want like Gapps-Kernels- ex.....
-Flash No Verity Mod
-Flash Magisk
-Reboot System
Credits:
@topjohnwu
https://forum.xda-developers.com/member.php?u=4470081
@Zackptg5:
https://forum.xda-developers.com/member.php?u=6037748
Click to expand...
Click to collapse
can we use this method for boot dual os (oos+custom) , when we install dual os twrp by @Zackptg5 we face problem with encryption and password protection on one of the os.
is it possible this method help this problem???
This does not work for my OP7Pro, when you say boot into Recovery and wipe data. Is that the stock recovery or TWRP? When I try decrypting using the instructions using TWRP, when I reboot the phone, it boots into the boot animation. But the animation is slow and the phone just gets stuck there and won't boot any further. Trying to decrypt so it's easier to get LineageOS installed. My phone seems to have problems when on the B partition reading the internal storage.
Scotsman828 said:
This does not work for my OP7Pro, when you say boot into Recovery and wipe data. Is that the stock recovery or TWRP? When I try decrypting using the instructions using TWRP, when I reboot the phone, it boots into the boot animation. But the animation is slow and the phone just gets stuck there and won't boot any further. Trying to decrypt so it's easier to get LineageOS installed. My phone seems to have problems when on the B partition reading the internal storage.
Click to expand...
Click to collapse
Are you running an open beta build? OnePlus did something dumb with the beta builds where this no longer works. I've been racking my brain trying to find a way to decrypt a beta too. For now, only the main builds of OOS are decryptable.
H4X0R46 said:
Are you running an open beta build? OnePlus did something dumb with the beta builds where this no longer works. I've been racking my brain trying to find a way to decrypt a beta too. For now, only the main builds of OOS are decryptable.
Click to expand...
Click to collapse
No, my phone was on a main build. Just wasn't having any luck and gave up. I'm on LineageOS now but spent an entire day trying to get that installed and working properly. Something was weird, slot A could read my internal storage, but when I switched to slot B the internal storage just disappeared. Once I got TWRP and LOS installed on both slots, the problem disappeared. But I still haven't attempted to decyrpt for fear of messing up my current setup.
H4X0R46 said:
Are you running an open beta build? OnePlus did something dumb with the beta builds where this no longer works. I've been racking my brain trying to find a way to decrypt a beta too. For now, only the main builds of OOS are decryptable.
Click to expand...
Click to collapse
It still works for me to this day tbh, on any rom i flash except some problems with android 11 roms ...
H4X0R46 said:
Are you running an open beta build? OnePlus did something dumb with the beta builds where this no longer works. I've been racking my brain trying to find a way to decrypt a beta too. For now, only the main builds of OOS are decryptable.
Click to expand...
Click to collapse
I'm on OOS 11 Beta 1 and decryption works fine for me. I was on 10.3.7 (decrypted) before.
Do you have to be on OOS? Or could any clean flashed rom work?
who can help. i cant decrypt my op7t pro. Well, let's start with the fact that when formatting dalvik cache and data, I have an error and nothing is formatted. as with (Go to wipe - Format data and click yes). Formatted this data via adb, installed No Verity Mod and now I have bootloop
Hello,
I am trying to install lineage OS on my 9t pro, but it fails every time.
I managed to unrbick my phone thanks to miflash, but now i'm totally stuck
So, i'm on miui Global 11 QFKEUXM, and i can install twrp-3.3.1-22-raphael-mauronofrio.
Then, if I try to flash a rom with it (i also tried RevengeOS), i'm going to be stuck in a bootloop, until it goes to twrp again.
When it appens, i can't access files from my computer anymore, all folders seems to have random names like "uzehfj405Cuh5635azP5IUHDPuZ".
So i have to use miflash to go back to miui. I don't know what's wrong i've spent hours trying, can someone help me ?
Thanks and have a nice day
EDIT :
Indeed i didn't format data in TWRP. I tried to, and i'm still in that boot loop unfortunatly.
But this time, file system seems to be ok because i can access internal storage from my computer
EDIT2 :
I think the problem come from GAPPS. If i format then flash lineage without GAPPS, I can boot it
But if then i try to flash them, it won't boot anymore.
I am using the "nano" package here https://sourceforge.net/projects/opengapps/files/arm64/beta/20191114/
Is this incorrect ?
hi,
have already format data in TWRP?
BuckyBucks said:
Hello,
I am trying to install lineage OS on my 9t pro, but it fails every time.
I managed to unrbick my phone thanks to miflash, but now i'm totally stuck
So, i'm on miui Global 11 QFKEUXM, and i can install twrp-3.3.1-22-raphael-mauronofrio.
Then, if I try to flash a rom with it (i also tried RevengeOS), i'm going to be stuck in a bootloop, until it goes to twrp again.
When it appens, i can't access files from my computer anymore, all folders seems to have random names like "uzehfj405Cuh5635azP5IUHDPuZ".
So i have to use miflash to go back to miui. I don't know what's wrong i've spent hours trying, can someone help me ?
Thanks and have a nice day
Click to expand...
Click to collapse
See bro When we buy the android the the storage is
Encrypted , when you unlock the bootloader and install TWRP it doesn't decrypt the internal storage that's why only the stick rom i.e. Miui can access the storage , here is what you need to do ..
Install TWRP then go to wipe then click on format data and type yes this will decrypt the internal storage and so that any custom rom you install can access the data ..
Make sure that you format data then reboot trwp and then connect the phone to of transfer the files and install the rom and gappa it will boot just fine
Although for some reason when i install the LOS my storage gets decrypt again I say you try the EvoX rom which doesn't require gappa just flash the rom and the firmware
Also there is some force decrypt zip file that lets you decrypt the internal storage because sometime install the firmware may encrypt your storage again so flash that DFE file you will find that in telegram grp ..
Basically you can't boot into rom and see files on computer cause your storage is encrypted and only Miui can decrypt it unless decrypted ...
Hope it help
Every time when you want to flash aosp or other custom rom you need to format data ( wiping isnt enough because of encryption) when coming from stock miui or miui eu rom.
Best way is to read instruction of rom you want to install.
My steps are when coming from stock miui:
Install twrp
Boot to twrp
Format data with yes
Reboot to twrp
Copy rom you want to install to internal storage, usually you need also rom+vendor file of latest stable miui.
Flash vendor+rom of stable miui
Wipe dalvick+ cache
Flash custom rom (los, evolutionx...)
Wipe dalvick+ cache
Flash gapps if needed
Wipe dalvick + cache
Reboot to system, set your system to your liking
Then reboot to twrp to flash magisk ( if you like to be rooted, otherwise continue to use rom as is)
Best is to read install instructions of rom you want to install
ranjan_shivam said:
See bro When we buy the android the the storage is
Encrypted , when you unlock the bootloader and install TWRP it doesn't decrypt the internal storage that's why only the stick rom i.e. Miui can access the storage , here is what you need to do ..
Install TWRP then go to wipe then click on format data and type yes this will decrypt the internal storage and so that any custom rom you install can access the data ..
Make sure that you format data then reboot trwp and then connect the phone to of transfer the files and install the rom and gappa it will boot just fine
Although for some reason when i install the LOS my storage gets decrypt again I say you try the EvoX rom which doesn't require gappa just flash the rom and the firmware
Also there is some force decrypt zip file that lets you decrypt the internal storage because sometime install the firmware may encrypt your storage again so flash that DFE file you will find that in telegram grp ..
Basically you can't boot into rom and see files on computer cause your storage is encrypted and only Miui can decrypt it unless decrypted ...
Hope it help
Click to expand...
Click to collapse
Hello, thanks for taking the time to help me. I tried again formating the data, it seems a bit better (i can acces file system from my computer), but i'm still in that boot loop :/
BuckyBucks said:
Hello, thanks for taking the time to help me. I tried again formating the data, it seems a bit better (i can acces file system from my computer), but i'm still in that boot loop :/
Click to expand...
Click to collapse
Maybe it's the vendor. What device do you have (china, global, etc.)?
ef1x said:
Every time when you want to flash aosp or other custom rom you need to format data ( wiping isnt enough because of encryption) when coming from stock miui or miui eu rom.
Best way is to read instruction of rom you want to install.
My steps are when coming from stock miui:
Install twrp
Boot to twrp
Format data with yes
Reboot to twrp
Copy rom you want to install to internal storage, usually you need also rom+vendor file of latest stable miui.
Flash vendor+rom of stable miui
Wipe dalvick+ cache
Flash custom rom (los, evolutionx...)
Wipe dalvick+ cache
Flash gapps if needed
Wipe dalvick + cache
Reboot to system, set your system to your liking
Then reboot to twrp to flash magisk ( if you like to be rooted, otherwise continue to use rom as is)
Best is to read install instructions of rom you want to install
Click to expand...
Click to collapse
djoni wallauer said:
hi,
have already format data in TWRP?
Click to expand...
Click to collapse
Thanks to both of you for helping me. As i sayed, I tried to to so and now i can see the filesystem from my computer, but i'm still stuck in the bootloop
Isley_ said:
Maybe it's the vendor. What device do you have (china, global, etc.)?
Click to expand...
Click to collapse
I think it's a global one, but now i have doubts... Is there a way to be sure ?
In the MIUI i managed to flash with miflash, it's sayed MIUI GLOBAL
vladsendrix said:
if it s a mi9t pro its probbably the global version, to make sure try downloading the firmware and vendor from here https://downloads.akhilnarang.me/MIUI/raphael/ . try downloading the global and indian version and try both since you dont know whihch model you have. also dont forget to format before trying anything. hope i helped
Click to expand...
Click to collapse
I'm a bit affraid to flash indian version, it's says to not cross flash ^^
I’d flash MIUI.eu before lineage, let it boot and then do the whole process to install lineage. Yo don’t have nothing to lose.
vladsendrix said:
well i d rrecommen you put your device in fastboot, go to aXiaomiADBFastbootTools and it ll show you your model number or use TOOLSALLINONE. Search ythese on xda and youll find the links and that will definetly show you your model number
Click to expand...
Click to collapse
What fastboot commands should I use to get the model number ? I tried fastboot oem get-psid but it didnt work
When I boot MIUI, in the settings its "MIUI GLOBAL QFKEUXM". So it's correct isn't it ?
vladsendrix said:
well i d rrecommen you put your device in fastboot, go to aXiaomiADBFastbootTools and it ll show you your model number or use TOOLSALLINONE. Search ythese on xda and youll find the links and that will definetly show you your model number
Click to expand...
Click to collapse
I think the problem come from GAPPS. If i format then flash lineage without GAPPS, I can boot it
But if then i try to flash them, it won't boot anymore.
I am using the "nano" package here https://sourceforge.net/projects/ope...beta/20191114/
Is this incorrect ?
Hi there,
I tried to install a ROM on my Mi9T pro. I use Orange Fox and it asked me when I entered the recovery for the password, that decrypted my Data partition. All well so far.I installed the ROM Havoc and Magisk. After reboot into System, there was a bootloop. I entered the recovery again and the Data(internal storage is encrypted. Which is not too bad, because I know the password, but I do not get asked for the password/pattern. It says:
E: Error making /sdcard/fox, unable to wipe Data, unable to format to remoce encryption.
So I cannot install a new rom as the partion is encrypted and I cannot remove the partition.
“E:Unable to decrypt FBE device”
Does anyone have a recommendation on what to do?
Kind regards
berndbrecht said:
Hi there,
I tried to install a ROM on my Mi9T pro. I use Orange Fox and it asked me when I entered the recovery for the password, that decrypted my Data partition. All well so far.I installed the ROM Havoc and Magisk. After reboot into System, there was a bootloop. I entered the recovery again and the Data(internal storage is encrypted. Which is not too bad, because I know the password, but I do not get asked for the password/pattern. It says:
E: Error making /sdcard/fox, unable to wipe Data, unable to format to remoce encryption.
So I cannot install a new rom as the partion is encrypted and I cannot remove the partition.
“E:Unable to decrypt FBE device”
Does anyone have a recommendation on what to do?
Kind regards
Click to expand...
Click to collapse
When installing over MIUI you need to format data. You should still be able to format data, which should allow you to boot into the ROM after.
If Orange Fox won't let you format data at this point, then the issue is with Orange Fox. In TWRP when this happens, even though the data partition is encrypted and TWRP doesn't ask for the password, TWRP can still format the data partition.
If you can format data in OF, then good. If not try installing TWRP then formatting data. If that fails your best option is to restore to MIUI with a stock fastboot ROM, then start again.
thank you for your comment. as a follow up. do you recommend a certain twrp release? i just don't want to **** up the phone. when ich connect the phone to my laptop, I can see the internal data, but neither can i copy, nor make the names of the files any sense (encrypted i guess). is there now way to decrypt the files from the situation as is? i do not mind, as i back upped all the important stuff, but if possible i would do without format.
btw. i came from lineage os. what i did: i wiped data, system, cache and data, then installed the rom ( included gapps) and magisk. then restarted.
berndbrecht said:
thank you for your comment. as a follow up. do you recommend a certain twrp release? i just don't want to **** up the phone. when ich connect the phone to my laptop, I can see the internal data, but neither can i copy, nor make the names of the files any sense (encrypted i guess). is there now way to decrypt the files from the situation as is? i do not mind, as i back upped all the important stuff, but if possible i would do without format.
btw. i came from lineage os. what i did: i wiped data, system, cache and data, then installed the rom ( included gapps) and magisk. then restarted.
Click to expand...
Click to collapse
Use the latest TWRP from here https://forum.xda-developers.com/k2...cial-twrp-xiaomi-redmi-t3944363/post79823568. Go with the latest unofficial as it is the same as the official version, but with some minor bug fixes added.
Orange Fox is only really worth using when sticking with MIUI. Most of it's extra functions are MIUI specific.
When you get into this situation, unfortunately, there is nothing that can be done to recover or decrypt the data partition, as far as I know.
Normally going from one AOSP ROM to another you should be OK and won't need to format data. But occasionally this problem will happen, I've had it happen when going from LOS to AOSiP. Formatting data in TWRP, when this happens, will then allow you to boot into your new ROM. I haven't yet found out why this sometimes happens.
You will just need to backup your data whenever you flash a ROM, just in case this happens again.
Robbo.5000 said:
Use the latest TWRP from here https://forum.xda-developers.com/k2...cial-twrp-xiaomi-redmi-t3944363/post79823568. Go with the latest unofficial as it is the same as the official version, but with some minor bug fixes added.
Orange Fox is only really worth using when sticking with MIUI. Most of it's extra functions are MIUI specific.
When you get into this situation, unfortunately, there is nothing that can be done to recover or decrypt the data partition, as far as I know.
Normally going from one AOSP ROM to another you should be OK and won't need to format data. But occasionally this problem will happen, I've had it happen when going from LOS to AOSiP. Formatting data in TWRP, when this happens, will then allow you to boot into your new ROM. I haven't yet found out why this sometimes happens.
You will just need to backup your data whenever you flash a ROM, just in case this happens again.
Click to expand...
Click to collapse
Thanks man, many thanks. did flash the twrp and it worked out. having some minor problems with the rom, but in general it worked out fine
much appreciated.
Hello everyone, this thread is a guide on how to enable encryption on ROMs that have it disabled.
ROMs that have encryption disabled, usually do it because TWRP is not fully working, or they want to make switching ROMs an easier task.
This zip was created for, and only tested on Official CrDroid on Oneplus 7 Pro (guacamole), developed by Gabriel Lup.
This patch might work for other ROMs, but support is NOT guaranteed.
Before we start, a disclaimer
I am not responsible for any data loss that occurs because steps were not followed correctly.
Speaking of data loss, you will NEED to backup your data before you start, because you will be completely formatting your device in the process.
Installation steps:
Download the ROM and flash it in TWRP or fastboot
After ROM is finished installing, reboot to recovery, so that you use the slot you installed your ROM to. If you didn't flash TWRP after installing the ROM, then reboot to fastboot and boot TWRP.
After booting TWRP, and active slot having the ROM installed, flash the enable_encryption.zip
Now go to Wipe > Format data > Type yes.
Now reboot to system, and you will be encrypted. You can check by going into Settings > Security > Encryption and credentials, or you can boot TWRP and check for yourself, after setting a password of course.
Note: Flash Magisk, ONLY after your first boot, and after you have confirmed you're encrypted. Flashing most of the other stuff before first boot, like gapps, should be fine.
Upgrade steps:Unfortunately, upgrading ROM via OTA is out of the question, so you will need to update via TWRP or fastboot.
Theoretically it can be done because the updated partition is not booted, and there are apps that can flash zip files while system is booted, but I won't be trying it soon, pure and simply because some users lose root after taking an OTA, because of Magisk's addon.d survival script, and without root, modifying partitions is impossible.
There are some workarounds for this problem as well but I won't get into that.
After downloading the zip file of your ROM, and enable_encryption.zip, boot to TWRP.
Flash the update for the ROM.
Reboot to TWRP, or go to fastboot and boot it again.
Flash enable_encryption.zip, magisk if you want it, and reboot system. [NOTE: if your ROM maintainer needs you to flash anything after an update, you can do that as well after flashing this zip.]
You should be fine, and prompted for a password.
Issues that might occur:The first issue that everyone might point out is
What if I forget to flash the zip after an update, or if I take an OTA?
This is an easy fix, as long as you don't panic. If you boot the ROM without flashing the enable encryption zip, instead of "Enter your password", you will be greeted with "Encryption unsuccessful, to resume using your phone, you will need to factory reset" with a button that says "Erase all data".
DO NOT ERASE ALL DATA, THIS CAN BE EASILY FIXED.
Just go to TWRP, and flash the zip to enable encryption, then reboot, you should be able to enter your password and continue using your device.
Another one could be
What if TWRP currently doesn't support decryption?
Yeah, this happens quite a lot with guacamole and Android 11. Oneplus loves changing how encryption works whenever TWRP maintainer makes it work.
This doesn't matter that much, you can sideload both ROM and this zip, regardless of if TWRP can actually read your data or not.
And finally
Installation of the zip is failing, why?
Well, there are 3 reasons if it ever fails, first one you could solve by redownloading it, or transferring it to device/sideloading again.
The second one, could be that the ROM maintainer packaged the ROM with 100% reserved blocks in the vendor.img, thus disabling writes. I personally don't think this will ever happen on our device, but it could happen.
The third one could be solved by trying out another TWRP.
This zip uses the default encryption method that is used by stock ROM, and that is fileencryption=ice, just a thing to note when choosing to flash this.
Because of this, this zip will not work if a ROM used FBEV2, and then was disabled by the maintainer, this only enables the default FBE we have on our device.
I can't get encryption working with latest crDroid build (7.9 from August 7th). I'm getting ERROR 1 after flashing enable_encryption.zip.
I tried with both regular and FBEv2 TWRP from Nebrassy, same error. If I try to flash enable_encryption.zip a second time, it doesn't return any error but after formatting data and rebooting to system, the phone reboots to TWRP.
Any idea?
Toutatis_ said:
I can't get encryption working with latest crDroid build (7.9 from August 7th). I'm getting ERROR 1 after flashing enable_encryption.zip.
I tried with both regular and FBEv2 TWRP from Nebrassy, same error. If I try to flash enable_encryption.zip a second time, it doesn't return any error but after formatting data and rebooting to system, the phone reboots to TWRP.
Any idea?
Click to expand...
Click to collapse
Strange, try and get me a recovery log by copying /tmp/recovery.log to somewhere accessible after you encounter the error.
I get no problems flashing it. Try using Nebrassy's latest TWRP, I used that one.
Xenos7 said:
Strange, try and get me a recovery log by copying /tmp/recovery.log to somewhere accessible after you encounter the error.
I get no problems flashing it. Try using Nebrassy's latest TWRP, I used that one.
View attachment 5380447
Click to expand...
Click to collapse
Sorry, I ended up flashing another ROM as I don't want to be unencrypted. I might try again later and I'll make sure to get a log this time if still getting the error. Thank you!
Hello there,
I, too, have a problem with flashing CrDroid 7 with encryption. For context, I come from CrDroid 6, which I didn't want to leave unless we can encrypt CrDroid 7.
What I did :
-> MSM Tool in order to fully reset my phone and cleanly install OOS 10 and update to OOS 11 (only way actually, since I had a pesky error related to TWRP being unable to decrypt FBE, which made it kinda impossible to do anything)
-> Unlock bootloader
-> Boot into Nebrassys's TWRP and advance -> flash
-> Installed CrDroid 7.9 (from August 7th) on slot A
-> Switched Slot to Slot A and rebooted to recovery
-> Here, I didn't really got why, but I booted into stock recovery, so I ended up in fastboot to flash Nebrassy's TWRP and advance -> flash it again
From here, I really didn't get what happened or why.
-> Booted into TWRP to find that it can't access /data/media/TWRP/somethingElse
-> Thought that it wasn't normal since I was supposed to flash tyour zip at this point, but since I couldn't access Internal Storage neither from my phone or computer, I decided to format /data with imputing 'yes' in order to "reset" encryption keys and set it available for current TWRP.
-> Reboot to recovery to be able to use /data again
-> Ended up with a "E : Unable to decrypt FBE device", which really makes Internal Storage unavailable. From here, I just had to MSM Tool back too OOS 11 like in first step in order to get a usable phone once again.
I don't really get what I did wrong, so if you have any input, I'm willing to learn :/ Thanks in advance !
Aurion13 said:
Hello there,
I, too, have a problem with flashing CrDroid 7 with encryption. For context, I come from CrDroid 6, which I didn't want to leave unless we can encrypt CrDroid 7.
What I did :
-> MSM Tool in order to fully reset my phone and cleanly install OOS 10 and update to OOS 11 (only way actually, since I had a pesky error related to TWRP being unable to decrypt FBE, which made it kinda impossible to do anything)
-> Unlock bootloader
-> Boot into Nebrassys's TWRP and advance -> flash
-> Installed CrDroid 7.9 (from August 7th) on slot A
-> Switched Slot to Slot A and rebooted to recovery
-> Here, I didn't really got why, but I booted into stock recovery, so I ended up in fastboot to flash Nebrassy's TWRP and advance -> flash it again
Click to expand...
Click to collapse
You booted back into stock recovery because when you flash crDroid, it flashes stock lineage recovery.
Aurion13 said:
From here, I really didn't get what happened or why.
-> Booted into TWRP to find that it can't access /data/media/TWRP/somethingElse
-> Thought that it wasn't normal since I was supposed to flash tyour zip at this point, but since I couldn't access Internal Storage neither from my phone or computer, I decided to format /data with imputing 'yes' in order to "reset" encryption keys and set it available for current TWRP.
-> Reboot to recovery to be able to use /data again
-> Ended up with a "E : Unable to decrypt FBE device", which really makes Internal Storage unavailable. From here, I just had to MSM Tool back too OOS 11 like in first step in order to get a usable phone once again.
I don't really get what I did wrong, so if you have any input, I'm willing to learn :/ Thanks in advance !
Click to expand...
Click to collapse
You should consider trying to sideload the enable encryption zip rather than relying on internal storage. After you side load you need to factory reset and then boot to system.
Another thing you can try is to boot crDroid unencrypted, and then reboot to recovery, flash enable encryption zip, then factory reset and reboot to system.
Thanks for your reply !
gruntparty said:
You booted back into stock recovery because when you flash crDroid, it flashes stock lineage recovery.
Click to expand...
Click to collapse
Yeaaaaaaah, it was obvious, but I missed this so hard. I totally forgot that you had to flash back TWRP when you first flash it. Thanks !
gruntparty said:
You should consider trying to sideload the enable encryption zip rather than relying on internal storage. After you side load you need to factory reset and then boot to system.
Another thing you can try is to boot crDroid unencrypted, and then reboot to recovery, flash enable encryption zip, then factory reset and reboot to system.
Click to expand...
Click to collapse
I'm not used to use sideloading, so I tried on your advice. I didn't managed to make the installation work sadly, I don't really know why, and tbh, I can't really lose time on evenings anymore. I'll try again this week-end. I'll update at this moment if I succed (or not) and with a recovery.log. But when I installed CrDroid with sideload, TWRP kept telling me that no OS was installed, with or whitout changing slot. I still didn't managed to patch the enable_encryption.zip, I got a "error: 1" which don't really talks a lot to me. So... More to come soon I guess.
Anyway, thanks for the help, and thanks for providing the zip too, it was just what I needed to hop on CrDroid 7.
Hello again,
Little update : I did it
I guess being tired didn't really served me well, and I surely did some strange things when flashing the rom since I managed to do it just a few minutes ago.
Regarding the enable_encryption.zip, I also encountered the "Updater process ended with ERROR: 1". I went to check the logs and there was this :
Code:
file size 2093, block size 65536
Installing zip file '/sideload/package.zip'
unknown fuse request opcode 2016
I:Update binary zip
Verifying package compatibility...
Package doesn't contain compatibility.zip entry
I:Extracting updater binary 'META-INF/com/google/android/update-binary'
I:Zip does not contain SELinux file_contexts file in its root.
mount: '/vendor' not in fstab
sed: /vendor/etc/fstab.qcom: No such file or directory
umount: /vendor: Invalid argument
Updater process ended with ERROR: 1
I thought the "mount: '/vendor' not in fstab" strange, so I tried to mount Vendor partition, reflashed the zip, and it worked. I just checked in settings and it says I'm encrypted, I rebooted in TWRP and it asked me for my password.
I think that this would need to be added in first post @Xenos7 and it will also probably fix the issue of @Toutatis_
Again, thanks a lot for proving the zip and for the support guys !
i installed latest update of CrDroid and followed the instruction of upgrading steps but the phone has gone to bootloop. Any solution for this?
Xenos7 said:
Hello everyone, this thread is a guide on how to enable encryption on ROMs that have it disabled.
ROMs that have encryption disabled, usually do it because TWRP is not fully working, or they want to make switching ROMs an easier task.
This zip was created for, and only tested on Official CrDroid on Oneplus 7 Pro (guacamole), developed by Gabriel Lup.
This patch might work for other ROMs, but support is NOT guaranteed.
Before we start, a disclaimer
I am not responsible for any data loss that occurs because steps were not followed correctly.
Speaking of data loss, you will NEED to backup your data before you start, because you will be completely formatting your device in the process.
Installation steps:
Download the ROM and flash it in TWRP or fastboot
After ROM is finished installing, reboot to recovery, so that you use the slot you installed your ROM to. If you didn't flash TWRP after installing the ROM, then reboot to fastboot and boot TWRP.
After booting TWRP, and active slot having the ROM installed, flash the enable_encryption.zip
Now go to Wipe > Format data > Type yes.
Now reboot to system, and you will be encrypted. You can check by going into Settings > Security > Encryption and credentials, or you can boot TWRP and check for yourself, after setting a password of course.
Note: Flash Magisk, ONLY after your first boot, and after you have confirmed you're encrypted. Flashing most of the other stuff before first boot, like gapps, should be fine.
Upgrade steps:Unfortunately, upgrading ROM via OTA is out of the question, so you will need to update via TWRP or fastboot.
Theoretically it can be done because the updated partition is not booted, and there are apps that can flash zip files while system is booted, but I won't be trying it soon, pure and simply because some users lose root after taking an OTA, because of Magisk's addon.d survival script, and without root, modifying partitions is impossible.
There are some workarounds for this problem as well but I won't get into that.
After downloading the zip file of your ROM, and enable_encryption.zip, boot to TWRP.
Flash the update for the ROM.
Reboot to TWRP, or go to fastboot and boot it again.
Flash enable_encryption.zip, magisk if you want it, and reboot system. [NOTE: if your ROM maintainer needs you to flash anything after an update, you can do that as well after flashing this zip.]
You should be fine, and prompted for a password.
Issues that might occur:The first issue that everyone might point out is
What if I forget to flash the zip after an update, or if I take an OTA?
This is an easy fix, as long as you don't panic. If you boot the ROM without flashing the enable encryption zip, instead of "Enter your password", you will be greeted with "Encryption unsuccessful, to resume using your phone, you will need to factory reset" with a button that says "Erase all data".
DO NOT ERASE ALL DATA, THIS CAN BE EASILY FIXED.
Just go to TWRP, and flash the zip to enable encryption, then reboot, you should be able to enter your password and continue using your device.
Another one could be
What if TWRP currently doesn't support decryption?
Yeah, this happens quite a lot with guacamole and Android 11. Oneplus loves changing how encryption works whenever TWRP maintainer makes it work.
This doesn't matter that much, you can sideload both ROM and this zip, regardless of if TWRP can actually read your data or not.
And finally
Installation of the zip is failing, why?
Well, there are 3 reasons if it ever fails, first one you could solve by redownloading it, or transferring it to device/sideloading again.
The second one, could be that the ROM maintainer packaged the ROM with 100% reserved blocks in the vendor.img, thus disabling writes. I personally don't think this will ever happen on our device, but it could happen.
The third one could be solved by trying out another TWRP.
This zip uses the default encryption method that is used by stock ROM, and that is fileencryption=ice, just a thing to note when choosing to flash this.
Because of this, this zip will not work if a ROM used FBEV2, and then was disabled by the maintainer, this only enables the default FBE we have on our device.
Click to expand...
Click to collapse
Hi! Done. Followed all steps and crdroid is now encrypted. But! Very strange behavior which I tested several times. After having OS encrypted I decided to go again to recovery, now from crdroid power/restart menu. But recovery didn't load. Instead, I had a recovery (TWRP Nebrassy) logo flicking. I hard-switched to fastboot, then fastboot boot twrp.img, and entered TWRP menu (temporary TWRP). In there I was trying to flash TWRP on permanent basis again but it failed with an error about mounting data. Format data didn't help. So, I stayed on temporary TWRP and after reboot to System, surprisingly successfully entered my crdroid. The same happens (checked) if I would reboot to Recovery - instead of Recovery I would enter crdroid. The only explanation I see is that encryption (done with this zip) blocks permanently installed TWRP from starting. In case of temporary TWRP it's just being disappeared after reboot and I can enter the system whatever option I choose in temporary TWRP: system or recovery. It would be OK but the sad thing I need the both encryption and recovery. Any ideas?
P.S. I tried also Orangefox recovery - the same story : logo flicking after the try to restart from encrypted crdroid to recovery.
Yagikable said:
Hi! Done. Followed all steps and crdroid is now encrypted. But! Very strange behavior which I tested several times. After having OS encrypted I decided to go again to recovery, now from crdroid power/restart menu. But recovery didn't load. Instead, I had a recovery (TWRP Nebrassy) logo flicking. I hard-switched to fastboot, then fastboot boot twrp.img, and entered TWRP menu (temporary TWRP). In there I was trying to flash TWRP on permanent basis again but it failed with an error about mounting data. Format data didn't help. So, I stayed on temporary TWRP and after reboot to System, surprisingly successfully entered my crdroid. The same happens (checked) if I would reboot to Recovery - instead of Recovery I would enter crdroid. The only explanation I see is that encryption (done with this zip) blocks permanently installed TWRP from starting. In case of temporary TWRP it's just being disappeared after reboot and I can enter the system whatever option I choose in temporary TWRP: system or recovery. It would be OK but the sad thing I need the both encryption and recovery. Any ideas?
P.S. I tried also Orangefox recovery - the same story : logo flicking after the try to restart from encrypted crdroid to recovery.
Click to expand...
Click to collapse
Forgot to add: Format data failed with "couldn't format encrypted data"
Yagikable said:
Hi! Done. Followed all steps and crdroid is now encrypted. But! Very strange behavior which I tested several times. After having OS encrypted I decided to go again to recovery, now from crdroid power/restart menu. But recovery didn't load. Instead, I had a recovery (TWRP Nebrassy) logo flicking. I hard-switched to fastboot, then fastboot boot twrp.img, and entered TWRP menu (temporary TWRP). In there I was trying to flash TWRP on permanent basis again but it failed with an error about mounting data. Format data didn't help. So, I stayed on temporary TWRP and after reboot to System, surprisingly successfully entered my crdroid. The same happens (checked) if I would reboot to Recovery - instead of Recovery I would enter crdroid. The only explanation I see is that encryption (done with this zip) blocks permanently installed TWRP from starting. In case of temporary TWRP it's just being disappeared after reboot and I can enter the system whatever option I choose in temporary TWRP: system or recovery. It would be OK but the sad thing I need the both encryption and recovery. Any ideas?
P.S. I tried also Orangefox recovery - the same story : logo flicking after the try to restart from encrypted crdroid to recovery.
Click to expand...
Click to collapse
I never install TWRP, so I can't really say about that, but I'm sure the zip shouldn't impact the recovery installing/booting.
Try downloading the latest version of Nebraccy TWRP, the August one. That one should work if OnePlus didn't change something with encryption again.
This zip doesn't even touch the boot partition, it only edits 2 lines in vendor partition, which would never make TWRP unable to install.
However, last time I tried, in June and decrypted, TWRP wouldn't install at all anyways.
Xenos7 said:
I never install TWRP, so I can't really say about that, but I'm sure the zip shouldn't impact the recovery installing/booting.
Try downloading the latest version of Nebraccy TWRP, the August one. That one should work if OnePlus didn't change something with encryption again.
This zip doesn't even touch the boot partition, it only edits 2 lines in vendor partition, which would never make TWRP unable to install.
However, last time I tried, in June and decrypted, TWRP wouldn't install at all anyways.
Click to expand...
Click to collapse
Thanks. When next update for crdroid comes, I'll try again from the scratch. Meanwhile, the issue was magically solved. I was sick and tired with this flicking recovery and decided to flash lineage recovery from the command line. It was a surprise when instead of seeing lineage after reboot I saw my Nebrassy TWRP fully loaded and never flicking since then. Crdroid has also successfully run encrypted. I have no explanation for that. Maybe it has something to do with a/b slots but I'm sure I've been choosing the right slots all the time.
Use this to enable FBEv2 instead of sdcardfs. Use the instructions from the OP.
Mount vendor in TWRP before flashing. Also, flash an FBEv2 kernel.
EDIT: Don't complain to the dev or me if your data is gone or your device blows up.
darkflicker said:
Use this to enable FBEv2 instead of sdcardfs. Use the instructions from the OP.
Mount vendor in TWRP before flashing. Also, flash an FBEv2 kernel.
Click to expand...
Click to collapse
Why would you purposely try to break stuff?
Technically, that IS possible, but, just, why?
You receive no visible benefits, and you could lose all your data once major Android version is updated...
Not to mention users will complain to dev when random bugs happen because they use some out of the nowhere kernel.
As for sdcardfs or fuse?
I can bet that people CAN'T know the difference between them, looking at the fact everyone asks if the ROM is sdcardfs or not.
Fact is, using this method on a ROM that's supposed to use regular FBE, is possible, but NOT recommended.
Putting all your data on the line because of theoretical performance bumps is a plainly stupid idea if you ask me.
Either use a FBEV2 ROM, or don't, although people make a big fuss about it being sdcardfs or not, FBEV2 or not.
Those things should NEVER be a deciding factor, because every non developer user, really can't tell the difference.
Xenos7 said:
Why would you purposely try to break stuff?
Technically, that IS possible, but, just, why?
You receive no visible benefits, and you could lose all your data once major Android version is updated...
Not to mention users will complain to dev when random bugs happen because they use some out of the nowhere kernel.
As for sdcardfs or fuse?
I can bet that people CAN'T know the difference between them, looking at the fact everyone asks if the ROM is sdcardfs or not.
Fact is, using this method on a ROM that's supposed to use regular FBE, is possible, but NOT recommended.
Putting all your data on the line because of theoretical performance bumps is a plainly stupid idea if you ask me.
Either use a FBEV2 ROM, or don't, although people make a big fuss about it being sdcardfs or not, FBEV2 or not.
Those things should NEVER be a deciding factor, because every non developer user, really can't tell the difference.
Click to expand...
Click to collapse
You are also forcefully trying to enable encryption on a decrypted and unsupported ROM. The chances of breakage are similar for both. I am just providing the users a choice. If anything breaks, nobody is responsible but them.
darkflicker said:
You are also forcefully trying to enable encryption on a decrypted and unsupported ROM. The chances of breakage are similar for both. I am just providing the users a choice. If anything breaks, nobody is responsible but them.
Click to expand...
Click to collapse
The ROM fully supports encryption on it's kernel, dev is just not using it to keep TWRP support, this was before A11 TWRP got released. I'm assuming he doesn't want users to clean flash just because of encryption.
This zip just reverts the commit made to fstab to disable encryption, and you're still using the kernel developer intended.
But sure, if someone breaks their device, it's their own fault.
Fellas yall going backwards with all this. Encryption is the devil.
Updated the zip to include checks to unmount vendor if someone mounted it manually, so that it shouldn't get errors for that now.
The zip can be found in OP.
Xenos7 said:
Hello everyone, this thread is a guide on how to enable encryption on ROMs that have it disabled.
ROMs that have encryption disabled, usually do it because TWRP is not fully working, or they want to make switching ROMs an easier task.
This zip was created for, and only tested on Official CrDroid on Oneplus 7 Pro (guacamole), developed by Gabriel Lup.
This patch might work for other ROMs, but support is NOT guaranteed.
Before we start, a disclaimer
I am not responsible for any data loss that occurs because steps were not followed correctly.
Speaking of data loss, you will NEED to backup your data before you start, because you will be completely formatting your device in the process.
Installation steps:
Download the ROM and flash it in TWRP or fastboot
After ROM is finished installing, reboot to recovery, so that you use the slot you installed your ROM to. If you didn't flash TWRP after installing the ROM, then reboot to fastboot and boot TWRP.
After booting TWRP, and active slot having the ROM installed, flash the enable_encryption.zip
Now go to Wipe > Format data > Type yes.
Now reboot to system, and you will be encrypted. You can check by going into Settings > Security > Encryption and credentials, or you can boot TWRP and check for yourself, after setting a password of course.
Note: Flash Magisk, ONLY after your first boot, and after you have confirmed you're encrypted. Flashing most of the other stuff before first boot, like gapps, should be fine.
Upgrade steps:Unfortunately, upgrading ROM via OTA is out of the question, so you will need to update via TWRP or fastboot.
Theoretically it can be done because the updated partition is not booted, and there are apps that can flash zip files while system is booted, but I won't be trying it soon, pure and simply because some users lose root after taking an OTA, because of Magisk's addon.d survival script, and without root, modifying partitions is impossible.
There are some workarounds for this problem as well but I won't get into that.
After downloading the zip file of your ROM, and enable_encryption.zip, boot to TWRP.
Flash the update for the ROM.
Reboot to TWRP, or go to fastboot and boot it again.
Flash enable_encryption.zip, magisk if you want it, and reboot system. [NOTE: if your ROM maintainer needs you to flash anything after an update, you can do that as well after flashing this zip.]
You should be fine, and prompted for a password.
Issues that might occur:The first issue that everyone might point out is
What if I forget to flash the zip after an update, or if I take an OTA?
This is an easy fix, as long as you don't panic. If you boot the ROM without flashing the enable encryption zip, instead of "Enter your password", you will be greeted with "Encryption unsuccessful, to resume using your phone, you will need to factory reset" with a button that says "Erase all data".
DO NOT ERASE ALL DATA, THIS CAN BE EASILY FIXED.
Just go to TWRP, and flash the zip to enable encryption, then reboot, you should be able to enter your password and continue using your device.
Another one could be
What if TWRP currently doesn't support decryption?
Yeah, this happens quite a lot with guacamole and Android 11. Oneplus loves changing how encryption works whenever TWRP maintainer makes it work.
This doesn't matter that much, you can sideload both ROM and this zip, regardless of if TWRP can actually read your data or not.
And finally
Installation of the zip is failing, why?
Well, there are 3 reasons if it ever fails, first one you could solve by redownloading it, or transferring it to device/sideloading again.
The second one, could be that the ROM maintainer packaged the ROM with 100% reserved blocks in the vendor.img, thus disabling writes. I personally don't think this will ever happen on our device, but it could happen.
The third one could be solved by trying out another TWRP.
This zip uses the default encryption method that is used by stock ROM, and that is fileencryption=ice, just a thing to note when choosing to flash this.
Because of this, this zip will not work if a ROM used FBEV2, and then was disabled by the maintainer, this only enables the default FBE we have on our device.
Click to expand...
Click to collapse
Is this enable_encryption.zip only works for oneplus 7 pro ?? If so then can you please provide the file that works for Mi A2.