NGI Assure project: Probabilistic NAT Traversal

Implementation details milestone 8

See revisions from e843c5c to 8044aa2 in the gnunet-android repo, and c5b44d6 to af4ce4d in the dev/t3ss/monolith-android branch of the gnunet repo.

With this milestone, we wanted to get a minimal set of GNUnet service running to test our NAT traversal library. Therefore it was necesarry to cross compile more dependencies (sqlite).

Additional GNUnet utility shared libraries that were cross compiled:

  • libgnunethello
  • libgnunetsq
GNUnet services that were cross compiled:

  • libgnunetarm
  • libgnunetpeerstore
  • libgnunetstatistics
  • libgnunettransportapplication
  • libgnunettransportcommunicator
  • libgnunettransportcore
  • libgnunettransportmonitor


This attempt to get GNUnet running on Android failed, because - which was already expected before, it was not possible to start all those independent processes on Android. Solution to this problem was to build a monolitic version of GNUnet. Having only two shared libraries libgnunetutil and libgnunet.

After this big change we had to fix several problems:

  • Adding Sqlite C to Java linking code (see android_studio/app/src/main/java/org/sqlite).
  • Changing the service macro to get external configuration handle.
  • Load GNUnet configuration from Android assets folder.
  • Fix all GNUnet paths to point to the directory under control of the Android app.
  • Setting the ltdl search path.
  • Preload the GNUnet sqlite plugin.
  • Adding a precompiled private key file to load from asset folder.
  • Several smaller configuration issues.
  • Finish the code for the daemon macro to start the GNUnet communicator components.
Because the automated GNUnet tests are not working on Android, which we found out during Milestone 6 and 7, we again did manual tests between one Android device and two GNU/Linux boxes. Here is a log entry indicating that the Android box (1XNB) send some message to AWZB via QG2V and received an answer from AWZB.

08-21 08:26:06.840 17084 17116 D GNUNET : 2024-08-21T08:26:06.840469+0100 libgnunet-17084 DEBUG Received DVInit via 1XNB-->QG2V-->AWZB-->1XNB

To complete Milestone 8 the testing of the unfished Milestone 3 code is missing. This is by far the smaller part of the effort that had to be made for this milestone