Skip to content
Open
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
91c3068
test
mcleinman Aug 19, 2025
62daf83
this builds
mcleinman Aug 20, 2025
b5f54af
remove unneeded
mcleinman Aug 20, 2025
21192d8
more
mcleinman Aug 22, 2025
f136094
improve gradle
mcleinman Sep 3, 2025
0f63726
back out unneeded changes
mcleinman Sep 3, 2025
e0bede6
Bump taskcluster android version
strseb Sep 16, 2025
44db40d
Bump sdk cmake version
strseb Sep 16, 2025
9406c99
Bump clang-tidy
strseb Sep 16, 2025
fb6c946
Bump junit
strseb Sep 16, 2025
d931e67
Debug the toolchain task
strseb Sep 16, 2025
cc4aee4
Fix aqt script
strseb Sep 17, 2025
e1405e9
Honestly why is qt renaming folders ...
strseb Sep 17, 2025
879d2d0
We have built an apk, but where is it?
strseb Sep 17, 2025
4e06f19
Un-Break all other builds
strseb Sep 17, 2025
886a727
Remove bloat and fixup class hirachy
Sep 17, 2025
d6033b4
WIP: DIY a context provider
strseb Sep 17, 2025
c8bde3b
CHANT THE DARK INCANTATION, I SUMMON THEE
Sep 22, 2025
d8e1a7a
Rip out non needed changes part 1
Sep 23, 2025
70ecf15
Fix lifetimes
strseb Sep 23, 2025
07b9c98
That was also not needed
strseb Sep 23, 2025
edfa5f1
Put things back i removed
strseb Sep 23, 2025
dd2548b
Cross-compile issues
strseb Sep 23, 2025
7cfd996
more cross compile issues
strseb Sep 23, 2025
c2be0d3
Fix includes
strseb Sep 23, 2025
a384a3f
fix windows
strseb Sep 23, 2025
77f2641
Have you seen my apk?
strseb Sep 25, 2025
499e18d
small change to get another taskcluster build
mcleinman Oct 28, 2025
b7b7cec
Merge branch 'main' into vpn-6766-android-qt-6.9
mcleinman Oct 30, 2025
5a4f6ac
linters
mcleinman Oct 30, 2025
45a4bca
fix build
mcleinman Oct 30, 2025
00049f7
android fix
mcleinman Oct 30, 2025
9e19eca
Merge branch 'main' into vpn-6766-android-qt-6.9
mcleinman Nov 4, 2025
b28f823
make tests pass
mcleinman Nov 4, 2025
817aad1
Merge branch 'vpn-6766-android-qt-6.9' of github.com:mozilla-mobile/m…
mcleinman Nov 4, 2025
118932d
linter
mcleinman Nov 4, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ CMakeUserPresets.json
cmake_install.cmake
CMakeCache.txt
CMakeFiles/
compile_commands.json
lottie/lottie_autogen/
lottie/liblottie.a
nebula/nebula_autogen/
Expand Down
2 changes: 1 addition & 1 deletion 3rdparty/i18n
Submodule i18n updated 104 files
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ set_property(GLOBAL PROPERTY AUTOGEN_TARGETS_FOLDER "Autogen")
set_property(GLOBAL PROPERTY AUTOMOC_TARGETS_FOLDER "Autogen")
set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER "Autogen")

find_package(Qt6 COMPONENTS
find_package(Qt6 REQUIRED COMPONENTS
Core
Gui
Network
Expand All @@ -160,6 +160,10 @@ if(QT_KNOWN_POLICY_QTP0001)
qt_policy(SET QTP0001 NEW)
endif()

if(QT_KNOWN_POLICY_QTP0004)
qt_policy(SET QTP0004 OLD)
endif()

message("Using Qt version ${Qt6_VERSION}")
add_definitions(-DQT_DEPRECATED_WARNINGS)
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050F00)
Expand Down
5 changes: 2 additions & 3 deletions android/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
-->
<manifest package="org.mozilla.firefox.vpn" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="-- %%INSERT_VERSION_NAME%% --" android:versionCode="-- %%INSERT_VERSION_CODE%% --" android:installLocation="auto">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="-- %%INSERT_VERSION_NAME%% --" android:versionCode="-- %%INSERT_VERSION_CODE%% --" android:installLocation="auto">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
Expand All @@ -25,7 +25,6 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
android:allowBackup="false"
android:name="org.mozilla.firefox.qt.common.CoreApplication"
android:label="Mozilla VPN"
android:extractNativeLibs="true"
android:theme="@style/AppTheme"
android:icon="@mipmap/vpnicon"
android:networkSecurityConfig="@xml/network_security_config">
Expand Down Expand Up @@ -64,7 +63,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.

</activity>
<service
android:name=".daemon.VPNTileService"
android:name="org.mozilla.firefox.vpn.daemon.VPNTileService"
android:label="@string/product_name"
android:icon="@drawable/ic_mozvpn_round"
android:exported="true"
Expand Down
2 changes: 1 addition & 1 deletion android/adjust/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<manifest package="com.adjust" xmlns:android="http://schemas.android.com/apk/res/android"></manifest>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"></manifest>
3 changes: 2 additions & 1 deletion android/adjust/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ android {
java.srcDirs = ['src']
}
}
namespace 'com.adjust'

