yashsingh1/xdaforums huggingface dataset:
[Android Software Development] WoKoschekk:
But there's no link between encryption and security patch level. It doesn't matter if your device is encrypted or not. You can flash what ever you want.
[Android Software Development] lndiana:
I got an OP 7 pro too
[Android Software Development] H4X0R46:
How so? Because when I flash a rom that has an earlier security patch than what I have, the phone's encryption trips and TWRP shows a bunch of gibberish encrypted junk, forcing me to either format or flash something newer [emoji848]

---------- Post added at 06:42 PM ---------- Previous post was at 06:42 PM ----------

Yeah hopefully it's a quick fix! I won't update my OOS until I can turn off force encryption personally.
[Android Software Development] WoKoschekk:
Encryption is set in /vendor/etc/fstab and that has nothing to do with security patch level.
[Android Software Development] H4X0R46:
Ah, then my terminology must be wrong. So what causes the security level mismatch and not being able to flash roms with older patches? Why does it encrypt and not let you unless your phone is unencrypted then? I'm genuinely curious [emoji848]
[Android Software Development] WoKoschekk:
The information about your current patch level is stored somewhere in the bootloader partition. The patch level of your ROM is inside the boot.img

Use magiskboot, unpack the boot.img and you'll see.

And now I am genuinely curios how the bootloader mounts /userdata to encrypt it?? Could you explain this to me? It seems you are very convinced of it.

---------- Post added at 10:51 AM ---------- Previous post was at 10:41 AM ----------

BTW: The disabler.zip from the OP removes the avb bootflag for your /odm and /vendor partitions. Someone here already tried to flash the vbmeta partition to disable the verification for /odm and /vendor?
[Android Software Development] alecxs:
some devices have known issues when running unencrypted, therefore that ROM versions can't be supported (search for keyword *fingerprint* within this thread)
[Android Software Development] WoKoschekk:
Yes, I also heard about that.

But it's kinda funny that nobody cares about the security issues when fully unencrypted.

Your personal data is accessible for everyone. You only need to boot into TWRP and open the fileexplorer. You don't need a PIN/password/pattern to do that.
[Android Software Development] Bortex19:
Hi!

I have been reading the forum and I am not sure about what should I do if I want to encrypt my phone after flashing dm-verity-disable forcencrypt.

TWRP now supports encryption, so I want to have it.

What should I do? Install an OTA update?

Thank you for your time

Could you help me with that? I want to recover encryption but I am not sure what would be the best way to do it and I'm afraid of mess it up
[Android Software Development] WoKoschekk:
Which device?
[Android Software Development] Bortex19:
Xiaomi Mi 8, running MIUI 12 EU
[Android Software Development] alecxs:
[MENTION=8848618]Bortex19[/MENTION] restore backup of the phone which you did BEFORE flashing this zip
[Android Software Development] Bortex19:
I maybe have it somewhere, but if I cannot find it, is there other way?
[Android Software Development] WoKoschekk:
Then you should use the flash tool to install the latest complete firmware. At the same time you must format /data. It's not possible to keep your data while restoring encryption this way.
[Android Software Development] Bortex19:
And last question (thank you for your speed to reply).

Do you have any idea of the name of the backup file? (The automatic one)

If I make a backup of /data could I restore it after format it and restoring encryption?
[Android Software Development] WoKoschekk:
I don't use Xiaomi myself. What kind of backup do mean?
[Android Software Development] Bortex19:
I am not really sure "@Bortex19 restore backup of the phone which you did BEFORE flashing this zip"
[Android Software Development] WoKoschekk:
It sounds like a TWRP backup. But I wouldn't recommed to restore encryption or sth else with a TWRP backup. Take your time and do it the right way by flashing a complete stock firmware. That's easy and it's safe.

And it's not possible to restore non encrypted data on a encrypted device! If you want to backup any data you can only do that with Titanium Backup.
[Android Software Development] Bortex19:
Migrate, instead of Titanium, could be fine too?
[Android Software Development] WoKoschekk:
While in running system, single files are not encrypted anymore. That's the reason why you can use Titanium backup for en- or decrypted data partition.

TWRP always backups the entire partition or the entire data on that partition, also including encryption information.
[Android Software Development] alecxs:
[MENTION=8848618]Bortex19[/MENTION] find the line for userdata and restore =ice back into fileencryption=ice in your /vendor/etc/fstab.qcom
[Android Software Development] WoKoschekk:
This produces a bootloop.

---------- Post added at 06:51 PM ---------- Previous post was at 06:50 PM ----------

...and you should give him the correct permission.
[Android Software Development] asextor:
hi . i think i found a way to replace recovery with twrp , still haven't tried it yet but i wanted to ask you your opinion

first download the stock rom and extract it . then go to Firmware\images\recovery.img and replace the recovery file with twrp.img that you have after changing the twrp.img to recovery.img of course. and then flash the rom

so do you think this will work ?
[Android Software Development] WoKoschekk:
Yes, but why? You can always use

fastboot flash recovery <File name you want to flash>
[Android Software Development] asextor:
because sometimes , after you flash TWRP.img and reboot , it gets replaced with Recovery immediately and the only option that you have is to lunch TWRP before reboot .

so if you don't want TWRP to get replaced with Recovery , i think this is the way . to flash TWRP along with a stock rom , and after that you can replace stock rom with whatever you want. :)
[Android Software Development] WoKoschekk:
In /system/bin you'll find a boot script called "install-recovery.sh". This one is responsible for why TWRP gets replaced.

If your system detects another recovery during boot process, it replaces that one with the stock recovery.

To prevent this, it's necessary to patch the script before booting into system. TWRP does it for every device while rebooting into recovery.
[Android Software Development] asextor:
yeah but for me that line doesn't work , so this is just a way that i thought of to work it out , to remove recovery completely .

still haven't tried it though , cause i just bought my first andoird phone and i realy have no experience with this stuff.

when i try it and if it works i will show you the results.
[Android Software Development] WoKoschekk:
Which device?

