Kodi Community Forum

Full Version: Call System.exec in XML
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

how can i use System.exec() in Home.xml Files on Android System,
Catlog writes many DEBUG Messages and a Fatal Kill Signal when i Push the coded Button.

Greetings, Schuppeste
Suggestion: If you have catlogs, show them.
onClick Exit Button with new action @ 11-26 10:20:25.981 V/XBMC (5123): 10:20:25 T:1567973128 DEBUG: : To System.Exec("su root reboot")
please use pastebin.com and give the link (and not dump the log on the forum)
(2013-11-26, 16:25)Schuppeste Wrote: [ -> ]onClick Exit Button with new action @ 11-26 10:20:25.981 V/XBMC (5123): 10:20:25 T:1567973128 DEBUG: : To System.Exec("su root reboot")
Try "su -c reboot"
the android shell does not support "-c" Parameter(shell testet).. but same error.

http://pastebin.com/dmTnKC4B

The goal of the Script is to shutdown Android-PC on Exit Button, i read all Wiki Entries and normally this should the way i Want.
I tried in Python With run script in user data/reboot.py. The Python Engine loads and Stops with message "library OS not Found", import error...

Python-Script:
import os
os.system('sh /sdcard/reboot.sh')