flyinghead / flycast

Flycast is a multiplatform Sega Dreamcast, Naomi, Naomi 2 and Atomiswave emulator
GNU General Public License v2.0
1.51k stars 176 forks source link

Scoped storage renders Flycast unusable on google TV #1764

Open infojoe opened 1 day ago

infojoe commented 1 day ago

Using a google TV box on Android 12, there is no way to set the folder to scan for games. There is no document picker built in. Also, the UI is very difficult to navigate, requiring both a usb keyboard as well as the remote.

Would it be possible to have a default of just scanning /games or /roms folders in main storage folder? Or even the downloads folder if nothing else? Another possibility would be to look in the main storage folder for a .flycast.config file that we can edit to change settings since the ui for AndroidTV is pretty much unusable.

flyinghead commented 1 day ago

Duplicate of #1657. Like Google says:

GTV is for watching TV first and foremost, not managing files outside of adding or removing services or other apps designed to work with the interface. :)

There's no way for Flycast to access any storage without having permissions, and the only way is through a document picker. Only Google can fix this.

MastaG commented 1 day ago

But there are a few pickers you can install from the Play Store. I forgot which one, but I used it for setting up Wireguard on my Google TV.

flyinghead commented 23 hours ago

A pointer would be helpful because I couldn't find any that works.

infojoe commented 19 hours ago

There is no document picker or file manager that works for Android TV in Android 12. I have tried them all. Mixplorer is the one I use. There are folders that can be accessed by apps without having to grant specific permissions. Like the downloads folder or any folder in the base of internal storage. /storage/emulated/0/

Permission to those folders can be granted in the Android app settings. It's only when you navigate to /storage/emulated/0/Android/data that you need specific document picker access. Every app has access to downloads by default. Couldn't we just make a subfolder there? It just needs to be coded into flycast to look there.

flyinghead commented 18 hours ago

You cannot access anything in /storage/emulated/0 in apps targeting Android 11+.

Permission Denial: reading content://com.android.externalstorage.documents/tree/primary%3ADownload/document/primary%3ADownload/children 
requires that you obtain access using ACTION_OPEN_DOCUMENT or related APIs

Similar problem with /storage/emulated/0/Download