C daemon execute system() in Android

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

C daemon execute system() in Android

1,167件の閲覧回数
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

タグ(1)
0 件の賞賛
返信
1 返信

986件の閲覧回数
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 件の賞賛
返信