Take the 2-minute tour ×

I'm going to implement aodv protocol as a linux module for a research project, and I need to implement it on Android later.I wonder if I could compile my codes into the android kernel and have my module work as in Linux (kernel 2.6 up).

Any suggestions would be greatly appreciated.

(P.S. There are already some aodv implementations on Android, such aodv-on-android and UoB JAdhoc, however, those are implemented in Java, not involving kernels)

share|improve this question
add comment

1 Answer

The tagline goes: Android is Linux, so anything (portable) you do on Linux should be simple to make happen on Android.

This is mostly true, however there are a few things you'll want to keep in mind:

  • Portability: If you're writing your implementation on x86 and then moving the module to ARM for Android, be careful not to use any capabilities that don't exist on both. However, for something like a network protocol, you probably won't be running into a lot of these. The only one that comes to mind is the NIC.

  • Dalvik: Generic Linux distributions tend to run fairly close to the OS, meaning they regularly make system calls or libc calls, and the semantics of interactions with the kernel mostly carry over to the application. Android, however, has essentially a Java environment build on top of that, and the majority of applications only interact with that framework. For you, this means you will want to be aware of the possible need to modify the Android framework in order to make changes visible to applications.

  • The above point depends on your use case, however. If you plan on augmenting routing for existing applications to use aodv, then you'll want to hack around with Dalvik. If you'll be writing one proof of concept application, then you can write the portions that interact with aodv in C using the NDK, and avoid having to modify the application framework.

  • You probably already know this, but the kernel built system is sophisticated enough that you should be able to get away with writing your module once and compiling it for two architectures or platforms just by changing your configuration.

Hope this helps.

share|improve this answer
Thank you very much! I'm green to android and I didn't realize there might be serious problems making the changes visible to applications within the framework of android, need to do some research on that. –  Jonathan Mar 30 '12 at 2:58
You're very welcome. I suggest voting up the answer, not out of self-promotion, but because giving it a higher score means people who search for the similar things will more likely see it. Good luck! –  Alex Mar 30 '12 at 14:43
add comment

Your Answer


