How to mount encrypted /data partition in recovery mode?

I managed to run the fastboot boot ... command, but get an error message:

anonymous@anonymous:~$ fastboot boot ~/Downloads/twrp-3.7.0_9-0-FP3.img 
Sending 'boot.img' (31512 KB)                      OKAY [  0.854s]
Booting                                            FAILED (remote: 'unlock device to use this command')
fastboot: error: Command failed

I think I must unlock the bootloader. But if I remember correctly, this will erase all my data. Am I right? Or what shall I do?

2 Likes