Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mi 5a TV (Android TV 11) unable to open files with PPSSPP #16865

Closed
tausifj15 opened this issue Jan 30, 2023 · 66 comments
Closed

Mi 5a TV (Android TV 11) unable to open files with PPSSPP #16865

tausifj15 opened this issue Jan 30, 2023 · 66 comments
Labels
Platform-specific (Android) Scoped Storage Related to scoped storage on Android
Milestone

Comments

@tausifj15
Copy link

What happens?

Ppsspp is not recognising games in mi tv 5a Android 11 kindly help i tried with pen drive too and internal storage

What should happen?

What are you using?

A smart tv brand mi 5a tv 2022 version

What hardware / device and operating system?

Mali g31 Mp2 Android 11

What graphics card (GPU) or mobile phone model?

It's an smart tv

@ghost
Copy link

ghost commented Jan 30, 2023

#11997 (comment)

@hrydgard
Copy link
Owner

Yeah, a lot of smart TVs don't implement the proper file browsing controls needed to support scoped storage. It's quite bizarre how that got through Google's Android certification (if it did).

@tausifj15
Copy link
Author

tausifj15 commented Jan 30, 2023 via email

@hrydgard
Copy link
Owner

PPSSPP 1.11 and earlier don't declare support for scoped storage, so Android 11 will let them do things without the dialogs and stuff.

Theoretically we could create special scoped-storage-free builds of the newer versions of PPSSPP too, but it would be quite a hassle..

@tausifj15
Copy link
Author

tausifj15 commented Jan 30, 2023 via email

@ghost
Copy link

ghost commented Feb 2, 2023

So it will take time? Right?

On Mon, 30 Jan, 2023, 9:46 pm Henrik Rydgård, @.> wrote: PPSSPP 1.11 and earlier don't declare support for scoped storage, so Android 11 will let them do things without the dialogs and stuff. Theoretically we could create special scoped-storage-free builds of the newer versions of PPSSPP too, but it would be quite a hassle.. — Reply to this email directly, view it on GitHub <#16865 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE3MVBSWDFGB4R4USEXALXTWU7SODANCNFSM6AAAAAAUK7NDSA . You are receiving this because you authored the thread.Message ID: @.>

Stick to ppsspp v1.11 as a workaround.

@tausifj15
Copy link
Author

tausifj15 commented Feb 2, 2023 via email

@hrydgard hrydgard added the Scoped Storage Related to scoped storage on Android label May 15, 2023
@stzokev
Copy link

stzokev commented Aug 4, 2023

@hrydgard

Yeah, a lot of smart TVs don't implement the proper file browsing controls needed to support scoped storage. It's quite bizarre how that got through Google's Android certification (if it did).

@hrydgard SAF is not supported on Android TV by design (on purpose, not a bug). Therefore not only file picker is missing, but file.uri, required by most emulators, is not supported. The workaround would be to have a fallback to manually enter the uri as it was prior to v.1.11. For example I am currently using PPSSPP on CWGTV (Chromecast with Google TV) which is Android 12 and I am using v.1.10.3 successfully. All I do is enter the path to the SD card manually and done! Similar workaround is used for Retroarch. So it shouldn't be too much work for you to support this either by graceful fallback on these systems, or if you ask me even better to have 2 buttons - 1) Browse 2)Enter uri.

Regards and keep up the excellent work.

@hrydgard
Copy link
Owner

hrydgard commented Aug 4, 2023

@hrydgard

Yeah, a lot of smart TVs don't implement the proper file browsing controls needed to support scoped storage. It's quite bizarre how that got through Google's Android certification (if it did).

@hrydgard SAF is not supported on Android TV by design (on purpose, not a bug).

Weird then that it works on NVIDIA Shield, which is Android TV.

Therefore not only file picker is missing, but file.uri, required by most emulators, is not supported. The workaround would be to have a fallback to manually enter the uri as it was prior to v.1.11. For example I am currently using PPSSPP on CWGTV (Chromecast with Google TV) which is Android 12 and I am using v.1.10.3 successfully. All I do is enter the path to the SD card manually and done! Similar workaround is used for Retroarch. So it shouldn't be too much work for you to support this either by graceful fallback on these systems, or if you ask me even better to have 2 buttons - 1) Browse 2)Enter uri.

Regards and keep up the excellent work.

We could certainly add a field to manually enter the path. But how would most users find out the correct path to enter?

@stzokev
Copy link

stzokev commented Aug 4, 2023

