Connecting to PC through USB (MTP) doesn't expose underlying filesystem (
f2fs) of internal storage (
/data partition) to PC. But recovery programs need direct access to filesystem i.e. block level access and won't work with MTP (Transfer Files) which is just a client-server type protocol for data transfer.
You need USB Mass Storage (UMS) which is disabled on newer Android versions by default. So you need root access or at least custom recovery to enable UMS:
# mountpoint /data && umount /data
# echo '0' >/sys/class/android_usb/android0/enable
# echo '/dev/block/bootdevice/by-name/userdata' >/sys/class/android_usb/android0/f_mass_storage/lun/file
# echo 'mass_storage' >/sys/class/android_usb/android0/functions
# echo '1' >/sys/class/android_usb/android0/enable
* Kernel should be built with
* Paths may vary depending on device
* If your
/data partition is FDE encrypted and you unencrypted it in recovery, path will be
/data will appear as a partition on Linux PC which you can mount (preferably read-only to avoid overwriting data). However recovery tools including
extundelete mostly don't need mounting filesystems.
If you have custom recovery, another option is to
dd out an image of
/data partition to external SD card and then mount it on Linux PC as a loop file:
# umount /data
# dd if=/dev/block/bootdevice/by-name/userdata of=/external_sd/data.img
Same is also achievable using adb exec-out.
To make sure your data is recoverable, see this answer.