Disable Force Encryption Explained And With Benefits

MechaNarutoSucks

Senior Member
May 26, 2017
64
23
0
Istanbul
I'll get straight into the matter at hand.

DFE basically disables all the encryption the phone uses. Now that is explained let's get into the benefits of disabling it.

-Battery Life Improvement
-Slighty Better Response Times

So from looking at this you can say that it hardly does anything in terms of making your life easier.

Let's get to the verdict:

If you don't care about security and you trust yourself then i encourage you to disable it

Any mods that will make your experience better is a plus in my book.

P.s: If you are installing any type of gsi then you don't have any choice but to disable it.



Hope this helped you in someway or another. :eek:
 

KabalLV

Senior Member
Sep 30, 2015
202
38
48
Does my phone get re-encrypted when i flash a new rom build (pixel experiance) or a new firmware ? I dont get that part.
 

Martensite

Senior Member
May 22, 2017
162
54
0
That's actually wrong information it only patches the android framework so like @KabalLV says the phone gets encrypted every time you wipe and install.
I find fix.sh in the dfe.zip. I think this is how magic happen.
#!/sbin/sh
find /vendor/etc -name "fstab.*" -exec sed -i 's/forceencrypt/encryptable/g' {} +
find /vendor/etc -name "fstab.*" -exec sed -i 's/forcefdeorfbe/encryptable/g' {} +
find /vendor/etc -name "fstab.*" -exec sed -i 's/fileencryption/encryptable/g' {} +
And it was fine when I forget to flash dfe with already patched vendor.
 
Last edited:

Darklouis

Senior Member
Jun 17, 2017
381
122
0
Davao City
No.

Encryption is defined in late-stage fstab, and on treble devices that fstab is at /vendor/etc/
Encryption happens in vendor/etc partition thats why when you try to update your device's vendor/firmware, the patch (DFE) will be overwritten with the new files thus enabling the encryption again. But updating only the system (like dirty flashing new LineageOS Rom like OTA update via TWRP [old build > new build]) it won't overwrite vendor/firmware thus the encryption stays the same (if enabled or disabled via patch)
 
Last edited:

CosmicDan

Senior Member
Jun 19, 2009
5,845
7,677
263
34
Sydney
Encryption happens in vendor/etc partition thats why when you try to update your device's vendor/firmware, the patch (DFE) will be overwritten with the new files thus enabling the encryption again. But updating only the system (like dirty flashing new LineageOS Rom like OTA update via TWRP [old build > new build]) it won't overwrite vendor/firmware thus the encryption stays the same (if enabled or disabled via patch)
Why are you replying to me lol....

Anyway, MIUI ROMs (the custom ones) all seem to include vendor too, which may or may not have FDE disabled.

It's perfectly fine to just flash FDE disable/optional any time, if it's already applied then it won't hurt. Unless it's a toggle script, which I haven't seen anywhere because that'd be annoying.

Sent from my POCOPHONE F1 using Tapatalk
 
Last edited:

Darklouis

Senior Member
Jun 17, 2017
381
122
0
Davao City
Why are you replying to me lol....

Anyway, MIUI ROMs (the custom ones) all seem to include vendor too, which may or may not have FDE disabled.

It's perfectly fine to just flash FDE disable/optional any time, if it's already applied then it won't hurt. Unless it's a toggle script, which I haven't seen anywhere because that'd be annoying.

Sent from my POCOPHONE F1 using Tapatalk
Just giving out additional info.. Hahahaha :D
 

MechaNarutoSucks

Senior Member
May 26, 2017
64
23
0
Istanbul
Why are you replying to me lol....

Anyway, MIUI ROMs (the custom ones) all seem to include vendor too, which may or may not have FDE disabled.

It's perfectly fine to just flash FDE disable/optional any time, if it's already applied then it won't hurt. Unless it's a toggle script, which I haven't seen anywhere because that'd be annoying.
That may be true but everytime i reflash the encryption turns on. So i don't know the exact answer but that's the out outcome of reflashing at least for me.
 

