diff --git a/external/Makefile b/external/Makefile index 96251f79..fd03338c 100644 --- a/external/Makefile +++ b/external/Makefile @@ -249,6 +249,7 @@ tor/Makefile: tor/configure.ac tor/Makefile.am --enable-zstd \ --disable-lzma \ --disable-module-relay \ + --disable-unittests \ --disable-module-dirauth \ --disable-asciidoc \ --disable-tool-name-check \ @@ -288,8 +289,8 @@ ifneq ($(DEBUG), 1) ls -l $(INSTALL_DIR)/libtor.so endif grep "Java_org_torproject_jni_TorService" $(INSTALL_DIR)/libtor.so - install -d $(EXTERNAL_ROOT)/test/$(APP_ABI) - cp tor/src/test/test tor/src/test/test-memwipe tor/src/test/test-slow \ +# install -d $(EXTERNAL_ROOT)/test/$(APP_ABI) +# cp tor/src/test/test tor/src/test/test-memwipe tor/src/test/test-slow \ $(EXTERNAL_ROOT)/test/$(APP_ABI) PREBUILD_SHARED_LIBRARY-clean: diff --git a/external/tor b/external/tor index 23d5b73f..247a93a4 160000 --- a/external/tor +++ b/external/tor @@ -1 +1 @@ -Subproject commit 23d5b73f2f1fe84067e33bd3c0c798ce7cbd2bad +Subproject commit 247a93a48314ba1d61b1a3484484ce32f01ae1f7 diff --git a/tor-android-binary/src/main/java/org/torproject/jni/TorService.java b/tor-android-binary/src/main/java/org/torproject/jni/TorService.java index 85143949..755ece74 100644 --- a/tor-android-binary/src/main/java/org/torproject/jni/TorService.java +++ b/tor-android-binary/src/main/java/org/torproject/jni/TorService.java @@ -230,6 +230,17 @@ private static File getAppTorServiceDataDir(Context context) { private native int runMain(); + public native static boolean fatal(); + public static final String STATUS_ABORT = "ABORTING"; + private static Context ctx; + public static void onTorRawAbort() { + Log.wtf("OrbotAbortReport", "made it to java abort"); + if (ctx == null) return; // TorService's onCreate() hasn't been called, no valid context. + Log.wtf("OrbotAbortReport", "sending abort "); + broadcastStatus(ctx, STATUS_ABORT); + } + + public class LocalBinder extends Binder { public TorService getService() { return TorService.this; @@ -248,6 +259,7 @@ public IBinder onBind(Intent intent) { public void onCreate() { super.onCreate(); broadcastStatus(this, STATUS_STARTING); + ctx = this; startTorServiceThread(); } @@ -443,6 +455,7 @@ private void startTorServiceThread() { @Override public void onDestroy() { super.onDestroy(); + ctx = null; if (torControlConnection != null) { torControlConnection.removeRawEventListener(startedEventListener); }