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

111 lines
4.5 KiB
Java

package com.google.android.gms.internal.ads;
import android.content.Context;
import android.os.Bundle;
import android.util.Pair;
import java.util.concurrent.ScheduledExecutorService;
/* loaded from: classes.dex */
public final class zzerm implements zzerf {
/* renamed from: a, reason: collision with root package name */
public final zzfij f6848a;
public final zzclg b;
/* renamed from: c, reason: collision with root package name */
public final Context f6849c;
public final zzerc d;
public final zzfnr e;
public zzcvz f;
public zzerm(zzclg zzclgVar, Context context, zzerc zzercVar, zzfij zzfijVar) {
this.b = zzclgVar;
this.f6849c = context;
this.d = zzercVar;
this.f6848a = zzfijVar;
this.e = zzclgVar.z();
zzfijVar.r = zzercVar.b;
}
public final boolean a(com.google.android.gms.ads.internal.client.zzm zzmVar, String str, zzerd zzerdVar, zzere zzereVar) {
zzerc zzercVar = this.d;
zzeqp zzeqpVar = zzercVar.b;
if (((Boolean) com.google.android.gms.ads.internal.client.zzbd.zzc().a(zzbgk.X2)).booleanValue()) {
com.google.android.gms.ads.internal.client.zzbb.zzc();
}
com.google.android.gms.ads.internal.zzt.zzc();
Context context = this.f6849c;
boolean zzM = com.google.android.gms.ads.internal.util.zzs.zzM(context);
zzclg zzclgVar = this.b;
if (zzM && zzmVar.zzs == null) {
int i = com.google.android.gms.ads.internal.util.zze.zza;
com.google.android.gms.ads.internal.util.client.zzo.zzf("Failed to load the ad because app ID is missing.");
zzclgVar.f().execute(new Runnable() { // from class: com.google.android.gms.internal.ads.zzerl
@Override // java.lang.Runnable
public final void run() {
((zzerb) zzerm.this.d.f6840c).S(zzfjm.d(4, null, null));
}
});
return false;
}
if (str == null) {
int i2 = com.google.android.gms.ads.internal.util.zze.zza;
com.google.android.gms.ads.internal.util.client.zzo.zzf("Ad unit ID should not be null for NativeAdLoader.");
zzclgVar.f().execute(new Runnable() { // from class: com.google.android.gms.internal.ads.zzerk
@Override // java.lang.Runnable
public final void run() {
((zzerb) zzerm.this.d.f6840c).S(zzfjm.d(6, null, null));
}
});
return false;
}
boolean z = zzmVar.zzf;
zzfjh.b(context, z);
if (((Boolean) com.google.android.gms.ads.internal.client.zzbd.zzc().a(zzbgk.la)).booleanValue() && z) {
zzclgVar.y().b(true);
}
int i3 = ((zzerg) zzerdVar).f6841a;
Long valueOf = Long.valueOf(com.google.android.gms.ads.internal.zzt.zzk().currentTimeMillis());
Bundle a2 = zzdwo.a(new Pair("api-call", valueOf), new Pair("dynamite-enter", valueOf));
zzfij zzfijVar = this.f6848a;
zzfijVar.f7388a = zzmVar;
zzfijVar.t = a2;
zzfijVar.m = i3;
zzfik a3 = zzfijVar.a();
zzfne p = a.p(context, zzfnn.b(a3), 8, zzmVar);
com.google.android.gms.ads.internal.client.zzco zzcoVar = a3.o;
if (zzcoVar != null) {
zzeqpVar.i(zzcoVar);
}
zzdlu q = zzclgVar.q();
zzczs zzczsVar = new zzczs();
zzczsVar.f5634a = context;
zzczsVar.b = a3;
((zzcms) q).e = new zzczt(zzczsVar);
zzdgj zzdgjVar = new zzdgj();
zzdgjVar.b(zzeqpVar, zzclgVar.f());
zzcms zzcmsVar = (zzcms) q;
zzcmsVar.d = new zzdgk(zzdgjVar);
zzcmsVar.f = new zzdlq(zzercVar.f6839a, zzeqpVar.b());
zzfno zzfnoVar = null;
zzcmsVar.g = new zzcsz(null);
zzdlv zzh = zzcmsVar.zzh();
if (((Boolean) zzbid.f4704c.c()).booleanValue()) {
zzfnoVar = (zzfno) ((zzcmt) zzh).e.zzb();
zzfnoVar.i(8);
zzfnoVar.c(zzmVar.zzp);
zzfnoVar.d(zzmVar.zzm);
}
zzfno zzfnoVar2 = zzfnoVar;
zzclgVar.x().a(1);
zzgyw zzgywVar = zzcdo.f5068a;
zzijo.a(zzgywVar);
ScheduledExecutorService g = zzclgVar.g();
zzcwo a4 = zzh.a();
zzfmb c2 = a4.c(a4.b());
zzcvz zzcvzVar = new zzcvz(zzgywVar, g, c2);
this.f = zzcvzVar;
c2.k(new zzgyk(c2, new zzcvt(zzcvzVar, new zzerj(this, zzereVar, zzfnoVar2, p, zzh))), zzgywVar);
return true;
}
}