Search This thread
Apr 23, 2019
40
3
#########Concept########
When phone data is encrypted so twrp can't decrypt it and ask for password.
So We need to find a "fstab" named file in "etc" folder and change its "encrypt" word to "decrypt"
This Fstab file is located inside "System" OR "Vendor folder".

For TWRP Recovery Users ( who don't have root)

PHP:
Open recovery mode and tap on "Advance>file manager" and go to this path

For Root Users Use "Root Explore" OR any Explorer that supports root

PHP:
Go to "System/etc" path

OR

PHP:
go to "system_root/system/etc

If Fstab isn't available inside system then search it in vendors folder

PHP:
go to "vendor/etc"

find ("fstab") named file in etc folder.

maybe more than 1 fstab file will be there.
In that condition.

You need to check which one fstab has partition blocks names like ("system, vendor, userdata) etc.

so just copy this Fstab to SD card :)

###Editing####

Download"Quick Edit Apk".

Open This file using this tool and find line look this this with "data" or "userdata" word.

PHP:
"dev/block/bootdevice/by-name/userdata"
OR
PHP:
"dev/block/bootdevice/by-name/data"

Something like these lines.


Now change "encrypt" word to "decrypt" of this userdata line

Hint
PHP:
"forceencrypt"  >>>>>>>>>>>>>>change it to "forcedecrypt"

PHP:
"encryptable" >>>>>>>>>>>>>>>>>change it to "decryptable"

PHP:
"encrypt" >>>>>>>>>>>>>>>>>>>>change it to  "decrypt"

PHP:
"encryption" >>>>>>>>>>>>>>>>>>change it to "decryption"

See I Just Change "en" to "de"


For example on my phone fstab the line was this.

PHP:
/dev/block/platform/bootdevice/by-name/userdata /data f2fs noatime,nosuid,nodev,discard,noflush_merge wait,check,quota,reservedsize=128M,formattable,resize,forcedecrypt=/dev/block/platform/bootdevice/by-name/metadata,

You can see for me the word was "forcedecrypt" and after (by-name) the word was "Userdata" in this.


("Root Users, You have done eding" Now reset you device and enjoy")

### TWRP Users you can continue ###

go back to recovery and copy this edited fstab to
"it's original location (where you found it).


(For me it was vendor/etc and i paste this edited fstab there)

after pasting done then again go to it's original location (Pasted location)(For me it was vendor/etc)
And tap on this edited "fstab" and select on "chmod" option And set permission to 0644 of this file.

wipe your data, internal storage and dalvik-cable.


Reboot

now error is completely gone :)

Watch this video of you're still confused.

https://youtu.be/Menyk0f--nU
 
Last edited:

SHAH RUKH 45

Member
Aug 24, 2018
16
3
:confused:
I think this would cause error, if we ever want to re encrypt the device. Just change forceencrypt to encryptable and perform a factory reset. You will have a unencrypted device with encryption option available.
Please Correct me if I am wrong.
 
Apr 23, 2019
40
3
Yes, after your device is decrypted then you can again encrypt it by just changing the word from decrypt>>> to "encrypt" and do a factory reset.

The important part is to find the right "fstab" file from (etc) folder located inside system OR vendor directory's.

And change the encrypt word to decrypt and do a factory reset.


Wrong,❎❎❎
Force-encrypt to decrypt.

Riight ☑️☑️☑️
Force-encrypt to force-decrypt.

The number of words should be same age changed.

You just need to change en to de.

Understand.
That's a Common sense.
 
Last edited:

SHAH RUKH 45

Member
Aug 24, 2018
16
3
Yes, after your device is decrypted then you can again encrypt it by just changing the word from decrypt>>> to "encrypt" and do a factory reset.

The important part is to find the right "fstab" file from (etc) folder located inside system OR vendor directory's.

And change the encrypt word to decrypt and do a factory reset.


Wrong,
Force-encrypt to decrypt.

Riight
Force-encrypt to force-decrypt.

The number of words should be same age changed.

You just need to change en to de.

Understand.
That's a Common sense.

Wouldn't it be easy just to re-encrypt from setting menu instead of everyone we have to encrypt or decrypt, changing the fstab file. While your way is working, it would be best to make device encrypt-decrypt from setting. Also a plus side we don't need to perform factory reset after we encrypt and decrypt it again.
Cheers!
 
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