Online Updater won't write to mixed format external storage

I have another problematic use case scenario for Android filesystem woes (scoped storage is currently the “big one”). Anyway, I recently installed the armeabi-v7a version on multiple platforms including a Fire HD 10 tablet (Android 9-ish), two Fire TV cubes with OTG USB (Android 9-ish), and Nvidia Shield “tube” 2019 version (Android 11).

Each device has access to 128MB of external storage in the form of either SD or USB that is mixed format 30% private “adoptable” and 70% external shared disk. (How to turn a portable SD card into internal storage via ADB command?)

I set all of the User Directories to internal shared /storage/emulated/0/retroarch/..., in one config, and external shared /storage/3B62-1211/retroarch/... in another, with matching folders on the filesystem.

When I attempt to use the online updater to say, download Assets, it is able to download and extract assets.zip (/storage/emulated/0/retroarch/assets/assets.zip), from internal shared storage, without issue. When I use external storage (/storage/3B62-1211/retroarch/assets/assets.zip) it cannot write assets.zip to the folder, and therefore no extraction takes place.

This is the only thing logged: Download of 'assets.zip' failed: Write failed.

I have a phone that doesn’t support adoptable storage, at all, on Android 11, so the SD is formatted as 100% external shared. Its retroarch.cfg has all User Directories pointing to external and the assets extract normally. So…, it would appear this is a filesystem issue that specifically relates to mixed format external disks that are partially adoptable.

The RetroArch GUI has no problem seeing my external shared storage, it’s just treated as Read-Only. From my reading, the most reliable place to put User Directories is Internal shared storage and that’s what I’m doing now. Game and firmware images go on external because they take the most space and that’s where I have it.

For anyone who’s interested, while the Android OS may offer to format an external disk as [%100] “adoptable”, it’s a horrible idea. It gets treated like private external storage for Apps only. Mixed is a much better option because it provides some private space for Apps and shared space for the filesystem.

1 Like

I assumed that because I could see the folders/files on my mixed external storage that RetroArch could load data even if it couldn’t save it. This is not true.

RetroArch cannot load or save data from mixed external SD card, it can only browse.

It works, at least for me. But RetroArch is not able to write into external storage, only to adoptable storage. In my case, the assets folder in RetroArch is set to “/mnt/expand//user/0/com.retroarch.ra32/assets”. I think I needed to move com.retroarch.ra32 to adoptable storage first so that these directories get created (via “pm move-package”, you can get the UUID via the “df” command). I opted for having some directories in ‘/storage/emulated/0/Retroarch’, like saves, states, config, … I then sync the whole RetroArch folder with syncthing :smile:.

Oh, the forum deleted something… my assets folder is at “/mnt/expand/<some UUID>/user/0/com.retroarch.ra32/assets”.