This question is in reference to an ongoing issues brought up in the past about being able to see all files on a device through an file manager app, but only a partial amount showing in Windows Explorer while a device is connected to a PC via MTP.
Below are some recollections of this issues:
- Not all files are visible over MTP
- SD card not showing files when connected to pc
- Nexus 4 not showing files via MTP
As for why folders and files do not show up in Windows Explorer while connected via MTP, it’s not exactly known what the cause or reason is. Kevin Panko in link #3 said that "The MTP cache gets out of date...", but I'm not sure if this is correct since there was no further explanation.
My hypothesis is that if you create content in any other storage location other than user designated storage, it gets transferred to the user designated location (e.g., /sdcard --> /storage/emulated/0), and does not directly communicate with Media Storage, avoiding the process of being added to Media Storage (a system app that contains the current state of the current user's storage). Thus, I believe Media Storage is programmed to only collect changes that occur when they are made directly in the user designated storage, or /storage/emulated/0 for example.
The Media Storage app dictates what is being shown in Windows Explorer. If you clear the Media Storage app, a user won't be able to see any content at all when plugging in their device into a PC. So therefore, if it never gets added to Media Storage it will never show up on a PC via MTP.
To add to this hypothesis, when you create a file in user designated storage, /storage/emulated/0 for example, that file will show up on a PC through MTP instantaneously, even while simultaneously connected via MTP. This does not occur when created in any other storage location.
What is causing this issue?