Problematic Xiaomi MI 9T - can't flash due to encrypted partition - Redmi K20 / Xiaomi Mi 9T Questions & Answers

Hi everyone, I just bought myself a MI 9T davinci global version. I wanted to make it so that it is nethunter, but It just doesn't work. I try everytime to flash recovery first then image, but when I try to copy images for flashing this **** comes up.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I can't copy anything inside. I am looking for any image of a ROM but when I choose MIUI 11 for 9T, the official one, just so I can flash it somehow I can't do it, becuase Chinese little hands did something unexpected, I have to LOG IN to flash MY hardware with software I want.
What the f is going on? I can't flash dm-verify because I can't put it on the phone anywhere, I can't flash ****. What can I do? I have currently MIUI 12.4 I think.

johan.drykke said:
Hi everyone, I just bought myself a MI 9T davinci global version. I wanted to make it so that it is nethunter, but It just doesn't work. I try everytime to flash recovery first then image, but when I try to copy images for flashing this **** comes up.
View attachment 5668491
I can't copy anything inside. I am looking for any image of a ROM but when I choose MIUI 11 for 9T, the official one, just so I can flash it somehow I can't do it, becuase Chinese little hands did something unexpected, I have to LOG IN to flash MY hardware with software I want.
What the f is going on? I can't flash dm-verify because I can't put it on the phone anywhere, I can't flash ****. What can I do? I have currently MIUI 12.4 I think.
Click to expand...
Click to collapse
Very simple. When you open TWRP, it should ask you for the PIN. You have to enter the same PIN/Pattern you use the same for unlocking the screen in Android
Use the latest official TWRP from TWRP.me
It's nothing specific to Mi 9T or Xiaomi, it's a very good protection enforced by Google couple of years ago with A10 - TWRP cannot decrypt your Internal memory data without your pin.
Just consider your phone gets lost and somebody boots to TWRP - would you like him to be able to see your photos, documents, etc

The thing is, I had pin, 1234, I flashed twrp official through fastboot, It didn't ask for it, partition is still encrypted. Whet next? I tried wiping **** out of sdcard putting image there and flashing it, PicselExp, bootloop willkomen. Nothing is working, I am glad I flashed recovery though.
Please stop moralizing, I bought this phone because I want to play with it, not to store DEFCON 2 documents on it.
EDIT1: Sorry for beeing harsh, just I think that this 'davinci' is different than other 'davinci' and for the love of God, I hate TiVoization.

johan.drykke said:
Please stop moralizing...
Click to expand...
Click to collapse
I'm not noraluzing, I wanted to help, now I don't care anymore. Google will be your friend, everything relevant can be found there
Good luck

use fastboot to flash stock ROM (fastboot ROM). then from stock removeall safety patterns, fingers, go to flashing twrp with fastboot, boot to twrp, format data, flash whatever you want
be polite or get the f...out of this forum

Hi!
I'm having a somewhat similar yet kind of different problem : long story short I was able to flash a ROM once last week, it bricked my device and the internal storage got encrypted just like that, I somehow managed to manually flash a stock ROM from ADB and now my device boots properly on a stock MIUI.
The issue is I have no lock pattern anymore and the internal storage is still encrypted so I still can't flash from recovery.
Am I doomed to rock MIUI until my device dies? At what point should TWRP ask me for a pattern?

can't you format data in recovery?
wipe everything in recovery, try to install desired ROM. Hope you have made a backup before encryption

I have not tried yet, does wiping data remove encryption and "read only" ?
I had not backed up before encryption but as long as I have fastboot I have a stock MIUI I could flash with adb, it's kind of tedious but better than nothing.

Crikripex said:
I have not tried yet, does wiping data remove encryption and "read only" ?
I had not backed up before encryption but as long as I have fastboot I have a stock MIUI I could flash with adb, it's kind of tedious but better than nothing.
Click to expand...
Click to collapse
There are two things:
- Data and Internal memory are FBE encrypted:
File-Based Encryption | Android Open Source Project
source.android.com
- System As Root (SAR) = System, Vendor, Product are Read-only
Do not mix/mess-up one with another
---
Format Data does not remove one or another
FORMAT - not Wipe, there are two different buttons in TWRP.
And Format Data only (not System, etc)
After that, reboot to Android, setup your screen unlock pin
Then reboot to TWRP, it must ask you for pin - enter that same pin you did set in Android for screen unlocking
The TWRP (by the FBE mechanism) will be able to decrypt Data and Internal storage.
On a folder or file by file base - just like it works in Android (seemless for you)
Same way you have to enter your pin every time when you reboot to Android - samw you have to enter the pin every time you reboot to TWRP
Because FBE ancryption cannot decrypt without your pin
And that's a good feature (enforced by Google, since Android 10). I don't understand why people are 'afraid' or whatever of that. Thinking it's something strange, unwanted, whatever
If your phone is stolen and the thief reboots to TWRP, he will see scrambled files and folders. If he copies the files to PC - your photos and documents, etc will be scrambled and of no use for him
Without FBE, the thief reboots to TWRP (he cannot to Android since not knowing our pin) and he could copy your files to PC and open them
And things work seamlessly for you, hence no problem at all
---
Read only SAR is something totally different. System filesystems are read-onl and you cannot make any (hard) changes. Even not with Magisk/root
But Magisk privides Systemless mechanism - where every time while booting and initializing Magisk, Magisk mounts the changes asked by Magisk modules.
That way once you are booted, your System appears as it was changed (AdAway hosts file, debloating, Viper4Androud, etc).
Hence again, things work for you seamlessly.
But if you disable/uninstall Magisk module(s) or Magisk itself (or you just reboot with stock Boot img - without Magisk), then you have clean/not changed/not affected System - and since that you have no problem with OTA, etc
No Xiaomi 'features' but things enforced by Google and you will find them in all new phones with new Android versions
Actually, started with Android 10 or so, hence present already for 3 years out.
No more times of KitKat, Open Bootloaders, etc

yes, format data wipes encryption and all of your data.
Without decryption you won't be able to restore data.
Boot to miui, make a backup if that's possible and then boot to recovery, format data and do everything to i stall desired ROM

zgfg said:
There are two things:
- Data and Internal memory are FBE encrypted:
File-Based Encryption | Android Open Source Project
source.android.com
- System As Root (SAR) = System, Vendor, Product are Read-only
Do not mix/mess-up one with another
---
Format Data does not remove one or another
FORMAT - not Wipe, there are two different buttons in TWRP.
And Format Data only (not System, etc)
After that, reboot to Android, setup your screen unlock pin
Then reboot to TWRP, it must ask you for pin - enter that same pin you did set in Android for screen unlocking
The TWRP (by the FBE mechanism) will be able to decrypt Data and Internal storage.
On a folder or file by file base - just like it works in Android (seemless for you)
Same way you have to enter your pin every time when you reboot to Android - samw you have to enter the pin every time you reboot to TWRP
Because FBE ancryption cannot decrypt without your pin
And that's a good feature (enforced by Google, since Android 10). I don't understand why people are 'afraid' or whatever of that. Thinking it's something strange, unwanted, whatever
If your phone is stolen and the thief reboots to TWRP, he will see scrambled files and folders. If he copies the files to PC - your photos and documents, etc will be scrambled and of no use for him
Without FBE, the thief reboots to TWRP (he cannot to Android since not knowing our pin) and he could copy your files to PC and open them
And things work seamlessly for you, hence no problem at all
---
Read only SAR is something totally different. System filesystems are read-onl and you cannot make any (hard) changes. Even not with Magisk/root
But Magisk privides Systemless mechanism - where every time while booting and initializing Magisk, Magisk mounts the changes asked by Magisk modules.
That way once you are booted, your System appears as it was changed (AdAway hosts file, debloating, Viper4Androud, etc).
Hence again, things work for you seamlessly.
But if you disable/uninstall Magisk module(s) or Magisk itself (or you just reboot with stock Boot img - without Magisk), then you have clean/not changed/not affected System - and since that you have no problem with OTA, etc
No Xiaomi 'features' but things enforced by Google and you will find them in all new phones with new Android versions
Actually, started with Android 10 or so, hence present already for 3 years out.
No more times of KitKat, Open Bootloaders, etc
Click to expand...
Click to collapse
yaro666 said:
yes, format data wipes encryption and all of your data.
Without decryption you won't be able to restore data.
Boot to miui, make a backup if that's possible and then boot to recovery, format data and do everything to i stall desired ROM
Click to expand...
Click to collapse
Thank you both so much for your time, help and explainations!
I finally understand what was happening, I had a hard time pinpointing exactly what made my partition encrypted but it does make a whole lot of sense.
I managed to successfully flash ArrowOS 12.1 using sideload after formating. I now know both that my system is naturally encrypted and that it is completely normal and not a result of a flashing error
Last time I flashed a ROM the newest and flashiest android was 9.0 so it's all new to me.
Thanks again!

There is a TWRP (TWRP 3.6.2+ - UNOFFICIAL | Android 12.) specially made to work with android 12 enryption. (The version from Adi is only needed for his supported roms. Otherwise always use the TWRP 3.6.2+ if not declared differently)
Could be useful if you want to OTA update your rom. Otherwise you could be forced to sideload over adb or even make a complete clean flash again.
Selfquote:
[RECOVERY][3.4.0-10][davinci]Official/Unofficial TWRP for Xiaomi Redmi K20 (Stable)
Team Win Recovery Project 3.x, or twrp3 for short, is a custom recovery built with ease of use and customization in mind. Its a fully touch driven user interface no more volume rocker or power buttons to mash. The GUI is also fully XML driven and...
forum.xda-developers.com

Related

