Skip to content
This repository was archived by the owner on Dec 23, 2024. It is now read-only.

Commit 5c9e7a2

Browse files
Fennec 128.0.0
Signed-off-by: Tavi <[email protected]>
1 parent 28af5a5 commit 5c9e7a2

File tree

4 files changed

+84
-80
lines changed

4 files changed

+84
-80
lines changed

fenix-liberate.patch

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
diff -r cfd3e02d8411 mobile/android/fenix/app/build.gradle
2-
--- a/mobile/android/fenix/app/build.gradle Thu Jun 06 18:17:11 2024 +0000
3-
+++ b/mobile/android/fenix/app/build.gradle Thu Jun 13 09:01:09 2024 +0300
1+
diff -r 14b32d530926 mobile/android/fenix/app/build.gradle
2+
--- a/mobile/android/fenix/app/build.gradle Thu Jul 04 12:11:31 2024 +0000
3+
+++ b/mobile/android/fenix/app/build.gradle Tue Jul 09 12:12:48 2024 -0400
44
@@ -643,7 +643,6 @@
55

66
implementation project(':lib-crash')
@@ -9,7 +9,7 @@ diff -r cfd3e02d8411 mobile/android/fenix/app/build.gradle
99
implementation project(':lib-state')
1010
implementation project(':lib-dataprotect')
1111
testImplementation project(':support-test-fakes')
12-
@@ -686,15 +685,8 @@
12+
@@ -687,15 +686,8 @@
1313
implementation FenixDependencies.protobuf_javalite
1414
implementation ComponentsDependencies.google_material
1515

@@ -19,8 +19,8 @@ diff -r cfd3e02d8411 mobile/android/fenix/app/build.gradle
1919
implementation FenixDependencies.google_ads_id // Required for the Google Advertising ID
2020

2121
- // Required for in-app reviews
22-
- implementation FenixDependencies.google_play_review
23-
- implementation FenixDependencies.google_play_review_ktx
22+
- implementation ComponentsDependencies.play_review
23+
- implementation ComponentsDependencies.play_review_ktx
2424
-
2525
implementation FenixDependencies.androidx_profileinstaller
2626

@@ -928,27 +928,25 @@ diff -r cfd3e02d8411 mobile/android/fenix/app/src/main/res/xml/site_permissions_
928928
app:allowDividerBelow="true"/>
929929

930930
<androidx.preference.Preference
931-
diff -r cfd3e02d8411 mobile/android/fenix/plugins/fenixdependencies/src/main/java/FenixDependenciesPlugin.kt
932-
--- a/mobile/android/fenix/plugins/fenixdependencies/src/main/java/FenixDependenciesPlugin.kt Thu Jun 06 18:17:11 2024 +0000
933-
+++ b/mobile/android/fenix/plugins/fenixdependencies/src/main/java/FenixDependenciesPlugin.kt Thu Jun 13 09:01:09 2024 +0300
934-
@@ -25,16 +25,9 @@
935-
const val androidx_transition = "1.5.0"
931+
diff -r 14b32d530926 mobile/android/fenix/plugins/fenixdependencies/src/main/java/FenixDependenciesPlugin.kt
932+
--- a/mobile/android/fenix/plugins/fenixdependencies/src/main/java/FenixDependenciesPlugin.kt Thu Jul 04 12:11:31 2024 +0000
933+
+++ b/mobile/android/fenix/plugins/fenixdependencies/src/main/java/FenixDependenciesPlugin.kt Tue Jul 09 12:12:48 2024 -0400
934+
@@ -26,14 +26,9 @@
935+
const val androidx_viewpager2 = "1.1.0"
936936
const val google_accompanist = "0.32.0"
937937

938938
- const val adjust = "4.38.2"
939939
- const val installreferrer = "2.2"
940940
-
941941
const val junit = "5.10.2"
942-
const val mockk = "1.13.10"
942+
const val mockk = "1.13.11"
943943

944944
- const val google_ads_id_version = "16.0.0"
945-
-
946-
- const val google_play_review_version = "2.0.1"
947945
-
948946
// keep in sync with the versions used in AS.
949947
const val protobuf = "3.21.10"
950948
const val protobuf_plugin = "0.9.4"
951-
@@ -58,9 +51,6 @@
949+
@@ -58,9 +53,6 @@
952950
const val protobuf_javalite = "com.google.protobuf:protobuf-javalite:${FenixVersions.protobuf}"
953951
const val protobuf_compiler = "com.google.protobuf:protoc:${FenixVersions.protobuf}"
954952

