[tor-bugs] #32342 [Applications/Tor Browser]: Tor Browser for Android crashes when opening the locale pane in the settings

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Nov 1 12:53:21 UTC 2019


#32342: Tor Browser for Android crashes when opening the locale pane in the
settings
-------------------------------------------------+-------------------------
 Reporter:  gk                                   |          Owner:  tbb-
                                                 |  team
     Type:  defect                               |         Status:  new
 Priority:  High                                 |      Milestone:
Component:  Applications/Tor Browser             |        Version:
 Severity:  Major                                |     Resolution:
 Keywords:  tbb-mobile, tbb-crash,               |  Actual Points:
  tbb-9.0-issues, tbb-regression,                |
  tbb-9.0.1-can, TorBrowserTeam201910            |
Parent ID:                                       |         Points:
 Reviewer:                                       |        Sponsor:
-------------------------------------------------+-------------------------

Comment (by sysrqb):

 Replying to [comment:11 gk]:
 > We already have
 > {{{
 > unzip $apk -d tmp
 > rm $apk
 > cd tmp
 > }}}
 > so, rezipping `omni.ja` there while we are at it would work, no? (not
 sure whether that's what you meant).

 `omni.ja` is still zipped at this point. It seems the problem is the next
 step where the files are zipped again. It is here where `zip` compresses
 `omni.ja` a second time, instead of simply storing the file in the
 archive, unchanged.

 We can correct this after we rezip the apk files by deleting
 `assets/omni.ja` in the archive and then re-add it, except this time we
 explicitly say it should only be stored. I'm thinking about something like
 this:
 {{{
 $ unzip tor-browser-9.0a8-android-x86_64-multi.apk assets/omni.ja
 Archive:  tor-browser-9.0a8-android-x86_64-multi_omnija_store.apk
   inflating: assets/omni.ja
 $ zip -d tor-browser-9.0a8-android-x86_64-multi.apk assets/omni.ja
 deleting: assets/omni.ja
 $ zip -Z store tor-browser-9.0a8-android-x86_64-multi.apk assets/omni.ja
   adding: assets/omni.ja (stored 0%)
 }}}

 >
 > That said is `omni.ja` the only file affected here or do we need to redo
 more?

 Okay, I think I understand the difference between `Defl:N` and `Defl:X`
 now. From the `zipinfo` man page (with some snipping for clarity):
 {{{
 There are six methods known at present:  storing (no compression), [...],
 and deflating.
 In addition, there are [...]  four levels of deflating (superfast, fast,
 normal,
 maximum compression).  zipinfo represents these methods and their sub-
 methods as follows:
 [...], defS, defF, defN, and defX.
 }}}

 It seems simply zipping the apk files really messes with the how the files
 are added into the archive. I don't have a good understanding of the
 impact besides the effect it has on omni.ja.

 I wonder if we should use `aapt` from the Android build-tools in the
 future instead of zip:
 {{{
  aapt a[dd] [-v] file.{zip,jar,apk} file1 [file2 ...]
    Add specified files to Zip-compatible archive.
 }}}

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/32342#comment:12>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list