[HOW-TO USE TWRP] Make.A.NaNDroiD BacK-Up and Restore on J700t1 (Metro PCS)

Team RejectZ
How to Nandroid Back up and Restore as well as flash zips with TWRP on the Galaxy J700t1 (Metro PCS variant)
Hello , TimmetaL6669 here from Team Rejectz... It feels so good to be back.. So we have been having this little problem with the TWRP when it comes to doing a back up or flash anything because of, "system can't mount -data , failed" "system can't mount external sd card " .. or something along those lines... So after playing with it for awhile I finally figured out what the problem is... We are used to the old file system before Marshmallow... Before Marshmallow and before SE Linux Enforced the system would write directly to data or the sd card by mounting it directly... but with the new security the system writes through the system.. not by mounting thus avoiding potential malware attacks... so if the system can write to itself... so can we... This fix is more simple than I originally thought... there is no need to mount data unless you are flashing a ROM in which case we can use odin....or TWRP... you just have to know from where...So without further adue,
Pre-Requisites:
You must be Rooted usisng Mese2050's ported TWRP recovery and flashing SU binaries or by using Paco's Method.
You must have a micro SD card with at least 4 GB on it for your zips and backups
WARNINGS: DO NOT WIPE DATA OR CASHE OR DALVIK CASHE FOR ANY REASON YOU WILL END UP IN A BOOT LOOP OR AT THE RESTORE SCREEN
There isn't any reason to change cashe or data unless you are doing a full ROM change ..... Odin does this anyway when you odin so unless you just made an entire ROM with kernel and recovery included with STOCK cashe then DON'T WIPE CASHE OR DATA on marshmallow.. New security.. They did away with us messing with DATA or CASHE.... No need anyway for a back up or restore or to flash zips.... a good updater script for zips for marshmallow will mount the System anyway.
To Nandroid Back UP:
1. Boot into TWRP and click BACK UP. You're gonna need to switch your storage.... Switch your storage to Micro SDCard STORAGE .. because thats where we are going to be making our backup to..Then Swipe to Back up. Wait for your backup to be complete
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
To Nandroid RESTORE:
Boot into TWRP. Click RESTORE. This time though we have been running into the "can't mount storage/ can't mount data" issue ...So..... Instead of switching to your Micro SDCard storage, STAY IN INTERNAL STORAGE. click "go up a level". Click external SD. Find your back up and swipe to Restore.
To Flash zip Files
Again just like with the restore option we are going to stay in the internal storage and click "go up a level" click external sd card and find the zip file you want to flash from your sd card. Click install Image
Thats it. Click thanks if I helped you, Feel free to ask questions if you get stuck. Make sure that you are completely rooted first with SU and Busybox binaries in /system/bin , /system/xbin and root/sbin before you try to use TWRP. Before attempting a back up, or to use TWRP make sure you follow the instructions carefully in Mese2050's TWRP thread.
" Go to [Wipe] -> [Format Data] (not advanced wipe) -> type "yes".
WARNING: This will wipe your internal storage, disable encryption, and factory reset your phone!
Go to [Reboot] -> [Recovery]."
Also ensure that you have "unknown sources" checked in Settings/Security tab. and also in "Developer Options" you wanna have USB debugging and OEM unlock checked too.
This will keep root, Xposed, etc upon restore?
Sent from my SM-J700T1 using XDA-Developers mobile app
needmuchohelp said:
This will keep root, Xposed, etc upon restore?
Sent from my SM-J700T1 using XDA-Developers mobile app
Click to expand...
Click to collapse
Yes.. hut keep a copy of the su zip file on your sd card anyway just in case
needmuchohelp said:
This will keep root, Xposed, etc upon restore?
Sent from my SM-J700T1 using XDA-Developers mobile app
Click to expand...
Click to collapse
Yes.. hut keep a copy of the su zip file on your sd card anyway just in case
Yeah, i do. My sd files look almost exact to bottom screenshot
Sent from my SM-J700T1 using XDA-Developers mobile app
---------- Post added 10-08-2016 at 12:04 AM ---------- Previous post was 09-08-2016 at 11:59 PM ----------
I think I had done this prior to reading this post, but I did smart install of busybox at same time, when I restarted it wasn't reading sd properly and I formatted thinking it would solve issue. Lost data on sd and still didn't fix issue. Did full clean install, normal busy box, everything golden now
Sent from my SM-J700T1 using XDA-Developers mobile app
I am a little confused. I have the SM J700T. I thought I was following Messi2050's instructions. Here's where I am so far. I have a 32gb micro sd card which I did not have installed when I setup Kies3. Kies3 was installed in the PC to install the phone drivers. Correct? I saw the drivers install when I connected the phone having Odin3 running at the same time. After the drivers installed the phone connected to Odin. Then I launched Odin 3 in order to flash a kernel which turned out to be incompatible with the J700T and got the "Kernel is not Seandroid Enforcing" error. I found a recovery image which was supposed to take me back to stock, and it seemed to work in that I could then install the Messi2050 kernel "odin-permissive-kernel-j700t-t1". The install went ok. Then I flashed the TWRP "odintwrp-3.0.2-0-j700t" which seemed to go ok, but when I disconnected the phone from the PC and rebooted into TWRP I was seeing the Enforcing error on the screen until TWRP fully booted. Anyway, I put the Micro SD card in with the SuperSU zip on it and used TWRP to install "UPDATE-SuperSU-v2.46.zip" , which kinda hung on the install until I sorta cancelled it and immediately the install finished. I rebooted and checked for root with Root Checker and after a while I got a successful report. So then I tried to do a backup of the phone as explained above in this thread.. I selected the MicroSD card to back up to and selected all the selectable partitions, but ended up with lots of can't mount data errors. Eventually I selected only system to backup and it succeeded. So now when I boot up the phone I am still seeing the Enforcing error on the initial black boot screen, but it boots normally and I have been able to use rooted tools and apps. I do not have Busybox installed yet as I believe I have to start over to clear the Enforcing error. I also did not follow Messi2050's instruction to MTP the SU file onto the phone while I am in TWRP. (Without exiting TWRP, transfer the SuperSU zip to your device over MTP* and flash it using [Install] in TWRP.) I assume that means you have to have the phone connected to the PC. So how do I fully clear the Enforcing error? Here, in this thread, it says, "WARNINGS: DO NOT WIPE DATA OR CASHE OR DALVIK CASHE FOR ANY REASON YOU WILL END UP IN A BOOT LOOP OR AT THE RESTORE SCREEN ", so there must be something I am missing when Messi2050 says, "-if you want internal storage or data to work in TWRP: Go to [Wipe] -> [Format Data] (not advanced wipe) -> type "yes".
WARNING: This will wipe your internal storage, disable encryption, and factory reset your phone! Go to [Reboot] -> [Recovery]. So somewhere in here I need to get oriented correctly. I think I have to reset the phone but I tried a factory reset but it didn't clear the Enforcing error. I would appreciate a considered response from the members who know what to do!! Thanks
@bromerrill
Messi2050's directions for format data would be from the beginning as in right after you flash kernel and twrp and before you backup using this threads method for backup.
After a backup/restore using this method in this thread, do not wipe anything.
-sent from this device using this app....
OriginalShinken1 said:
@bromerrill
Messi2050's directions for format data would be from the beginning as in right after you flash kernel and twrp and before you backup using this threads method for backup. After a backup/restore using this method in this thread, do not wipe anything.
So, first you use Odin to flash Messi2050's kernel, which, when you reboot gives the Enforcing warning message; then you Odin the TWRP, and then EXACTLY what do you wipe and why and how??
Does this or another step resolve the inability to do a backup of data and the other partitions? I followed the instructions in this thread, but it didn't work.
Perhaps it has to do with the first wipe? Perhaps you could explain why these errors are happening; something to do with the Marshmallo file system? How to resolve it?
Click to expand...
Click to collapse
@bromerrill
Click format data. Type yes (you'll see)
Make sure you have supersu zip on sd card just in case. Then go back to "install" and flash supersu.
Sorry pics are turned.
-sent from this device using this app....
Well it seems we still do not have a handle on this rooting process. After following the instructions and getting root twice, each time upon a reboot after a while the phone gets soft bricked. Getting the Custom binary blocked by FRP error. It could be related to turning off the developer options subsequent to getting root. If that is the case those who know need to advise those who don't not to turn off developer options! As far as this thread is concerned I don't see a clear explanation of the backup / restore procedure. There has to be something you do before using TWRP to do a backup, otherwise you get errors that you can't back up the data, etc. I appreciate the skewed pictures but that doesn't explain anything because there is no procedure explained. I wrote, "then EXACTLY what do you wipe and why and how??" which is not yet answered. How hard is it to do a step by step so all the users can get a clear understanding of the procedure??

[CLOSED][OFFICIAL][RECOVERY] OrangeFox Recovery Project [R10.0]

OrangeFox Recovery Project
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Code:
/*
* Your warranty is now void.
*
* We're not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this recovery
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at us for messing up your device, we will laugh at you.
*
*/
OrangeFox is FREE SOFTWARE​
Supports Treble, Miui, Custom Roms
Downloads:
Sourceforge: https://sourceforge.net/projects/orangefox/files/vince/
OrangeFox website: https://files.orangefox.website/OrangeFox-Stable/vince/
INSTALLATION:
0. Backup your ROM and all your data
1. Download the OrangeFox zip file to your device
2. Reboot to your custom TWRP-based Recovery
3. Install the OrangeFox zip file as a normal zip
4. The device will automatically reboot into OrangeFox recovery after installation (allow this to happen)
5. Enjoy!
Frequently Asked Questions, MIUI OTA, Troubleshooting, and Sundry Information:
* See https://forum.xda-developers.com/showpost.php?p=76885728&postcount=3
Credits
* TeamWin - for TWRP
* The OrangeFox Team - for your hard work
* All our testers - for your patience and help
FEATURES:
* Supports Treble and non-Treble ROMs
* Updated with latest TWRP commits
* Built-in support for installing init.d functionality
* Built-in support for installing Magisk
* AromaFM
* Password
* Support for Miui and Custom ROMs
* Better language support
* Optimized versions of community scripts
* Fox theme engine:
- choice of theme (black, dark, etc)
- choice of color scheme
- choice of splash screen
* Alternative lockscreen
* And many more!
Screenshots
See https://files.orangefox.website/Screenshots/R10/
Other useful information - see below
XDA:DevDB Information
OrangeFox Recovery Project, Tool/Utility for the Xiaomi Redmi Note 5 / 5 Plus
Contributors
DarthJabba9, MrYacha, 4PERTURE
Source Code: https://gitlab.com/OrangeFox
Version Information
Status: Stable
Current Stable Version: R10.0
Stable Release Date: 2019-07-08
Created 2018-06-22
Last Updated 2019-07-09
OrangeFox R10.0 released
We have released OrangeFox R10.0
Changelog: https://files.orangefox.website/OrangeFox-Stable/R10-Changelog.md
Download: https://files.orangefox.website/OrangeFox-Stable/vince/
INSTALLATION:
0. Backup your ROM; backup; backup; backup
1. Download the OrangeFox zip file to your device
2. Reboot to your custom TWRP-based Recovery
3. Install the OrangeFox zip file as a normal zip
4. The device will automatically reboot into OrangeFox recovery after installation (allow this to happen)
5. Enjoy!
Frequently Asked Questions; Installation from stock recovery; MIUI OTA; Troubleshooting; Sundry Information:
* See https://forum.xda-developers.com/showpost.php?p=76885728&postcount=3
------------------:
Our group - https://t.me/joinchat/HNZTNky4zkpWc7na_-Beow
Our channel - https://t.me/OrangeFoxRecovery
Downloads -
* https://files.orangefox.website/OrangeFox-Stable/vince/
* https://sourceforge.net/projects/orangefox/files/vince/
------------------:
Sundry OrangeFox information
FAQ:
#0. I HAVE ENCOUNTERED A PROBLEM WHILE USING ORANGEFOX :
1. Provide the logs - and -
2. Provide a full explanation of precisely what has happened, and precisely how you got to that point. Cryptic or generic statements of something "not working", etc., are quite useless to us. We need full details of everything - and the more the details, the better.
3. If you do not provide both of these, then we will simply ignore any report of any problem. So, it is advisable to (a) learn how to take logs before trying anything, and (b) always take the logs before rebooting after using the recovery.
#1. INSTALLING ORANGEFOX RECOVERY FROM STOCK MIUI RECOVERY (adb/fastboot method):
You need a PC for this. If you do not have a PC, or access to a PC, then you are stuck!
1. Install adb, fastboot, and the relevant USB drivers onto your PC
2. Install the Mi Flash tool onto your PC
3. Download the correct OrangeFox zip file to your phone, and to your PC
4. Extract recovery.img from the OrangeFox zip file, and copy recovery.img to your PC’s adb directory
5. Reboot your phone into fastboot/bootloader mode
6. Unlock your bootloader
7. Open up a command line window on your PC
8. Change to the adb directory on your PC
9. “Hotboot” OrangeFox by running the command: fastboot boot recovery.img
** Note: some devices do not like the "fastboot boot ..." command (eg, lavender). You must NOT run this command on those devices. Rather, you should run the command: fastboot flash recovery.img - and when it has finished flashing, then boot into OrangeFox by using the Power+Vol+ hardware key combination.
10. After OrangeFox has booted up, check that everything is working – eg, that it has mounted the data partition successfully, and that the touchscreen works.
11. Select “Install”, then find and select the OrangeFox zip, and swipe to install it
12. After installation, the phone will automatically reboot into OrangeFox
13. Enjoy!
#2. SETTING UP MIUI OTA (on supported devices):
1. Download the most up-to-date release of OrangeFox Recovery
2. Download a full MIUI ROM that will be the basis of your future MIUI experience, and copy it to your phone’s storage
3. Flash the OrangeFox Recovery zip with your current custom recovery (or follow the steps in the thread for installing from adb/fastboot)
4. Reboot into OrangeFox Recovery (this will have happened automatically if you flashed the OrangeFox zip)
5. Go to the OrangeFox settings, and enable these MIUI OTA settings -
a. Support MIUI incremental OTA
b. Include system in OTA survival
c. Incremental OTA signature verification
d. Aggressive stock recovery deactivation
e. Disable DM-Verity (note: do not enable this for the newest Xiaomi devices released in 2019, or when flashing the latest MIUI ROMs for Android 9.0 or 10.0)
7. Go to the “Wipe” menu, and wipe data, cache, and dalvik
8. Reboot OrangeFox
9. Flash your full MIUI ROM. After the ROM is flashed, OrangeFox will start the "OTA_BAK" process, which will backup your system and boot partitions into the /sdcard/Fox/OTA directory. You must NOT delete any of the files in the /sdcard/Fox/OTA directory. If you do, then incremental OTA updates will most definitely fail.
10. Reboot your phone, and start to use your phone normally
11. When MIUI notifies you that there is an update, download the update, using the MIUI updater app, and allow it to reboot automatically to OrangeFox
12. OrangeFox will install the update automatically (this might take several minutes)
13. OrangeFox will reboot the phone automatically upon completion of the installation of the MIUI OTA update
14. After this, you will not need to flash a full ROM any more - just follow the steps in #10 above
15. If you want to move to a completely different version/build of MIUI, then you will first need to clean-flash the full ROM of that MIUI build, as described above.
#3. RETURNING TO A MIUI ROM FROM A TREBLE ROM:
The cleanest and easiest way to return to MIUI from a custom Treble ROM is to flash a full fastboot MIUI ROM, using the Mi Flash tool. This method should be used in preference to any other method (just ensure that you do not accidentally lock your bootloader again - else, there will be tears). Note that this method will probably format your storage and replace the custom recovery with the stock MIUI recovery. It is generally a good thing to allow your data to be formatted during the flashing of MIUI (so better first backup your apps and settings and data to an external storage device), because this is the best guarantee of trouble-free MIUI. You will subsequently need to flash OrangeFox again using the method described in #1 above.
If you choose to not use method of restoring MIUI that has just been described above, then see the instructions below:
A. Treble ROMs on many older devices use MIUI’s “cust” partition for their vendor image. This process removes the Xiaomi proprietary files that are necessary for MIUI to run. These files must be restored, otherwise MIUI will not work properly. This is not required for devices that have a dedicated vendor partition (ie, those that shipped with a full Treble ROM).
B. For older devices (eg, kenzo, mido, vince) where the cust partition is also used for the treble ROMs' vendor partitions, if you did not create a backup of your MIUI cust partition to MicroSD or USB-OTG before installing a Treble ROM, then you must use the method just described above (ie, flash a full fastboot MIUI ROM, using the Mi Flash tool.)
C. If you DID create a backup of your MIUI cust partition on these old devices (in the newest versions of OrangeFox, this would be the “vendor” partition – it points to the same location as “cust”) to MicroSD or USB-OTG, then you can use OrangeFox to install MIUI when coming from a Treble ROM.
D. Take the following steps:
1) Backup your internal memory to an external device (eg, MicroSD, USB-OTG, or your PC). DO NOT SKIP THIS STEP!
2) Copy the latest stable MIUI ROM to your MicroSD or USB-OTG storage
3) Boot OrangeFox
4) Make sure that OrangeFox can read your MicroSD or USB-OTG storage, and can see the MIUI ROM that you copied there. This is the ROM that you will install in the steps below.
5) Select the “Wipe” menu and wipe the Dalvik/Art Cache and Cache partitions
6) Format data (“format” - not “wipe”) - you will lose all the contents of your internal memory after doing this
7) Reboot OrangeFox - you might see a message saying “No OS installed …” - just swipe to reboot OrangeFox
8) Flash your MIUI ROM
9) Reboot to system, and wait for a long time ...
10) When ready, restore your backup of your internal memory from your external storage device.
#4. FLASHING ROMS:
Flashing a ROM is usually a straightforward process. You can either do a "clean" flash, or a "dirty" flash.
First things:
When flashing a ROM, you want to ensure that the recovery is in a known state, before you start flashing the ROM. Therefore, you should always observe the following:
1. Do NOT flash a ROM in a queue with other zips. Always flash a ROM on its own, and when flashing is completed, reboot OrangeFox, before doing anything else.
2. If you ever wipe the /vendor partition, then you must reboot OrangeFox immediately afterwards - before doing anything else (eg, flashing a ROM or anything else you might want to do).
3. If you ever wipe the /system, partition, then you must reboot OrangeFox immediately afterwards - before doing anything else (ignoring any warnings about no OS being installed).
4. If you ever format the data partition, then you must reboot OrangeFox immediately afterwards - before doing anything else.
5. If your Xiaomi device has ARB, and you are on a MIUI ROM, then you had better tread very carefully if you want to change your MIUI ROM to a different MIUI ROM, or to a different version of the same MIUI ROM. Search on Google for "ARB", read and understand everything, and then decide whether you really need to proceed.
6. Make a full backup of your current ROM - before performing any other operations in the recovery. At the very least, backup the /system, /data, /boot and /vendor partitions.
7. Please note that, if you do not follow all of the above instructions, and you encounter problems afterwards (which you definitely will), I will not answer any questions.
A. "Clean flashing" (Very strongly recommended)
1) Backup your internal storage, applications, settings, SMS messages, call logs, etc Do NOT skip this step.
2) Bootup OrangeFox Recovery
3) Select "Wipe", then tick Data, Dalvik/Art Cache, and Cache
4) Swipe - this will restore the system to a known state, and will remove apps/settings that might be incompatible with the ROM that you wish to install (NOTE: if you are moving from MIUI to custom ROMs, or vice versa, you must format your data partition - "Menu->Manage Partitions", select "Data", click on "Format Data", and type "Yes"; this will format your data partition and will also wipe your internal storage).
5) Reboot OrangeFox
6) In the OrangeFox File Explorer, select the ROM that you want to flash
8) Swipe to flash the ROM
9) Reboot OrangeFox recovery - before doing anything else - so that any changes to partitions/filesystems done by flashing the new ROM will take full effect
10) Boot up the ROM (so that it can complete whatever it first needs to do) - you might need to wait for a long time while the new ROM sets itself up (note that, for some ROMs, flashing magisk might first be required before booting up the ROM for the first time)
11) Reboot to OrangeFox recovery
12) Flash whatever else you might want to flash (eg, GAPPs, magisk, etc)
13) Reboot your device
14) Enjoy
B. "Dirty flashing" (NOT recommended)
1) Bootup OrangeFox Recovery
2) Select "Install"
3) Choose the ROM that you want to flash
4) Swipe to flash
5) Wipe cache and dalvik
6) Reboot OrangeFox recovery - before doing anything else - so that any changes to partitions/filesystems done by flashing the new ROM will take full effect
7) Flash whatever else you might want to flash (eg, GAPPs, magisk, etc)
8) Reboot your device
9) Enjoy (or experience a bootloop)
NOTE: Dirty flashing a ROM is NOT recommended. It can cause all kinds of random problems. Always choose to "clean flash"
#5. "YOUR SYSTEM HAS BEEN DESTROYED" scenarios:
A) If you have one of these, then, yes, you might be in deep trouble! But this has nothing to do with OrangeFox. It is rather a result of your decisions and what you have chosen to do, or to flash.
B) For possible solutions, Google is your friend.
C) Salient advice: next time, look very carefully before flashing anything. It is your responsibility to ascertain and completely understand, a) what you are installing, b) what instructions it is giving to the recovery, c) what it will do as part of the installation, and d) what it will do after the installation. Otherwise, there will be tears.
#6. MY DEVICE IS ENCRYPTED:
This is excellent. If your device gets stolen or lost, at least your data on non-removable storage is secure. But, if, for some reason, you would prefer for your data to not be secure, then you can remove the encryption by formatting your data partition (note - format - not just wipe). This process will also permanently delete all the contents of your internal storage. So, you had better backup your internal storage onto an external device before formatting - else, you can say "good bye" to all the photos, files, music, videos, etc, on your internal storage.
Note: ticking "Disable Forced Encryption" will most certainly not remove encryption from your device. That is not its purpose. The only way to remove encryption is to format your data partition.
#7. I GET "ERROR 7" WHEN TRYING TO INSTALL <whatever>:
* This is a very old problem, which has nothing at all to do with OrangeFox. So, Google is your friend.
* Hint: this is usually an issue with the "updater-script" inside whatever it is that you are trying to install. It is checking for a specific device (with "getprop ro.product.device"), but either finds an empty value, or finds another device. Check that what you are trying to install is the correct version for your device (run the previously mentioned "getprop" command yourself, from a terminal). If so, then speak to whoever released the zip installer that you are trying to install, and ask them to fix their script. If you wiped your system partition, reboot the recovery.
* Also check that you have the correct firmware version installed. Sometimes, error 7 is a result of not having the minimum firmware version that the zip installer is expecting.
* Hint2: whenever this happens, take a copy of the recovery logs immediately (ie, before doing anything else) and post the logs when you are trying to report the problem. The recovery.log file will provide devs with a lot of useful information in trying to get to the bottom of what has happened. Reporting the problem without posting the logs would be a complete waste of everybody's time.
#8. I GET "ERROR 1" WHEN TRYING TO INSTALL <whatever>:
* This is a very old problem, which has nothing at all to do with OrangeFox. So, search Google.
..............................................................................................................................
Other useful downloads/information:
• Android SDK platform tools (adb, fastboot, etc): https://developer.android.com/studio/releases/platform-tools
• ADB, Fastboot, & Drivers: https://forum.xda-developers.com/showthread.php?t=2588979
• Mi Flash tool: https://www.xiaomigeek.com/download-xiaomi-mi-flash-tool.html
• Xiaomi USB drivers: https://www.xiaomigeek.com/download-xiaomi-usb-driver-windows.html
• How to install TWRP: https://www.xda-developers.com/how-to-install-twrp/
• How to install adb: https://www.xda-developers.com/install-adb-windows-macos-linux/ ​
Supported Languages:
cz.xml
de.xml
el.xml
en.xml
es.xml
fr.xml
hu.xml
in.xml
it.xml
ja.xml
nl.xml
pl.xml
pt_BR.xml
pt_PT.xml
ru.xml
sk.xml
sl.xml
sv.xml
tr.xml
uk.xml
zh_CN.xml
zh_TW.xml
It's asking for password
sayad1 said:
It's asking for password
Click to expand...
Click to collapse
How did you get to that point?
Edit: problem fixed in R6-Beta
DarthJabba9 said:
How did you get to that point?
Click to expand...
Click to collapse
I installed into redwolf recovery after installed no variety and rebooted recovery after successfully booted asked for password to decryption
sayad1 said:
I installed into redwolf recovery after installed no variety and rebooted recovery after successfully booted asked for password to decryption
Click to expand...
Click to collapse
Password for recovery, or password for ROM?
DarthJabba9 said:
Password for recovery, or password for ROM?
Click to expand...
Click to collapse
Password for access internal storage and mount system if I cancel I can't able to access internal storage
sayad1 said:
Password for access internal storage and mount system if I cancel I can't able to access internal storage
Click to expand...
Click to collapse
You are not really giving a lot of information.
1. Are you talking about accessing the internal storage in the Recovery, or are you talking about accessing your ROM?
2. Which ROM are you using?
Hint: OrangeFox does not do anything (eg, encryption) to your data partition. If your data partition is encrypted, it is normally something done by your ROM. Sometimes it depends on a setting in your ROM's configuration - but some ROMs force encryption by default.
The bottom line is that, if your data partition is encrypted, this is not an issue with the recovery. If you format your data partition, you will be able to access it afterwards. However, you obviously will lose your data (and the contents of your internal storage) so you need to do backups first.
sayad1 said:
It's asking for password
Click to expand...
Click to collapse
Same with me.
It asks password to decrypt /data partiton.
After flashing previous beta everything is Ok.
PS Are there any option to update OTA MIUI ROM and and retain custom recovery?
lyolic said:
Same with me.
It asks password to decrypt /data partiton.
After flashing previous beta everything is Ok.
Click to expand...
Click to collapse
That is very strange. And what happens when you flash R5.1 again?
lyolic said:
PS Are there any option to update OTA MIUI ROM and and retain custom recovery?
Click to expand...
Click to collapse
Yep. Go to the "Advanced-->Special Actions" menu.
Please Sur, how to do miui OTA, please explain it step by step, if you would be mind..
(Ive try redwolf, still cannot OTA)
gandrigoes said:
Please Sur, how to do miui OTA, please explain it step by step, if you would be mind..
(Ive try redwolf, still cannot OTA)
Click to expand...
Click to collapse
Here is a tutorial (about the original recovery that created this feature - but it should work (with suitable modifications) for OrangeFox too):
https://forum.xda-developers.com/redmi-note-3/how-to/zcx-twrp-install-twrp-flash-supersu-t3462448
DarthJabba9 said:
That is very strange. And what happens when you flash R5.1 again?
Click to expand...
Click to collapse
The same:
Mount
Decrypt
Data Partition
Data partition is encrypted
Please enter the password or press back button to cancel.
Click to expand...
Click to collapse
---------- Post added at 02:31 PM ---------- Previous post was at 01:49 PM ----------
DarthJabba9 said:
Yep. Go to the "Advanced-->Special Actions" menu.
Click to expand...
Click to collapse
I don't have "Special Actions" menu in Public beta.
Thank you, this stable version was expected
By my side, no issue after flashing, just the read only warning.
To answer above, on OF beta version, i've ticked options:
Incremental OTA signature verif
Include system OTA survival
Support MUI incremental OTA
and my device rebooted to OrangeFox to flash automatically the downloaded MUI updates (i've got two during the past weeks).
I guess options are the same for this stable version
My obligated question, Does this Recovery work with TREBLE and UN-TREBLE rom?
Godwarrior1 said:
My obligated question, Does this Recovery work with TREBLE and UN-TREBLE rom?
Click to expand...
Click to collapse
Yes, and also MIUI stock OTAs, tested by many.
I installed 4 hours ago and everything is working flawless. Congratulations Dev.
Godwarrior1 said:
I installed 4 hours ago and everything is working flawless. Congratulations Dev.
Click to expand...
Click to collapse
:good:
Do i need to wipe my internal storage after flashing this twrp? Because its keep asking for password everytime im trying to access internal storage from twrp and btw im using miui global stable

Stuck at Password Screen! Please Help

So I’ve tried many ROMs and am on the latest version of TWRP but I keep getting stuck at the password screen after rebooting. I have tried many factory resets and complete wipes and nothing has worked. I am also getting “encryption” errors and twrp errors about decrypting data...asking for a password and then telling me my password is incorrect. Is this the end of my 6P? Thanks for any help!
Password is linked to user data partition, a full wipe with TWRP doesn't wipe this partition, so it won't remove it. So to remove your password and fix this issue, you need to wipe the user partition, which will remove anything on your phone.
notstevek said:
Password is linked to user data partition, a full wipe with TWRP doesn't wipe this partition, so it won't remove it. So to remove your password and fix this issue, you need to wipe the user partition, which will remove anything on your phone.
Click to expand...
Click to collapse
I have formatted the data and wiped my phone fully. It will let me install a new ROM and I can boot into it, set it up but after a couple of restarts...I get stuck on the password screen again. Then if I reboot into twrp it asks me for a password there to decrypt data. I am so confused!
videotape74 said:
I have formatted the data and wiped my phone fully. It will let me install a new ROM and I can boot into it, set it up but after a couple of restarts...I get stuck on the password screen again. Then if I reboot into twrp it asks me for a password there to decrypt data. I am so confused!
Click to expand...
Click to collapse
Also, not to be rude, but you do know if you set a password, the twrp password is the password you're using for your lock screen? I don't mean to belittle you, just wanted to make sure you knew his. If you make your lockscreen password pin 1234, that's what you do in TWRP, if pattern, use that pattern, if regular password, type that.
What I mean by data is in TWRP you have the option to wipe phone (factory wipe) which does "data, cache, system", but that is not the data I am referring to. If you click advanced wipe, you have the option of formatting "internal storage" that is the user data I am referring to that holds the password. That's the portion you save stuff to like picture, the other data partition is where system apps get installed. If you can boot into the rom and use it normally, remove the password, does TWRP still ask you for a password? What about changing password, or changing from password to pin or pattern? If you've done all that I recommend manually downloading stock nexus 6p update, using fastboot, format each and every partition and flashing (including recovery) stock firmware. Nexus 6p is known for bootloop, this is something entirely different. Can you please verify that you can:
Boot into phone and use it(what rom?)
Remove password(if this doesn't work, see below)
Change password
Change to different type of password (go to pin if pattern, pattern if pin, password if pin/pattern)
Formated internal storage (which you need to backup and again is not the same as doing a "swipe to factory reset" in TWRP, you need to click advanced wipe and hit wipe internal storage.)
If none of that works, I again suggest trying to use fastboot, format each partition manually then flashing a full stock firmware including internal storage, and recovery, then install TWRP and rom, and see if that fixes it.
P.s. I don't want you to think I'm treating you as if you're clueless I am just trying get as much information and be 100% clear and on the same page regarding everything you try and make sure we're talking about the same stuff (i.e, regarding formatting Data) so we're on the same page, and so I can help you out to the best of my ability to.
notstevek said:
Also, not to be rude, but you do know if you set a password, the twrp password is the password you're using for your lock screen? I don't mean to belittle you, just wanted to make sure you knew his. If you make your lockscreen password pin 1234, that's what you do in TWRP, if pattern, use that pattern, if regular password, type that.
What I mean by data is in TWRP you have the option to wipe phone (factory wipe) which does "data, cache, system", but that is not the data I am referring to. If you click advanced wipe, you have the option of formatting "internal storage" that is the user data I am referring to that holds the password. That's the portion you save stuff to like picture, the other data partition is where system apps get installed. If you can boot into the rom and use it normally, remove the password, does TWRP still ask you for a password? What about changing password, or changing from password to pin or pattern? If you've done all that I recommend manually downloading stock nexus 6p update, using fastboot, format each and every partition and flashing (including recovery) stock firmware. Nexus 6p is known for bootloop, this is something entirely different. Can you please verify that you can:
Boot into phone and use it(what rom?)
Remove password(if this doesn't work, see below)
Change password
Change to different type of password (go to pin if pattern, pattern if pin, password if pin/pattern)
Formated internal storage (which you need to backup and again is not the same as doing a "swipe to factory reset" in TWRP, you need to click advanced wipe and hit wipe internal storage.)
If none of that works, I again suggest trying to use fastboot, format each partition manually then flashing a full stock firmware including internal storage, and recovery, then install TWRP and rom, and see if that fixes it.
P.s. I don't want you to think I'm treating you as if you're clueless I am just trying get as much information and be 100% clear and on the same page regarding everything you try and make sure we're talking about the same stuff (i.e, regarding formatting Data) so we're on the same page, and so I can help you out to the best of my ability to.
Click to expand...
Click to collapse
went back to stock fully after formatting partition, phone booted up fine, updated my apps and restarted my phone...now I'm getting a screen saying "Decryption Unsuccessful". i enter the correct password and it says I have to factory reset...i do, set up everything again and the same thing happens! pic below...thanks for any/all help.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
videotape74 said:
I have formatted the data and wiped my phone fully. It will let me install a new ROM and I can boot into it, set it up but after a couple of restarts...I get stuck on the password screen again. Then if I reboot into twrp it asks me for a password there to decrypt data. I am so confused!
Click to expand...
Click to collapse
videotape74 said:
went back to stock fully after formatting partition, phone booted up fine, updated my apps and restarted my phone...now I'm getting a screen saying "Decryption Unsuccessful". i enter the correct password and it says I have to factory reset...i do, set up everything again and the same thing happens! pic below...thanks for any/all help.
Click to expand...
Click to collapse
Oh this explains it ok. You need to format the internal storage. I'm not sure what that button does in regards to resetting but I recommend you using fast boot to wipe everything to factory rom. Go here: https://forum.xda-developers.com/nexus-6p/general/guides-how-to-guides-beginners-t3206928 and follow #11 in the second post. Add the command "fastboot format userdata" to that set of instructions. This will wipe your phone to factory, as if you just bought it. Once this is done, setup the phone, make sure it boots and works. If it does, download TWRP again from https://dl.twrp.me/angler/twrp-3.2.3-0-angler.img.html use the command "fastboot flash recovery twrp-3 2.3-0angler.img" to reflash TWRP. Try rebooting into twrp a few times to see if you can get the same error, if you can't you fixed it. If you can, your phones flash memory is probably shot. Let me know if you need anymore help and how it goes.
notstevek said:
Oh this explains it ok. You need to format the internal storage. I'm not sure what that button does in regards to resetting but I recommend you using fast boot to wipe everything to factory rom. Go here: https://forum.xda-developers.com/nexus-6p/general/guides-how-to-guides-beginners-t3206928 and follow #11 in the second post. Add the command "fastboot format userdata" to that set of instructions. This will wipe your phone to factory, as if you just bought it. Once this is done, setup the phone, make sure it boots and works. If it does, download TWRP again from https://dl.twrp.me/angler/twrp-3.2.3-0-angler.img.html use the command "fastboot flash recovery twrp-3 2.3-0angler.img" to reflash TWRP. Try rebooting into twrp a few times to see if you can get the same error, if you can't you fixed it. If you can, your phones flash memory is probably shot. Let me know if you need anymore help and how it goes.
Click to expand...
Click to collapse
I followed your steps exactly and now I'm getting the below error...I guess my flash memory is done.
I appreciate all the help you've given me!
videotape74 said:
I followed your steps exactly and now I'm getting the below error...I guess my flash memory is done.
I appreciate all the help you've given me!
Click to expand...
Click to collapse
I'm sorry to hear that. So to confirm you completely reflashed to stock firmware, reflashed TWRP recovery, and it's still giving you the error? Maybe someone else has some idea of what's happening but only thing I can think of is flash memory is shot. Try maybe older version of twrp??
Something similar happened to me, I will explain my situation and how to solve it, I had the stock ROM 8.1.0 installed and out of curiosity I put a start block that starts with a password and all right up there, then install the twrp and I prepared to put a Custo ROM to be specific CRDroid and everything was installed correctly nothing unusual, the problem came to insert my SIM card and see that I had no signal review the imei and had disappeared was blank and had not made rest of the SAI so I turned pale, then started twrp and asked for the password I had put with the stock ROM and accept it I made an advanced deletion and still still without imei, I reinstalled the latest version of stock ROM home, I asked for the password ,I was. security and I removed all kinds of security, I returned. do the process of installing the Custon ROM and the imei turned MIA CONCLUSION by changing the ROM and better to disable absolutely all kinds of blocking tank can bring signal or encryption conflicts

Disable [DM-Verity]/[Force Encryption] [OnePlus 3T/3] for [PIE] Oxygen OS

Oneplus has released the PIE Oxygen OS for Oneplus 3T and 3.
This thread is only for OOS PIE. For disabling Dm-Verity and force Encryption in NOUGAT OOS ROMs refer to my thread here:https://forum.xda-developers.com/oneplus-3t/how-to/rom-dm-verity-force-encryption-disabled-t3618232 and for OREO OOS refer to my thread here:https://forum.xda-developers.com/oneplus-3t/how-to/disable-dm-verity-force-encryption-op3t-t3688748
Disclaimer: I am not responsible for any damage or data loss that happens to your device on embarking this procedure. This is a just released version of OOS and so expect the unexpected. Back up all your data and valuables before you go on and don't blame me if you or your device commits suicide..
THE DETAILS....
After a thororugh initial analysis of the PIE installation zip file for Oneplus 3/3T, I found that there has not been much hell of a difference in the protection schema related to Dm-verity and force encryption. Hence most of the procedure remains the same...As mentioned this is relatively new build and probably existing Twrp may need upstream fixes or other changes to accommodate PIE related commits before encrypting, decrypting and flashing...I have no intention of flashing the PIE build unless it gets stable and have a lot of time to spare so that if things get rough i can dive into it..So its untested from my side but its ought to work same as before. ..
So in a nut shell, to disable DM-Verity you will need to flash the patched Boot Images and to disable force encryption you will have to flash the force encryption disabler zip - The links of which are provided below. Do refer to the correct procedure explained in detail before attempting to do anything...
For all those who need an in-depth reading of the nature of patching the fstab in dtb file and my work you can refer here:
https://forum.xda-developers.com/showpost.php?p=74326761&postcount=3
THIS METHOD WILL WORK FOR BOTH ONEPLUS 3 T AND ONEPLUS 3...
FOR THOSE WHO HAVE ALREADY TRIGGERED DM-VERITY ON OOS PIE FOLLOW THE STEPS IN POST 2 IN THIS THREAD TO GET RID OF DM-VERITY BEFORE PROCEEDING...
Nothing has been changed....
It is 100% stock boot image except that the DM-Verity Flag has been patched...
Links:
For ONEPLUS 3T
STABLE OOS Boot Images
Patched Boot Image Stable OOS 9.0.6
https://www.mediafire.com/file/mgdc7fga7ypemon/boot-patched-9.0.6-OP3T.img/file
Patched Boot Image Stable OOS 9.0.5
http://www.mediafire.com/file/xuea2pjk7iebo7y/boot-patched-9.0.5-OP3T.img/file
Patched Boot Image Stable OOS 9.0.4
http://www.mediafire.com/file/dzbe1djwlc24h0q/boot-patched-9.0.4-OP3T.img/file
Patched Boot Image Stable OOS 9.0.3
http://www.mediafire.com/file/432r3vew6786pga/boot-patched-9.0.3-OP3T.img/file
Patched Boot Image Stable OOS 9.0.2
https://www.mediafire.com/file/fj2offc35sa0zo7/boot-patched-9.0.2-OP3T.img/file
BETA OOS Boot Images
Patched Boot Image Beta OOS 9.0.1
http://www.mediafire.com/file/bf32s2mf2c7y66o/boot-patched-9.0.1-OP3T.img/file
Patched Boot Image Beta OOS 9.0
http://www.mediafire.com/file/kesaqq2q8dgi43p/boot-patched-9.0.0-OP3T.img/file
For OnePlus 3
STABLE OOS Boot Images
Patched Boot Image Stable OOS 9.0.6
http://www.mediafire.com/file/huxj64syp8l1o58/boot-patched-9.0.6-OP3.img/file
Patched Boot Image Stable OOS 9.0.5
http://www.mediafire.com/file/mkv6swi72pruafy/boot-patched-9.0.5-OP3.img/file
Patched Boot Image Stable OOS 9.0.4
http://www.mediafire.com/file/7d9k4nytqa7nqjv/boot-patched-9.0.4-OP3.img/file
Patched Boot Image Stable OOS 9.0.3
http://www.mediafire.com/file/z7dckvcztskes53/boot-patched-9.0.3-OP3.img/file
Patched Boot Image Stable OOS 9.0.2
http://www.mediafire.com/file/3rzae15wf25l72w/boot-patched-9.0.2-OP3.img/file
BETA OOS Boot Images
Patched Boot Image Beta OOS 9.0.1
http://www.mediafire.com/file/v36cxtcnao23bc3/boot-patched-9.0.1-OP3.img/file
Patched Boot Image Beta OOS 9.0
http://www.mediafire.com/file/a9gq8koevpra9bh/boot-patched-9.0.0-OP3.img/file
STEPS: This is applicable only to people who have their data currently ENCRYPTED and needs the procedure only for NOT TRIGGERING DM-VERITY
USAGE FOR STOCK OOS:
1. Flash the downloaded boot-patched.img file corresponding to the Model and OOS version in TWRP immediately after flashing the Stock ROM zip in TWRP before doing anything (even before restarting or applying any patches, root, kernels, etc.)
2. Restart back to TWRP Recovery.
3. Done.
4. Now do whatever you want like usual.. Flash root, kernel, mods or anything as usual
5. You dont have to worry about triggering DM-Verity again and any changes made to system via TWRP will not be reverted back..
The 2 Prodeures given below: This is applicable only to those people who needs the procedure for getting rid of FORCE ENCRYPTION AND PREVENT TRIGGERING DM-VERITY
PROCEDURE 1: This is applicable only to people who have their data currently NOT ENCRYPTED AND KEEP IT DECRYPTED
First of all Backup your data preferably to and usb otg or a PC for later restore. You may lose your data from your phone following this procedure...
1. Format SYSTEM, DALVIK, CACHE and then only Flash the Full Rom Pie OOS zip file in TWRP.
2. DON'T REBOOT
3. Flash the downloaded boot-patched.img file corresponding to the Model and OOS version in TWRP immediately after flashing the Stock ROM zip.
4. DON'T REBOOT TO SYSTEM
5. REBOOT TO TWRP.
6. In TWRP, MOUNT SYSTEM, GO TO ADVANCED > TERMINAL and Type "df system"(without quotes) and enter. The details of the system partition will be shown. Look at the Use% and Free Space. Make sure you have atleast 100MB free space in System before you go to the next step. If you don't have enough free space then mount system in TWRP, go to file manager and free some space in system by deleting some unwanted apps (in system/app folder like duo, google drive, hangouts,etc. which you can later reinstall via google play as it is not mandatory for them to run as system apps)...If there is low space on your system partition that fstab file flashing fails resulting in blank fstab file and you will end up in bootloop.
7. Once you have confirmed that you have atleast 100MB of free space left in system partition. REBOOT BACK TO TWRP.
8. Flash "Force Encryption Disabler For OOS Pie v1.zip" in TWRP.
9. Flash SuperSuSR5 / Magisk 18+
10. Done.
11. Reboot to System.
NB:f you have bootloop go back to TWRP by keep holding the power button to power off and powering on and rebooting to TWRP via the volume buttons, mount system, go to file manager and free some space in system by deleting some unwanted apps (in system/app folder like duo, google drive, hangouts,etc. which you can later reinstall via google play as it is not mandatory for them to run as system apps) and reflash the disabler zip and reboot..It is due to low space on your system partition that fstab file flashing fails resulting in blank fstab file. But if you followed Steps 6 and 7 carefully you wont end up here.
PROCEDURE 2: This is applicable only to people who have their data currently ENCRYPTED AND NEEDS TO GET IT DECRYPTED and PREVENT TRIGGERING DM-VERITY
First of all Backup your data preferably to and usb otg or a PC for later restore. You will lose your data from your phone following this procedure...
1. Go to Bootloader...
2. Connect to your PC..Type "fastboot format userdata" without quotes and press enter. (You will lose your data, do back up if you need something.)
3. Don't reboot to system...Using volume buttons select boot to recovery and Reboot to TWRP.....(Very Important)
4. Flash the downloaded boot-patched.img file corresponding to the Model and OOS version in TWRP immediately after flashing the Stock ROM zip.
5. DON'T REBOOT TO SYSTEM
6. REBOOT TO TWRP
7. In TWRP, MOUNT SYSTEM, GO TO ADVANCED > TERMINAL and Type "df system"(without quotes) and enter. The details of the system partition will be shown. Look at the Use% and Free Space. Make sure you have atleast 100MB free space in System before you go to the next step. If you don't have enough free space then mount system in TWRP, go to file manager and free some space in system by deleting some unwanted apps (in system/app folder like duo, google drive, hangouts,etc. which you can later reinstall via google play as it is not mandatory for them to run as system apps)...If there is low space on your system partition that fstab file flashing fails resulting in blank fstab file and you will end up in bootloop.
8. Once you have confirmed that you have atleast 100MB of free space left in system partition. REBOOT BACK TO TWRP.
9. Flash "Force Encryption Disabler For OOS Pie v1.zip" in TWRP.
10. Flash SuperSuSR5 / Magisk 18+
11. Done.
12. Reboot to System.
NB: If you have bootloop go back to TWRP by keep holding the power button to power off and powering on and rebooting to TWRP via the volume buttons, mount system, go to file manager and free some space in system by deleting some unwanted apps (in system/app folder like duo, google drive, hangouts,etc. which you can later reinstall via google play as it is not mandatory for them to run as system apps) and reflash the disabler zip and reboot..It is due to low space on your system partition that fstab file flashing fails resulting in blank fstab file. But if you followed Steps 7 and 8 carefully you won't end up here.
Rooting:
For Rooting use only SuperSu 2.82 SR5 or Magisk 18 or above seems to work for root...
FAQs:
Q: Is the boot.img file altered in anyway?
A: As mentioned above its 100% stock boot image except that the DM-Verity Flag has been patched in the device tree blobs (dtb)...
Q: My phone is already encrypted, will I lose encryption on flashing the zip?
A: No. It only disables force encryption. That means if you have already disabled encryption in your phone it will prevent the phone from getting encrypted when you flash a stock OOS ROM..
Q: I happen to lose TWRP and revert to stock recovery every time I update OOS, I happen to lose changes made to system via TWRP or lose data/apps accidentally while updating OOS...Can this be corrected by using this method?
A: Definitely. Follow the steps correctly. Each time while updating the OOS, after flashing the Full OOS ROM.zip, immediately flash the patched boot.img of the corresponding OOS given in this thread and then restart back to TWRP recovery. Done. You will never lose TWRP again..
Q: I am Rooting my phone using Magisk/Supersu then why do i need this?
A: Its optional.. If you are rooting phone using Magisk/Supersu it patches the stock boot.img. But in case you have problems flashing Magisk/Supersu after flashing the STOCK ROM zip this can come in handy or as an insurance policy just flash this patched boot.img before doing anything. But is very helpful to those people out there who doesn't root their phone but has unlocked their phone or installed TWRP for other purposes..
Q: How to flash the patched boot.img in TWRP?
A: Default flash option is for zip files in TWRP. Select the flash image option in TWRP. Then select the downloaded patched boot.img file and among from the partition option (boot, recovery and system) select the boot option and then flash it.
Q: What is "-Xn" seen after the OOS Version in the settings menu?
A: That's just my signature -Xn that I had put there to make sure that you have correctly done the procedure and the boot image that is currently in use is my patched boot image and to ensure you that you are 100% safe from DM verity...
Q: Where to find downloads and queries regarding the Stock OOS ROM and Beta OOS?
A: @Siddk007 has been maintaining Stock and Beta OOS threads were you can find relevant information.
Hope you find it useful...
Will update this OP as newer OOS versions come....
HIT THANKS IF I HELPED YOU. IT DOESN'T COST YOU ANYTHING, BUT IT MEANS A LOT TO ME...
AND IF YOU DO APPRECIATE MY WORK DONATIONS ARE ALWAYS WELCOME...
THIS IS FOR PEOPLE WHO HAVE TRIGGERED DM-VERITY AND NEEDS TO GET RID OF THE DM-VERITY MESSAGE PERMANENTLY ON OOS PIE ROMs. ...
THIS IS FOR ONEPLUS 3T AND FOR ONEPLUS 3 but be careful in using the correct files corresponding to the OOS version and your MODEL
READ ALL THE STEPS AND DOWNLOAD ALL REQUIRED FILES BEFORE PROCEEDING. FOLLOW THE STEPS EXACTLY AND 100% THE DM-VERITY MESSAGE WILL BE GONE WITHOUT ANY DATA LOSS OR ANY OTHER HARM!!!
Prerequisite : Install ADB for windows from here: [url]https://forum.xda-developers.com/showthread.php?t=2588979[/URL]
1)
Download 4.0.2 Firmware for Oneplus 3T from here: [url]http://www.mediafire.com/file/cx568em66025p5b/4.0.2_firmware_OnePlus_3T.zip[/URL]
Download 4.0.2 Firmware for Oneplus 3 from here: [url]http://www.mediafire.com/file/8tt5x4xxy4m488t/4.0.2_firmware_OnePlus3.zip[/URL]
2) Flash the downloaded 4.0.2 firmware OnePlus 3.zip or 4.0.2 firmware OnePlus 3T.zip file in TWRP.
3) DONT REBOOT TO SYSTEM. REBOOT TO BOOTLOADER FROM OPTION IN TWRP.
4) Connect your phone to the pc
5) Press windows button + X
6) Open Command prompt
7) Type "fastboot oem disable_dm_verity" without quotes and press enter
8) Type "fastboot oem enable_dm_verity" without quotes and press enter
9) DONT REBOOT TO SYSTEM. REBOOT TO TWRP RECOVERY.
10)
In case of Oneplus3T, Flash the required firmware files for PIE OOS corresponding to your current OOS (current OOS is the version of OOS which you are using now on your phone) in TWRP from this post: https://forum.xda-developers.com/oneplus-3t/how-to/firmware-beta-10-t3631166(Courtesy: @kamilmirza)
In case of Oneplus3, Flash the required firmware files for PIE OOS corresponding to your current OOS (current OOS is the version of OREO OOS which you are using now on your phone) in TWRP from this post: [url]https://forum.xda-developers.com/oneplus-3/how-to/radio-modem-collection-flashable-zips-t3468628[/URL] (Courtesy: @jamal2367)
11) DONT REBOOT!!!!
12) VERY IMPORTANT: WITHOUT REBOOTING, Flash the downloaded boot-patched.img file corresponding to the OOS version and phone model(either stable or beta) in TWRP from post 1...
13) Reboot..The DM-verity message is gone forever...
VERY IMPORTANT:
1. If you need to keep your phone un-encrypted flash Force Encryption Disabler For OOS PIE.zip immediately after step 12 and then only reboot.
2.If you are attempting this method on a a CUSTOM ROM then after Step 12 flash the full CUSTOM ROM zip file + latest gapps again without doing any sort of wipes in TWRP immediately and then only reboot....
Enjoy!!!
FAQs...
Q: Will I lose any data after I do these steps?
A: Never. There will be no data loss or any untoward effects of the procedure. Your data and phone will be in the exact same state as it was a before except for the fact that the damn dirty Dm-Verity message will be gone forever!!!
Q: Will this work on CUSTOM ROMs?
A: Of course. It has been tested to be perfectly working on even CUSTOM ROMs. Just follow the instructions in this post carefully where specific steps for CUSTOM ROMs are mentioned.
HIT THANKS IF I HELPED YOU. IT DOESN'T COST YOU ANYTHING, BUT IT MEANS A LOT TO ME...
Reserved..
Reserved...
Thanks for your work!
I have a question. Is there anyway to prevent OOS Pie Community Build from corrupting the /data partition on Unlocked Bootloaders with Encrypted /data partition? They specifically designed the builds to do so. It doesn't cause it if the device is locked. Can the boot image be patched for that too?
Sent from my #FlagshipKiller3T using Tapatalk
DarkSJ1998 said:
Thanks for your work!
I have a question. Is there anyway to prevent OOS Pie Community Build from corrupting the /data partition on Unlocked Bootloaders with Encrypted /data partition? They specifically designed the builds to do so. It doesn't cause it if the device is locked. Can the boot image be patched for that too?
Click to expand...
Click to collapse
That is the duty of twrp (recovery) I suppose because with stock recovery it doesn't seem to happen and it probably doesn't have anything to do with boot image as such...but u can very well try with the patched boot image..either u can flash the patched boot image immediately after flashing the zip file and try rebooting back to twrp and see
Or replace the boot image in the OOS zip file with mine and try flashing...but no guarantees buddy...
ALWAYS BACKUP BEFORE DOING ANYTHING...THIS IS A NEW OS ANS WE ARE STILL LEARNING...
Xennet said:
That is the duty of twrp (recovery) I suppose because with stock recovery it doesn't seem to happen and it probably doesn't have anything to do with boot image as such...but u can very well try with the patched boot image..either u can flash the patched boot image immediately after flashing the zip file and try rebooting back to twrp and see
Or replace the boot image in the OOS zip file with mine and try flashing...but no guarantees buddy...
ALWAYS BACKUP BEFORE DOING ANYTHING...THIS IS A NEW OS ANS WE ARE STILL LEARNING...
Click to expand...
Click to collapse
Alright thanks!
Let's see if anyone tries it out [emoji14]
I'm not in the urge of risking getting my /data wiped as of now
Sent from my #FlagshipKiller3T using Tapatalk
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
thanks @Xennet ...:good:
I followed all the steps from procedure 1 ( PROCEDURE 1: This is applicable only to people who have their data currently NOT ENCRYPTED AND KEEP IT DECRYPTED ) and for everyone out there who are confused or fear of loosing data , I successfully booted OOS Pie beta/community build without loosing any of my data/internal storage (everything regarding data is intact).
DarkSJ1998 said:
Alright thanks!
Let's see if anyone tries it out [emoji14]
I'm not in the urge of risking getting my /data wiped as of now
Sent from my #FlagshipKiller3T using Tapatalk
Click to expand...
Click to collapse
Don't try because if your data is encrypted and you follow the old steps with pie files for just not triggering dm-verity
Twrp cannot decrypt the data if you reboot after flashing oos community beta and then immediately patched boot image for pie
Luckily i saved myself (from loosing data) by not booting into system and again dirty flashing stable oreo rom using the guide for oreo and patched oreo boot image.
I had to dirty flash OREO Rom patched boot image and magisk all using OTG since i couldn't access data partition.
a0879 said:
thanks @Xennet ...:good:
I followed all the steps from procedure 1 ( PROCEDURE 1: This is applicable only to people who have their data currently NOT ENCRYPTED AND KEEP IT DECRYPTED ) and for everyone out there who are confused or fear of loosing data , I successfully booted OOS Pie beta/community build without loosing any of my data/internal storage (everything regarding data is intact).
Click to expand...
Click to collapse
Did u have your bootloader unlocked and on what OOS were u on, before u upgraded...
Yudh said:
Don't try because if your data is encrypted and you follow the old steps with pie files for just not triggering dm-verity
Twrp cannot decrypt the data if you reboot after flashing oos community beta and then immediately patched boot image for pie
Luckily i saved myself (from loosing data) by not booting into system and again dirty flashing stable oreo rom using the guide for oreo and patched oreo boot image.
I had to dirty flash OREO Rom patched boot image and magisk all using OTG since i couldn't access data partition.
Click to expand...
Click to collapse
That's in line....
Hmmmmmm it's a Twrp problem...the problem is with decryption of pie data by twrp...as stated earlier by @a0879, the patched boot image works perfectly with already decrypted data partitions without losing data...
But @Yudh, the patched boot image did it's work by not letting twrp being overwritten by the stock recovery or else you would have been in trouble...
Xennet said:
Did u have your bootloader unlocked and on what OOS were u on, before u upgraded...
Click to expand...
Click to collapse
Yes, my bootloader is unlocked from time immemorial and i was on havoc 2.4, twrp 3.2.3-10, magisk v18.1 just before flashing oos pie beta today.
Earlier i tried the leaked version and the one3tos also a few days back which ultimately wiped whole of my data/internal (though i backed it on pc) and replaced it with the stock recovery, i was unable to do anything other than just using it as it was but then also my bootloader was unlocked.
So i was searching for how to use pie by remaining non encrypted and not formatting internal storage and saving then Finally after going through your post i decided to follow each and every step as told, and "B A N G" !! , it worked as told by you !
thanks again..:good:
Xennet said:
Did u have your bootloader unlocked and on what OOS were u on, before u upgraded...
Click to expand...
Click to collapse
I had my bootloader unlocked.
I was on oos 5.0.8 latest stable build.
Also i discovered a workaround.
Steps below to keep your app data, unlocked bootloader and update to pie.
1)First upgrade the twrp to latest 3.3.0-1
2)remove any kind of lock in the system.
{otherwise it creates issues at the last point by not allowing us to enter the phone past lock screen.
[ If forgot to do so like me Workaround(perform after step 14 only) is to reboot to twrp and deleting the file located at /data/system/locksettings.db using twrp file manager (trick picked from OnePlus official rooting guide).
Then reboot into system and create the same locking method to retain fingerprints and facelock]
But for some people it would be better to remove locks in the first place from system before taking a full backup using twrp because you can always forget which file needs to be deleted or bymistakely if wrong file is deleted then it will cause issues}
3) reboot to twrp and take a COMPLETE BACKUP IN AN EXTERNAL DEVICE . Internal backup won't help.
It would be better if you don't compress it.(in rare cases it led me to corrupted backup in the past with previous twrp versions)
4)after taking backup don't go out of twrp and using MTP
Copy the whole internal storage to pc .
Bellow part isn't necessary but it would be better if you do it.
Also check the twrp backups digest for each created partition just to be on safer side.( It's better to be safe than sorry.)
So that you can make sure that your backup isn't corrupted.
5) download the community pie beta build and patched boot image for pie on the external storage like an otg (which i used).
Sha256 for OnePlus 3T beta build is
837d0f972ce7a10e422ddbf4d96d37cf3d84422ee5717c37a0ee5c3e1419d3c0
Also sha256 for OnePlus 3T patched boot image is
e2619b029e2f14f8cbe3c3b9306181e6688f038f39e8fcd4d5dea823360dcce0
6)wipe everything in twrp using format data option.
7) reboot to recovery again immediately using twrp otherwise twrp won't be able to access data partition afterwards.
8)flash the community beta build and immediately after that the patched pie boot image.
9) reboot to twrp again
10)flash magisk if you want.
11) reboot to system. After the system is started don't enter anything.
Instead again reboot to twrp.
12)while in twrp connect the mobile to pc and delete all the new folders and files in new internal storage.
After that copy the old internal storage contents to your mobile.
Just wait even i was exhausted. But it worked out well.
13)after that restore only the data partition from the nandroid backup which you made using twrp in the start of this guide
14) reboot to system and your data is still there in your mobile with pie community beta build and also unlocked bootloader
Proof that i succeeded
Now its time for me to enjoy my pie and go to sleep.
For you it's time to prepare your own pie
Xennet said:
That's in line....
Hmmmmmm it's a Twrp problem...the problem is with decryption of pie data by twrp...as stated earlier by @a0879, the patched boot image works perfectly with already decrypted data partitions without losing data...
But @Yudh, the patched boot image did it's work by not letting twrp being overwritten by the stock recovery or else you would have been in trouble...
Click to expand...
Click to collapse
The problem isn't with twrp i think because
After rebooting to recovery after flashing the pie beta and patched boot image
Even the system couldn't access the data partition it asked me to reset my phone by saying the data partition is corrupted (which in reality wasn't because i was able to recover the data)
So after i formatted it via twrp and rebooted again into twrp
Both the system and twrp were able to decrypt it.
I think something about encryption is changed in pie in oos
I successfully flash the open beta pie following the op's instruction.! Decrypted with no dm-verity message! Thank you Xennet!
I was on Aosip before and I didn't loose my data!
Sent from my OnePlus 3T using XDA Labs
As @a0879 and @xarrismoto have provided proof it's 100% clear that the patched boot image and force encryption disabler zip is able to update Oreo to pie without losing data if the phone is in DECRYPTED STATE ...
Now the problem is for encrypted phones...
Now as @Yudh mentioned it is definitely due to a change in the encryption in pie the data wipe is happening..that's sure..
But the question is if you have a locked bootloader and stock recovery, you are able to update from Oreo to pie without lose of data??...but with twrp you can't....
So the question is, whether the problem of encryption is not handled by twrp or by the system in pie itself....
xarrismoto said:
I successfully flash the open beta pie following the op's instruction.! Decrypted with no dm-verity message! Thank you Xennet!
I was on Aosip before and I didn't loose my data!
Click to expand...
Click to collapse
Can you please elaborate a bit more and it will be most helpful post of the day. As i was on closed beta and lost my data on flashing closed beta however afterwards i flashed custom roms and now my device is encrypted and locked bootloader having TWRP running Colt PIE OS. If i flashed decryption zip and modified boot then my data will be wiped or not? If not then please share your steps. Thanks
Sent from my ONEPLUS A3003 using Tapatalk
MirzaAwais said:
Can you please elaborate a bit more as its most helpful post of the day. As i was on closed beta and lost my data on flashing closed beta however afterwards i flashed custom roms and now my device is encrypted and locked bootloader having TWRP running Colt PIE OS. If i flashed decryption zip and modified boot then my data will be wiped or not? If not then please share your steps. Thanks
Click to expand...
Click to collapse
I don't think it will work for you as you are encrypted!
I was decrypted before and I stay decrypted after I flash Pie rom. I use latest TWRP 3.3.0.1 and magisk v19.0,also my bootloader is unlock
I followed the instruction from Op which is PROCEDURE 1: This is applicable only to people who have their data currently NOT ENCRYPTED AND KEEP IT DECRYPTED
Sent from my OnePlus 3T using XDA Labs