@@ -958,15 +956,11 @@ diff -r cfd3e02d8411 mobile/android/fenix/plugins/fenixdependencies/src/main/jav
958956
const val mockk = "io.mockk:mockk:${FenixVersions.mockk}"
959957
const val mockk_android = "io.mockk:mockk-android:${FenixVersions.mockk}"
960958
const val falcon = "com.jraska:falcon:${FenixVersions.falcon}"
961-
@@ -83,11 +73,7 @@
959+
@@ -83,7 +75,7 @@
962960
// Test services is unused
963961
// --- END AndroidX test dependencies --- //
964962

965963
- const val google_ads_id = "com.google.android.gms:play-services-ads-identifier:${FenixVersions.google_ads_id_version}"
966-
-
967-
- // Required for in-app reviews
968-
- const val google_play_review = "com.google.android.play:review:${FenixVersions.google_play_review_version}"
969-
- const val google_play_review_ktx = "com.google.android.play:review-ktx:${FenixVersions.google_play_review_version}"
970964
+ const val google_ads_id = "org.microg.gms:play-services-ads-identifier:0.3.2.240913"
971965

972966
const val junitApi = "org.junit.jupiter:junit-jupiter-api:${FenixVersions.junit}"

gecko-liberate.patch

Lines changed: 58 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -5,76 +5,76 @@ diff -r d80eefe94738 mobile/android/geckoview/build.gradle
55
implementation "androidx.annotation:annotation:1.6.0"
66
implementation "androidx.legacy:legacy-support-v4:1.0.0"
77

8-
- implementation "com.google.android.gms:play-services-fido:20.0.1"
8+
- implementation "com.google.android.gms:play-services-fido:21.1.0"
99
+ implementation "org.microg.gms:play-services-fido:0.3.2.240913"
1010
implementation "org.yaml:snakeyaml:2.2"
1111

1212
implementation "androidx.lifecycle:lifecycle-common:2.6.1"
13-
diff -r d80eefe94738 mobile/android/geckoview/src/main/java/org/mozilla/geckoview/WebAuthnTokenManager.java
14-
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/WebAuthnTokenManager.java Tue Nov 28 21:01:37 2023 +0000
15-
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/WebAuthnTokenManager.java Fri Dec 15 11:32:38 2023 +0300
16-
@@ -260,27 +260,15 @@
13+
diff -r 14b32d530926 mobile/android/geckoview/src/main/java/org/mozilla/geckoview/WebAuthnTokenManager.java
14+
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/WebAuthnTokenManager.java Thu Jul 04 12:11:31 2024 +0000
15+
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/WebAuthnTokenManager.java Tue Jul 09 11:44:11 2024 -0400
16+
@@ -193,27 +193,14 @@
1717

18-
final Task<PendingIntent> intentTask;
18+
final Task<PendingIntent> intentTask;
1919

