Opened 8 months ago

Last modified 8 days ago

#28119 needs_revision defect

Provide Tor Browser for Android for arm64-v8a devices

Reported by: gk Owned by: tbb-team
Priority: High Milestone:
Component: Applications/Tor Browser Version:
Severity: Normal Keywords: tbb-rbm, tbb-mobile, user-feedback, blog, TorBrowserTeam201906, GeorgKoppen201906
Cc: sisbell, boklm Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Supporting all devices Fennec supports means that we need to add support for arm64-v8a devices into tor-browser-build.

Child Tickets

Change History (11)

comment:1 Changed 5 months ago by peredor

hi,
i need to install Tor Browser for Ubuntu on an arm64 architekure.

I couldnt find any linux release for arm64, so i tried to build tor browser on my device (rockpro64, Ubuntu Bionic 18.04.1 arm64).
I used the git clone https://git.torproject.org/builders/tor-browser-build.git but i read in the README make will only produce a version for armv71 and I386/amd64.
i went further anyway executed make [file], i think the output is the following file:
/tor-browser-build/out/debootstrap-image/container-image_ubuntu-base-18.04.1-base-amd64.tar.gz

but what now?
Is it Possible?
Exist already a build?
is it neccesary to install tor browser, tor itself and mozilla is availible in my package repository?

Thanks and greetings
Mark

comment:2 in reply to:  1 ; Changed 5 months ago by cypherpunks2

Replying to peredor:

i need to install Tor Browser for Ubuntu on an arm64 architekure.

You can join #12631 and add rbm descriptors for aarch64.

comment:3 in reply to:  2 Changed 5 months ago by peredor

Replying to cypherpunks2:

Replying to peredor:

i need to install Tor Browser for Ubuntu on an arm64 architekure.

You can join #12631 and add rbm descriptors for aarch64.

Thanks a lot, i found this ticket already in the past but thougt this wouldn't work for me.
buying a modern SBC is how entering a Linux Lesson, you have to learn much :) Try my best

comment:4 Changed 4 months ago by gk

Keywords: TorBrowserTeam201902 GeorgKoppen201902 added
Priority: MediumHigh
Status: newneeds_information

We need to provide 64bit .apks by August this year for Google App Store which is why I gave this a shot. bug_28119 is the result. It gives me an .apk \o/ There is at least the Orbot piece missing, though, as it seems there is no aarch64 Orbot support yet. sisbell: How much of the Orbot stuff do we care here? I am wondering how much time I should spend fixing this up.

Version 0, edited 4 months ago by gk (next)

comment:5 in reply to:  4 ; Changed 4 months ago by sisbell

Replying to gk:

We need to provide 64bit .apks by August this year for Google App Store which is why I gave this a shot. bug_28119 (https://gitweb.torproject.org/user/gk/tor-browser-build.git/log/?h=bug_28119) is the result. It gives me an .apk \o/ There is at least the Orbot piece missing, though, as it seems there is no aarch64 Orbot support yet. sisbell: How much of the Orbot stuff do we care here? I am wondering how much time I should spend fixing this up.

Current Android devices will provide a backwards compatibility for 32 bit versions. What we can't do is mix and match libraries. Once you include one arm64-v8a library, all libraries will need to be compiled for arm64, otherwise a link error will be thrown.

So the Orbot piece would be required:
1) if you include any other arm64 library in the project OR
2) we attempt to upload to Google Play after July of this year

Otherwise it will run just fine on 64 bit devices.

comment:6 in reply to:  5 Changed 4 months ago by gk

Replying to sisbell:

Replying to gk:

We need to provide 64bit .apks by August this year for Google App Store which is why I gave this a shot. bug_28119 (https://gitweb.torproject.org/user/gk/tor-browser-build.git/log/?h=bug_28119) is the result. It gives me an .apk \o/ There is at least the Orbot piece missing, though, as it seems there is no aarch64 Orbot support yet. sisbell: How much of the Orbot stuff do we care here? I am wondering how much time I should spend fixing this up.

Current Android devices will provide a backwards compatibility for 32 bit versions. What we can't do is mix and match libraries. Once you include one arm64-v8a library, all libraries will need to be compiled for arm64, otherwise a link error will be thrown.

So the Orbot piece would be required:
1) if you include any other arm64 library in the project OR
2) we attempt to upload to Google Play after July of this year

Otherwise it will run just fine on 64 bit devices.

Yes. My question was more like, what do we need from the Orbot stuff we ship now, after TOPL is used instead because I was wondering how much time I should spend on fixing the Orbot stuff.

Last edited 4 months ago by gk (previous) (diff)

comment:7 Changed 4 weeks ago by gk

Keywords: TorBrowserTeam201905R GeorgKoppen201905 added; TorBrowserTeam201902 GeorgKoppen201902 removed
Status: needs_informationneeds_review

comment:8 in reply to:  7 Changed 3 weeks ago by boklm

Keywords: TorBrowserTeam201905 added; TorBrowserTeam201905R removed
Status: needs_reviewneeds_revision

Replying to gk:

Okay, I got another reminder from Google about Tor Browser being in need for an arm64 version, so I dusted my old patch off. bug_28119_v4 (https://gitweb.torproject.org/user/gk/tor-browser-build.git/commit/?h=bug_28119_v4&id=a5dba4f2c96c15a6ad88d2d63190105dbc5185db) has the patch for review.

I see we set a different value for var/android_min_api for aarch64 and the other architectures. However, in projects/android-toolchain/build, we create one toolchain tarball containing all architectures, and we use var/android_min_api for all of them. However var/android_min_api only contains the value corresponding to the architecture we are currently building. So I think we should not use var/android_min_api in projects/android-toolchain/build, and instead do something like this:

./build/tools/make_standalone_toolchain.py --api 16 --arch arm --install-dir=./arm
./build/tools/make_standalone_toolchain.py --api 16 --arch x86 --install-dir=./x86
./build/tools/make_standalone_toolchain.py --api 21 --arch aarch64 --install-dir=./aarch64

Or to avoid duplicating the api version in two places:

diff --git a/projects/android-toolchain/build b/projects/android-toolchain/build
index 588aab9..e0f59a9 100644
--- a/projects/android-toolchain/build
+++ b/projects/android-toolchain/build
@@ -18,11 +18,9 @@ cd $NDK_HOME
 mv android-ndk-r15c/* .
 rm -fR android-ndk-r15c
 
-# The architectures we support
-archs="arm x86 arm64"
-for arch in $archs; do
-  ./build/tools/make_standalone_toolchain.py --api [% c("var/android_min_api") %] --arch $arch --install-dir=./$arch
-done
+./build/tools/make_standalone_toolchain.py --api [% c("var/android_min_api_armv7") %] --arch arm --install-dir=./arm
+./build/tools/make_standalone_toolchain.py --api [% c("var/android_min_api_x86") %] --arch x86 --install-dir=./x86
+./build/tools/make_standalone_toolchain.py --api [% c("var/android_min_api_aarch64") %] --arch arm64 --install-dir=./arm64
 
 # Tool Archives
 cd $SDK_HOME
diff --git a/rbm.conf b/rbm.conf
index c344e6f..fe3f406 100644
--- a/rbm.conf
+++ b/rbm.conf
@@ -196,15 +196,17 @@ targets:
     arch: aarch64
     var:
       android-aarch64: 1
-      # API 21 is the minimum we currently support for arm64 on Android
-      android_min_api: 21
       osname: android-aarch64
   android:
     var:
       android: 1
       compiler: android-toolchain
       # API 16 is the minimum we currently support for Tor Browser on Android
-      android_min_api: 16
+      android_min_api: '[% SET arch = c("var/arch"); GET c("var/android_min_api_" _ arch) %]'
+      # API 21 is the minimum we currently support for arm64 on Android
+      android_min_api_aarch64: 21
+      android_min_api_armv7: 16
+      android_min_api_x86: 16
       snowflake: 0
       container:
         suite: stretch

comment:9 Changed 3 weeks ago by wayward

Keywords: user-feedback blog added

comment:10 Changed 8 days ago by gk

Keywords: TorBrowserTeam201906 added; TorBrowserTeam201905 removed

Moving tickets to June

comment:11 Changed 8 days ago by gk

Keywords: GeorgKoppen201906 added; GeorgKoppen201905 removed

Moving my tickets to June

Note: See TracTickets for help on using tickets.