It doesn't matter if twrp is being flashed included in your stock ROM or afterwards. The boot process and its scripts are important.
[Android Software Development] alecxs:
[MENTION=1730764]asextor[/MENTION] completely off-topic, hide your posts [MENTION=9764265]WoKoschekk[/MENTION] don't feed
[Android Software Development] asextor:
it's over dude , there is nothing to say now
[Android Software Development] H4X0R46:
Does the dev still update this zip?
[Android Software Development] WoKoschekk:
why? there is nothing to update
[Android Software Development] Crimson Viper:
Hey uhm im quite new to using this disabling force encryption thing, this youtuber (Vid link: https://www.youtube.com/watch?v=sGolu5J0x3U) sent me here to entrust the OP's file as for how it is considered to be the universal one. I have a question, since the instructions had something to say about changing the zip name file in order to change the function, can I remove the DM-Verity from the file name safely? since im only after the DFE (Disable Force Encryption) part. My device is a Zenfone Max Pro M2, not rooted, has TWRP-custom recovery and also Pixel Experience Custom ROM installed. I was planning to use the universal DFE file given by OP since it was required by the video link given that I have to flash the said file after flashing an update from my custom rom, under the Security settings-Advanced-Encryption and Credentials it says "Phone not encrypted" so I was thinking of giving the file a go for the next system update.
[Android Software Development] WoKoschekk:
What's your goal when using this .zip?? Your device is already not encrypted and there is no need to flash the .zip.

This tool disables force encryption. Force encryption means your device will be encrypted and keeps encrypted without any chance to decrypt it.

You have the

option

to encrypt your device and the only logical conclusion is: you are not encrypted.
[Android Software Development] Crimson Viper:
Oh okay I see, so do I just flash the system update file through TWRP and reboot immediately since there is no need for me to flash the DFE.zip file since my phone is not encrypted by default?
[Android Software Development] WoKoschekk:
Yes

I downloaded the Pixel ROM for your Zenfone and had a look inside the fstab. You are definitely not encrypted.
[Android Software Development] Crimson Viper:
Alright, will take note of this for the next system update rollout. Hoping for no data loss or bootloops, thank you! ✨
[Android Software Development] H4X0R46:
It no longer works on some newer OnePlus builds. OnePlus changed something where this zip just makes the phone bootloop. [MENTION=6037748]Zackptg5[/MENTION]
[Android Software Development] herpor:
I can‘t download the zipfile from the published link above – website of Zackptg5.

There seems to be no file.

Please let me know a working download link.

Thanks a lot.
[Android Software Development] lawrencee:
Has anyone got this to work on Galaxy J7 nxt android 8.1

I have tried this Zip and even no-verity but none of them works.

I still get 0MB after first system boot
[Android Software Development] willcall:
This doesn't working on moto g7 running android 10. At least I couldn't get it to work. Anybody out there get it to work on moto g7?
[Android Software Development] nickster1:
Which newer builds? Beta builds? I'm on latest stable and I'm having no issues with it.
[Android Software Development] H4X0R46:
Yeah beta builds. Apparently it's something they've already BEEN doing with HydrogenOS in China, and will likely trickle down to OOS stable builds in the near future. Decrypting stable still works..... For now!
[Android Software Development] nickster1:
Well thank you for the heads up! I sure hope this gets updated. I would absolutely hate to go back to being encrypted.
[Android Software Development] WoKoschekk:
It should be possible with some extra modifications. There's an init process called High Assurance Boot (HAB) to verify your system's integrity. Check the script "/vendor/etc/init/hw/init.mmi.hab.rc". This process fails after the disabler was flashed and causes a boot loop
[Android Software Development] H4X0R46:
I very much agree with you! I would hate mine encrypted too! [emoji106]
[Android Software Development] Amit™:
Thanks it's working ?
[Android Software Development] H4X0R46:
Beta 18 was released for OnePlus 7 Pro today, same thing. I guess OnePlus is really gonna be like that now :/
[Android Software Development] almightysiman:
OB18 still can't boot with decrypt data?
[Android Software Development] H4X0R46:
Nope! And I'm really starting to dislike OnePlus for this decision.
[Android Software Development] greeneyez15o:
I had that issue on my OnePlus also, did u mount vendor b4 installing decrypt zip ? I always had to do that right b4 flashing the verity zip
[Android Software Development] H4X0R46:
Nah I haven't tried that actually. Hmm..... Worth a try. Seems odd though that the open betas don't let you decrypt but stable still does. Matter of time before both force it [emoji848]
[Android Software Development] greeneyez15o:
Did it work ???? Worked for me on previous betas .
[Android Software Development] almightysiman:
You mean worker on beta17?
[Android Software Development] Zackptg5:
Can you post the recovery.log after flashing the zip?
[Android Software Development] Zackptg5:
I'll have a fix for this in the next update, thanks!
[Android Software Development] H4X0R46:
Sorry this took a while, busy life. But here it is. In this recovery log you'll see me flash Magisk and your zip onto a fresh install of Open Beta 18 for the OnePlus 7 Pro!

Link: https://mega.nz/file/bRtHyIyR#WEGHe0a1WSytcppX1xcYluBuu3GIpgb-u28ZagfhhRs
[Android Software Development] Zackptg5:
Hmm, logs completely fine. Once I finally get my op7pro back from warranty, I'll be able to update this mod and look into it more
[Android Software Development] H4X0R46:
Awesome thanks man! Honestly I think OnePlus just changed something rom side to keep the phone encrypted. Idk why OnePlus thought that was a good idea lol
[Android Software Development] Spaceboy60:
Got a Realme 5 Pro. How do i know whether this is a Slot device or not?
[Android Software Development] H4X0R46:
Just checked for you. It appears it isn't. I checked the thread for twrp for your device, normally an A/B device has twrp in the form of a img file AND a zip file, your device only used an img file, so I believe it's NOT a dual slot device. Img just gets flashed to recovery slot in your case.
[Android Software Development] esi2121:
can i use this after flashing 10.3.4 oos to prevent wipe storage partiton..and boot os normally???
[Android Software Development] fdgfdhgfdhg:
iyughhghjhgjhghg
[Android Software Development] WoKoschekk:
getprop ro.build.ab_update

true => your device is A/B

false => your device is A-only

...or check

fastboot getvar all
[Android Software Development] WoKoschekk:
That's the reason why I wrote "or". Maybe you'll get the info by getprop or getvar all.
[Android Software Development] Spaceboy60:
getvar all was what gave that output.

The other command do I run from twrp or command line?
[Android Software Development] WoKoschekk:
Use a command line app or adb.
[Android Software Development] Spaceboy60:
So what is the likely cause of the error: cannot mount /odm when installing the ZIP??
[Android Software Development] Spaceboy60:
Returns nothing
[Android Software Development] WoKoschekk:
The 'fastboot getvar all' command should output the state of your boot slots (in case your device uses slots!)

https://source.android.com/devices/tech/ota/ab#life-of-an-a-b-update

not even an error (error code 1)?? error=false

Apart from that there are several other methods to find out if your device uses boot slots:

- does your fstab contain "slotselect" as a mount option?

- do you have partitions with a slot in '/dev/block/bootdevice/by-name'?

- does a flash.zip for a custom ROM contain a payload.bin?
[Android Software Development] Spaceboy60:
No error codes, no.

Last two no .1st: what location is fstab, not under /etc
[Android Software Development] WoKoschekk:
...good to have the .zip :D ;)

