***@gmail.com wrote:
[...]
Post by j***@gmail.comPost by David GivenAnd as apps can't provision C code, you can't deploy
anything you build anyway.
Yes, I read that only Java apps can be provisioned, so how exactly
people run their C programs on Android? Is it possible only in
emulator but not on real hardware?
You can use adb to push files anywhere onto the device. (Although I
believe that may have changed; when I did all this it was with m5.)
[...]
Post by j***@gmail.comThanks, I am digging but found only hello worlds (and shared/static
libraries), nothing about system stuff yet.
Ah. That's all there is...
AFAICT, practically everything in Android is either (a) written in Java,
or (b) a thin layer, called from Java via JNI. This means that there are
only a small handful of actual binaries, the biggest of which is the VM
itself, which contains nearly all the code (via shared libraries).
So you can build and run a static executable; but it can't talk to any
Android services, because the Android services all live in the VM.
The other approach is to build a JNI .so, and I've had a certain amount
of success in the past, but this is buggy (again, possibly fixed since
m5) and you still have to kinda guess at how the libraries work. For
example, the libc is custom and headers aren't available, which makes
stuff like, e.g., figuring out how to get errno really hard.
--
David Given
***@cowlark.com