... | ... | @@ -4,9 +4,9 @@ we use the path the JDK path `/usr/lib/jvm/java-11-openjdk-amd64` in this doc. U |
|
|
|
|
|
## Prepping Tools (skip this section for mac, we get our clang via Android Studio)
|
|
|
|
|
|
Get a copy of [tor-browser-build](http://eweiibe6tdjsdprb4px6rqrzzcsi22m4koia44kc5pcjr7nec2rlxyad.onion/tpo/applications/tor-browser-build/) and checkout the branch that matches your build target
|
|
|
Get a copy of [tor-browser-build](https://gitlab.torproject.org/tpo/applications/tor-browser-build/) and checkout the branch that matches your build target
|
|
|
|
|
|
*(2023.07.13: for 115.x.0-13.0 we still need [pierov:bug_40855_android](http://eweiibe6tdjsdprb4px6rqrzzcsi22m4koia44kc5pcjr7nec2rlxyad.onion/pierov/tor-browser-build/-/tree/bug_40855_android?ref_type=heads) please delete once merged to tbb propper)*
|
|
|
*(2023.07.13: for 115.x.0-13.0 we still need [pierov:bug_40855_android](https://gitlab.torproject.org/pierov/tor-browser-build/-/tree/bug_40855_android?ref_type=heads) please delete once merged to tbb propper)*
|
|
|
|
|
|
We need to build a clang compiler for our target, aarch64, and we need a few armv7 tools for packaging. The compiler we will use is `clang` and we also need a few extras found in `llvm-runtimes`
|
|
|
|
... | ... | @@ -33,14 +33,14 @@ And now both arm7 and aarch64 llvm-runtimes are installed in your clang and it's |
|
|
|
|
|
Geckoview is the core browser engine. It will be compiled for android and prepared for packaging in an android browser.
|
|
|
|
|
|
clone a copy of [tor-browser](http://eweiibe6tdjsdprb4px6rqrzzcsi22m4koia44kc5pcjr7nec2rlxyad.onion/tpo/applications/tor-browser) and check out the relevant branch (eg: tor-browser-115.2.1-13.5-1)
|
|
|
clone a copy of [tor-browser](https://gitlab.torproject.org/tpo/applications/tor-browser) and check out the relevant branch (eg: tor-browser-115.2.1-13.5-1)
|
|
|
|
|
|
create an `android-env.sh` and fill it accordingly to your setup with the following
|
|
|
|
|
|
|
|
|
For Linux:
|
|
|
```
|
|
|
export MOZ_BUILD_DATE=20230710165010 # This should match the data in [firefox-android](http://eweiibe6tdjsdprb4px6rqrzzcsi22m4koia44kc5pcjr7nec2rlxyad.onion/tpo/applications/firefox-android)/android-components/plugins/dependencies/src/main/java/Gecko.kt ~ln 12's def of the variable *version*, the date component
|
|
|
export MOZ_BUILD_DATE=20230710165010 # This should match the data in [firefox-android](https://gitlab.torproject.org/tpo/applications/firefox-android)/android-components/plugins/dependencies/src/main/java/Gecko.kt ~ln 12's def of the variable *version*, the date component
|
|
|
export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
|
|
|
export ANDROID_HOME=$HOME/.mozbuild/android-sdk-linux/ # or $HOME/Android/Sdk/ # Or .../android-toolchain/android-sdk-linux if you extract android-toolchain from tor-browser-build
|
|
|
export ANDROID_NDK_HOME=$ANDROID_HOME/ndk/23.2.8568313/ # for 115esr
|
... | ... | @@ -51,7 +51,7 @@ export PATH=/FULL/PATH/TO/tor-browser-build/out/clang/clang-16.x.y-arm/bin/:$PAT |
|
|
|
|
|
For Mac: (default is arm64, note the different paths for x86_64). Make sure to download the appropriate NDK's via Android Studio's SDK manager (you can select the specific version by checking the box in the bottom right that says "Show Package Details") ![Screenshot_2023-11-07_at_14.04.00](uploads/bb5eaa40b39284829fb3f21377c61b6f/Screenshot_2023-11-07_at_14.04.00.png)
|
|
|
```
|
|
|
export MOZ_BUILD_DATE=20230710165010 # This should match the data in [firefox-android](http://eweiibe6tdjsdprb4px6rqrzzcsi22m4koia44kc5pcjr7nec2rlxyad.onion/tpo/applications/firefox-android)/android-components/plugins/dependencies/src/main/java/Gecko.kt ~ln 12's def of the variable *version*, the date component
|
|
|
export MOZ_BUILD_DATE=20230710165010 # This should match the data in [firefox-android](https://gitlab.torproject.org/tpo/applications/firefox-android)/android-components/plugins/dependencies/src/main/java/Gecko.kt ~ln 12's def of the variable *version*, the date component
|
|
|
export JAVA_HOME=/opt/homebrew/opt/openjdk@11/libexec/openjdk.jdk/Contents/Home/ # for arm64. Or JAVA_HOME=/usr/local/opt/openjdk@11/libexec/openjdk.jdk/Contents/Home/ for x86_64.
|
|
|
export ANDROID_HOME=$HOME/Library/Android/sdk # or $HOME/.mozbuild/android-sdk-macosx/
|
|
|
export ANDROID_NDK_HOME=$ANDROID_HOME/ndk/23.2.8568313 # will need to download NDK 23.2.8568313 via android studio
|
... | ... | @@ -116,7 +116,7 @@ and after all this we should be able to confirm by running `ls ~/.m2/repository |
|
|
|
|
|
## Building firefox-android
|
|
|
|
|
|
Get a copy of the repo [firefox-android](http://eweiibe6tdjsdprb4px6rqrzzcsi22m4koia44kc5pcjr7nec2rlxyad.onion/tpo/applications/firefox-android) and check out the relevant build branch (eg: firefox-android-115.2.0-13.0-1)
|
|
|
Get a copy of the repo [firefox-android](https://gitlab.torproject.org/tpo/applications/firefox-android) and check out the relevant build branch (eg: firefox-android-115.2.0-13.0-1)
|
|
|
|
|
|
### Android Components
|
|
|
|
... | ... | |