Search code examples
androidapk-expansion-files

Can't Write to .obb directory for Expansion file


I am having major issues with my ".obb" directory which I need for expansion files. I can create a directories under it, but I can not place a data file in the directory. For example, I try to copy main.1.com.abc.groovebasstrial to /obb/com.abc.groovebasstrial/. I get the following error when using Android File Transfer: "could not copy file "main.1.com.abc.groove".

When using adb:

I cannot see the directories that I created.

I have also tried deleting the directory. I get the following error:"Cannot delete file or folder called obb". It said file may be busy. However, I can create other directories and move the file to them. For example, I created a folder call "obt" and added the data file to it with no problem. I also stopped all apps that may have been accessing the directory. I have search online, but no one seem to have this problem. Any help would be greatly appreciated.


Solution

  • I corrected my problem by having my code copy/write the file to the directories that I needed. I was not able to do it manually using Android File Transfer. The example that helped me correct my problem was: How to copy files from 'assets' folder to sdcard?