GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

Commit 2d3e92fc authored by sisbell's avatar sisbell Committed by Georg Koppen

Bug 30665: Get Firefox 68 ESR Working with latest android toolchain

Bug 31389: Update Android Firefox to Build with Clang
parent eb5032bf
diff --git a/mobile/android/app/build.gradle b/mobile/android/app/build.gradle
index c8380042d8a9..990fabe05a60 100644
--- a/mobile/android/app/build.gradle
+++ b/mobile/android/app/build.gradle
@@ -225,8 +225,10 @@ dependencies {
implementation "com.android.support:design:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}"
implementation "com.android.support:customtabs:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}"
implementation "com.android.support:palette-v7:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}"
- implementation files('orbotservice-release.aar')
+ implementation files('android-release.aar')
+ implementation files('universal-0.0.3.jar')
implementation files('jsocksAndroid-release.aar')
+ implementation files('service-release.aar')
if (mozconfig.substs.MOZ_NATIVE_DEVICES) {
implementation "com.android.support:mediarouter-v7:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}"
@@ -265,9 +267,10 @@ dependencies {
// Including the Robotium JAR directly can cause issues with dexing.
androidTestImplementation 'com.jayway.android.robotium:robotium-solo:5.5.4'
- // Orbotservice
- implementation 'org.torproject:tor-android-binary:0.3.4.9'
- implementation 'com.jrummyapps:android-shell:1.0.1'
+ //tor-android-service
+ implementation 'net.freehaven.tor.control:jtorctl:0.2'
+ implementation 'org.slf4j:slf4j-api:1.7.25'
+ implementation 'org.slf4j:slf4j-android:1.7.25'
}
// TODO: (bug 1261486): This impl is not robust -
diff --git a/python/mozboot/mozboot/android-packages.txt b/python/mozboot/mozboot/android-packages.txt
index ac947a72f410..1a9aa21cb5d8 100644
--- a/python/mozboot/mozboot/android-packages.txt
+++ b/python/mozboot/mozboot/android-packages.txt
@@ -1,5 +1,3 @@
platform-tools
build-tools;27.0.3
platforms;android-28
-emulator
-docs
diff --git a/build/moz.configure/android-sdk.configure b/build/moz.configure/android-sdk.configure
index a8ecc617850d..0a58597e2646 100644
--- a/build/moz.configure/android-sdk.configure
+++ b/build/moz.configure/android-sdk.configure
@@ -87,10 +87,6 @@ def android_platform_tools(sdk_root):
tools)
-@depends(android_sdk_root)
-def android_emulator_path(sdk_root):
- return [os.path.join(sdk_root, 'emulator')]
-
@template
def check_android_tools(tool, tool_dir):
@@ -108,7 +104,6 @@ def check_android_tools(tool, tool_dir):
check_android_tools('zipalign', android_build_tools)
check_android_tools('adb', android_platform_tools)
-check_android_tools('emulator', android_emulator_path)
set_config('ANDROID_SDK_ROOT', android_sdk_root)
set_config('ANDROID_TOOLS', android_tools)
......@@ -29,7 +29,7 @@ export PATH="/var/tmp/dist/rust/bin:/var/tmp/dist/cbindgen:/var/tmp/dist/nasm/bi
tar -C /var/tmp/dist -xf [% c('input_files_by_name/clang') %]
export LLVM_CONFIG="/var/tmp/dist/clang/bin/llvm-config"
[% IF c("var/linux") %]
[% IF c("var/linux") || c("var/android") %]
tar -C /var/tmp/dist -xf $rootdir/[% c('input_files_by_name/binutils') %]
export PATH="/var/tmp/dist/binutils/bin:$PATH"
# Use clang for everything on Linux now.
......@@ -53,19 +53,24 @@ mv -f $rootdir/[% c('input_files_by_name/mozconfig') %] .mozconfig
export ASAN_OPTIONS="detect_leaks=0"
[% END -%]
[% IF c("var/android-armv7") -%]
cp /var/tmp/dist/android-toolchain/android-ndk/arm/lib64/libclang.so.6 /var/tmp/dist/android-toolchain/android-ndk/arm/lib64/libclang.so
[% END -%]
[% IF c("var/android") %]
gradle_repo=/var/tmp/dist/gradle-dependencies
export GRADLE_MAVEN_REPOSITORIES="file://$gradle_repo"
export GRADLE_FLAGS="--no-daemon --offline"
# Move Gradle Repo to hard-coded location. This location is embedded in the file
# chrome/toolkit/content/global/buildconfig.html so needs to be standard for reproducibility
mv $rootdir/[% c('input_files_by_name/gradle-dependencies') %] $gradle_repo
cp -r $gradle_repo/plugins-release/* $gradle_repo
cp -r $gradle_repo/maven2/* $gradle_repo
cp -r $gradle_repo/m2/* $gradle_repo
# Move Android library dependencies so they will be included in the apk during the build
cp $rootdir/[% c('input_files_by_name/topl') %]/* mobile/android/app
cp $rootdir/[% c('input_files_by_name/tor-android-service') %]/* mobile/android/app
# Apply patches
patch -p1 < $rootdir/android-dependencies.patch
patch -p1 < $rootdir/android-packages.patch
patch -p1 < $rootdir/android-remove-emulator.patch
# Prepare building the multi-locale .apk including our own strings
mkdir -p /var/tmp/dist/locales
......@@ -88,12 +93,6 @@ fi
export LDFLAGS="-Wl,--no-insert-timestamp"
[% END -%]
# Backporting a sec-high bugfix to ESR 60, but making sure it is only applied to
# mobile, as desktop ESR has not seen any testing with this mobile-related patch
[% IF c("var/android") %]
patch -p1 < $rootdir/1527534.patch
[% END -%]
[% IF ! c("var/android") %]
# Place a copy of the Tor Launcher sources under browser/extensions
tar -C browser/extensions -xf $rootdir/[% c('input_files_by_name/tor-launcher') %]
......@@ -102,7 +101,9 @@ fi
rm -f configure
rm -f js/src/configure
./mach configure --with-tor-browser-version=[% c("var/torbrowser_version") %] --with-distribution-id=org.torproject --enable-update-channel=[% c("var/torbrowser_update_channel") %] --enable-bundled-fonts --with-branding=[% c("var/branding_directory") %]
# Android does not support --enable-bundled-fonts option
./mach configure --with-tor-browser-version=[% c("var/torbrowser_version") %] --with-distribution-id=org.torproject --enable-update-channel=[% c("var/torbrowser_update_channel") %] [% IF ! c("var/android") %]--enable-bundled-fonts[% END -%] --with-branding=[% c("var/branding_directory") %]
# Don't build with --verbose anymore or otherwise Stylo compilation breaks on
# Linux. See: #30321 for details.
./mach build
......
......@@ -28,7 +28,7 @@ var:
container:
use_container: 1
# this should be updated when the list of gradle dependencies is changed
gradle_dependencies_version: 5
gradle_dependencies_version: 6
# used by projects/firefox-locale-bundle
l10n-changesets.json: '[% exec("cat mobile/locales/l10n-changesets.json") %]'
......@@ -135,7 +135,7 @@ input_files:
name: mozconfig
- project: binutils
name: binutils
enable: '[% c("var/linux") %]'
enable: '[% c("var/linux") || c("var/android") %]'
- filename: fix-info-plist.py
enable: '[% c("var/osx") %]'
- filename: nsis-uninstall.patch
......@@ -172,7 +172,9 @@ input_files:
- project: tor-onion-proxy-library
name: topl
enable: '[% c("var/android") %]'
- filename: android-dependencies.patch
- filename: android-packages.patch
enable: '[% c("var/android") %]'
- filename: android-remove-emulator.patch
enable: '[% c("var/android") %]'
- project: firefox-locale-bundle
name: firefox-locale-bundle
......
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-aarch64-linux-android
mk_add_options MOZ_APP_DISPLAYNAME="Tor Browser"
export MOZILLA_OFFICIAL=1
CC="clang"
CXX="clang++"
ac_add_options --enable-optimize
ac_add_options --enable-official-branding
......@@ -9,13 +11,9 @@ ac_add_options --enable-application=mobile/android
ac_add_options --target=aarch64-linux-android
ac_add_options --with-android-ndk=/var/tmp/dist/android-toolchain/android-ndk
ac_add_options --with-android-sdk=/var/tmp/dist/android-toolchain/android-sdk-linux
ac_add_options --with-gradle=/var/tmp/dist/android-toolchain/gradle/gradle-4.1/bin/gradle
ac_add_options --with-gradle=/var/tmp/dist/android-toolchain/gradle/gradle-4.10.2/bin/gradle
ac_add_options --with-android-version=21
# Android NDK does not contain llvm-config so set clang path in options
ac_add_options --with-libclang-path=/var/tmp/dist/android-toolchain/android-ndk/arm64/lib64
ac_add_options --with-clang-path=/var/tmp/dist/android-toolchain/android-ndk/arm64/bin/clang
ac_add_options --with-android-distribution-directory=@TOPSRCDIR@/mobile/android/torbrowser
ac_add_options --with-l10n-base=/var/tmp/dist/locales
......@@ -40,11 +38,7 @@ ac_add_options --enable-strip
ac_add_options --disable-tests
ac_add_options --disable-debug
ac_add_options --disable-rust-debug
ac_add_options --disable-maintenance-service
ac_add_options --disable-crashreporter
ac_add_options --disable-webrtc
ac_add_options --without-google-play-services
# Let's make sure no preference is enabling either Adobe's or Google's CDM.
ac_add_options --disable-eme
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-arm-linux-androideabi
mk_add_options MOZ_APP_DISPLAYNAME="Tor Browser"
export MOZILLA_OFFICIAL=1
CC="clang"
CXX="clang++"
ac_add_options --enable-optimize
ac_add_options --enable-official-branding
......@@ -9,13 +11,9 @@ ac_add_options --enable-application=mobile/android
ac_add_options --target=arm-linux-androideabi
ac_add_options --with-android-ndk=/var/tmp/dist/android-toolchain/android-ndk
ac_add_options --with-android-sdk=/var/tmp/dist/android-toolchain/android-sdk-linux
ac_add_options --with-gradle=/var/tmp/dist/android-toolchain/gradle/gradle-4.1/bin/gradle
ac_add_options --with-gradle=/var/tmp/dist/android-toolchain/gradle/gradle-4.10.2/bin/gradle
ac_add_options --with-android-version=16
# Android NDK does not contain llvm-config so set clang path in options
ac_add_options --with-libclang-path=/var/tmp/dist/android-toolchain/android-ndk/arm/lib64
ac_add_options --with-clang-path=/var/tmp/dist/android-toolchain/android-ndk/arm/bin/clang
ac_add_options --with-android-distribution-directory=@TOPSRCDIR@/mobile/android/torbrowser
ac_add_options --with-l10n-base=/var/tmp/dist/locales
......@@ -40,11 +38,7 @@ ac_add_options --enable-strip
ac_add_options --disable-tests
ac_add_options --disable-debug
ac_add_options --disable-rust-debug
ac_add_options --disable-maintenance-service
ac_add_options --disable-crashreporter
ac_add_options --disable-webrtc
ac_add_options --without-google-play-services
# Let's make sure no preference is enabling either Adobe's or Google's CDM.
ac_add_options --disable-eme
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-i386-linux-android
mk_add_options MOZ_APP_DISPLAYNAME="Tor Browser"
export MOZILLA_OFFICIAL=1
CC="clang"
CXX="clang++"
ac_add_options --enable-optimize
ac_add_options --enable-official-branding
ac_add_options --enable-application=mobile/android
ac_add_options --target=i386-linux-android
ac_add_options --target=i686-linux-android
ac_add_options --with-android-ndk=/var/tmp/dist/android-toolchain/android-ndk
ac_add_options --with-android-sdk=/var/tmp/dist/android-toolchain/android-sdk-linux
ac_add_options --with-gradle=/var/tmp/dist/android-toolchain/gradle/gradle-4.1/bin/gradle
ac_add_options --with-gradle=/var/tmp/dist/android-toolchain/gradle/gradle-4.10.2/bin/gradle
ac_add_options --with-android-version=16
# Android NDK does not contain llvm-config so set clang path in options
ac_add_options --with-libclang-path=/var/tmp/dist/android-toolchain/android-ndk/x86/lib64
ac_add_options --with-clang-path=/var/tmp/dist/android-toolchain/android-ndk/x86/bin/clang
ac_add_options --with-android-distribution-directory=@TOPSRCDIR@/mobile/android/torbrowser
ac_add_options --with-l10n-base=/var/tmp/dist/locales
......@@ -40,11 +38,7 @@ ac_add_options --enable-strip
ac_add_options --disable-tests
ac_add_options --disable-debug
ac_add_options --disable-rust-debug
ac_add_options --disable-maintenance-service
ac_add_options --disable-crashreporter
ac_add_options --disable-webrtc
ac_add_options --without-google-play-services
# Let's make sure no preference is enabling either Adobe's or Google's CDM.
ac_add_options --disable-eme
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment