soul-browser/sources/java/com/google/android/gms/internal/ads/zzfjm.java
KaKi87 550ddb0413
Decompile and recreate Soul Browser v1.4.85 with APK CI builds (#1)
* Decompile and recreate Soul Browser v1.4.85 with APK CI builds

Co-authored-by: KaKi87 <KaKi87@pm.me>

* Fix CI build: include bundled google.jks and remove PR trigger

The apktool build failed in CI because app/unknown/.../google.jks was
excluded by the *.jks gitignore rule. Whitelist app-bundled JKS files
and commit the missing resource.

Also remove the redundant pull_request workflow trigger.

Co-authored-by: KaKi87 <KaKi87@pm.me>

* Change package ID to com.github.kaki87.soulbrowser

Rename the application ID so the rebuilt APK can be installed
alongside the original Soul Browser from Google Play.

- Update AndroidManifest package, permissions, providers, and actions
- Update R class references in smali (com/github/kaki87/soulbrowser/R)
- Update shortcuts.xml targetPackage
- Rename app label to "Soul Rebuild" for easy identification

Co-authored-by: KaKi87 <KaKi87@pm.me>

* Fix install compatibility: remove split APK metadata and bundle native libs

The rebuilt APK still declared requiredSplitTypes and Play Store split
metadata, causing Android to reject standalone installs as incompatible.

- Remove requiredSplitTypes and split-related manifest meta-data
- Merge native libs from all ABI splits with uncompressed storage
- Page-align before signing for extractNativeLibs=false
- Add .so to apktool doNotCompress list

Co-authored-by: KaKi87 <KaKi87@pm.me>

* Fix install failure: use apksigner v2/v3 and bundle arm64 native libs

Target SDK 36 requires APK Signature Scheme v2+, but jarsigner only
produces v1 signatures, causing Android to reject the install.

- Sign with apksigner (v1+v2+v3) instead of jarsigner
- Add arm64-v8a native libraries from universal Soul Browser 1.4.79
- Set extractNativeLibs=true for reliable sideload installs
- Commit stable debug keystore for consistent signatures across builds

Co-authored-by: KaKi87 <KaKi87@pm.me>

* Add committed debug keystore for consistent APK signatures

Co-authored-by: KaKi87 <KaKi87@pm.me>

* Fix startup crash: use original classes2.dex desugar libraries

Apktool recompiles smali_classes2 into a broken classes2.dex, causing
ClassNotFoundException for j$.com.android.tools.r8.a at ML Kit init.

Inject the original classes2.dex (Java 8+ desugar libs) after apktool
build instead of using the recompiled version.

Co-authored-by: KaKi87 <KaKi87@pm.me>

* Fix missing drawable resources from density split APKs

The base APK is an app bundle module; density-specific drawables like
seek_thumb_nor_b live in config.xhdpi.apk and were missing after rebuild,
causing Resources$NotFoundException at runtime.

- Merge non-9-patch resources from split APKs before apktool build
- Sync public.xml IDs from R smali only when backing files exist
- Add 713 density-specific resource IDs to public.xml

Co-authored-by: KaKi87 <KaKi87@pm.me>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-08-10 16:07:14 +02:00

244 lines
10 KiB
Java

package com.google.android.gms.internal.ads;
import com.google.android.gms.ads.MobileAds;
import com.google.android.gms.ads.RequestConfiguration;
/* loaded from: classes.dex */
public final class zzfjm {
public static com.google.android.gms.ads.internal.client.zze a(Throwable th) {
if (th instanceof zzejk) {
zzejk zzejkVar = (zzejk) th;
return c(zzejkVar.f6345c, zzejkVar.f);
}
if (th instanceof zzebr) {
if (th.getMessage() == null) {
return d(((zzebr) th).f6345c, null, null);
}
return d(((zzebr) th).f6345c, th.getMessage(), null);
}
if (th instanceof com.google.android.gms.ads.internal.util.zzaz) {
com.google.android.gms.ads.internal.util.zzaz zzazVar = (com.google.android.gms.ads.internal.util.zzaz) th;
int zza = zzazVar.zza();
String message = zzazVar.getMessage();
if (message == null) {
message = RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED;
}
return new com.google.android.gms.ads.internal.client.zze(zza, message, MobileAds.ERROR_DOMAIN, null, null);
}
return d(1, null, null);
}
public static com.google.android.gms.ads.internal.client.zze b(Throwable th, zzejl zzejlVar) {
com.google.android.gms.ads.internal.client.zze zzeVar;
com.google.android.gms.ads.internal.client.zze a2 = a(th);
int i = a2.zza;
if ((i == 3 || i == 0) && (zzeVar = a2.zzd) != null && !zzeVar.zzc.equals(MobileAds.ERROR_DOMAIN)) {
a2.zzd = null;
}
if (zzejlVar != null) {
a2.zze = new zzdad(zzejlVar.e, RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, zzejlVar, zzejlVar.d, zzejlVar.f6562c);
}
return a2;
}
public static com.google.android.gms.ads.internal.client.zze c(int i, com.google.android.gms.ads.internal.client.zze zzeVar) {
if (i != 0) {
if (i == 8) {
if (((Integer) com.google.android.gms.ads.internal.client.zzbd.zzc().a(zzbgk.x9)).intValue() <= 0) {
i = 8;
} else {
return zzeVar;
}
}
return d(i, null, zzeVar);
}
throw null;
}
/* JADX WARN: Can't fix incorrect switch cases order, some code will duplicate */
/* JADX WARN: Failed to find 'out' block for switch in B:31:0x005b. Please report as an issue. */
public static com.google.android.gms.ads.internal.client.zze d(int i, String str, com.google.android.gms.ads.internal.client.zze zzeVar) {
String str2;
int i2 = i - 1;
if (str == null) {
if (i != 0) {
str = "No fill.";
switch (i2) {
case 1:
str = "Invalid request.";
break;
case 2:
break;
case 3:
str = "App ID missing.";
break;
case 4:
str = "Network error.";
break;
case 5:
str = "Invalid request: Invalid ad unit ID.";
break;
case 6:
str = "Invalid request: Invalid ad size.";
break;
case 7:
str = "A mediation adapter failed to show the ad.";
break;
case 8:
str = "The ad is not ready.";
break;
case 9:
str = "The ad has already been shown.";
break;
case 10:
str = "The ad can not be shown when app is not in foreground.";
break;
case 11:
default:
str = "Internal error.";
break;
case 12:
if (((Integer) com.google.android.gms.ads.internal.client.zzbd.zzc().a(zzbgk.A9)).intValue() <= 0) {
str = "The mediation adapter did not return an ad.";
break;
}
break;
case 13:
str = "Mismatch request IDs.";
break;
case 14:
str = "Invalid ad string.";
break;
case 15:
str = "Ad inspector had an internal error.";
break;
case 16:
str = "Ad inspector failed to load.";
break;
case 17:
str = "Ad inspector cannot be opened because the device is not in test mode. See https://developers.google.com/admob/android/test-ads#enable_test_devices for more information.";
break;
case 18:
str = "Ad inspector cannot be opened because it is already open.";
break;
}
} else {
throw null;
}
}
String str3 = str;
if (i != 0) {
int i3 = 0;
int i4 = 2;
switch (i2) {
case 0:
case 11:
case 15:
i4 = i3;
return new com.google.android.gms.ads.internal.client.zze(i4, str3, MobileAds.ERROR_DOMAIN, zzeVar, null);
case 1:
case 5:
case 6:
case 9:
case 16:
i4 = 1;
return new com.google.android.gms.ads.internal.client.zze(i4, str3, MobileAds.ERROR_DOMAIN, zzeVar, null);
case 2:
case 10:
case 18:
i4 = 3;
return new com.google.android.gms.ads.internal.client.zze(i4, str3, MobileAds.ERROR_DOMAIN, zzeVar, null);
case 3:
i3 = 8;
i4 = i3;
return new com.google.android.gms.ads.internal.client.zze(i4, str3, MobileAds.ERROR_DOMAIN, zzeVar, null);
case 4:
case 8:
case 17:
return new com.google.android.gms.ads.internal.client.zze(i4, str3, MobileAds.ERROR_DOMAIN, zzeVar, null);
case 7:
i3 = 4;
i4 = i3;
return new com.google.android.gms.ads.internal.client.zze(i4, str3, MobileAds.ERROR_DOMAIN, zzeVar, null);
case 12:
if (((Integer) com.google.android.gms.ads.internal.client.zzbd.zzc().a(zzbgk.A9)).intValue() <= 0) {
i3 = 9;
i4 = i3;
return new com.google.android.gms.ads.internal.client.zze(i4, str3, MobileAds.ERROR_DOMAIN, zzeVar, null);
}
i4 = 3;
return new com.google.android.gms.ads.internal.client.zze(i4, str3, MobileAds.ERROR_DOMAIN, zzeVar, null);
case 13:
i3 = 10;
i4 = i3;
return new com.google.android.gms.ads.internal.client.zze(i4, str3, MobileAds.ERROR_DOMAIN, zzeVar, null);
case 14:
i3 = 11;
i4 = i3;
return new com.google.android.gms.ads.internal.client.zze(i4, str3, MobileAds.ERROR_DOMAIN, zzeVar, null);
default:
switch (i) {
case 1:
str2 = "INTERNAL_ERROR";
break;
case 2:
str2 = "INVALID_REQUEST";
break;
case 3:
str2 = "NO_FILL";
break;
case 4:
str2 = "APP_ID_MISSING";
break;
case 5:
str2 = "NETWORK_ERROR";
break;
case 6:
str2 = "INVALID_AD_UNIT_ID";
break;
case 7:
str2 = "INVALID_AD_SIZE";
break;
case 8:
str2 = "MEDIATION_SHOW_ERROR";
break;
case 9:
str2 = "NOT_READY";
break;
case 10:
str2 = "AD_REUSED";
break;
case 11:
str2 = "APP_NOT_FOREGROUND";
break;
case 12:
str2 = "INTERNAL_SHOW_ERROR";
break;
case 13:
str2 = "MEDIATION_NO_FILL";
break;
case 14:
str2 = "REQUEST_ID_MISMATCH";
break;
case 15:
str2 = "INVALID_AD_STRING";
break;
case 16:
str2 = "AD_INSPECTOR_INTERNAL_ERROR";
break;
case 17:
str2 = "AD_INSPECTOR_FAILED_TO_LOAD";
break;
case 18:
str2 = "AD_INSPECTOR_NOT_IN_TEST_MODE";
break;
default:
str2 = "AD_INSPECTOR_ALREADY_OPEN";
break;
}
throw new AssertionError("Unknown SdkError: ".concat(str2));
}
}
throw null;
}
}