buildFeatures {
buildConfig = true
}
}
}
10 changes: 6 additions & 4 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ apply plugin: 'kotlinx-serialization'
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
implementation project(path: ':daemon')
implementation project(path: ':qtBindings')
implementation project(path: ':vpnClient')

coreLibraryDesugaring SharedDependencies.com_android_tools_desugar_jdk_libs
Expand All @@ -52,10 +51,13 @@ dependencies {
android {
ndkVersion Config.ndkVersion
compileSdkVersion Config.compileSdkVersion
buildToolsVersion Config.buildToolsVersion

dexOptions {
javaMaxHeapSize "3g"
namespace 'org.mozilla.firefox.vpn'

packagingOptions {
jniLibs {
useLegacyPackaging = true
}
}

sourceSets {
Expand Down
2 changes: 1 addition & 1 deletion android/buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import org.gradle.kotlin.dsl.`kotlin-dsl`

plugins {
// Required workaround for: https://github.com/gradle/gradle/issues/16345
`kotlin-dsl`.version("2.3.3")
`kotlin-dsl`.version("5.2.0")
}
repositories {
mavenCentral()
Expand Down
1 change: 0 additions & 1 deletion android/buildSrc/src/main/kotlin/Config.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

object Config {
const val compileSdkVersion = 34
const val buildToolsVersion = "30.0.3"
const val minSdkVersion = 26
const val targetSdkVersion = 34
const val ndkVersion = "27.2.12479018"
Expand Down
2 changes: 1 addition & 1 deletion android/buildSrc/src/main/kotlin/SharedDependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

// Dependencies used by at least more then 1 Subproject.
object SharedDependencies {
const val com_android_tools_build_gradle = "com.android.tools.build:gradle:7.4.2"
const val com_android_tools_build_gradle = "com.android.tools.build:gradle:8.12.0"
const val androidx_core = "androidx.core:core-ktx:1.12.0"
const val com_android_tools_desugar_jdk_libs = "com.android.tools:desugar_jdk_libs:2.0.4"
}
11 changes: 8 additions & 3 deletions android/common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {
}

android {
//namespace 'org.mozilla.firefox.vpn.common'

compileSdkVersion Config.compileSdkVersion

defaultConfig {
Expand All @@ -21,6 +21,12 @@ android {
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

namespace 'org.mozilla.firefox.qt.common'

buildFeatures {
buildConfig true
}

buildTypes {
release {
minifyEnabled false
Expand All @@ -37,15 +43,14 @@ android {

dependencies {
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation project(path: ':qtBindings')
implementation fileTree(dir: '../libs', include: ['*.jar', '*.aar'])
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

implementation 'org.bouncycastle:bcprov-jdk15on:1.70'

implementation project(path: ':qtglean')
implementation project(path: ':qtBindings')
implementation project(path: ':adjust')

implementation "androidx.security:security-crypto:1.1.0-alpha06"
Expand Down
5 changes: 2 additions & 3 deletions android/common/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.mozilla.firefox.qt.common">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

</manifest>
</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ import android.os.Bundle
import android.util.Log
import androidx.work.Configuration
import com.adjust.sdk.*
import org.mozilla.firefox.qt.common.BuildConfig
import org.qtproject.qt.android.QtApplicationBase

/**
* CoreApplication - extends QtApplication with callbacks to hook in adjust and
* a privacy proxy that minimizes tracking.
*/
class CoreApplication : org.qtproject.qt.android.bindings.QtApplication(), Configuration.Provider {
class CoreApplication : org.qtproject.qt.android.QtApplicationBase(), Configuration.Provider {
override val workManagerConfiguration: Configuration
get() = Configuration.Builder()
// This is required for Glean to be able to enqueue the PingUploadWorker
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import java.security.KeyFactory
import java.security.Signature
import java.security.spec.RSAPublicKeySpec
import java.util.*
import org.mozilla.firefox.qt.common.BuildConfig

// Companion for Utils.cpp
object Utils {
Expand Down
9 changes: 9 additions & 0 deletions android/daemon/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@ android {
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

namespace 'org.mozilla.firefox.vpn.daemon'


packagingOptions {
jniLibs {
useLegacyPackaging = true
}
}

buildFeatures {
buildConfig = true
}
Expand Down
8 changes: 4 additions & 4 deletions android/daemon/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.mozilla.firefox.vpn.daemon">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_SYSTEM_EXEMPTED" />

<application>
<service android:name=".VPNService"
<service android:name="org.mozilla.firefox.vpn.daemon.VPNService"
android:permission="android.permission.BIND_VPN_SERVICE"
android:foregroundServiceType="systemExempted"
android:process=":Daemon"
Expand All @@ -15,7 +14,7 @@
<action android:name="android.net.VpnService"/>
</intent-filter>
</service>
<receiver android:name=".BootReceiver"
<receiver android:name="org.mozilla.firefox.vpn.daemon.BootReceiver"
android:exported="true">
<intent-filter
android:priority="2147483647">
Expand All @@ -25,3 +24,4 @@
</receiver>
</application>
</manifest>

Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import android.content.Context
import java.io.File
import java.time.LocalDateTime
import android.util.Log as nativeLog
import org.mozilla.firefox.vpn.daemon.BuildConfig

/*
* Drop in replacement for android.util.Log
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import org.mozilla.firefox.vpn.daemon.GleanMetrics.Session
import org.mozilla.guardian.tunnel.WireGuardGo
import java.io.File
import java.util.*
import org.mozilla.firefox.vpn.daemon.BuildConfig

class VPNService : android.net.VpnService() {
private val tag = "VPNService"
Expand Down
1 change: 0 additions & 1 deletion android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ android.enableJetifier=true
android.jetifier.ignorelist=bcprov
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
android.bundle.enableUncompressedNativeLibs=false
buildDir=build
org.gradle.caching=false
org.gradle.parallel=true
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip
9 changes: 0 additions & 9 deletions android/qtBindings/AndroidManifest.xml

This file was deleted.

43 changes: 0 additions & 43 deletions android/qtBindings/build.gradle

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ dependencyResolutionManagement {
include ':tunnel'
include ':qtglean'
include ':daemon'
include ':qtBindings'
include ':ClientCommon'
include ':vpnClient'
include ':common'
Expand Down
3 changes: 1 addition & 2 deletions android/tunnel/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ fun getGoEnvArgsForNdkBuild(project: Project): Map<String, String> {
val goPathProp = localProperties.getProperty("go.path") // Expect directory containing 'go'

// Determine Go executable path (respecting property > PATH > default 'go')
val goExeName = "go" + if (System.getProperty("os.name").toLowerCase().contains("windows")) ".exe" else ""
val goExeName = "go" + if (System.getProperty("os.name").lowercase().contains("windows")) ".exe" else ""
val goExePath =
if (!goPathProp.isNullOrBlank()) {
project
Expand Down Expand Up @@ -58,7 +58,6 @@ android {

defaultConfig {
minSdk = 24
targetSdk = Config.targetSdkVersion

externalNativeBuild {
cmake {
Expand Down
4 changes: 2 additions & 2 deletions android/vpnClient/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ plugins {
}

android {
//namespace 'org.mozilla.firefox.vpn'
namespace 'org.mozilla.firefox.vpn.qt'
compileSdkVersion Config.compileSdkVersion

defaultConfig {
Expand Down Expand Up @@ -86,8 +86,8 @@ dependencies {
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

implementation project(path: ":common")
implementation project(path: ":qtBindings")

implementation fileTree(dir: '../libs', include: ['*.jar', '*.aar'])

implementation SharedDependencies.androidx_core
implementation "com.android.installreferrer:installreferrer:2.2"
Expand Down
Loading