... | ... | @@ -33,7 +33,26 @@ 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](https://gitlab.torproject.org/tpo/applications/tor-browser) and check out the relevant branch (eg: tor-browser-128.0esr-14.0-2)
|
|
|
clone a copy of [tor-browser](https://gitlab.torproject.org/tpo/applications/tor-browser) and check out the relevant branch (eg: tor-browser-128.5.0esr-14.5-1)
|
|
|
|
|
|
edit `local.properties to have the following changing the `sdk.dir` to be accurate and the mozconfig to reflect the arch you want to build geckoview for
|
|
|
|
|
|
```
|
|
|
|
|
|
Open `tor-browser/local.properties` and fill as follows
|
|
|
|
|
|
```
|
|
|
## This file must *NOT* be checked into Version Control Systems,
|
|
|
# as it contains information specific to your local configuration.
|
|
|
#
|
|
|
# Location of the SDK. This is only used by Gradle.
|
|
|
# For customization when using a Version Control System, please read the
|
|
|
# header note.
|
|
|
#Tue Nov 21 12:54:51 MST 2023
|
|
|
|
|
|
sdk.dir=/home/YOU/Android/Sdk
|
|
|
mozilla-central.mozconfig=./mozconfig-android-aarch64
|
|
|
```
|
|
|
|
|
|
make a copy of `tools/geckoview/android-env-$OS-template.sh` as `tools/geckoview/android-env.sh` and fill it accordingly to your setup with the following
|
|
|
|
... | ... | @@ -96,19 +115,9 @@ rustup target add aarch64-linux-android |
|
|
then build (this may take a while depending on your machine, ranging from 10 minutes to over an hour as of 2023)
|
|
|
|
|
|
```
|
|
|
make build
|
|
|
```
|
|
|
|
|
|
### Packaging and publishing Geckoview for use in Android
|
|
|
|
|
|
we make the fatarr and publish to our local gradle repository with:
|
|
|
|
|
|
```
|
|
|
make package
|
|
|
make geckoview
|
|
|
```
|
|
|
|
|
|
and after all this we should be able to confirm by running `make show` and seeing our new files
|
|
|
|
|
|
### x64 builds
|
|
|
|
|
|
All the make commands can take an `ARCH` override such that you can
|
... | ... | @@ -116,8 +125,7 @@ All the make commands can take an `ARCH` override such that you can |
|
|
```
|
|
|
make clobber ARCH=x64
|
|
|
make config ARCH=x64
|
|
|
make build ARCH=x64
|
|
|
make package ARCH=x64
|
|
|
make geckoview ARCH=x64
|
|
|
```
|
|
|
|
|
|
#### Fetching required build artifacts
|
... | ... | @@ -134,45 +142,39 @@ universal-0.0.3.jar browser noscript-xx.x.x.xpi |
|
|
|
|
|
#### Building fenix
|
|
|
|
|
|
Open `tor-browser/local.properties` and fill as follows
|
|
|
|
|
|
```
|
|
|
## This file must *NOT* be checked into Version Control Systems,
|
|
|
# as it contains information specific to your local configuration.
|
|
|
#
|
|
|
# Location of the SDK. This is only used by Gradle.
|
|
|
# For customization when using a Version Control System, please read the
|
|
|
# header note.
|
|
|
#Tue Nov 21 12:54:51 MST 2023
|
|
|
|
|
|
sdk.dir=/home/YOU/Android/Sdk
|
|
|
mozilla-central.mozconfig=./mozconfig-android-all
|
|
|
```
|
|
|
|
|
|
Open `tor-browser/mobile/android/fenix/local.properties` and fill as follows
|
|
|
|
|
|
```
|
|
|
## This file must _NOT_ be checked into Version Control Systems,
|
|
|
|
|
|
# as it contains information specific to your local configuration.
|
|
|
|
|
|
#
|
|
|
|
|
|
# Location of the SDK. This is only used by Gradle.
|
|
|
|
|
|
# For customization when using a Version Control System, please read the
|
|
|
|
|
|
# header note.
|
|
|
|
|
|
#Tue Jun 27 16:08:20 PDT 2023
|
|
|
|
|
|
sdk.dir=/home/YOU/Android/Sdk
|
|
|
dependencySubstitutions.geckoviewTopobjdir=/FULL/PATH/TO/tor-browser/obj-arm-unknown-linux-androideabi
|
|
|
dependencySubstitutions.geckoviewTopobjdir=/FULL/PATH/TO/tor-browser/obj-aarch64-linux-android
|
|
|
dependencySubstitutions.geckoviewTopsrcdir=/FULL/PATH/TO/tor-browser
|
|
|
autoPublish.android-components.dir=../android-components
|
|
|
org.gradle.java.home=/usr/lib/jvm/java-17-openjdk-amd64/ # Your java home
|
|
|
```
|
|
|
|
|
|
Then `build` and `run` from Android Studio should work
|
|
|
|
|
|
Alternately you can use commands in `tor-browser/tools/geckoview` to `make` the following targets:
|
|
|
|
|
|
- `make fenix-debug`
|
|
|
- `make fenix-nightly`
|
|
|
- `make fenix-beta`
|
|
|
- `make fenix-release`
|
|
|
|
|
|
and to run on a device you can `make`
|
|
|
|
|
|
- `make install-nightly`
|
|
|
- `make install-beta`
|
|
|
- `make install-release`
|
|
|
|
|
|
#### Generating non dev builds (nightly, beta(alpha), release)
|
|
|
|
|
|
As an alternative, you can also build from the command line:
|
... | ... | |