How To Disable Force Encryption ?

So, Everytime Whenever I Flash A Custom Rom,My Device Gets Encrypted Automatically & Sometimes Roms Fails To Decrypt Data Even If I Type Right Password,if i flash another rom without formatting data. I tired dm-verity,force encryption & lazy flasher also but that doesn't woks,if there is anyway to fix it so pls help me out!
Now, I may not be much of help, but I think the encryption thing happens because you don't remove your saved fingerprints from the phone... OR it might be a TWRP bug, as the same thing happened to me when I wanted to switch from LOS back to MIUI; had to format /data & lose everything from the internal storage as no passwords worked in TWRP :crying:
Add pin as screen lock
jaxx08 said:
So, Everytime Whenever I Flash A Custom Rom,My Device Gets Encrypted Automatically & Sometimes Roms Fails To Decrypt Data Even If I Type Right Password,if i flash another rom without formatting data. I tired dm-verity,forece encryption & lazy flasher also but that doesn't woks,if there is anyway to fix it so pls help me out!
Click to expand...
Click to collapse
I had the same problem but when I set pin as screen lock the TWRP was able to decrypt my storage and everything is working!
From a telegram support group for redmi note 7:
// Encryption In Lavender //
Encryption is the process of translating plain text data (plaintext) into something that appears to be random and meaningless (ciphertext), when your device gets encrypted, it will ask for random password on startup and recovery, you cant access your internal storage and the only way to fix it is by formatting the data (doing this will also wipe your internal storage)
1) Changing from AOSP/LOS/CAF/GSI to MIUI or vice versa would almost certainly require formatting data
2) Changing from one custom ROM to another custom ROM may or may not require formatting data - see point number 3 below
3) On this device, there are different Pie encryption protocols, and they are not always compatible with each other. If you move from a ROM using a different encryption protocol from your current ROM, you will need to format data, because the pin/password will always be considered to be "wrong" by the new ROM. Some ROMs will just cheerfully format and encrypt without telling you, and you will have lost all your internal storage.
Conclusion - Never change your ROM without first backing up your precious data
Click to expand...
Click to collapse
The only workaround that I've found and that seems to work is to flash magisk just after the rom without rebooting to system, in this way I noticed that generally password is not required
The only workaround that I've found and that seems to work is to flash magisk just after the rom without rebooting to system, in this way I noticed that generally password is not required
Click to expand...
Click to collapse
Thats what I have found too, but am not 100% sure if there is an issue with TWRP as the PIN I use is always wrong and it kills the process. Very frustrating as I cannot mount data so cannot perform a backup
its due to dm-verity which is a "security" android feature and depends whether it is enabled or disabled. It also depends on if your recovery properly supports decryption. typically dm-verity can be disabled by flashing your rom and then flashing magisk BEFORE rebooting or a specific dm-verity disable patch if you wish to not install magisk. If you happen to have a encrypted partition and can got get in due to wrong password or non properly supported recovery ...then you are forced to format the partition thereby losing your data.
Can't you set password for screen lock after disabling force encrypt on your phone?
Edit: Never mind, it doesn't work in case of lavender.
XeoNoX said:
its due to dm-verity which is a "security" android feature and depends whether it is enabled or disabled. It also depends on if your recovery properly supports decryption. typically dm-verity can be disabled by flashing your rom and then flashing magisk BEFORE rebooting or a specific dm-verity disable patch if you wish to not install magisk. If you happen to have a encrypted partition and can got get in due to wrong password or non properly supported recovery ...then you are forced to format the partition thereby losing your data.
Click to expand...
Click to collapse
Thus, "typically dm-verity can be disabled by flashing your rom and then flashing magisk BEFORE rebooting".
I tried in the following steps
- flashing the full stock rom;
- reflashing the Orangefox recovery (since stock recovery replaced Orangefox);
- installing Magisk inside Orangefox.
Spoiler: Screenshot 1
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Furthermore, I checked two boxes below
- Disable DM-Verity;
- Disable Forced Encryption;
in the Orangefox settings both before and after flashing the full stock rom.
In addition, in fastboot mode, I flashed a Magisk-patched boot.img (that had been patched, before flashing the full stock rom, in a previously installed same stock rom).
All the above steps were performed before booting into system.
Finally, the data partition remained encrypted...
Would it be still possible to disable dm-verity?
Thanks.
Disable Forced Encryption cannot remove encryption, it can only disable forced encryption. to remove encryption, format data.

Categories

Resources