Opened 3 years ago

Last modified 17 months ago

#24457 new enhancement

Integrate tor-android build files directly into tor.git

Reported by: n8fr8 Owned by:
Priority: Medium Milestone: Tor: unspecified
Component: Core Tor/Tor Version:
Severity: Normal Keywords: mobile, android
Cc: ahf Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


We should provide all the scripts, gradle configurations, etc necessary for building tor for Android in the primary tor repository. This would be inline with the "/mobile" approach that Mozilla takes with Firefox/Fennec.

The result would be that we could generate tor android gradle dependency AAR files, for use by any application looking to include tor, with nothing more than tor.git and the right Android SDK/NDK installed

This is the current "crufty" project for building tor for android:

Child Tickets

Change History (5)

comment:1 Changed 3 years ago by n8fr8

This should also involve migrating for current external/Makefile to an Android native dev kit format build file.

comment:2 Changed 3 years ago by catalyst

Milestone: Tor: unspecified
Sponsor: Sponsor8-can

comment:3 Changed 3 years ago by ahf

Cc: ahf added

comment:4 Changed 3 years ago by hans

So my 'eighthave' account seems to have been nuked, so I'll post using 'hans' for now.

So upon thinking about this a bit more, it seems that if things need to be only in autotools, then the current Makefile is really probably the best it is going to get. You might be able to include some of the configuration for Android in the autotools files instead of the Makefile. Then in order to built for given architectures, there has to be one call to this whole process for each arch, then the build results are assembled by us outside of that Makefile. This Makefile does work, but it is missing some of the arch-specific optimizations and more crafted stripping of unused code.

If we can get tor builds working with ndk-build, then tor, xz, lzma, libevent and maybe even openssl would be all built together with a single call to ndk-build. Otherwise openssl would have to be built beforehand using one of the existing build processes. ndk_build would handle building all the specified arches for us, as well as include the arch and stripping optimizations.

We should probably switch over to the official openssl build process for Android in any case:

comment:5 Changed 17 months ago by gaba

Sponsor: Sponsor8-can
Note: See TracTickets for help on using tickets.