[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-bugs] #31882 [Core Tor/Tor]: move Android build config into core tor



#31882: move Android build config into core tor
---------------------------------+------------------------------
 Reporter:  eighthave            |          Owner:  (none)
     Type:  defect               |         Status:  new
 Priority:  Medium               |      Component:  Core Tor/Tor
  Version:                       |       Severity:  Normal
 Keywords:  Android, tbb-mobile  |  Actual Points:
Parent ID:                       |         Points:
 Reviewer:                       |        Sponsor:
---------------------------------+------------------------------
 Guardian Project has maintained a wrapper build system for building tor
 for Android since the beginning.  Since many more people are now building
 tor for Android, I'm working to upstream as much of that as possible.  The
 goal is that the requirements for building on Android can be fulfilled by
 tor's own ''configure.ac''.

 The first change is to remove the unnecessary `./configure --enable-
 android` option.

 * Android NDK compilers define `__ANDROID__` so that can be used for
 Android-only code without adding anything in ''configure.ac'', (following
 the standard pattern like `__APPLE__`, `__linux__`, `__FreeBSD__`,
 `_WIN32`, etc.
 * ''android/log.h'' and `__android_log_write()` are **always** present if
 building for Android, so this would be like testing for `printf()` on
 UNIX.


 Then move the Android config into ''configure.ac'' reusing the
 `./configure --enable-android` flag.  A working sketch for that is here:
 https://trac.torproject.org/projects/tor/ticket/28766#comment:6

 The last piece is including a Java JNI wrapper in tor, enabled by
 `./configure --enable-jni`.  This lets us run tor as an Android `Service`,
 which is the Android equivalent of a UNIX daemon (UNIX daemons are not
 really supported on Android and using them is quite problematic).  This
 JNI API should be generic enough to be useable in Java in general, though
 that's not a priority for us.


 I'll add patches for merging once we agree on these details.  I have this
 all working already on my machine.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/31882>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs