Running c binary in android using adb

1.8k views Asked by At

I have created one C binary named "SocketServer" for android. I pushed the binary into my rooted android phone's /data/local/tmp directory using

adb shell push SocketServer /data/local/tmp/

I have given permission to the exe using

adb shell chmod 0777 /data/local/tmp/SocketServer

Now i want to run this SocketServer executable using a C program running in a windows PC. Need help..

1

There are 1 answers

0
mirabilos On

If /data/local/tmp is not mounted noexec (which it most likely is), you can run it using:

adb shell /data/local/tmp/SocketServer

Note that chmod 777 is always a bad idea though, and only Ubuntu people do that…