I have a rooted Nexus 7 Jelly Bean tablet and whenever I attempt to run an application from a terminal emulator app after chmod 777ing it and using the syntax ("./applicationName") it insists that I do not have permission to execute even though I granted my self superUser privs using ("su"). After that I did a little research and I learnt that if you copy the file to the (/data/local/temp/) directory you should be able to execute the application. So when I tried that it said that the file does not exist even though it shows up when listing the directory contents using ("ls")
I have no idea what steps to take, if it helps I am tried to run (scp) as a test but I wish to be able to run a custom compiled version of dns2tcp. I know I could have used better applications such as a hello world compiled natively onthe device but i couldnt get my hands on a C compiler for android such as gcc.
Thanks for any advice
sh in front of your command, eg.:
sh -c ./scp
Emulator app should be able to run another app from its own directory. That directory is called something like
/data/data/com.super.emulator. Try giving the full path to the app you want in emulator.
If you want to get a compiler for Android, you can use NDK. Easy to get, free to use.
Can't you also push your file to
/system/bin via adb? I don't know if you get that permission when you root your device. But if that's the case, it should make your life much easier.
Most likely you can't run the program because of libraries on the device you ripped it from being missing from the device you copied it to.
Since your end goal is to compile a program and run it natively on the phone, might I suggest you use the Android NDK? The NDK documentation includes
STANDALONE-TOOLCHAIN.HTML which explains how to cross-compile a native program to run on your Android device.
If you are rooted (I see you are), use the
su command and then run your original script. If the problem is permissions, this should fix it. And if you are using a shell script, you can just add this line to it at the top. you might have to check your superSu settings (or whichever superuser app you have with root), and make sure your terminal emulator has root permissions.
If you are not rooted (or can't run as root for some reason), I suggest looking into how XBMC does it, as I believe it can run apps in user mode.