20-
- if (BuildConfig.MOZILLA_OFFICIAL) {
21-
- // Certain Fenix builds and signing keys are whitelisted for Web Authentication.
22-
- // See https://wiki.mozilla.org/Security/Web_Authentication
23-
- //
24-
- // Third party apps will need to get whitelisted themselves.
25-
- final Fido2PrivilegedApiClient fidoClient =
26-
- Fido.getFido2PrivilegedApiClient(GeckoAppShell.getApplicationContext());
27-
+ // The privileged FIDO2 API normally is restricted to apps with package
28-
+ // names and signatures that Google knows to be a browser. microG does not
29-
+ // have such a list, instead it asks the user to confirm that the app doing
30-
+ // the request is indeed a browser app (only for the first request from
31-
+ // that app).
32-
+ final Fido2PrivilegedApiClient fidoClient =
33-
+ Fido.getFido2PrivilegedApiClient(GeckoAppShell.getApplicationContext());
34-
35-
- intentTask = fidoClient.getRegisterPendingIntent(browserOptions);
36-
- } else {
37-
- // For non-official builds, websites have to opt-in to permit the
38-
- // particular version of Gecko to perform WebAuthn operations on
39-
- // them. See https://developers.google.com/digital-asset-links
40-
- // for the general form, and Step 1 of
41-
- // https://developers.google.com/identity/fido/android/native-apps
42-
- // for details about doing this correctly for the FIDO2 API.
43-
- final Fido2ApiClient fidoClient =
44-
- Fido.getFido2ApiClient(GeckoAppShell.getApplicationContext());
20+
- if (BuildConfig.MOZILLA_OFFICIAL) {
21+
- // Certain Fenix builds and signing keys are whitelisted for Web Authentication.
22+
- // See https://wiki.mozilla.org/Security/Web_Authentication
23+
- //
24+
- // Third party apps will need to get whitelisted themselves.
25+
- final Fido2PrivilegedApiClient fidoClient =
26+
- Fido.getFido2PrivilegedApiClient(GeckoAppShell.getApplicationContext());
4527
-
46-
- intentTask = fidoClient.getRegisterPendingIntent(requestOptions);
47-
- }
48-
+ intentTask = fidoClient.getRegisterPendingIntent(browserOptions);
49-
50-
final GeckoResult<MakeCredentialResponse> result = new GeckoResult<>();
28+
- intentTask = fidoClient.getRegisterPendingIntent(browserOptions);
29+
- } else {
30+
- // For non-official builds, websites have to opt-in to permit the
31+
- // particular version of Gecko to perform WebAuthn operations on
32+
- // them. See https://developers.google.com/digital-asset-links
33+
- // for the general form, and Step 1 of
34+
- // https://developers.google.com/identity/fido/android/native-apps
35+
- // for details about doing this correctly for the FIDO2 API.
36+
- final Fido2ApiClient fidoClient =
37+
- Fido.getFido2ApiClient(GeckoAppShell.getApplicationContext());
38+
-
39+
- intentTask = fidoClient.getRegisterPendingIntent(requestOptions);
40+
- }
41+
+ // The privileged FIDO2 API normally is restricted to apps with package
42+
+ // names and signatures that Google knows to be a browser. microG does not
43+
+ // have such a list, instead it asks the user to confirm that the app doing
44+
+ // the request is indeed a browser app (only for the first request from
45+
+ // that app).
46+
+ final Fido2PrivilegedApiClient fidoClient =
47+
+ Fido.getFido2PrivilegedApiClient(GeckoAppShell.getApplicationContext());
48+
+ intentTask = fidoClient.getRegisterPendingIntent(browserOptions);
5149

