jni: Android 4.1.1 on Samsung S3 required explicit loading of all non-standard shared library dependencies

Change-Id: I3ab62766671c2af9c0b184cd08c959a28e20a5b1
diff --git a/app/src/main/java/net/named_data/nfd/service/NfdService.java b/app/src/main/java/net/named_data/nfd/service/NfdService.java
index d9480b5..2657790 100644
--- a/app/src/main/java/net/named_data/nfd/service/NfdService.java
+++ b/app/src/main/java/net/named_data/nfd/service/NfdService.java
@@ -43,6 +43,26 @@
    * Loading of NFD Native libraries.
    */
   static {
+    // At least on Galaxy S3 (4.1.1), all shared library dependencies that are located
+    // in app's lib folder (not in /system/lib) need to be expliclity loaded.
+    // The script https://gist.github.com/cawka/11fe9c23b7a13960330b can be used to
+    // calculate proper dependency load list.
+    // For example:
+    //     cd app/src/main/libs/armeabi-v7a/
+    //     bash android-shared-lib-dependencies.sh nfd-wrapper
+    System.loadLibrary("crystax");
+    System.loadLibrary("gnustl_shared");
+    System.loadLibrary("cryptopp");
+    System.loadLibrary("boost_system");
+    System.loadLibrary("boost_filesystem");
+    System.loadLibrary("boost_date_time");
+    System.loadLibrary("boost_iostreams");
+    System.loadLibrary("boost_program_options");
+    System.loadLibrary("boost_chrono");
+    System.loadLibrary("boost_random");
+    System.loadLibrary("ndn-cxx");
+    System.loadLibrary("boost_thread");
+    System.loadLibrary("nfd-daemon");
     System.loadLibrary("nfd-wrapper");
   }