AnsweredAssumed Answered

C daemon execute system() in Android

Question asked by Ilan Ganor on Sep 21, 2017

I have compiled a C daemon that runs on Android (Android 6)

-rwxrwxrwx root     root       715940 2017-09-21 14:51 server.o

the daemon runs fine, and responds to requests from clients. However, I would like to initiate a system() call from the daemon, for example:

system("mkdir /data/test/");

this fails (any system() call I made failed, reference on Linux, same code different Makefile works fine). The Android is rooted. Please advice how to perform system() commands from C daemon on Android.

Original Attachment has been moved to: server_listner-master.zip

Outcomes