Bug External Binary addons not working
#1
Hi,
I have detected a problem with the XBMC version for Android related to binary addons contained in a ZIP file.
When you try to install a PVR addon from a ZIP file it won't work because you can't load native libraries located on the SD card. The SD card is mounted with the noexec option, so you need to copy the library to the internal memory before loading it.
I have come to the conclusion after a lot of attempts to load a test addon. When I built XBMC with the addon already integrated there was no problem, even I could uninstall it and load it from a ZIP. The problem appeared when I tried to load my test addon to the official XBMC apk.
The last try I have done to confirm the problem is the noexec option and not a problem with my test addon has been to build an XBMC apk with no PVR addons integrated and trying to load the Demo Addon from the official build. This is what I get:

Code:
07-03 17:14:40.377: V/XBMC(21732): 17:14:40 T:12683040   DEBUG: PVR - ADDON_STATUS PVR::CPVRClient::Create(int) - creating PVR add-on instance 'Test Client'
07-03 17:14:40.377: V/XBMC(21732): 17:14:40 T:12683040   DEBUG: ADDON: Dll Initializing - Test Client
07-03 17:14:40.387: V/XBMC(21732): 17:14:40 T:12683040   DEBUG: SECTION:LoadDLL(/mnt/sdcard/Android/data/org.xbmc.xbmc/files/.xbmc/addons/pvr.test/libXBMC_Demo.so)
07-03 17:14:40.387: V/XBMC(21732): 17:14:40 T:12683040   DEBUG: Loading: /mnt/sdcard/Android/data/org.xbmc.xbmc/files/.xbmc/addons/pvr.test/libXBMC_Demo.so
07-03 17:14:40.387: V/XBMC(21732): xb_dlopen: Error from dlopen(/mnt/sdcard/Android/data/org.xbmc.xbmc/files/.xbmc/addons/pvr.test/libXBMC_Demo.so): Cannot load library: load_segments[915]: 139 failed to map segment from 'libXBMC_Demo.so' @ 0x611bb000 (0x00075c4c). p_vaddr=0x00000000 p_offset=0x00000000
07-03 17:14:40.387: V/XBMC(21732): 17:14:40 T:12683040   ERROR: Unable to load /mnt/sdcard/Android/data/org.xbmc.xbmc/files/.xbmc/addons/pvr.test/libXBMC_Demo.so, reason: (null)
07-03 17:14:40.387: V/XBMC(21732): 17:14:40 T:12683040    INFO: Called Add-on status handler for '4' of clientName:Test Client, clientID:pvr.test (same Thread=no)
07-03 17:14:40.397: V/XBMC(21732): 17:14:40 T:12683040 WARNING: bool PVR::CPVRClients::UpdateAndInitialiseClients(bool) - failed to create add-on Test Client, status = 6
07-03 17:14:40.397: V/XBMC(21732): 17:14:40 T:12683040 WARNING: bool PVR::CPVRClients::UpdateAndInitialiseClients(bool) - failed to load the dll for add-on Test Client, disabling it

This error message took me to the real problem: http://stackoverflow.com/questions/62910...ap-segment
Reply
#2
why should i care about android mounting the sd with noexec, and xbmc being put on that sd by someone? i'm pretty sure that the default installation location of apps is not mounted with noexec and if a user puts it on a location with the option set, then it's not xbmc's problem imho
opdenkamp / dushmaniac

xbmc-pvr [Eden-PVR builds] [now included in mainline XBMC, so no more source link here :)]
personal website: [link]

Found a problem with PVR? Report it on Trac, under "PVR - core components". Please attach the full debug log.

If you like my work, please consider donating to me and/or Team XBMC.
Reply
#3
I haven't moved xbmc to the SD card, I don't even have the option, the button is disabled. That's the default location XBMC is using out of the box.
Reply
#4
nice. that obviously won't work for any binary add-on if it's installed to a location with noexec set.

moving this to the android section.
opdenkamp / dushmaniac

xbmc-pvr [Eden-PVR builds] [now included in mainline XBMC, so no more source link here :)]
personal website: [link]

Found a problem with PVR? Report it on Trac, under "PVR - core components". Please attach the full debug log.

If you like my work, please consider donating to me and/or Team XBMC.
Reply
#5
I have detected same problem using the last nightly apk, so it has not been resolved yet.

I think that the solution is simply that XBMC copy the add-on to a exec enabled location.
Reply
#6
Has this bug been solved in 13.0 version?

Binary add-ons are unusable without this bug solved.

The solution seems simple: to use a location without noexec option.
Reply
#7
this is not an XBMC issue, it's a distro/firmware issue.
Reply
#8
The issue occurs with every generic Android devices I have tried (smartphones, tablets, Xios DS Media Play, etc). If XBMC does not take into account this Android caracteristic, never will by possible to use binary add-ons on Android.

Could XBMC (Android version) copy the Add-on to an generic executable location (if it exists, I suppose yes) prior to loading it?

If I write a patch that solves the issue, could it be included on XBMC?
Reply
#9
if you write a patch and PR it and that patch is acceptable (not a hacked up POC Smile then yes, of course if would be considered for rolling into mainline. That's how Open Source works.
Reply
#10
Any news since then? Was the patch included?
Reply

Logout Mark Read Team Forum Stats Members Help
External Binary addons not working0