Opened 10 months ago

Last modified 2 weeks ago

#25164 new enhancement

Reproducible Tor Browser for Android builds

Reported by: sysrqb Owned by: tbb-team
Priority: High Milestone:
Component: Applications/Tor Browser Version:
Severity: Normal Keywords: tbb-mobile, TorBrowserTeam201811
Cc: boklm, sisbell, igt0 Actual Points:
Parent ID: Points:
Reviewer: Sponsor: Sponsor8

Description

Make sure the apks builds are reproducable.

Child Tickets

Change History (22)

comment:1 Changed 10 months ago by gk

Summary: Reproducable Tor Browser for Android buildsReproducible Tor Browser for Android builds

comment:2 Changed 9 months ago by boklm

Cc: boklm added

comment:3 Changed 9 months ago by sysrqb

Parent ID: #19675#5709

Moving these to #5709, these aren't blockers anymore. We'll merge Orfox patches first, then audit everything as we move to m-c and work on TBA. (We should create more tickets as we find more items that need investigating/fixing)

comment:4 Changed 8 months ago by gk

Keywords: TorBrowserTeam201804 added
Priority: MediumHigh

comment:5 Changed 7 months ago by gk

Keywords: TorBrowserTeam201805 added; TorBrowserTeam201804 removed

Move our roadmap tickets to May.

comment:6 Changed 6 months ago by gk

Keywords: TorBrowserTeam201806 added; TorBrowserTeam201805 removed

Moving our tickets to June 2018

comment:7 Changed 5 months ago by gk

Keywords: TorBrowserTeam201807 added; TorBrowserTeam201806 removed

Moving first batch of tickets to July 2018

comment:8 Changed 5 months ago by gk

Cc: sisbell added

comment:9 Changed 5 months ago by igt0

Cc: igt0 added

comment:10 Changed 4 months ago by boklm

Parent ID: #5709#26693

comment:11 Changed 4 months ago by sisbell

I've implemented building an Android apk with RBM at: https://github.com/sisbell/tor-browser-build/tree/android

I'll open a git project at torproject and import it over for further review and cleanup.

comment:12 in reply to:  11 Changed 4 months ago by boklm

Replying to sisbell:

I've implemented building an Android apk with RBM at: https://github.com/sisbell/tor-browser-build/tree/android

This is good work. Thanks!

Here are a few quick comments:

  • the main ticket for integrating the android build into tor-browser-build is not #25164 but #26693. This one is only for the reproducible part of it (checking that multiple builds on multiple machines create the same build).
  • In the commit subject you should use Bug XXXX: (even if the ticket is of type enhancement).
  • to make it easier to review, you should split the commits in different commits. I think one for adding stretch to debootstrap-image, for adding android-toolchain, for adding the new platform definition to rbm.conf, for fixing the rust build, for fixing the firefox build.
  • should we call the target in rbm.conf torbrowser-android-armv7 instead of just torbrowser-android?
  • var/compiler should be set to android-toolchain instead of gcc.
  • ndk.zip should be included in android-toolchain so that is not needed to download it from projects/firefox/config.

comment:13 Changed 4 months ago by gk

Nice! Do you get identical .apk files when building it several times? If not, this would need to get investigated and fixed as well.

comment:14 Changed 4 months ago by gk

Keywords: TorBrowserTeam201808 added; TorBrowserTeam201807 removed

Move our tickets to August.

comment:15 Changed 3 months ago by sisbell

Apks from two builds are different, even building on same laptop. This is due to some differences in the classes.dex file.

When I do a dexdump of two different dex files, the dexdumps are exactly the same.

When I decompile and recompile the classes.dex file from two different builds, the resulting classes.dex are exactly the same.

This leads me to believe that the differences in the classes.dex file are only cosmetic (padding differences?)

I will need to build a quick program to output exactly what part of the dex file format is different and then go from there.

comment:16 Changed 3 months ago by sisbell

It looks like the annotation offsets in the data area of the dex file are different between the files.

comment:17 Changed 3 months ago by gk

Keywords: TorBrowserTeam201809 added; TorBrowserTeam201808 removed

Moving our tickets to September 2018

comment:18 Changed 2 months ago by sisbell

I've published first version of tool to help identify differences that we are seeing in the Android dex files.

The outputs will give us enough information to start drilling down when we need to. I'm going to pause further work for now and move on to other tickets.

comment:19 Changed 7 weeks ago by gk

Keywords: TorBrowserTeam201810 added; TorBrowserTeam201809 removed

Moving tickets to October

comment:20 Changed 5 weeks ago by gk

Parent ID: #26693

That's not necessary for the tor-browser-build integration, unparenting.

comment:21 Changed 4 weeks ago by pili

Sponsor: Sponsor8

comment:22 Changed 2 weeks ago by gk

Keywords: TorBrowserTeam201811 added; TorBrowserTeam201810 removed

Moving our tickets to November.

Note: See TracTickets for help on using tickets.