Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Help:System.IO.IOException: Win32 IO returned 25 on my android device

Discussion in 'Android' started by CyberTurboPlays, Nov 7, 2014.

  1. CyberTurboPlays

    CyberTurboPlays

    Joined:
    Nov 7, 2014
    Posts:
    65
    wel, i started a question with the same problem over on the Unity answer, but not much of the response there and i m still in total stuck mode on this one, so i start a new thread here and hoping

    ok, i got my save/load feature which use filestream to write/read file to/from drive. everything working good both on my PC and device, then i move onto add in all the ad networks and google play into my game. and after that, i realize my save feature has broken now on my device, but still OK on my PC. i check in adb, and when the save happen, "System.IO.IOException: Win32 IO returned 25" was printed


    i go back to the apk which was built when there is no ad not even android manifest in my Unity proj (the pure game built) and test. adb return : I/Unity ( 2000): /data/data/com.CyberTurboPlays.DragFaster/files/DotData/CTPDotData.Tgd Saved

    the problem one is like: I/Unity (31976): IOException: Win32 IO returned 25. Path: /storage/sdcard0/Android/data/com.CyberTurboPlays.DragFaster/files/DotData I/Unity (31976): at System.IO.Directory.CreateDirectoriesInternal (System.String path) [0x00000] in :0 I/Unity (31976): at System.IO.Directory.CreateDirectory (System.String path) [0x00000] in :0 I/Unity (31976): at TBF_SaveLoad.TB_Save () [0x00000] in : 0


    its been more than a day now since this problem caught my eyes, and i m now totally out of ideas on where to even look into in order to fix this, plz any hint would be great help
    i hav a strong feeling it might be caused by the manifest file or the jar file thats got created/imported in when adding in ads and GPGS, both of which i know very little about
     
  2. CyberTurboPlays

    CyberTurboPlays

    Joined:
    Nov 7, 2014
    Posts:
    65
    i ran a strip down test where i add in repective ads one by one, and its been confirmed that the problem is caused by the chartboost sdk. i hav made a requested on the chartboost site regarding this problem, hopefully they will get back to me real soon

    but, up to this point, anyone has any thoughts over why on earth the chartboost sdk would interfere with my xmlserialization, and give me this problem
     
  3. CyberTurboPlays

    CyberTurboPlays

    Joined:
    Nov 7, 2014
    Posts:
    65
    i actually hav a very bad feeling towards those cs scripts live in Chartboost/Editor after imported in the sdk. i think they are responsible for the set up button in the chartboost window. from a quick glance, they do directory check in those scripts and auto mod the manifest.xml if required.

    could they be my problem source?
     
  4. CyberTurboPlays

    CyberTurboPlays

    Joined:
    Nov 7, 2014
    Posts:
    65
    i believe i hav pinpoint it this time. the problem actually caused by one of the android permission.
    "android.permission.WRITE_EXTERNAL_STORAGE"
    when i remove the permission, the save becomes OK again.
    wow, who would hav thought that this very one would prevent my save from writing

    this permission is also required by some of the other ads, so its not chartboost problem neither, i was too quick jumping to conclusion

    anyway, i need that permission for those ads, but it broke my save process. what can i do to fix this? Help!!!!
     
  5. CyberTurboPlays

    CyberTurboPlays

    Joined:
    Nov 7, 2014
    Posts:
    65
    the thing was i hav 2 build android project and remove that permission from eclipse, it would still hav the permission if i remove it in unity, that s some post scripts they got there, this thing really drives me mad

    my only option now is to alter my save function,right? any suggestion, guys?
     
  6. CyberTurboPlays

    CyberTurboPlays

    Joined:
    Nov 7, 2014
    Posts:
    65
    i change my save script a little and test, i was using Unity api persistenDataPath, i changed it to DataPath, exception is like: I/Unity (12898): UnauthorizedAccessException: Access to the path "/mnt/asec/co m.CyberTurboPlays.DragFaster-1/pkg.apkDotData" is denied.

    this one is even more @#$% up