plugin.program.iagl icon indicating copy to clipboard operation
plugin.program.iagl copied to clipboard

Android non-root user can't launch games when changing download path (workaround available)

Open Cee123 opened this issue 7 years ago • 39 comments

On Android games won't launch if I choose a different rom path from default. But as soon as I set path back to the default they work again.

This doesn't happen on the PC version of kodi.

Cee123 avatar Jan 04 '19 15:01 Cee123

I'd need a debug log to know the issue. The opposite issue is actually documented here: https://github.com/zach-morris/plugin.program.iagl/issues/1

zach-morris avatar Jan 04 '19 20:01 zach-morris

Alright cool. No worries, I'll get a copy of the log file.

Cee123 avatar Jan 05 '19 05:01 Cee123

I have no problems with alternative Rom Path [Kodi18][armv7][FireTv]. As long as the alternate RomPath is changed to a path where Kodi has permissions eg. SDCARD1/Android/obb/org.xbmc.kodi/.. or SDCARD1/Android/data/xbmc.kodi/..

Philps avatar Feb 11 '19 10:02 Philps

I noticed the problem on an Android Q Box/TV Box. For some reason it wouldn't let me isolate that section of the log file. And posting the entire log file would be annoying with add-on updates etc. Is there an easier way to do it?

Cee123 avatar Feb 11 '19 11:02 Cee123

It could be a permission problem as you said. But the Android box is rooted. So no idea.

Cee123 avatar Feb 11 '19 11:02 Cee123

Yes, I'd need a debug log. You can put it into a hastebin and link it

zach-morris avatar Feb 11 '19 23:02 zach-morris

Alright, I've done that. I've isolated the section of the log file where I was testing IAGL, pasted into hastebin, and here's the link.

https://hastebin.com/usipidaqil.sql

The games will not run when using an alternative download location to the default. Which is a problem because that means downloading them each time.

Cee123 avatar Feb 12 '19 12:02 Cee123

I tried to post the full log file, but it says that it exceeds the maximum length.

Cee123 avatar Feb 12 '19 12:02 Cee123

@Cee123 You wouldn't necessarily have to download them each time if you set your cache size larger than zero.

drinfernoo avatar Feb 12 '19 17:02 drinfernoo

Thanks, I see the error but not sure whats causing it. Can you tell me what the path you're entering is for the alternate download path?

zach-morris avatar Feb 12 '19 20:02 zach-morris

I also see in your log:

NOTICE: IAGL:  File saved to location /storage/sdcard1/Roms/gb/Super Mario Land (World).zip, file size -624556341690293936, file crc UNKNOWN
DEBUG: IAGL:  Checking downloaded file /storage/sdcard1/Roms/gb/Super Mario Land (World).zip validity

The issue there is that Kodi does not have permissions to that location, so it can't save a file there. You need to create a location that Kodi has write permission to or root Kodi so it has permission everywhere.

zach-morris avatar Feb 12 '19 20:02 zach-morris

@drinfernoo How do I change the cache size?

Cee123 avatar Feb 13 '19 03:02 Cee123

@zach-morris The alternative storage path is /storage/sdcard1/Roms/ basically storing on the SD card. Although the same thing happens when I try an alternative storage location anywhere.

Cee123 avatar Feb 13 '19 03:02 Cee123

@zach-morris How do you change the permissions on Kodi? I don't think it asks for permissions like other applications do.

Cee123 avatar Feb 13 '19 03:02 Cee123

@Cee123 There's a setting on the first page of settings to change the cache size.

drinfernoo avatar Feb 13 '19 04:02 drinfernoo

@drinfernoo Thanks, I'll try that see if it helps.

Cee123 avatar Feb 13 '19 06:02 Cee123

@drinfernoo Under first page of the settings? There are different sections under settings. Not sure which one you mean. Player? System? Display settings? Media? Services?

I've checked all of these, still can't find an option to change cache size on kodi 18 on Android.

Cee123 avatar Feb 13 '19 13:02 Cee123

