This question can be decomposed into several smaller tasks. The end result would be to set a breakpoint in the CFC C ++ implementation for the Galaxy Nexus device (Android 4.1) using a debugger such as gdb to check its internal state.
- Can I replace the Galaxy Nexus device libraries with ones that contain debugging symbols?
- Is it possible to use gdb to debug an Android device implementation in C / C ++?
- Is it possible to cross-compile an NFC implementation for Android?
- Are there any examples of someone trying something like this, maybe with a different library?
Update: Correcting the device and compiling Jellybean went well with some minor bugs. Actually, there are some very nice flags in makefile libnfc that provide extensive output for communication.
However, there is still a debugging problem. To debug libnfc (external / libnfc-nxp), I have to join the process using the library, which is most likely Nfc Manager (packages / apps / Nfc). To debug the application, I have to set the debuggable flag. If I rebuild Nfc Manager, the signature does not match the one already installed on the device, which means that adb install -r <file> will not work. adb uninstall com.android.nfc does not work either. Using a complicated method, just removing apk from /system/app creates an INSTALL_FAILED_SHARED_USER_INCOMPATIBLE error when I try to install a new one. Nfc is no longer working at the moment, and I had to double-check the stock image.
Any other ideas on debugging the libnfc library?
source share