C daemon execute system() in Android

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

C daemon execute system() in Android

1,166 Views
ilanganor
Contributor I

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

Tags (1)
0 Kudos
Reply
1 Reply

985 Views
diegoadrian
NXP Employee
NXP Employee

Hello,

Can you please, take a look at the bellow blog:

system call for makefile 

Probably, this can solve your problem.

Best Regards,

Diego.

0 Kudos
Reply