Weird then that it works on NVIDIA Shield, which is Android TV.

Android TV != Google TV. Most Android TV boxes out there are almost identical in specs using low powered Amlogic SOC with 2GB and very little storage. Nvidia Shield was not in this category from the get go. It's even the only one I know of that is running a x64bit version of Android TV, compared to all others which run x32bit due to the low resources.

We could certainly add a field to manually enter the path. But how would most users find out the correct path to enter?

As mentioned above storage for these tv boxes is usually extremely low and PSP images require space. So whoever wants to emulate on such device has already equipped with external storage where roms would be. On the Chromecast the path is visible via a file manager like X-Plore (probably many more) and is like so: "/storage/F490-1404/roms" where F490-1404 is a random number for each USB storage, but persisted across restarts.

@hrydgard
Copy link
Owner

hrydgard commented Aug 4, 2023

OK, that makes sense. I'm going to add a simple "Enter Path" button and only show it on Android TV, so at least power users can use it.

hrydgard added a commit that referenced this issue Aug 4, 2023
See issue #16865 for why this is important on some crippled Android
devices.
@hrydgard
Copy link
Owner

hrydgard commented Aug 4, 2023

I have added such a button now, please test.

@stzokev
Copy link

stzokev commented Aug 4, 2023

I have added such a button now, please test.

Oh wow, thanks for taking this at heart. Unfortunately it doesn't seem to work. While it shows the changed path at the top left corner and I can navigate the folders of the external storage now, it doesn't recognize or look for PSP games and therefore it doesn't list them. I can see in settings that the Change Memory stick folder still point to the internal storage and not the path I've set via the new button. I also see that the app now created folder structure inside the PSP folder with my games i.e. another PSP folder with GAME/SAVEDATA/SYSTEM/TEXTURES/PPSSPP_STATE. I tried moving some of the games in the GAME folder, but it doesn't seem to recognize them either. Let me know if you need logs/videos anything to help you if the above is not enough and thanks again!

@hrydgard
Copy link
Owner

hrydgard commented Aug 5, 2023

That sounds bizarre, if it lets you navigate and show folders, it should also show files. I guess some other restriction is there... I don't know. Can you take some screenshot or video just to confirm that I'm understanding things right?

What popular devices are like this? Or rather, what's a good cheap one, currently being sold, that I can buy to replicate this situation?

@stzokev
Copy link

stzokev commented Aug 5, 2023

The Walmart Onn is the cheapest $19 but is US only, for Europe that would be the HD version of the Chromecast with Google TV which is usually around 30 euro. Any Xiaomi Mi Box and Amazon Firestick device would also be cheap and has the same limitation. You can see the workaround I am using with v1.10.3 in this video https://youtu.be/Jy-HlXPEIsI?t=679

Here is a screenshot from v1.10.3 where I see my games and [here is a video](https://photos.app.goo.gl/mhzTCZVBHASx8bAU7 with last nights version where it doesn't pickup the games.

@stzokev
Copy link

stzokev commented Aug 10, 2023

@hrydgard Did you have a chance to see the video and get an idea? Or you want to buy such device and test directly?

@hrydgard
Copy link
Owner

I'm getting the Chromecast shortly.

@hrydgard
Copy link
Owner

Hm, so I got the Chromecast HD. Haven't set it up yet, but noticed that is has no port for sd cards (not really unexpected) and the USB needs to be plugged in all the time to give it power. How are you guys connecting any external storage to it?

@stzokev
Copy link

stzokev commented Aug 11, 2023

Using USB C hub with power delivery, so the power goes to it and it powers the Chromecast. Then I have 2 USB ssds, one for internal and one for external storage. You would need at least 8w power adapter in order to compensate for the hub and ssds. Just for the sake of you testing this however, you should be fine copying a single small game into the Chromecast internal storage .

@hrydgard
Copy link
Owner

That sounds a bit complicated, I wonder how many people bother...

Can you link to such a USB-C hub on Amazon or something, and what are USB SSDs, regular USB drives?

@stzokev
Copy link

stzokev commented Aug 12, 2023

Nothing complicated, here is my setup - https://ibb.co/vcrH7Sd And yes, USB ssds attached to USB C hub. It needs to be power delivery hub. You can use thumb drive/flashdrive instead of ssds for your test purpose. Or if you just don't want to bother, let me know how I can help with logs or other means. You keep new builds coming and I'll keep testing until we have it working. I don't think it needs much (if at all) work, as you already had this working in 1.10.3 version

@hrydgard
Copy link
Owner

Ah I didn't realize how common those power hubs have become for laptops. Ordered a cheapo one, and I'll just plug some USB storage sticks into it, let's see how it goes.

@stzokev
Copy link

stzokev commented Aug 13, 2023

Yes, very common due to the limited number of ports on modern laptops which only strive to be as thin as possible. I was never able to get an SD card or MicroSD card working with the Chromecast, although the same work when I plug the hub to a laptop. So using usb ssd or usb stick is your best option.

@stzokev
Copy link

stzokev commented Aug 20, 2023

@hrydgard Anything I can test yet? :) Just joking, really appreciate you trying to work this one out!

