... | ... | @@ -35,7 +35,7 @@ Geckoview is the core browser engine. It will be compiled for android and prepar |
|
|
|
|
|
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
|
|
|
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
|
|
|
|
|
|
|
|
|
For Linux:
|
... | ... | @@ -62,8 +62,6 @@ export PATH=$ANDROID_HOME/ndk/25.2.9519653/toolchains/llvm/prebuilt/darwin-x86_6 |
|
|
|
|
|
Make sure that the variables defined are all valid for your setup, and that PATH is now using our newly built clang.
|
|
|
|
|
|
Then `source android-env.sh` to include
|
|
|
|
|
|
<details>
|
|
|
<summary>You may want to run `./mach bootstrap` the first time to get some deps</summary>
|
|
|
|
... | ... | @@ -73,8 +71,9 @@ Select "3", installing deps as recommended. This will also populate some ~/.mozb |
|
|
To build:
|
|
|
|
|
|
```
|
|
|
MOZCONFIG=mozconfig-android-aarch64 ./mach clobber
|
|
|
MOZCONFIG=mozconfig-android-aarch64 ./mach configure --without-wasm-sandboxed-libraries
|
|
|
cd tools/geckoview
|
|
|
make clobber
|
|
|
make configure
|
|
|
```
|
|
|
|
|
|
<details>
|
... | ... | @@ -89,7 +88,7 @@ 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)
|
|
|
|
|
|
```
|
|
|
MOZCONFIG=mozconfig-android-aarch64 ./mach build
|
|
|
make build
|
|
|
```
|
|
|
|
|
|
### Packaging and publishing Geckoview for use in Android
|
... | ... | @@ -97,22 +96,28 @@ MOZCONFIG=mozconfig-android-aarch64 ./mach build |
|
|
First we make a "fat aar"
|
|
|
|
|
|
```
|
|
|
MOZCONFIG=mozconfig-android-all ./mach clobber
|
|
|
cd tools/torbrowser
|
|
|
env ARCHS=aarch64 make fat-aar
|
|
|
cd ../..
|
|
|
make fataar
|
|
|
```
|
|
|
|
|
|
and then we publish to our local gradle repository
|
|
|
|
|
|
```
|
|
|
MOZCONFIG=mozconfig-android-aarch64 ./mach build binaries
|
|
|
MOZCONFIG=mozconfig-android-aarch64 ./mach gradle geckoview:publishWithGeckoBinariesDebugPublicationToMavenRepository
|
|
|
|
|
|
MOZCONFIG=mozconfig-android-all ./mach gradle geckoview:publishWithGeckoBinariesDebugPublicationToMavenLocal exoplayer2:publishDebugPublicationToMavenLocal
|
|
|
make package
|
|
|
```
|
|
|
|
|
|
and after all this we should be able to confirm by running `ls ~/.m2/repository/org/mozilla/geckoview/geckoview-default-omni` and seeing our new files
|
|
|
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
|
|
|
|
|
|
```
|
|
|
make clobber ARCH=x64
|
|
|
make config ARCH=x64
|
|
|
make build ARCH=x64
|
|
|
make fataar ARCH=x64
|
|
|
make package ARCH=x64
|
|
|
```
|
|
|
|
|
|
## Building firefox-android
|
|
|
|
... | ... | |