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

No access to NAS / USB since Android TV 11 #248

Closed
MasterDudess opened this issue Jan 15, 2022 · 47 comments
Closed

No access to NAS / USB since Android TV 11 #248

MasterDudess opened this issue Jan 15, 2022 · 47 comments

Comments

@MasterDudess
Copy link

MasterDudess commented Jan 15, 2022

Can't access the files on NAS of USB anymore since the Nvidia Shield updated to Android TV 11 even after de 9.0+ hotfix. Nvidia says that apps that can't acces the files anymore need to update the app.

Can you update it?

@MasterDudess MasterDudess changed the title No acces to NAS since Andorid TV 11 No acces to NAS since Android TV 11 Jan 15, 2022
@MasterDudess MasterDudess changed the title No acces to NAS since Android TV 11 No access to NAS since Android TV 11 Jan 15, 2022
@MasterDudess MasterDudess changed the title No access to NAS since Android TV 11 No access to NAS / USB since Android TV 11 Jan 15, 2022
@moneytoo
Copy link
Owner

Please try updating to v0.90 (hopefully also available in the testing channel on Google Play shortly).

@moneytoo
Copy link
Owner

You might also try uninstalling and then installing the app again.

@MasterDudess
Copy link
Author

Thanks for your fast respons. I will delete it and install the new version v0.90 now and give you the feedback

@MasterDudess
Copy link
Author

Hey Moneytoo, I have installed version v0.90 and there is indeed an improvement thanks! I see all the USB and NAS drives again. The only problem is Just Player doesn't see any files in the folder. No video files and after long press also no subtitles. I hope you can fix this because I like your player very much and gives clean and msooth playback.

@moneytoo
Copy link
Owner

I'm afraid that I don't really know what's going on as (legacy) file access (for multimedia) works in Android TV 11 emulators as well as other devices. Are all other apps and video players able to access your files?

I believe I read that Nvidia will allow using the newer API (Storage Access Framework) on Shield with Android 11 which should make it on par with phones. So here I have a version which uses the newer system file chooser: Just.Player.v0.90-saf.apk. However I already received a feedback that while the chooser shows files, it cannot be controlled properly using directional pad.

@MasterDudess
Copy link
Author

Hey Moneytoo, It depends strongly on the app.
Works in: Kodi, File manager, X-plorer
Doesnt work (anymore) in: Just Player, Vimu (does when connected to nas in app instead of mount in in Android TV)

@MasterDudess
Copy link
Author

The workaround is to open it in File manager and then open file and choose just player as player. But this is not very consumer friendly and it is not possible to sideload subtitle (only embedded)

@MasterDudess
Copy link
Author

I'm afraid that I don't really know what's going on as (legacy) file access (for multimedia) works in Android TV 11 emulators as well as other devices. Are all other apps and video players able to access your files?

I believe I read that Nvidia will allow using the newer API (Storage Access Framework) on Shield with Android 11 which should make it on par with phones. So here I have a version which uses the newer system file chooser: Just.Player.v0.90-saf.apk. However I already received a feedback that while the chooser shows files, it cannot be controlled properly using directional pad.

Hey Moneytoo, Thanks for this latest version. Indeed the d-pad function does not work properly, but....... I found a work around for now. The Nvidia Shield has an telephone app and there you can control the shield with. Now in this app you can change between d-pad and trackpad. This gives you a cursor and now and can go to my nas en play the video files including loading an external subtitle. I hope you can make it compatible with the D-pad to make it more client friendly. Thanks for now and hope to see the updates coming.

This is by far the best player for me with large files. No stutters en very smooth picture quality!

@moneytoo
Copy link
Owner

Reading through https://www.nvidia.com/en-us/geforce/forums/shield-tv/9/481674/android-11-application-issues/ there are reports of issues even with apps like MX Player, VLC etc.

Could you try enabling media scanning as mentioned in the FAQ for Nova Video Player? Just Player works differently but you may give it a shot.

Maybe you could try installing this version: Just.Player.v0.91-legacy.apk to verify some of my theories... Does this one work?
How about even other players? mpv, Fermata...?

Thank you for all the feedback.

@MasterDudess
Copy link
Author

Maybe you could try installing this version: Just.Player.v0.91-legacy.apk to verify some of my theories... Does this one work?

He Moneytoo,
OMG you are the man!!! I installed this version and it works perfectly and just how it just to be.

Thank you for all the hard work!

@moneytoo
Copy link
Owner

Unfortunately, the legacy version is only a work around and such version cannot be distributed through Google Play.