I guess you don't have a device with A/B partitions.
[Android Software Development] Spaceboy60:
If I could install it without it giving an error, it would
[Android Software Development] WoKoschekk:
What error?
[Android Software Development] Spaceboy60:
cannot mount /odm !
[Android Software Development] WoKoschekk:
What version of TWRP is currently installed on your device?
[Android Software Development] Spaceboy60:
3.3.1-0

Latest for my phone I think (realme 5 Pro)
[Android Software Development] WoKoschekk:
Could you post a link to that version?
[Android Software Development] Spaceboy60:
https://sourceforge.net/projects/bablus/files/RMX1971/twrp_RMX1971-20200228.img/download

Xda thread :

https://xdaforums.com/realme-5-pro/development/recovery-twrp-3-3-x-realme-5-pro-realme-t4067113
[Android Software Development] WoKoschekk:
It could be helpful to try another build like Orange Fox.

https://xdaforums.com/realme-5-pro/development/recovery-official-orangefox-recovery-t4137821

Just flash the downloaded .zip to install it.
[Android Software Development] Spaceboy60:
Will try and flash tomorrow, see if any luck.
[Android Software Development] WoKoschekk:
If not there will be another fix for that. ;)
[Android Software Development] Spaceboy60:
Same result
[Android Software Development] WoKoschekk:
You want to decrypt your device with that .zip?

Your current firmware build?
[Android Software Development] Spaceboy60:
Evolution 4.6 android 10 custom ROM.
[Android Software Development] WoKoschekk:
Magisk installed? If so, you could try to decrypt your device by patching the fstab file on your own.

1. Start TWRP > mount /vendor > open file explorer > copy /vendor/etc/fstab.qcom to your PC.

Alternatively you also can adb pull the file when /vendor is mounted:

adb pull /vendor/etc/fstab.qcom

2. open the file in a texteditor and search for 'fileencryption=ice' and change it to 'encryptable=ice'. Maybe you find it twice. Save it and put the file back into /vendor/etc or use

adb push fstab.qcom /vendor/etc

3. Open terminal in TWRP or use ADB commandline

(adb shell) chmod 644 /vendor/etc/fstab.qcom

4. In TWRP open 'Wipe' and choose 'format data'. Confirm it by typing 'yes' and reboot into system

INFO: Once your device is decrypted it's not possible to restore a backup of your encrypted data partition.

To save your apps and settings use Titanium Backup or sth. like that.
[Android Software Development] H4X0R46:
Hmm.... The manual way.... I wonder if this would work on my 7 Pro [emoji848] Can't say I've tried this. Question, what's the chmod command for? I know it's to change permissions on a file, but in this case what's it good for?
[Android Software Development] WoKoschekk:
To have permissions -rw-r--r-- I don't know how adb push will set the permissions on that file. Maybe it's the same.

---------- Post added at 03:41 AM ---------- Previous post was at 03:35 AM ----------

The system expects exactly these permissions for files in /vendor/etc. Otherwise fstab is not readable and your device will end up in a bootloop.

For further information about chmod use the --help option.
[Android Software Development] H4X0R46:
Okay thanks for the answer! Good to know!
[Android Software Development] WoKoschekk:
Do you have an OnePlus 7 Pro? In contrast to the Realme 5 Pro your device uses the A/B partition scheme and I'm afraid this method won't work for you.

It's mandatory to disable dm-verity/AVB for persist modifications of any file in /vendor. For A-only devices Magisk disables dm-verity/AVB by default. But not for A/B devices. You need a patched kernel for this method. This is normally what the .zip does for you.
[Android Software Development] Spaceboy60:
All done. Will report back once I've set my phone up and rebooted into recovery.

Setting a pattern or pin in shouldn't encrypt the Drive right?

