Nexus 4 not showing files via MTP

Solution 1:

Seems to be a known issue affecting Android USB file access over MTP. The MTP cache gets out of date until a reboot of the phone.

A workaround is:

  • Clear the "Media Storage" app's data
  • Use the SDrescan or the SD Scanner (also works on Android 4.4/5, available on F-Droid) app to force an update

Or just avoid using USB at all. The issue does not affect other methods of accessing the files. For example, try AirDroid to transfer files.


Note: This doesn't work for Android 5.0.2: After clearing "Media Storage" and using an SD Rescanner, the folders appears in Windows 7 as unopenable 4K files. The only solution at that point is to clear once again Media Storage and restart the device

Solution 2:

You can use the following code after file close

MediaScannerConnection.scanFile(this, new String[] { file.getAbsolutePath() }, null, null);

Source: https://code.google.com/p/android/issues/detail?id=38282