Input/output error resulting from searching files >1GB on galaxy phone

I have my galaxy s8 connected to a USB port 2.0 on the back of my PC and I am using ubuntu 20.04 VM on windows 10 x64. When I search for a file that is bigger than 1GB using this command:

find . -type f -size +1073741824c

I am receiving this error

find: ‘path/to/folder’: Input/output error`

I have tried USB 3.0 ports and other USB 2.0 ports too. I am using a USB-C-USB 3.0 cable to connect my galaxy s8 to PC.

Why is the input/output error occurring ?

This I/O error is likely occurring due to a few potential reasons when trying to access your Galaxy S8 through Ubuntu VM:

  1. MTP (Media Transfer Protocol) Connection Issues:
  • Android phones typically connect via MTP, which can be less stable than direct USB file access
  • The connection through the VM adds another layer that can make MTP access more fragile
  • Large file operations are particularly prone to failures with MTP
  1. VM USB Passthrough Limitations:
  • The USB passthrough from Windows host to Ubuntu VM can introduce additional complexity
  • The connection may be dropping momentarily during intensive operations like searching large files

To troubleshoot this, you could try:

  1. First, confirm the phone is properly mounted:
ls -l /path/to/mount/point
  1. Try using a different file transfer mode on your phone:
  • Go to USB connection settings when connected
  • Try switching to “File Transfer” or “PTP” mode instead of MTP
  1. If possible, test directly on the Windows host to isolate if it’s a VM-specific issue:
  • Try the same large file operations in Windows Explorer
  • If it works in Windows but not Ubuntu VM, it’s likely a VM USB passthrough issue
  1. Alternative approach - instead of using find, try breaking down the search into smaller directories:
for d in ./*/; do
  find "$d" -type f -size +1073741824c 2>/dev/null
done