[guardian-dev] Orbot v15 RC3... now with x86/ATOM-power!

Hans of Guardian hans at guardianproject.info
Tue Apr 14 11:17:06 EDT 2015


On Apr 14, 2015, at 10:11 AM, Nathan of Guardian wrote:

> 
> 
> On Tue, Apr 14, 2015, at 06:58 AM, Michael Rogers wrote:
>> On 13/04/15 14:55, Nathan of Guardian wrote:
>>> Making some tiny changes to external/Makefile and jni/Application.mk
>>> means we can now build the tor, polipo and xtables binaries, along with
>>> the tun2socks.so for any necessary chip architecture. I've added support
>>> for x86 in this release, which only added a few MB to the overall APK. 
>> 
>> Very cool! It looks like RC3 only includes PIE binaries, is that right?
> 
> Yes, for now I have focused on PIE/Android-16 and up, and prioritized
> getting x86 support before worrying about non-PIE. I also need to handle
> devices that don't support the VPN API.
> 
>> By the way, you can reduce the APK size a little by stripping the
>> binaries, which shrinks each tor.mp3 by about 200 kB. On Debian the
>> version of strip you need is in binutils-multiarch.
> 
> Thanks!

For Android, it is probably best to use the strip that comes with the NDK.  Its in the same folder with the same arch prefix as gcc, etc.  For example:

/opt/android-ndk-r10d//toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-strip

or:

/opt/android-ndk-r10d/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/arm-linux-androideabi/bin/strip

Also, using the build flags from the NDK itself can help make the binaries smaller.  Check out GnuPG-for-Android for an example.  The Makefile includes this:

  include $(ANDROID_NDK_HOME)/toolchains/$(NDK_TOOLCHAIN)/setup.mk

Then you can do something like this:

ifeq ($(APP_ABI),armeabi-v7a)
        CFLAGS += $(TARGET_arm_release_CFLAGS)
endif
ifeq ($(APP_ABI),armeabi)
        CFLAGS += $(TARGET_thumb_release_CFLAGS)
endif

https://github.com/guardianproject/gnupg-for-android/blob/master/external/Makefile

.hc


More information about the guardian-dev mailing list