commit 1cc2c254320e8580d4cb6cdf4eb3c18c53968b74
parent 2aee2c24e7cee208d2e9031d13d846e63e7b80c4
Author: julianharty <julianharty@gmail.com>
Date: Mon, 12 Aug 2024 12:46:53 +0100
Configuration fixes to run on Android ecosystem.
Diffstat:
2 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/android_studio/app/src/main/assets/gnunet.conf b/android_studio/app/src/main/assets/gnunet.conf
@@ -90,11 +90,11 @@ PRIVATE_KEY = $GNUNET_DATA_HOME/private_key.ecc
SYSTEM_TYPE = UNKNOWN
[PATHS]
-GNUNET_HOME = home
+GNUNET_HOME = /data/user/0/org.gnu.gnunet/home
GNUNET_DATA_HOME = $GNUNET_HOME/data
GNUNET_CONFIG_HOME = $GNUNET_HOME/config
GNUNET_CACHE_HOME = $GNUNET_HOME/cache
-GNUNET_RUNTIME_DIR = cache/gnunet-system-runtime
-GNUNET_USER_RUNTIME_DIR = cache/gnunet-runtime
-GNUNET_TMP = cache
+GNUNET_RUNTIME_DIR = /data/user/0/org.gnu.gnunet/cache/gnunet-system-runtime
+GNUNET_USER_RUNTIME_DIR = /data/user/0/org.gnu.gnunet/cache/gnunet-runtime
+GNUNET_TMP = /data/user/0/org.gnu.gnunet/cache
diff --git a/android_studio/app/src/main/cpp/native-lib.cpp b/android_studio/app/src/main/cpp/native-lib.cpp
@@ -249,10 +249,7 @@ Java_org_gnu_gnunet_MainActivity_stringFromJNI(
char *const non_const_ptr = const_cast<char*>(tmp_file.c_str());
char *const argvx[] = {
- "-L",
- "DEBUG",
- "-l",
- non_const_ptr,
+ "BuggerAll",
NULL
};
@@ -263,8 +260,10 @@ Java_org_gnu_gnunet_MainActivity_stringFromJNI(
start_logger(tag);
printf("Some message.\n");
+ /*
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Simulate error message. We do not no what is the actual log level.\n");
+ */
cfg = GNUNET_CONFIGURATION_create ();
AAsset *asset = AAssetManager_open(mgr, "gnunet.conf", AASSET_MODE_BUFFER);
char buf[AAsset_getLength(asset)];
@@ -278,7 +277,7 @@ Java_org_gnu_gnunet_MainActivity_stringFromJNI(
AAsset_close(asset);
- GNUNET_SERVICE_main (4,
+ GNUNET_SERVICE_main (1,
argvx,
cfg);