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:

Description

This is a bug report for 0.2.2.22-orbot-alpha-1.0.5.20110417a-dev, 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 cmp=org.torproject.android/.Orbot }
I/ActivityManager( 1487): Start proc org.torproject.android for activity org.torproject.android/.Orbot: pid=23812 uid=10105 gids={3003}
I/ORBOT (23812): service started: org.torproject.android.service.TOR_SERVICE
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/org.torproject.android/app_bin/tor': java.io.IOException
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:

https://guardianproject.info/downloads/0.2.2.25-orbot-alpha-1.0.5.20110503a-dev.apk

(sig: https://guardianproject.info/downloads/0.2.2.25-orbot-alpha-1.0.5.20110503a-dev.apk.asc)

Also available with QRCode for download here:
https://github.com/guardianproject/Orbot/0.2.2.25-orbot-alpha-1.0.5.20110503a-dev.apk/qr_code

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.

https://guardianproject.info/downloads/0.2.2.25-orbot-alpha-1.0.5.20110508a-dev.apk

Note: See TracTickets for help on using tickets.