(2017-01-13, 16:47)dataghost1984 Wrote:
Gotcha, so as of now, extraction does not work with Android? Makes sense. I was pulling my hair out. Thanks for letting me know. What is needed to make this work? A working 7z.android? So porting a correct executable binary to android and renaming it? If so I will start on that. Thank you very much for the time taken to reply as well.
Short version: Yes, extraction does not work right now.
Long version / the trials and tribulations of a bad programmer:
So, I thought just getting a binary compiled in the correct way is what I was missing from android. I went chasing my tail for a long time assuming my binary wasn't compiled correctly, or wasn't the right architecture. I was wrong. It turns out Android has made a walled garden that is not very friendly for developers like me to give users of boxes like a fire tv. You can't execute binaries without system or superuser privileges (which in my opinion is kind of a requirement). Strangely enough, from an ADB shell, I can run my 7zip binary if it's located in "the right spot" (/data/local/tmp/ for example), but Kodi / Python will fail to execute the same exact command, complaining about permissions. I find that pretty strange.
My other options are to:
1) Compile a binary module (p7zip.so) and
use ctypes to import the module and run it. Seems overly difficult, especially for my meagre skills.
2) Find an APK for extracting archives that is free / open source and allows for android intents, use Kodi's
StartAndroidActivity functionality. Unfortunately, I have yet to find an android app with documentation that allows for this.
3) Wait until a better / direct Kodi solution exist. Fortunately, it looks like
there is one thats under development.
4) Give up and just not show 7zip game lists for android users, or wait until someone else smarter than me hands me a solution
I'm torn between #3 and #4 right now. I'm banking on #3. In the meantime, I believe Retroarch can, in some cases, handle a 7z file directly. You can test this by editing the game list xml and changing the <emu_postdlaction> line to:
Code:
<emu_postdlaction>none</emu_postdlaction>