It would be still useful if you could verify if media scanning option has anything to do with the visibility of files (per my previous comment).

Could you verify if any of these apps (updated after November 2021) works (list files)? VLC, Fermata Media Player, X-plore File Manager, Solid Explorer File Manager, Amaze File Manager, MiXplorer Silver?

@MasterDudess
Copy link
Author

Hey Moneytoo,

That's unfortunately. I just tested the media scanning option and turned it on. For now I don't see any difference in the apps that cannot acces the files (X-plorer file does work also without scanning). The most apps see the drives but not the files. Also the name in these apps starts with USB instead of the network (NAS) name since android tv 11. Maybe scanning takes time to fill up the database. So I will also check later on and let you know.

@MasterDudess
Copy link
Author

MasterDudess commented Jan 16, 2022

Ok I checked Nova Player and indeed in this app it works. When opening the app you will see a circle running in the top right corner and the files become visible. Others apps who lack this feature there is still no difference. Hope this helps you.

@moneytoo
Copy link
Owner

moneytoo commented Jan 16, 2022

What version of Nova Video Player are you using? The latest stable version from Google Play (v5.x?)? This version still targets older Android version so it works just like the -legacy version of Just Player. Latest version of Nova Video Player (v6.x) has similar issues.

Until this matter is resolved, I suggest using the -legacy builds from Github releases. I will probably switch the Google Play version to using MediaStore (which will require to enable media scanning for external volumes) but I need to test something first with real Android 11/12 devices (I don't have access to those right now).

Anyway, when you're talking about no access to files, is this only about external storages like NAS/USB or also the internal storage? Can you access video files that are stored directly on your device?

@MasterDudess
Copy link
Author

Hey Moneytoo, Its both External and Internal. So if i only see the folders and not the files in a certain app thats applies for both. I indeed use the play store version (latest) of Nova Player. Haven't tested the v6. version,

@moneytoo
Copy link
Owner

moneytoo commented Jan 16, 2022

One more thought... In what directory path are your videos located? Could you try copying any video to the topmost \Movies (or \Download) folder and see if it's visible in there?

@MasterDudess
Copy link
Author

I copied a movie to the /movies folder and indeed VLC player (for example) does see the movie and can play it. When seaching on the NAS the folders are empty (The files do appear when manually searched through network in-app)

@moneytoo
Copy link
Owner

How about Just Player? Does moving videos to the Movies folder help make it visible to its file chooser (the stable version on Google Play)?

@MasterDudess
Copy link
Author

I will test it for you and give feedback.

@MasterDudess
Copy link
Author

How about Just Player? Does moving videos to the Movies folder help make it visible to its file chooser (the stable version on Google Play)?

I tested it with the stable (google play store 0.88v) version and indeed it sees the movie file in the internal movies folder and is playable. External is not visible.

@moneytoo
Copy link
Owner

Thank you a lot for all the tests.

I still planning on testing/confirming some cases myself later on but so far my best solution is to change the file chooser on Android TV 11 to using MediaStore and keep it optionally configurable.

Current WIP version is here: Just.Player.v0.92-mediastore.apk In advances settings (long tap the ⚙️ gear to access it), you can change File access mode from Auto to:

  • Storage Access Framework - Native system file chooser with access to all files, used on phones but usually not available on TVs. It's available on Nvidia Shield but has problems with d-pad controls.
  • MediaStore - Lists files indexed by system media scanner. See this FAQ as indexing needs to be enabled for external storages.
  • Legacy - The old way of accessing storage, which is now problematic on Android TV 11

@MasterDudess
Copy link
Author

Your welcome was glad to help you with testing and thanks for the fast responses. Good luck with testing yourself en we see the updates coming. It's a great app!

@patroza
Copy link

patroza commented Jan 18, 2022

Nvidia Shield 2019 (tube) - Shield Experience 9.0.0 - no hotfixes.

0.92-mediastore:

  • legacy; I can properly see my network shares, but can't see files
  • storage access framework; works a treat, as long as I use the Nvidia remote on my phone with trackpad indeed
  • mediastore/auto; I just see "Choose a file", but nothing else, empty list. Media scanning is enabled in Android settings.

0.91-legacy: works a treat.

@moneytoo
Copy link
Owner

legacy; I can properly see my network shares, but can't see files

Yep, this is expected, only the special version has unrestricted access.

mediastore/auto; I just see "Choose a file", but nothing else, empty list. Media scanning is enabled in Android settings.

Have you tried rebooting? Maybe you could try the latest version of Nova Video Player. According to nova-video-player/aos-AVP#539 enabling of scanning should resolve that.

@Poker354
Copy link

So the Shield has a feature that allows you to mount your NAS or network shares to the Shield itself. This allows your network files to appear as local files to apps that do not have a built in smb setting. The scan for media option only seems to work for physically connected usb drives. Using Mediastore option in v92 only shows media from physically connected drives (not mounted storage) but it displays it all generically listed in alphabetical order, so basically it is a total mess. The v91 legacy allows access to mounted storage and is still organized as folders/files. Mediastore is simply not good for the Shield.

@moneytoo
Copy link
Owner

@Poker354

The look of MediaStore chooser is in my control and can be improved. I will try adding adding volume names and also handle startig/last used file. Multi level browsing structure could be probably possible as well.

The fact that mounted network volumes are not indexed is quite interesting. This means that only apps with the MANAGE_EXTERNAL_STORAGE can access it. Normally, this permission is only granted to apps like file managers, however large apps like VLC and MX Player managed to get an exception. Given that this (network volume mounts) feature is not a native Android feature, I worry that Google may not permit the use of this permission for Just Player, especially considering Nova Video Player was denied in the past. But I guess I could try...

@moneytoo
Copy link
Owner

So, does this version: Just.Player.v0.93-manage_external_storage.apk work / is able to access all mounts after manually granting the highest permission (see Nvidia KB)?

@moneytoo moneytoo pinned this issue Jan 19, 2022
@Poker354
Copy link

Yes. I have tested v93. I needed to completely uninstall Just Player and reinstall v93 to get it to work. I double checked app permissions and this time it was set to not allow. I changed it to always allow. The first time a tried Storage Access Framework an additional pop up asked for permission to access files. Both Storage Access Framework and Legacy are now working for Folder/Files. MediaStore still only shows USB connected and internal storage but it is unusable anyway do to it’s organization of the files.

@moneytoo
Copy link
Owner

Thanks @Poker354. I have just submitted a version using this permission for review to Google and I stated access to these network shares configured using 1st party (Nvidia) tool (in more details) as a reason. 🤞 But I wouldn't get my hopes too high. While VLC and MX Player managed to get access to this permission, others such as Nova Video Player or TiviMate failed.

@moneytoo
Copy link
Owner

Even if the permission won't be granted, I understand the the biggest trouble when using 3rd party file managers to browse and open videos is to load subtitle files as well. I guess I could register Just Player to handle subtitle files and append the subtitles selected from the file browser to the currently opened video. This should workaround the biggest annoyance IMHO.

@moneytoo
Copy link
Owner

Requested...

... and rejected:

Violation     All files access permission: Not a core feature

Details     The feature that you identified that is dependent on this permission does not appear to be critical to the core functionality of your app.

Violation     All files access permission: Need to use MediaStore API

Details     You have requested access to 'All files access' permission but it appears that your app’s core feature requires access to only media files.

@moneytoo
Copy link
Owner

moneytoo commented Jan 20, 2022

Both Storage Access Framework and Legacy are now working for Folder/Files.

@Poker354 But as others mentioned, the (Android native) Storage Access Framework file chooser cannot be controlled fully/properly using only the Shield standalone remote, right?

If it's so, then...

All of you folks... Report/spam Nvidia with this issue, that the system file chooser (ACTION_OPEN_DOCUMENT of Storage Access Framework / DocumentsUI) cannot be properly used with apps. Get them to fix it!

This is basically the same issue: hrydgard/ppsspp#15315

Once it's fixed, I will switch the default chooser to SAF.

@Poker354
Copy link

On v93 test app the Storage Access Frame work functioned and looked identical to legacy, it did not bring up the GUI as in other versions. In apps/permissions there were 3 options with v93: do not allow, allow while using app and always allow. In other versions there are only 2 options, do not allow and allow while using the app. In V93 legacy and Storage Access Framework worked (but storage access frame work was the same as legacy).
Since Google rejected your request can you not continue with a Play Store version and a sideload version posted here of GitHub?

@moneytoo
Copy link
Owner

On v93 test app the Storage Access Frame work functioned and looked identical to legacy, it did not bring up the GUI as in other versions.

That was a bug it that test version, sorry for that. SAF should always bring up the full screen system file chooser.

Since Google rejected your request can you not continue with a Play Store version and a sideload version posted here of GitHub?

I can only not use the (MANAGE_EXTERNAL_STORAGE) permission which means that the Legacy file access in the version distributed through Google Play won't be able to fully access external storage volumes. I will continue providing the fully functional -legacy version for sideload here on GitHub.

I plan on checking for libraries providing some auto updating mechanism for this version. Right now I'm working on loading subtitle files from file managers.

@Poker354
Copy link

Thanks and great work!

@AbelToy
Copy link

AbelToy commented Jan 21, 2022

Thanks for your swift updates and hard work.

@moneytoo
Copy link
Owner

moneytoo commented Jan 23, 2022

As listed in the changelog of v0.95 (beta), it should be now possible to open subtitle files from external file managers - as the subtitle will be attached to currently opened video in Just Player. This is an alternative/backup way to access your files.

@moneytoo moneytoo unpinned this issue Jan 31, 2022
@moneytoo
Copy link
Owner

Unlike Just Player (and Nova Video Player or Tivimate), other video player apps like VLC, MX Player or Vimu all managed to get the MANAGE_EXTERNAL_STORAGE permission approved from Google.

As @courville already pointed out (after seeing my rant), at least in the case of VLC, it's because of support for exotic video formats not indexed by media scanner.

@f0x135
Copy link

f0x135 commented Feb 1, 2022

@moneytoo v93 actually was working with my Nvidia Shield Pro + Android 11 update stock FW + external HDD. Was even using JP last night.

However the app updated this morning to v97 from the play store, even though i've sideloaded v93. This has broken the ex HDD access again on the Shield. I'm assuming that all the 'official' versions will be like this until Google allows 'Manage External Storage'? Off to load v93 again and find a way to stop Just Player updating.

@moneytoo
Copy link
Owner

moneytoo commented Feb 1, 2022

@f0x135 Use the -legacy version from https://github.com/moneytoo/Player/releases

I'm assuming that all the 'official' versions will be like this until Google allows 'Manage External Storage'?

Google already denied my request so it will continue to work pretty much the same like right now.

If you want to use the Google Play version, enable media scanning for external devices.

@courville
Copy link

Regarding shield update and USB storage, I had the same issue with my player nova-video-player/aos-AVP#539 and it turns out that it was a problem with the nvidia shield that do not index usb drive by default anymore...
You can turn it back on in nvidia settings.

On latest version of the OS, Nvidia shield disables external storage Android indexing for performance enhancements. In order to get back external storage video files visibility, you need to enter Android settings/Device Preferences/Storage and enable Scan for media automatically option.

Alternatively you can expose in the same setting the local USB drive via SMB (Mount network storage option) and then use Nova SMB network shares indexing.

@f0x135
Copy link

f0x135 commented Feb 1, 2022

@f0x135 Use the -legacy version from https://github.com/moneytoo/Player/releases

I'm assuming that all the 'official' versions will be like this until Google allows 'Manage External Storage'?

Google already denied my request so it will continue to work pretty much the same like right now.

If you want to use the Google Play version, enable media scanning for external devices.

@moneytoo the legacy verions work when using the stand alone app but i actually modified Kodi to externally pass Dolby Vision media to JP, and for some reason none of the legacy versions are working with it.

Edit: managed to get it working (v96 legacy) by adding .legacy to the code in Kodi. Thanks for this app mate!

@f0x135
Copy link

f0x135 commented Feb 1, 2022

you need to enter Android settings/Device Preferences/Storage and enable Scan for media automatically option.

@courville i do have that checked but the PLay store version of v97 still couldn;t acccess the files. Maybe with the 3 hotfixes Nvidia has released, but so far my Shield was all fine with stock FW for everything until JP got updated to v97.

@moneytoo
Copy link
Owner

Nvidia released Shield Experience Upgrade 9.0.1 and mentions:

  • Fixes storage permission issues on media players, file browsers, and emulator apps
  • Resolves navigation issues when selecting folders to grant files and media permissions
  1. Any changes in the access to external storage volumes using the legacy file access mode in the Google Play version of Just Player?
  2. How about Storage Access Framework? Does it mean that the system file picker UI can be controlled using d-pad of a physical remote?

@Poker354
Copy link

  1. No change. Legacy setting can see folders but not the files within.
  2. No change either. Navigation is improper, and files/folders are not properly highlighted when navigating.

@wirezen
Copy link

wirezen commented Oct 16, 2022

@moneytoo no more update on this issue? :(

@moneytoo
Copy link
Owner

I'm going to close this as I don't think there's anything more to do with this. I will continue publishing the -legacy version which remains the only solution for some use cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants