twrp is a open source recovery project which allow user to backup & restore their device. with the help of twrp recovery you can flash any flashable zip file. after flashing the twrp recovery Many user face a data encryption or twrp password issue on their phone, os if you are one of them then you can fix it by following the below Instructions.
Step 1: Root Your Phone Using Magisk
- Root your device using Magisk.
Step 2: Edit vendor/etc/fstab.6765 File
- Launch a root explorer app on your rooted device.
- Navigate to the file “vendor/etc/fstab.6765”.
- Open the file using a text editor.
- Search for the following line:
Search For below lines
wait,check,quota,formattable,resize,forcencrypt=/dev/block/platform/bootdevice/by-name/metadata
Replace with
wait,check,quota,formattable,resize,encryptable=/dev/block/platform/bootdevice/by-name/metadata
Step 3: Repeat Changes in vendor/nvdata/fstab.mt6765 (If Applicable)
- Navigate to the file “vendor/nvdata/fstab.mt6765” using the root explorer app.
- repeat the changes mentioned in Step 2 if this file exists. If the file is missing, skip this step.
Step 4: Flash the Latest TWRP Recovery
- Download the latest TWRP recovery image for your device.
- Connect your device to your computer and boot it into fastboot mode.
- Flash the TWRP recovery image using fastboot commands or a flash tool compatible with your device.
- Once the flashing process is complete, reboot your device.
Step 5: Done!
Congratulations! You’ve successfully fixed the TWRP data encryption issue on your device. You can now use TWRP recovery without encountering encryption-related hurdles.
Note: if not solved run below code via fastboot
fastboot format userdata