52-
@@ -464,19 +452,12 @@
53-
.build();
50+
intentTask.addOnSuccessListener(
51+
pendingIntent -> {
52+
@@ -411,19 +398,12 @@
53+
.build();
5454

55-
final Task<PendingIntent> intentTask;
56-
- // See the makeCredential method for documentation about this
57-
- // conditional.
58-
- if (BuildConfig.MOZILLA_OFFICIAL) {
59-
- final Fido2PrivilegedApiClient fidoClient =
60-
- Fido.getFido2PrivilegedApiClient(GeckoAppShell.getApplicationContext());
61-
+ // See the makeCredential method for documentation about the FIDO2 API and
62-
+ // microG.
63-
+ final Fido2PrivilegedApiClient fidoClient =
64-
+ Fido.getFido2PrivilegedApiClient(GeckoAppShell.getApplicationContext());
55+
final Task<PendingIntent> intentTask;
56+
- // See the makeCredential method for documentation about this
57+
- // conditional.
58+
- if (BuildConfig.MOZILLA_OFFICIAL) {
59+
- final Fido2PrivilegedApiClient fidoClient =
60+
- Fido.getFido2PrivilegedApiClient(GeckoAppShell.getApplicationContext());
61+
+ // See the makeCredential method for documentation about the FIDO2 API and
62+
+ // microG.
63+
+ final Fido2PrivilegedApiClient fidoClient =
64+
+ Fido.getFido2PrivilegedApiClient(GeckoAppShell.getApplicationContext());
6565

66-
- intentTask = fidoClient.getSignPendingIntent(browserOptions);
67-
- } else {
68-
- final Fido2ApiClient fidoClient =
69-
- Fido.getFido2ApiClient(GeckoAppShell.getApplicationContext());
66+
- intentTask = fidoClient.getSignPendingIntent(browserOptions);
67+
- } else {
68+
- final Fido2ApiClient fidoClient =
69+
- Fido.getFido2ApiClient(GeckoAppShell.getApplicationContext());
7070
-
71-
- intentTask = fidoClient.getSignPendingIntent(requestOptions);
72-
- }
73-
+ intentTask = fidoClient.getSignPendingIntent(browserOptions);
71+
- intentTask = fidoClient.getSignPendingIntent(requestOptions);
72+
- }
73+
+ intentTask = fidoClient.getSignPendingIntent(browserOptions);
7474

75-
final GeckoResult<GetAssertionResponse> result = new GeckoResult<>();
76-
intentTask.addOnSuccessListener(
77-
@@ -573,15 +554,9 @@
75+
intentTask.addOnSuccessListener(
76+
pendingIntent -> {
77+
@@ -557,15 +537,9 @@
7878
@WrapForJNI(calledFrom = "gecko")
7979
private static GeckoResult<Boolean> webAuthnIsUserVerifyingPlatformAuthenticatorAvailable() {
8080
final Task<Boolean> task;

paths.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
#
1919

2020
readonly patches=$(dirname "$(realpath "$0")")
21-
readonly android_components_as=$(realpath ../srclib/FirefoxAndroidAS/android-components)
21+
readonly android_components_as_top=$(realpath ../srclib/MozFennecAS)
22+
readonly android_components_as=$(realpath ../srclib/MozFennecAS/mobile/android/android-components)
2223
readonly android_components=$(realpath ../srclib/MozFennec/mobile/android/android-components)
2324
readonly application_services=$(realpath ../srclib/MozAppServices)
2425
readonly glean_as=$(realpath ../srclib/MozGleanAS)

prebuild.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,10 @@ popd
156156
#
157157
# Android Components
158158
#
159+
pushd "$android_components_as_top"
160+
# Remove Mozilla repositories substitution and explicitly add the required ones
161+
patch -p1 --no-backup-if-mismatch --quiet < "$patches/gecko-localize_maven.patch"
162+
popd
159163

160164
pushd "$android_components_as"
161165
acver=$(git name-rev --tags --name-only "$(git rev-parse HEAD)")
@@ -164,6 +168,8 @@ sed -e "s/VERSION/$acver/" "$patches/a-c-buildconfig.yml" > .buildconfig.yml
164168
# We don't need Gecko while building A-C for A-S
165169
rm -fR components/browser/engine-gecko*
166170
localize_maven
171+
sed -i -e '/firebase_messaging/d' plugins/dependencies/src/main/java/DependenciesPlugin.kt
172+
sed -i -e '/play_services_base/d' plugins/dependencies/src/main/java/DependenciesPlugin.kt
167173
popd
168174

169175
pushd "$android_components"
@@ -185,14 +191,17 @@ sed -i \
185191
# Hack to prevent too long string from breaking build
186192
sed -i '/val statusCmd/,+3d' plugins/config/src/main/java/ConfigPlugin.kt
187193
sed -i '/\/\/ Append "+"/a \ val statusSuffix = "+"' plugins/config/src/main/java/ConfigPlugin.kt
194+
sed -i -e '/firebase_messaging/d' plugins/dependencies/src/main/java/DependenciesPlugin.kt
195+
sed -i -e '/play_services_base/d' plugins/dependencies/src/main/java/DependenciesPlugin.kt
196+
sed -i -e '/play_review/d' plugins/dependencies/src/main/java/DependenciesPlugin.kt
188197
popd
189198

190199
#
191200
# Application Services
192201
#
193202

194203
pushd "$application_services"
195-
sed -i -e 's/60.0.0/60.0.1/' gradle/libs.versions.toml
204+
sed -i -e 's/60.1.0/60.1.1/' gradle/libs.versions.toml
196205
echo "rust.targets=linux-x86-64,$rusttarget" >> local.properties
197206
sed -i -e '/content {/,/}/d' build.gradle
198207
sed -i -e '/NDK ez-install/,/^$/d' libs/verify-android-ci-environment.sh

0 commit comments

Comments
 (0)