Skip to content
This repository has been archived by the owner on Dec 31, 2022. It is now read-only.

Latest commit

 

History

History
79 lines (59 loc) · 2.19 KB

README.md

File metadata and controls

79 lines (59 loc) · 2.19 KB

TOPL-Android-TorBinary

Tor Binary build for Android

DEPRICATION NOTICE

Support for this project will be sunset by July 1st, 2022 in favor of a successor library kmp-tor-binary.

Get Started

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.

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.6.5"
  • In your Application module's build.gradle 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?

Binaries are reproducably built from The Tor Project's tor-browser-build.

See here for more information.

Building Yourself

Clone the repo and initialize submodules:

git clone https://github.com/05nelsonm/TOPL-Android-TorBinary.git
cd TOPL-Android-TorBinary/
git submodule update --init

Install dependencies

# See tor-browser-build's README for needed dependencies and install them
cd external/tor-browser-build
nano README

Initialize tor-browser-build's rbm submodule

make submodule-update

# Change directories back to root project location
cd ../..

Run the build script

# From project's root directory
scripts/build_binaries.sh