9

I'm in the process of developing an Android app and using my Nexus 4 as the test device. One of the functions of the app is to create a folder on the phone for storing data. If I browse the phone using ES File Explorer I can see the folder/files, but when connected to a Windows 7 (64bit) PC I cannot see the newly created folder. The missing folder is called "Cruise Speed".

Desktop screenshot:

desktop_screenshot

Mobile screenshot:

desktop_screenshot

  • This is really curious! My first thought was a permissions problem, but that doesn't seem to be the case. Permissions, owner, and group all match files that don't do this. Just so others know, I was able to reproduce the behavior just by creating a file/folder on the internal storage with a terminal emulator or file manager. Anything I created on the device in this way was invisible over MTP. – dotVezz Sep 17 '13 at 19:54
  • Well I am glad it's not just me. I did think it may be something to do with how I set the save path of the file but clearly not. – Jonny Wright Sep 17 '13 at 20:03
  • I know its a long shot but...to set the save location of the file I used android.os.Environment.getExternalStorageDirectory(); however Windows is referring to this as Internal Storage. Seems strange that in one instance it is referred to as External and the next as Internal. – Jonny Wright Sep 17 '13 at 20:09
  • 1
    I'm pretty sure the discrepancy is just because of how MTP handles things. – dotVezz Sep 17 '13 at 20:19
  • There was a similar case already this week. The affected user reported after a reboot of Windows the folder was visible (which makes it clear it's a problem on Windows' end). Have you tried a refresh in the file explorer? Or checked with a different file manager on Windows (e.g. Total Commander)? My guess is it's some kind of caching Windows performs. – Izzy Sep 17 '13 at 21:12
5

This is a famous issue affecting USB file access over MTP.
I can't even remember how many hours I've lost trying to access files created by my first app on a PC (and I'm talking about GBs of important files).
If you start the app and it creates the folder, then you have to reboot the device in order to let your PC be able to correctly display the folder.
This happens only if you use USB and MTP.
You could solve the issue using MediaScannerConnection in your code or cleaning Media Storage's cache but I suggest you to do the simplest thing: use AirDroid ;)

  • Just a comment on this, on my Samsung Galaxy Tab 3, not even a reboot makes the file show on the computer. – Martin Argerami Mar 20 '16 at 22:21
1

I was having the same issue, a folder was created by Vuze app on my nexus 6 phone. This folder was accessible/visible on my phone but not on PC when phone was connected through USB. I simply copied another random file on my phone to this folder which was not visible on PC. After this copy I was able to see the folder on PC.

1

Just create the dir on the pc first then copy it over to the sd card/phone storage.

you can either put in the contents into folder first and copy over or just the folder first. as long as the folder is created from pc, any content can just be copied directly to internal/external mobile devices.

for zipped contents they cannot be directly unzipped and copied over unfortunately, you need to unzip them first manually onto the desktop.

good luck and have a good day! :)

0

In my case, clearing the cache didn't work. However, I managed to access the hidden folders/files by renaming the parent folder. Remember to dismount the phone and connect it again after renaming the parent folder if the phone is connected to the PC.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.