Opened 9 years ago

Closed 9 years ago

#2989 closed defect (fixed)

ORBot install fails when installing/uncompressing tor binary

Reported by: __sporkbomb Owned by: n8fr8
Priority: Medium Milestone:
Component: Applications/Orbot Version:
Severity: Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


This is a bug report for, running on CM6.1.0-RC2 (Desire HD).

It seems like ORBot fails to unzip the tor binary to the data directory, as it is too large to fit in the dedicated memory for that operation (...or so Google tells me).

Additionally (not sure if that should be a second bug), ORBot still declares the operation successful, even though it is caught by the exception handler. This, of course, leads to ORBot trying (and failing) to start afterwards, constantly receiving -1 as the pid (if you want to detect unrecoverable situations, that _might_ be one approach - keep in mind that I haven't read the corresponding code, maybe ORBot is already doing that).

Logcat (useless messages redacted):

I/ActivityManager( 1487): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 }
I/ActivityManager( 1487): Start proc for activity pid=23812 uid=10105 gids={3003}
I/ORBOT (23812): service started:
D/ORBOT (23812): Tor binary exists=false
D/ORBOT (23812): Privoxy binary exists=false
D/asset (23812): Data exceeds UNCOMPRESS_DATA_MAX (3188430 vs 3145728)
D/ORBOT (23812): Error writing output file '/data/data/':
D/ORBOT (23812): SUCCESS: installed tor, privoxy binaries from raw

Should I try running it on CM7 instead?

Child Tickets

Change History (3)

comment:1 Changed 9 years ago by __sporkbomb

Works on CM-7.0.2-DesireHD.

The fix can apparently be attributed to Android 2.3 - see this blog post for details (particularly the lower part, which also links to this AOSP commit).

Seems like the available choices are:

  1. Requiring Android 2.3 for ORBot, which makes adjustments unnecessary, but brings up the usual problems with fragmentation (though probably less so than for most users, as I'd guess nearly all ORBot users run custom ROMs and are quick upgraders),
  2. Adapting the binary to fit into the size limit (easier said than done, I guess) or
  3. Following the instructions in the blog post linked in this comment, thereby causing aapt to not compress the binary. Boils down to either renaming the tor binary to an extension that will not be compressed (slightly absurd) or passing '-0 tor' to aapt (not possible with Eclipse ADT).

comment:2 Changed 9 years ago by n8fr8

Status: newassigned

The latest version of the Tor binary is smaller (3212190) so perhaps this is fixed by that. In addition, we can split the binary into two parts, and write them as one file on disk, if necessary.

Please test the latest dev build to confirm:


Also available with QRCode for download here:

comment:3 Changed 9 years ago by n8fr8

Resolution: fixed
Status: assignedclosed

Our latest build, uses a new trick, which is to name the 'tor' binary to 'tor.mp3'. This is a strange workaround, but in short, because mp3 is known to be a compressed format, the APK compression is not applied to it, and the res/raw resource is allowed to be 3MB+.

Please let us know if the installation of the tor binary works for you.

Note: See TracTickets for help on using tickets.