How to mount encrypted /data partition in recovery mode?

I also ran into this problem on my FP4 (storage full) and had the same problems as @Ecowano:
I couldn’t mount even the encrypted data from recovery and neither could TWRP.

I did however manage to find a pretty wonky solution that allowed me to free space:

  • Installed TWRP to recovery
  • Booted TWRP
  • Opened an adb shell
  • Modified /etc/fstab to mount /system_root as writable (replace ro with rw)
  • Followed this guide to enable debugging (note that TWRP mounts the system partition to /system_root instead)
  • Booted into the system without unlocking it and tried adb shell, you should see a message about this
  • Unlocked the system and quickly checked allowing future access and accepted debugging access
  • After the system rebooted by itself to the lock screen again, ran adb shell to gain a shell
  • User data was still not mounted but I was able to use pm uninstall to remove a large app (inspired by this comment)

This may work without installing TWRP but I already had that installed to my recovery partition.

IMHO the fact that filling up userdata can so easily brick the system is pretty bad and not in line with /e/OS’ aim to be an OS for everyone.

3 Likes