[Q] File created on handset shows up as 0 bytes on MTP USB interface topic

SOCIALIZE IT ⇨

I am running CyanogenMod (CM) 12 on my 1st generation Moto G. In the root directory as shown via the file manager, I created a "notes" folder, where I store text files. Files that I copy over from Windows 7 seem fine.

As an *aside*, the only proviso is that the native CM text editor uses Unix line endings (LF only, not CR+LF). So if the text files were DOS to begin with, any new lines of text added on the handset will have only LF, while old lines will have CR+LF. The CM text editor handles this well, seemingly treating both line endings in the same way.

I have a problem with any *new* text files created on the handset. I am not sure whether the problem is somehow related to the line endings. On the handset, I created a file tmp.txt of length 160 bytes (it contains 160 characters). When I view the text file from Windows 7 using the MTP interface, windows explorer shows the file as having 0 bytes. When I drag the file over to a Windows folder on the laptop, it is basically an empty file. Very bad.

I can use adb to pull the file over, and then it's fine (it's not empty). As a side note, the source path as seen in the handset file manager must be prefixed with storage/emulated/legacy/ when using adb pull.

I do not want to use adb pull to copy over a whole bunch of files. The klag in that process would make it a real headache. I will be regularly mirroring these text files between the laptop and the handset.

Can anyone suggest a reason why a file created on the handset looks so bizzarely empty when viewed over the MTP USB interface? Can anyone suggest a hopefully elegant workaround that doesn't involve too much geeking out? Geeking out is all fun and that, but the handset was really meant to save me time rather than become a project in itself.

Thanks.

xda-developers


  1. Xperia Z Shows full network but cant receive or make calls topic
  2. [Q] G2 D802 Bricked - LG logo shows, but no recovery topic
  3. [Q] LG G2 shows only 9gb avalible topic
  4. [Q] PC recognizes Kindle Fire but ADB shows no device connected topic
  5. Sprint Note 3 flashed shows 3G Symbol but the internet is not working on the phone topic
  6. [Q] Incoming Number shows, no contact name though in CONTACTS topic
  7. [Q] Need to set up the backup account shows up topic
  8. [Q] File created on handset shows up as 0 bytes on MTP USB interface topic
  9. [Q] Stock Firmware OC3 for N9005 HK in .zip file that can flashable ??? topic
  10. [Q] Is it possible to have a file download on internal storage and external? topic
  11. EFS backup and how important that file is topic
  12. [Q] HELP EDITING SYSTEM CALIBRATION FILE? have root etc... topic
  13. [Q] tasker help with switch between any watchface automatically file topic
  14. Changing file in /system stops update? topic
  15. Bootloop after bad build.prop file! topic
  16. oxygen os back up file glitch TWRP topic
  17. [Q] Unable to flash recovery img due to not being able to download PIT file topic
  18. [Q] Pit File for G920F topic
  19. [Q] How to access qualcomm diag interface from android app topic
  20. Is root required to roll back to KitKat? topic

0 commentaires:

Enregistrer un commentaire