How can GPGME use GnuPG on Android

Sandra Schreiner sasc0041 at stud.hs-kl.de
Thu Feb 11 18:54:00 CET 2016


Hello,

Looking at gnupg-for-android I was wondering and amazed. How does a Android app manages to use GnuPG? As far as I understand the relationship between GPGME and GnuPG, GPGME gathers all necessary information from the app and sends the data to GnuPG in a 'command-line-based way' and receives the result. I know it is not that hard to use C++ libraries in Android (thanks to JNI and NDK). Therefore the connection between the java wrapper and the C++ part is no real mistery. 

I just can't imagine how this all works together with GnuPG. On a Linux pc there is a standard path for GnuPG, so GPGME can find and call it very easy. On Android - I guess - you have to bring your own GnuPG with the apk. But how does the C++ part of GPGME know where GnuPG is located? Does the whole communication work in the same manner as on a pc? Does the deviation of bionic and glibc affect GPGME and GnuPG in any way? I tried to understand how this is done in gnupg-for-android, however it seems like sorcery to me.

I would be very grateful if someone could help me to get a better basic understanding of the android <-> gpgme <->gnupg relationship. 

Many thanks in advance.

Sandra



More information about the Gnupg-users mailing list