Beta Advanced Emulator Launcher - Multi-emulator frontend for Kodi
(2019-11-21, 04:46)Nagelfar Wrote: I did a quick search and I could not find a good answer to my issue. 
Apparently, due to some change in the android storage permission setup, the AEL can't be used when storing ROMs and scraper data on an SD-Card due to write permission restrictions.
Does anybody know of a good solution to this issue? I did a debug log and there it was obvious that the issue I was experiencing was due to write permission that was not correct.

I am running an Android tv box with Android 9 on it and kodi 18.4
Some more details: Amlogic X96Max_V311R_P with Android 9.0.0 API level 28, kernel: Linux ARM 32-bit version 4.9.113


test:
2019-11-20 22:05:26.206 T:8773  NOTICE: -----------------------------------------------------------------------
2019-11-20 22:05:26.206 T:8773  NOTICE: Starting Kodi (18.4 Git:20190831-3ade758ceb). Platform: Android ARM 32-bit
2019-11-20 22:05:26.206 T:8773  NOTICE: Using Release Kodi x32 build
2019-11-20 22:05:26.206 T:8773  NOTICE: Kodi compiled 2019-09-01 by Clang 7.0.2 (https://android.googlesource.com/toolchain/clang 003100370607242ddd5815e4a043907ea9004281) (https://android.googlesource.com/toolchain/llvm 1d739ffb0366421d383e04ff80ec2ee591315116) for Android ARM 32-bit API level 21 (API level 21)
2019-11-20 22:05:26.206 T:8773  NOTICE: Running on Amlogic X96Max_V311R_P with Android 9.0.0 API level 28, kernel: Linux ARM 32-bit version 4.9.113
2019-11-20 22:05:26.206 T:8773  NOTICE: FFmpeg version/source: 4.0.4-Kodi
2019-11-20 22:05:26.207 T:8773  NOTICE: Host CPU: ARMv7 Processor rev 4 (v7l), 4 cores available
......
2019-11-20 22:37:39.651 T:10345   ERROR: AEL INFO : _command_add_new_launcher() New launcher (launcher_type = 3)
2019-11-20 22:38:15.789 T:10345   ERROR: AEL VERB : fs_get_ROMs_basename() roms_base_noext "roms_root_category_p_92abb3"
2019-11-20 22:38:15.789 T:10345   ERROR: AEL VERB : assets_init_asset_dir() asset_path "/storage/0000-0000/Roms/NES/assets-nes/"
2019-11-20 22:38:15.789 T:10345   ERROR: AEL DEBUG: assets_parse_asset_dir() Creating dir "/storage/0000-0000/Roms/NES/assets-nes/fanarts"
2019-11-20 22:38:15.790 T:10345   ERROR: AEL ERROR: SingleInstance::__exit__() Unhandled excepcion in protected code
2019-11-20 22:38:15.790 T:10345   ERROR: AEL DEBUG: SingleInstance::__exit__() Releasing lock
2019-11-20 22:38:15.819 T:10345   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.OSError'>
                                            Error Contents: [Errno 13] Permission denied: '/storage/0000-0000/Roms/NES/assets-nes/fanarts'
                                            Traceback (most recent call last):
                                              File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.program.advanced.emulator.launcher/addon.py", line 37, in <module>
                                                main.Main().run_plugin()
                                              File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.program.advanced.emulator.launcher/resources/main.py", line 308, in run_plugin
                                                self.run_protected(command, args)
                                              File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.program.advanced.emulator.launcher/resources/main.py", line 400, in run_protected
                                                self._command_add_new_launcher(VCATEGORY_ADDONROOT_ID)
                                              File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.program.advanced.emulator.launcher/resources/main.py", line 1213, in _command_add_new_launcher
                                                assets_init_asset_dir(assets_path_FName, launcherdata)
                                              File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.program.advanced.emulator.launcher/resources/assets.py", line 122, in assets_init_asset_dir
                                                assets_parse_asset_dir(launcher, assets_path_FName, 'path_fanart', 'fanarts')
                                              File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.program.advanced.emulator.launcher/resources/assets.py", line 143, in assets_parse_asset_dir
                                                subPath.makedirs()
                                              File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.program.advanced.emulator.launcher/resources/utils.py", line 879, in makedirs
                                                os.makedirs(self.path)
                                              File "/home/jenkins/workspace/Android-ARM-Leia/tools/depends/xbmc-depends/arm-linux-androideabi-21-release/lib/python2.7/os.py", line 157, in makedirs
                                            OSError: [Errno 13] Permission denied: '/storage/0000-0000/Roms/NES/assets-nes/fanarts'
                                            -->End of Python script error report<--

Okay, yes write permissions on non-rooted Androids are always annoying in this context. So is there a different folder on the system somewhere where you actually do have write access?

Just a little background on my setup, I have a Nvidia Shield and all my media (roms and images) are on a server/pc. I mounted the shares through Android (Shield) which gives the Emulators access to the roms through normal paths like /storage/remote_share/mygames/.. etc. But this only gives you read access, not write which you need for scraping in AEL.
Kodi however, has also connected the share but through it's own smb protocol. Through Kodi you will have write access (if properly configured) over a path like 'smb://server/remote_share/mygames/'. So when creating the launcher I configure my assetpaths through the Kodi smb shares and for the Rom path I use the android path.

Although this is a solution for network shares, you might want to look in a similar way for a solution on the local machine. See if you can find a folder trough the Kodi filesystem/explorer where you have write access and use that as the assets folder for your launcher. For Rom folders you only need read access.
Reply


Messages In This Thread
RE: Advanced Emulator Launcher - Multi-emulator frontend for Kodi - by chrisism - 2019-11-22, 14:29
Can You create A Sub Category? - by Wild_Tom - 2020-07-13, 04:43
Crash & Lost my launchers? - by eirrocmh - 2020-11-29, 02:25
RE: Crash & Lost my launchers? - by eirrocmh - 2020-12-19, 00:19
Logout Mark Read Team Forum Stats Members Help
Advanced Emulator Launcher - Multi-emulator frontend for Kodi12