@hrydgard
Copy link
Owner

No updates yet, sorry. I did recently receive the USB hub thingy I ordered.

@Joai27373
Copy link

Joai27373 commented Dec 10, 2023

usando a versão 1.10.3 não tem mas o erro porém ainda não lê os jogos na mi stick ele reconhece o pendrive mas o jogo não aparece, o jogo está no formato .iso

TRANSLATION:

using version 1.10.3 there is no error but it still doesn't read the games on the mi stick it recognizes the pendrive but the game doesn't appear, the game is in .iso format

@hispanico957
Copy link

hispanico957 commented Jan 9, 2024

For my experience this problem is related on version of Android, Others emu as Dolphin show same problem.
For your infromation i think that the problem it concerns the use of the Android file explorer which does not allow (privacy) reading from USB sticks or external disks. 
From the tests I have done, this does not happen for example with RetroArch emu which in fact does not use the Android explorer but its own explorer to search for the path of the games and this problem does not arise.

I try also this little trick
https://www.aftvnews.com/how-to-grant-allow-all-the-time-full-file-storage-access-permission-for-any-app-in-fire-os-8-on-the-2nd-gen-fire-tv-stick-4k-4k-max/
but not solve

Kira

@davidhedlund
Copy link

davidhedlund commented Feb 5, 2024

@stzokev

I am currently using PPSSPP on CWGTV (Chromecast with Google TV) which is Android 12 and I am using v.1.10.3 successfully. All I do is enter the path to the SD card manually and done!

That is partially working for me on Chromecast with Google TV (HD). The directories are displayed in the USB flash drive which is great, but the games are not listed.

@stzokev
Copy link

stzokev commented Feb 5, 2024

@davidhedlund Not sure what is different on your end, except the fact that I use the 4k version of Chromecast. Anyway I no longer use the old version because the newer versions offer better performance. Yes, you cannot see the games in PPSSPP, but you can navigate to your roms via file manager in the USB flash drive and when you select a rom it would open directly in PPSSPP (there is Intent class registered). So yeah, not the best experience, but does it work - yes

@davidhedlund
Copy link

@davidhedlund Not sure what is different on your end, except the fact that I use the 4k version of Chromecast. Anyway I no longer use the old version because the newer versions offer better performance. Yes, you cannot see the games in PPSSPP, but you can navigate to your roms via file manager in the USB flash drive and when you select a rom it would open directly in PPSSPP (there is Intent class registered). So yeah, not the best experience, but does it work - yes

I'm glad that it works for you, but the roms (the .iso files) are not listed for me.

@stzokev
Copy link

stzokev commented Feb 9, 2024

@davidhedlund I think you misunderstood my explanation. They are not listed in the last version of PPSSPP for me either. The workaround I use is start the games from file manager directly, I am using X-plore. Try it you would see it works.

@sum2012
Copy link
Collaborator

sum2012 commented Feb 10, 2024

