I am having the source code of DigitalPersona(DP) fingerprint reader.
Now, i need to compile it for Android.
I have Android NDK r5. I replicated the Android.mk, default.properties and AndroidManifest.xml from the hello-jni sample project in NDK to the DP source code.
But when i run ‘ndk-build’ inside the DP source code.
Its giving me huge bulk of errors.
Here are the configs.
http://pastebin.com/khUbWQdE
I know i am doing something wrong, but please do enlighten me.
Thanks
It’s quite likely that at least part of the code is a kernel mode device driver module, which this company is polite enough to supply in source form.
Compiling kernel drivers is certainly possible, but it doesn’t follow the ndk process. You’ll need the kernel sources for the kernel running on your device or at least the headers from them. Do some web searching for hints on compiling android linux kernels, and pay attention to the part about packing the ramdisk image onto the kernel if your device requires that.
You may also have userspace code to deal with. Getting that through the ndk build system (or perhaps the recently added ‘stand alone toolchain’ option) is not always trivial. You have an unusual C library (bionic instead of glibc) plus all the generic issues involved in cross compiling, which some projects configuration scripts do not always handle well. There’s also the possibility of using a different toolchain with a more standard library and statically linking.
Finally, you aren’t going to be able to install and use the code unless you have a rooted device which allows replacing the kernel (or runs a kernel that allows modules) and the device has both the electrical capability and working drivers for operating in USB host mode.