soul-browser/sources/java/com/google/android/gms/internal/ads/zzfnr.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

119 lines
5 KiB
Java

package com.google.android.gms.internal.ads;
import android.content.Context;
import android.os.Binder;
import com.google.android.gms.ads.RequestConfiguration;
import com.google.android.gms.ads.internal.util.client.VersionInfoParcel;
import java.util.HashMap;
import java.util.List;
/* loaded from: classes.dex */
public final class zzfnr implements Runnable {
public static final Object n = new Object();
public static final Object o = new Object();
public static final Object p = new Object();
public static Boolean q;
/* renamed from: c, reason: collision with root package name */
public final Context f7510c;
public final VersionInfoParcel f;
public int i;
public final zzdur j;
public final List k;
public final zzcld l;
public final zzfnv g = zzfny.E();
public String h = RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED;
public boolean m = false;
public zzfnr(Context context, VersionInfoParcel versionInfoParcel, zzdur zzdurVar, zzbzi zzbziVar, zzcld zzcldVar) {
this.f7510c = context;
this.f = versionInfoParcel;
this.j = zzdurVar;
this.l = zzcldVar;
if (((Boolean) com.google.android.gms.ads.internal.client.zzbd.zzc().a(zzbgk.ba)).booleanValue()) {
this.k = com.google.android.gms.ads.internal.util.zzs.zzk();
} else {
zzgvs zzgvsVar = zzgtd.f;
this.k = zzguy.i;
}
}
public static boolean a() {
boolean booleanValue;
boolean z;
synchronized (n) {
try {
if (q == null) {
if (!((Boolean) zzbid.b.c()).booleanValue()) {
q = Boolean.FALSE;
} else {
if (Math.random() < ((Double) zzbid.f4703a.c()).doubleValue()) {
z = true;
} else {
z = false;
}
q = Boolean.valueOf(z);
}
}
booleanValue = q.booleanValue();
} catch (Throwable th) {
throw th;
}
}
return booleanValue;
}
public final void b(final zzfnh zzfnhVar) {
((zzgxi) zzcdo.f5068a).E0(new Runnable() { // from class: com.google.android.gms.internal.ads.zzfnq
/* JADX WARN: Removed duplicated region for block: B:28:0x0214 A[Catch: all -> 0x00de, TryCatch #1 {all -> 0x00de, blocks: (B:14:0x00bf, B:16:0x00db, B:20:0x00e1, B:22:0x01a4, B:25:0x01a9, B:26:0x01b0, B:28:0x0214, B:29:0x0220, B:31:0x0232, B:33:0x023a, B:35:0x0246, B:36:0x0250, B:37:0x0274), top: B:13:0x00bf }] */
/* JADX WARN: Removed duplicated region for block: B:31:0x0232 A[Catch: all -> 0x00de, TryCatch #1 {all -> 0x00de, blocks: (B:14:0x00bf, B:16:0x00db, B:20:0x00e1, B:22:0x01a4, B:25:0x01a9, B:26:0x01b0, B:28:0x0214, B:29:0x0220, B:31:0x0232, B:33:0x023a, B:35:0x0246, B:36:0x0250, B:37:0x0274), top: B:13:0x00bf }] */
@Override // java.lang.Runnable
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final void run() {
/*
Method dump skipped, instructions count: 635
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.internal.ads.zzfnq.run():void");
}
});
}
@Override // java.lang.Runnable
public final void run() {
byte[] h;
if (a()) {
Object obj = o;
synchronized (obj) {
try {
if (((zzfny) this.g.f).D() == 0) {
return;
}
try {
synchronized (obj) {
zzfnv zzfnvVar = this.g;
h = ((zzfny) zzfnvVar.m()).h();
zzfnvVar.k();
((zzfny) zzfnvVar.f).G();
}
zzefy zzefyVar = new zzefy((String) com.google.android.gms.ads.internal.client.zzbd.zzc().a(zzbgk.V9), 60000, new HashMap(), h, "application/x-protobuf");
Context context = this.f7510c;
String str = this.f.afmaVersion;
Binder.getCallingUid();
new zzega(context, str, null).zza(zzefyVar);
} catch (Exception e) {
if ((e instanceof zzebr) && ((zzebr) e).f6345c == 3) {
return;
}
com.google.android.gms.ads.internal.zzt.zzh().g("CuiMonitor.sendCuiPing", e);
}
} catch (Throwable th) {
throw th;
}
}
}
}
}