@Cee123 On the first page of IAGL's settings, you can change the size of it's cache, making it keep more than one ROM downloaded at a time.

drinfernoo avatar Feb 13 '19 16:02 drinfernoo

@drinfernoo Oh OK. Sorry I thought you meant Kodi settings. I didn't know that there was an option under iagl settings. Thanks heaps for that I'll try that then.

Cee123 avatar Feb 14 '19 01:02 Cee123

@drinfernoo Thanks heaps! I changed the cache size to 500 mb as most of the 16gb space is full. Now I don't have to keep downloading them each time. But they still won't load when I change the default path. Was going to use the SD card for storage but they won't run from there.

Cee123 avatar Feb 14 '19 12:02 Cee123

The issue is the same described in #1, where there is some type of permission error:

19:43:22.358 T:11077  NOTICE: IAGL:  Attempting to download file ...GoldenEye%20%28USA%29.zip
19:43:22.358 T:11077  NOTICE: IAGL:  Saving file to /storage/sdcard1/Roms/n64/007 - GoldenEye (USA).zip
...
19:43:46.182 T:11077  NOTICE: IAGL:  File saved to location /storage/sdcard1/Roms/n64/007 - GoldenEye (USA).zip, file size 219043332128, file crc UNKNOWN
19:43:46.213 T:11077   DEBUG: IAGL:  Checking downloaded file /storage/sdcard1/Roms/n64/007 - GoldenEye (USA).zip validity
19:43:46.213 T:11077   DEBUG: IAGL:  File validity check passed.
19:43:46.213 T:11077   DEBUG: IAGL:  Post Process file /storage/sdcard1/Roms/n64/007 - GoldenEye (USA).zip - unzip (builtin)
19:43:46.274 T:9514   DEBUG: CZipManager::GetZipList: failed to stat file zip://%2fstorage%2fsdcard1%2fRoms%2fn64%2f007%20-%20GoldenEye%20(USA).zip/

It's a Kodi issue at it's root (see here), and I don't have a workaround currently. This may potentially be resolved with vfs.libarchive which is a binary addon that can unzip files (rather than using the python implementation which chokes in this case), so I'll look into that.

zach-morris avatar Feb 17 '19 03:02 zach-morris

@zach-morris Oh right, that's interesting. I remember also reading something about trying to change permissions within Kodi on Android and there was nothing but a bunch of people saying it wasn't possible as the current Android developer has left the project, and there wasnt much in the way of Android development.

Cee123 avatar Feb 17 '19 04:02 Cee123

@zach-morris Nice. Hopefully that binary addon can fix the issue in the near future.

Cee123 avatar Feb 17 '19 04:02 Cee123

Do you have any more information on that vfs.libarchive add-on? I'm interested in using it as well, especially if it can handle Unicode characters.

drinfernoo avatar Feb 21 '19 05:02 drinfernoo

It should be available in the official repository (although I can't guarantee it's available for every OS). It's a new binary addon specifically to deal with archive filetypes .7z,.tar.gz,.tar.bz2,.tar.xz,.zip,.rar,.tgz,.tbz2,.gz,.bz2,.xz

zach-morris avatar Feb 21 '19 05:02 zach-morris

This should work now. If possible please try 2.1.0 and let me know if the issue persists

zach-morris avatar Mar 14 '19 18:03 zach-morris

Awesome. That's great. I'll try it out see if the issue is resolved.

Cee123 avatar Mar 15 '19 01:03 Cee123

Strangely enough, the issue seems to still be there. Could be the Android version (5.0) or the box itself.

Cee123 avatar Mar 16 '19 05:03 Cee123

OK, some things to try: Uninstall IAGL, then reinstall Install vfs.libarchive if it's available for your box

zach-morris avatar Mar 16 '19 15:03 zach-morris

@Cee123 You need to change the download location to somewhere that Kodi has access to, which unfortunately, is unlikely to be on your SD card. I'm not sure in what version of Android it changed, but apps can now only write in folder where they have permissions.

drinfernoo avatar Mar 29 '19 17:03 drinfernoo