Running native code in Android 2
So, the previous method only really works for statically compiled programs, meaning it’s kinda useless for anything more complex, or for cross-compiling much of anything really.
Luckily, I found another page that details a better, though more time consuming way of doing things.
Basically, you’re downloading the Android source and compiling it to get a cross-compiler that links to the appropriate Android libraries, and anything else you might need.
CAVEATS:
- Compiling takes a VERY long time. Don’t start the compilation over SSH, because something bad will happen, and you’ll be forced to close the SSH session, which’ll bork everything. If you’re doing stuff remotely, VNC into your Linux box, open a terminal window there, and do what you need that way.
- I haven’t tested this on anything other than Linux.
Craig Said,
November 23, 2009 @ 3:03 am
Another alternative is to use the unix command “screen”. Screen allows you to run multiple console sessions, and detach the whole thing from your particular login terminal. Once detached, you can log off and the processes in the console sessions will continue to run. When you ssh back in, you run screen and tell it to attach to the previous session.