/TOPL-Android-TorBinary

Tor Binary build for Android

Primary LanguageShellOtherNOASSERTION

TOPL-Android-TorBinary

Tor Binary build for Android

Installs the Tor executable file in your Android Application's native library directory (/data/app/...) with the file name libTor.so.

Used primarily for the TorOnionProxyLibrary-Android project.

This is a temporary work-around while I build a gradle plugin to more easily distribute binaries.

Implementation

  • In your Application module's build.gradle file, add the following to the dependencies block:
implementation "io.matthewnelson.topl-android:tor-binary:0.4.3.6"
  • In your Application module's build.gradl e file, add the following to the android block:
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
  • If your application's minSdkVersion is 23 or greater, add to the AndroidManifest.xml, within the application tag:
android:extractNativeLibs="true"
  • Celebrate, nothing more is needed.

More Info

This would be the file if you need it in your app:

val torExecutable = File(context.applicationInfo.nativeLibraryDir, "libTor.so")

Where do the binaries come from?

They are built using The GuardianProject's tor-android project, then copied to
the tor-binary module. Doesn't come with anything but the executables.

See RELEASING.md, scripts/update_tor_binaries.sh and external/tor-android/ for more info.