EDIT: Can't set a pattern or pin, just defaults to swipe now. Any ideas??
[Android Software Development] WoKoschekk:
no, it doesn't.
[Android Software Development] Spaceboy60:
Can't set a pattern or pin now, just defaults to swipe now. Any ideas??
[Android Software Development] WoKoschekk:
erase /data/system/locksettings.db and reboot
[Android Software Development] Spaceboy60:
Still not working
[Android Software Development] WoKoschekk:
Seems that your lock screen needs an encrypted /data partition. After deleting locksettings.db you must be able to set a new PIN/password
[Android Software Development] Spaceboy60:
OK, so what to do now if it requires an encrypted data partition since no lock sticks (goes back to swipe).
[Android Software Development] WoKoschekk:
Just repeat the steps in reverse order and change "encryptable=ice" back to "fileencryption=ice".
[Android Software Development] Spaceboy60:
Is it likely all roms are likely to require this as most are LOS based aren't they?
[Android Software Development] WoKoschekk:
For your device, maybe... But this is the first time I've seen something like this.
[Android Software Development] H4X0R46:
Ah farts. Yeah the OnePlus 7 Pro is my daily driver device. Welp, I'll wait it out for word from the OP and hopefully he can take a crack at my device. Thanks for all the insight man!
[Android Software Development] Spaceboy60:
Will installing a different rom overwrite the existing fstab anyway??
[Android Software Development] WoKoschekk:
Every ROM comes at least with a own /vendor, /system and /boot image. So yes, another ROM means another fstab.
[Android Software Development] stryker09:
Hey man, just letting you know, 10.3.5 works great with my decrypted OP7P!
[Android Software Development] H4X0R46:
Yeah I'm running it right now too! I tried it last night and I'm glad the issue isn't in stable builds yet! [emoji106]

Edit: I say issue, but more like intentional lol
[Android Software Development] Zackptg5:
Bad news everyone, the repair center didn't have any op7pro's left in stock after loosing my phone so they shipped me a op8. Good for me, bad for this mod cause twrp isn't complete for the op8 so I can't do anything with this mod for now. Once I get full featured twrp on one of my devices, I'll be able to update this
[Android Software Development] master_lam:
It's install failed on my device (redmi 10x 5G) with dynamic partition. error at the end log: "unable to mount /nvdata file not found" :(
[Android Software Development] vdbhb59:
Can you do something for dynamic partitions like Samsung M21, also where superimages are involved?
[Android Software Development] H4X0R46:
Man that really sucks! Either way, hope you're enjoying your new op8! It's a great device! 😁
[Android Software Development] chooks06:
Consolation - have fun with your new device! Stay safe mate!
[Android Software Development] vtec303:
I have a oneplus 8 pro the latest twrp (3.4.0-14) is working to the extend that wipe data is possible now but no backup and restore yet. So I thought lets give it a try to decrypt the phone since wipe is working in twrp, I was on OOS, rooted off course, did a format data, reboot twrp, flashed dm verity disabler script, but just after flashing dm verity disabler script it said device not decrypted, but I carried on and flashed latest magisk, reboot system, set the rom up, but it was still showing "Phone Encrypted". I don't have a lot of android knowledge but does this have to do with the recovery partition? as this phone has a dedicated recovery partition unlike OP7, cheers
[Android Software Development] Zackptg5:
8 and 8 pro have the same TWRP and system, vendor, and product mount as rw isn't working yet (it says in the OP) which is required for this mod
[Android Software Development] vtec303:
Thanks for the info mate and your script is awesome I have enjoyed it on many devices, keep up the good work, cheers
[Android Software Development] nickster1:
Thanks for taking this as far as you could and for letting us know!

What do you think the likelihood is that the 8 will ever have a fully functioning twrp?
[Android Software Development] H4X0R46:
I'm almost certain it will at some point. OnePlus devices are certainly complicated in this way but such a popular device, so I'll bet you they'll have that in time.
[Android Software Development] dix93:
Something strange is happening...

Without flashing this zip after the ROM I was not able token boot the Custom ROM, my phone was kipping me on Recovery with all data crypted.

With this zip I can finally boot my ROM (Havoc OS), but all the data on SDCARD partition are still crypted!! I installed a file manager from the play store and what I get are a bunch of strange folders with silly names in the root of the phone... I cannot save a screenshoot because says me that my memory is full or I haven't an SDCARD.

How to solve this?
[Android Software Development] greeneyez15o:
Doesn't seem to play well with havoc os
[Android Software Development] kevinthug:
i'm not encrypted, do i need just flash this zip without rename, right? i'm planning to install the latest havoc.