djp952 / pvr.hdhomerundvr

Unofficial Kodi HDHomeRun DVR PVR Client
https://github.com/djp952/pvr.hdhomerundvr/wiki
Other
58 stars 9 forks source link

Android build target of Kodi 16.1 #36

Closed sanderbaas closed 5 years ago

sanderbaas commented 5 years ago

I installed kodi-16.1-zuki.pvr.hdhomerundvr-arm-1.3.3.6808.apk on my Android device running Android 4.4.2 (API level 19, kernel: Linux 3.10.33). After I enable the addon and then enable TV under Settings > TV, I get an error The PVR manager has been enabled without any enabled PVR add-on. Enable at least one add-on in order to use the PVR functionality.

The Kodi log mentions the following:

19:17:16 T:1791862648   ERROR: Unable to load /data/data/org.xbmc.kodi/cache/apk/assets/addons/pvr.hdhomerundvr/libhdhomerundvr.so, reason: dlopen failed: cannot locate symbol "srand" referenced by "libhdhomerundvr.so"...
19:17:16 T:1791862648 WARNING: bool PVR::CPVRClients::UpdateAndInitialiseClients(bool) - failed to create add-on HDHomeRun DVR PVR Client, status = 6
19:17:16 T:1791862648 WARNING: bool PVR::CPVRClients::UpdateAndInitialiseClients(bool) - failed to load the dll for add-on HDHomeRun DVR PVR Client, disabling it

What is the target for the build of the file I installed? Is it higher than 19?

djp952 commented 5 years ago

Hi! The Jarvis build for Android actually targets the same SDK as Krypton -- v21 (Lollipop). I checked the original code from Team Kodi and it appears that they targeted v17 for Jarvis, which should explain the problem you are encountering.

I'm surprised this never came up until now, to be honest. You're absolutely right and on the right track, it's a build issue on my part, I should be targeting Jelly Bean 4.2 for Jarvis. The Jarvis build for the PVR is more of a back-port of Krypton than a proper release in and of itself.

Let me see what I can do with the build environment to let Jarvis target API level 17 like it should. It will probably take a few days, not in a "good place" for working on this project at the moment. I'm worried that some of the C++ 11 features I use in the code won't work on API 17, but I don't expect any show-stopping problems that can't be worked around.

Sorry!!

edit: Setting the API level to 17 failed, but I think it's because the prebuilt libraries I use (libuuid and libcurl) were compiled for API level 21. I'll try to build API 17 versions of those and see if that eliminates the problem. Hang tight.

sanderbaas commented 5 years ago

Hi! Thanks for checking this out. I actually ended up updating my device to android 5.1 and then everything works flawlessly.

djp952 commented 5 years ago

Glad to hear it's working! I was able to back-port everything in the Jarvis build to Android API 17 regardless, and have been successfully running it in a Jelly Bean 4.2.2 emulator. I'll publish the update and continue to use API 17 for Jarvis from now on, just in case anyone else runs into this same problem. This helps me as well, it made me check what API version Kodi is using for Leia too, and it happens to be API 21 still, so Krypton and Leia should be good.

Apologies again for the oversight.