CosmicDan

Senior Member
Jun 19, 2009
5,845
7,677
263
34
Sydney
That may be true but everytime i reflash the encryption turns on. So i don't know the exact answer but that's the out outcome of reflashing at least for me.
Because you're flashing MIUI? The ROM you're flashing, whatever it is, must have its own vendor. Open the ZIP on PC and check yourself if it has vendor.new.dat.br - there is your answer.
after flashing each update via twrp, should i flash DFE then magisk or it is needed once?
Just flash it again if in doubt, as said it can't do any harm.

Sent from my POCOPHONE F1 using Tapatalk
 
  • Like
Reactions: hosseinito

rickyroma

Senior Member
Aug 18, 2007
106
28
48
Is there a reason to still be using 18.0 DFE and not 18.1? Also I have magisk v19 installed. If I update this rom (10.3.4.0|9.4.1) should I flash dfe 18.1 and re-flash magisk v18.1 for the purpose? Thanks
 

hosseinito

Senior Member
Jul 14, 2014
192
21
38
Because you're flashing MIUI? The ROM you're flashing, whatever it is, must have its own vendor. Open the ZIP on PC and check yourself if it has vendor.new.dat.br - there is your answer.Just flash it again if in doubt, as said it can't do any harm.
Ok then. Thank you?
 

MechaNarutoSucks

Senior Member
May 26, 2017
64
23
0
Istanbul
Because you're flashing MIUI? The ROM you're flashing, whatever it is, must have its own vendor. Open the ZIP on PC and check yourself if it has vendor.new.dat.br - there is your answer.Just flash it again if in doubt, as said it can't do any harm.
Like i said i don't know the exact idea on it so thx for the explanation.

And its true that i only update my rom when there is a new firmware update.
 

dan.socea

Senior Member
Mar 14, 2013
99
14
0
Can I just flash the DFE file in TWRP without wiping data or anything else? Right now I have Lineage installed with everything set up and I would not wipe everything right now just to flash DFE.
 

Jerryxl

Senior Member
Jan 27, 2015
83
13
0
28
Hi i am on global 10.3.5 stable, rooted with magisk and twrp is not installed (only hot booted).
1. Can i just flash dfe?
2 what about ota update? If i just flash dfe Will it ask for any pin after doing ota update?? Or i can just update and then flash dfe again
3. Also i have one doubt. i flashed pixel rom once and i decided to revert back to miui. So i restored my twrp backup of miui and got bootloop. Then i flashed the 10.3.5 zip and vendr/firmware also. But after booting it asked me for pin. i had to fastboot flash the rom again. It wiped all my data. So what did i do wrong here. And how to restore miui twrp backup. Coz its really difficult to back up all the data in my phone every time i flash a rom. Thats holding me back from enjoying the custom roms. So any clarification would be highly appreciated. Thanks
 
Last edited:

rehfore

Member
Jul 8, 2018
39
4
0
I'll get straight into the matter at hand.

DFE basically disables all the encryption the phone uses. Now that is explained let's get into the benefits of disabling it.

-Battery Life Improvement
-Slighty Better Response Times

So from looking at this you can say that it hardly does anything in terms of making your life easier.

Let's get to the verdict:

If you don't care about security and you trust yourself then i encourage you to disable it

Any mods that will make your experience better is a plus in my book.

P.s: If you are installing any type of gsi then you don't have any choice but to disable it.



Hope this helped you in someway or another. :eek:
but how do i do it? i only read dfe dfe dfe everywhere but can't find anywhere how to disable encryption
 

pac213

Senior Member
Aug 9, 2010
702
158
0
How can you tell the benefits without providing concrete proof? I am running encrypted since I got my POCO and installed LOS16. I haven't encountered any issues at all with regards to performance or battery life.
 
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone