I have a system app (in the /system/app folder and also signed with the system signature) and I would like to execute some commands.
It works well with adb and superuser rights, but everytime I get a "Permission denied" when I make the call from my application.
This is the kind of command I'm doing :
Do you know why I have this error ? And how to correct it ?
You need to ask for a SU permissions first from the system.
I would suggest you to use roottools:
RootTools provides rooted developers a standardized set of tools for use in the development of rooted applications. In the end, we will accomplish this by providing developers with robust, easy-to-use libraries that will drastically improve development times as well as promote code reuse. This project is open to any proven developer that feels they have something to contribute. By pitching in together we can streamline our own processes, improve the effectiveness of our apps, learn new techniques, and provide a better experience for our users.
EDIT: Can you please describe the process of signing your APK with the system certificates? Have you edited your AndroidManifest.xml as well?