Bricked P20, TWRP is encrypted. How can I factory reset? - Huawei P20 Pro Questions & Answers

Basically I tried to install a new substratum theme and rebooted. Stuck on a bootloop. Tried going to TWRP but my TWRP is encrypted. I am on stock EMUI. Anywhere I can get around this?

i know some versions of twrp ask you the encryption key so that it can access the files.

Fixed it by flashing stock recovery and doing a full wipe.

So what use is TWRP if this happens and the date is encrypted?

You need to remove all of your lockscreen protection first in order to use TWRP.

Related

TWRP for Nougat?

Is there any TWRP img available that can be used on EMUI5/Android Nougat on P9 Plus? I am on VIE-AL10 and all the ones I found doesn't seem to be compatible with EMUI 5. When I flash them to recovery2 and tried to hold Volume Up while booting, all I get is Your Device is booting now and it doesn't actually go to the recovery.
If there is any other recovery image that might work with Nougat I am willing to give it a try too. Or even better, if there is any way I can install SuperSu without recovery since that's pretty much all I need the recovery for.
So as mine, and I cannot clear my phone, factory reset since I tried flashing marshmallow TWRP. I wanna clear all the Chinese apps and contacts on my phone, so I need TWRP and root
I am in the same situation...
Maybe edit system.img to include SuperSu?
pan.baidu.com/s/1nuIjxYp

TWRP issue

so i installed TWRP recovery on my N950F/FD model, i want to flash mods or ROMs from internal storage, but it always shows like it's not mounted or its empty and nothing in it
but external SD works perfectly
any solutions ?
After installing TWRP you need to wipe data to remove encryption, then reboot back into TWRP. Internal storage will then be mountable. If you are not flashing a custom rom or root at this time, flash no verity before booting to system (and rmm state fix if you have OEM lock issue).
In addition, if you are on Oreo, you need to use TWRP updated for Oreo by kairi_zeroblade.
shouren04 said:
After installing TWRP you need to wipe data to remove encryption, then reboot back into TWRP. Internal storage will then be mountable. If you are not flashing a custom rom or root at this time, flash no verity before booting to system (and rmm state fix if you have OEM lock issue).
In addition, if you are on Oreo, you need to use TWRP updated for Oreo by kairi_zeroblade.
Click to expand...
Click to collapse
well my phone is 6 months old so i persumed i had the OEM lock issue when i really don't know if it existed, as for the TWRP flashing, after first time flashing i wiped entire phone twice before i flashed custom ROM, and where can i find that latest TWRP by kairi ?
Warnahly said:
well my phone is 6 months old so i persumed i had the OEM lock issue when i really don't know if it existed, as for the TWRP flashing, after first time flashing i wiped entire phone twice before i flashed custom ROM, and where can i find that latest TWRP by kairi ?
Click to expand...
Click to collapse
Here you go:
https://github.com/zeroblade1984/samsung_exynos8895/releases/tag/TWRP_OREO
Flash in TWRP. In case you have never updated TWRP in TWRP before..... select Install, then select Install Image, choose the img file, be sure to flash to Recovery partition when promted, then reboot back to TWRP & see if internal storage is mountable.

Problems with custom recoveries.

Why is it that when I flash TWRP following the steps provided on the official website my Redmi 4X gets stuck on the logo when powered on? At this point the only thing I can do is access TWRP and even then I am asked for a password. I also performed a factory reset from TWRP and even though I can use TWRP just fine the stock ROM still doesn't boot.
So, what do I have to do in order to have a proper working recovery with MIUI installed? I read something about boot verification but didn't really understand it ?
First off install lazyflasher.zip then format (not factory data reset) data from TWRP.
Good to go!
use redwolf recovery

[Guide] Enable encryption on a custom ROM which has it disabled by default

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.

TWRP stuck at splash screen

Hello. I'm trying to load into custom recovery to work on my phone. It's bootlooped so I can't boot my phone and open it.
I've tried with different twrps but they all get stuck at the twrp logo. I know the obvious solution is to factory reset, then twrp will work. But I don't want to lose the data. It's probably because of the F2FS file format that makes twrp loading very slow. But I've already tried loading for 15 hours, and it's still not loading. Is there any other custom recovery that could work? Or any other way to boot into custom recovery or recover my files?
Wayne, lineage os 18.1
suvtropics said:
Hello. I'm trying to load into custom recovery to work on my phone. It's bootlooped so I can't boot my phone and open it.
I've tried with different twrps but they all get stuck at the twrp logo. I know the obvious solution is to factory reset, then twrp will work. But I don't want to lose the data. It's probably because of the F2FS file format that makes twrp loading very slow. But I've already tried loading for 15 hours, and it's still not loading. Is there any other custom recovery that could work? Or any other way to boot into custom recovery or recover my files?
Wayne, lineage os 18.1
Click to expand...
Click to collapse
At the first installation of a custom rom you must format the data then flash the rom.
Is there any way to recover my files? They are in the internal storage. I've been using los 18.1 for a while before it bootlooped out of nowhere.
suvtropics said:
Is there any way to recover my files? They are in the internal storage. I've been using los 18.1 for a while before it bootlooped out of nowhere.
Click to expand...
Click to collapse
If there is a Twrp/O.F for your phone, install it and try a backup (not sure it works).

Categories

Resources