ads

vendredi 18 septembre 2015

How to properly use Terminal Emulator shortcut widget commands?



Hello!

I want to create a homescreen widget shortcut for Terminal Emulator to do the following command line:


Code:


killall -9 mediaserver

To do so, I created a sh file type with the following lines and moved it to /system dir with rwxrwxrwx permissions:


Code:


#!/system/bin/sh
su
killall -9 mediaserver
exit
exit


And then created a widget with Term shortcut with this text on argument window:

Code:


su -c "sh  /system/camscript.sh"

The problem is: When I select the Terminal Icon on my homescreen, it open the terminal emulator appears


Code:


u0_a912@mo:/ $ su -c "sh /system/camscript.sh"
root@m0:/ #


The thing is that I want it to execute the command and exit the terminal emulator prompt by itself.

Can anyone help me?

Thanks



Aucun commentaire:

Enregistrer un commentaire