Just fyi ( Original reporter in http://c.tieba.baidu.com/p/8880500610 10 th /floor )
Android TV (海信电视) error
2

@davidhedlund
Copy link

@davidhedlund I think you misunderstood my explanation. They are not listed in the last version of PPSSPP for me either. The workaround I use is start the games from file manager directly, I am using X-plore. Try it you would see it works.

Ah, that works. I can play PSP games from PPSSPP now! Thank you very much.

hrydgard added a commit that referenced this issue Aug 14, 2024
…er Android version

This should allow working around the scoped storage problem on old
Android TVs by sideloading APKs built this way. Support for building
this will be added to the buildbot soon.

Considering maybe making a special icon variant?

See #16865

Not yet tested.
@hrydgard
Copy link
Owner

Try the new AndroidLegacy build from the buildbot, removes the need for a folder browser (but unfortunately cannot be uploaded on Play).

Announcement: https://www.ppsspp.org/news/ppsspp-legacy/

@Joai27373
Copy link

Joai27373 commented Aug 16, 2024 via email

@Ridwaan112
Copy link

I know you busy with (IOS / Apple) but please don't forget that we android users are your true fans and have been supporting you through thick and thin - a fix for the Google TV issue I'm facing would be appreciated or a work around to get games playing atleast would be really nice... What are we to do whilst you shelve supoort for android and Google devices for IOS / Apple?

@Ridwaan112
Copy link

Ridwaan112 commented Aug 20, 2024

IMG_20240820_213603.jpg

The legacy build recognizes the game and loads it but freezes on load save as per image attached... The controller doesn't allow to choose yes or no. It freezes here! Please fix

I think there's an issue with the controller mapping or settings - default doesn't recognise the controller... Can this be fixed?

@Ridwaan112
Copy link

Really appreciate you finding a work around and releasing the Legacy Build, much appreciated 🙏

Could you kindly resolve the issue with controller support so that games become playable... I've tried to manually map the keys but the controller is non responsive

@hrydgard
Copy link
Owner

Hm, I wasn't aware of that problem, and don't really have a good answer. I'm gonna assume you tried manually binding and pushing all the relevant controller buttons..

Are you able to bind them in control mappings?

@Joai27373
Copy link

Joai27373 commented Aug 21, 2024 via email

@Ridwaan112
Copy link

Hm, I wasn't aware of that problem, and don't really have a good answer. I'm gonna assume you tried manually binding and pushing all the relevant controller buttons..

Are you able to bind them in control mappings?

Yes, I've tried to manually bind but nothing happens, I can access the settings menu with the TV Box remote and get into the controller settings but the controller itself is non responsive. The only buttons that do work is the "O" and acts as a back button, all other buttons don't work for some reason

@Ridwaan112
Copy link

Hm, I wasn't aware of that problem, and don't really have a good answer. I'm gonna assume you tried manually binding and pushing all the relevant controller buttons..

Are you able to bind them in control mappings?

Yes, I've tried to manually bind but nothing happens, I can access the settings menu with the TV Box remote and get into the controller settings but the controller itself is non responsive. The only buttons that do work is the "O" and acts as a back button, all other buttons don't work for some reason

Update :- so I have installed the Legacy Build on an older TV box (Mi Box android older box with android 9) and it works smoothly and even the controls respond accurately

I've deleted the build on the newer box (Mi TV box 2nd Gen Google TV android 11) and reinstalled and encountering the same issue with the controller... It just not responding... What could the problem be? I've tried binding but that to doesn't work as it non responsive only on this box

@hrydgard
Copy link
Owner

hrydgard commented Aug 22, 2024

Very confused by that, there should be no difference in controller handling between the legacy build and the normal builds, apart from anything imposed by the operating system for targeting an older version of Android. And I don't think there are any such OS version differences regarding controllers :(

If you install a normal build, does its controller support work?

@Ridwaan112
Copy link

Very confused by that, there should be no difference in controller handling between the legacy build and the normal builds, apart from anything imposed by the operating system for targeting an older version of Android. And I don't think there are any such OS version differences regarding controllers :(

If you install a normal build, does its controller support work?

Yes, on the normal build the controller works - I aslo can't understand why!? 😭

@hrydgard
Copy link
Owner

hrydgard commented Sep 9, 2024

I'm going to close this issue because I think the Legacy Edition is the way to go and there's not really much else we can do. However, I'll have to open a new one for the controller problem.

@anr2me
Copy link
Collaborator

anr2me commented Sep 9, 2024

Btw @Ridwaan112 have you tried this method (on Android 11 or newer) ?

Settings >> Additional Settings >> Accessibility: turn everything off

*based on https://support.google.com/android/thread/71625972/controller-on-android-11-doesn-t-work-anymore

@Ridwaan112
Copy link

Ridwaan112 commented Sep 13, 2024

Btw @Ridwaan112 have you tried this method (on Android 11 or newer) ?

Settings >> Additional Settings >> Accessibility: turn everything off

*based on https://support.google.com/android/thread/71625972/controller-on-android-11-doesn-t-work-anymore

I will try the above and inform you if it works or not. Thank you

Update: the above method does not work on android tv box (MI TV Box 2nd Gen) android 11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform-specific (Android) Scoped Storage Related to scoped storage on Android
Projects
None yet
Development

No branches or pull requests

10 participants