VLC cannot read internal storage on Android Q after July security updates
The application is just infinitely trying to read internal storage without success. In settings, when I try to click 'internal storage', the selection clears immediately upon leaving the screen.
The relevant logcat lists 2 issues: 6198 W VLC/LibVLC/Util: WARNING: Unable to read libvlcjni.so; cannot check device ABI!
and
cannot read sdcard, permission denied
.
I believe this has to do with a write_media_storage permission, which is absent. Why do I think so? I develop my own roms. After July 2020 security patches, Dialer stopped recording calls with logcat saying, cannot open media storage
. Once I put write_media_storage permission into dialer's manifest, recording started working.
I have created a pull request to add that permission to VLC, however, I was advised to open an issue here.
My device is Oneplus 5 with a custom version of Android Q, see this [https://forum.xda-developers.com/oneplus-5/development/jaguar-q-oneplus-5-official-v1-t4035061]
Here is more logcat entries: 07-28 13:39:56.479 6762 6845 I VLC/medialibrary: ../src/discoverer/DiscovererWorker.cpp:76 discover Adding file:///storage/emulated/0 to the folder discovery list 07-28 13:39:56.479 6762 6845 I VLC/medialibrary: ../src/discoverer/DiscovererWorker.cpp:118 enqueue Queuing entrypoint file:///storage/emulated/0/ of type 0 07-28 13:39:56.481 6762 6836 D VLC/medialibrary: ../src/MediaLibrary.cpp:1804 onDiscovererIdleChanged Discover thread was resumed 07-28 13:39:56.481 6762 6836 D VLC/medialibrary: ../src/MediaLibrary.cpp:1817 onDiscovererIdleChanged Setting background idle state to false 07-28 13:39:56.481 6762 6836 I VLC/medialibrary: ../src/discoverer/DiscovererWorker.cpp:318 runDiscover Running discover on: file:///storage/emulated/0/ 07-28 13:39:56.481 6762 6836 W VLC/medialibrary: ../src/Folder.cpp:373 fromMrl Failed to get device containing an existing folder: file:///storage/emulated/0/ 07-28 13:39:56.481 6762 6836 E VLC/medialibrary: ../src/filesystem/unix/Directory.cpp:67 read Failed to open directory /storage/emulated/0/ 07-28 13:39:56.482 6762 6836 E VLC/medialibrary: ../src/discoverer/DiscovererWorker.cpp:336 runDiscover Fatal error while discovering file:///storage/emulated/0/: Failed to open directoryPermission denied 07-28 13:39:56.482 6762 6836 W VLC/medialibrary: ../src/discoverer/DiscovererWorker.cpp:343 runDiscover No IDiscoverer found to discover file:///storage/emulated/0/
More logcat entries:
07-28 13:39:53.984 6762 6886 D VLC : [0000007a270ce090/1ae6] libvlc input: Creating an input for preparsing '0' 07-28 13:39:53.985 6762 6889 D VLC : [00000079eeeead90/1ae9] libvlc meta fetcher: looking for meta fetcher module matching "any": 1 candidates 07-28 13:39:53.985 6762 6889 D VLC : [00000079eeeead90/1ae9] libvlc meta fetcher: Trying Lua scripts in /data/user/0/org.videolan.vlc/app_vlc/.share/lua/meta/fetcher 07-28 13:39:53.985 6762 6889 D VLC : [00000079eeeead90/1ae9] libvlc meta fetcher: Trying Lua scripts in /data/app/org.videolan.vlc-4prGOCWCWgdE4bS0XDKkow==/vlc/lua/meta/fetcher 07-28 13:39:53.985 6762 6889 D VLC : [00000079eeeead90/1ae9] libvlc meta fetcher: Trying Lua scripts in /system/usr/share/lua/meta/fetcher 07-28 13:39:53.985 6762 6889 D VLC : [00000079eeeead90/1ae9] libvlc meta fetcher: no meta fetcher modules matched 07-28 13:39:53.985 6762 6889 D VLC : [00000079eeeead90/1ae9] libvlc art finder: looking for art finder module matching "any": 2 candidates 07-28 13:39:53.986 6762 6889 D VLC : [00000079eeeead90/1ae9] libvlc art finder: Trying Lua scripts in /data/user/0/org.videolan.vlc/app_vlc/.share/lua/meta/art 07-28 13:39:53.987 6762 6889 D VLC : [00000079eeeead90/1ae9] libvlc art finder: Trying Lua playlist script /data/user/0/org.videolan.vlc/app_vlc/.share/lua/meta/art/00_musicbrainz.lua 07-28 13:39:53.987 6762 6889 D VLC : [00000079eeeead90/1ae9] libvlc art finder: skipping script (unmatched scope) /data/user/0/org.videolan.vlc/app_vlc/.share/lua/meta/art/00_musicbrainz.lua 07-28 13:39:53.987 6762 6889 D VLC : [00000079eeeead90/1ae9] libvlc art finder: Trying Lua playlist script /data/user/0/org.videolan.vlc/app_vlc/.share/lua/meta/art/01_googleimage.lua 07-28 13:39:53.988 6762 6889 D VLC : [00000079eeeead90/1ae9] libvlc art finder: skipping script (unmatched scope) /data/user/0/org.videolan.vlc/app_vlc/.share/lua/meta/art/01_googleimage.lua 07-28 13:39:53.988 6762 6889 D VLC : [00000079eeeead90/1ae9] libvlc art finder: Trying Lua playlist script /data/user/0/org.videolan.vlc/app_vlc/.share/lua/meta/art/02_frenchtv.lua 07-28 13:39:53.988 6762 6889 D VLC : [00000079eeeead90/1ae9] libvlc art finder: skipping script (unmatched scope) /data/user/0/org.videolan.vlc/app_vlc/.share/lua/meta/art/02_frenchtv.lua 07-28 13:39:53.988 6762 6889 D VLC : [00000079eeeead90/1ae9] libvlc art finder: Trying Lua playlist script /data/user/0/org.videolan.vlc/app_vlc/.share/lua/meta/art/03_lastfm.lua 07-28 13:39:53.989 6762 6889 D VLC : [00000079eeeead90/1ae9] libvlc art finder: skipping script (unmatched scope) /data/user/0/org.videolan.vlc/app_vlc/.share/lua/meta/art/03_lastfm.lua 07-28 13:39:53.989 6762 6889 D VLC : [00000079eeeead90/1ae9] libvlc art finder: Trying Lua scripts in /data/app/org.videolan.vlc-4prGOCWCWgdE4bS0XDKkow==/vlc/lua/meta/art 07-28 13:39:53.989 6762 6889 D VLC : [00000079eeeead90/1ae9] libvlc art finder: Trying Lua scripts in /system/usr/share/lua/meta/art 07-28 13:39:53.989 6762 6889 D VLC : [00000079eeeead90/1ae9] libvlc art finder: no art finder modules matched