Friday, January 4, 2019

Way for Android emulators or similar apps to write to storage with NO WRITE permission.

I was playing NES games with Android NES.emu emulator but its internal filemanager was not able to pick internal storage for saving states.

There was setting to save states to same location of ROM. This failed due to no permission. The solution is to create a "<PackageName>/files" directory inside the top of that storage.

Example:

Any Android app has default write access to Android/data/<packagename>

In my case it was /storage/emulated/0/Android/data/com.vapps.NesEmu2/files.

So i created same layout of folders in my external SDCARD where roms were. Like this :


/storage/0000-0000/Android/data/com.vapps.NesEmu2

This location had write permission and the app was able to save states there. Using the same method we can allow Android apps to save files to removable storage WITHOUT write permission. This is a good workaround when internal memory is low or filemanager simply cannot go to internal storage.

Before doing anything we must first find the package name and create thatnamed folder inside "Android/data" of any storage. Package finder apps can be found on playstore.

No comments: