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.
- In your Application module's
build.gradle
file, add the following to thedependencies
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 theandroid
block:
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
- If your application's
minSdkVersion
is 23 or greater, add to theAndroidManifest.xml
, within theapplication
tag:
android:extractNativeLibs="true"
- Celebrate, nothing more is needed.
This would be the file if you need it in your app:
val torExecutable = File(context.applicationInfo.nativeLibraryDir, "libTor.so")
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.