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

225 lines
8.4 KiB
Java

package com.google.android.gms.internal.ads;
import android.os.IBinder;
import android.text.TextUtils;
import com.google.android.gms.ads.RequestConfiguration;
import java.util.List;
import org.json.JSONArray;
import org.json.JSONObject;
/* loaded from: classes.dex */
public final class zzdzy implements zzdan, zzddq, zzdcc {
/* renamed from: c, reason: collision with root package name */
public final zzeak f6296c;
public final String f;
public final String g;
public zzdad j;
public com.google.android.gms.ads.internal.client.zze k;
public JSONObject o;
public JSONObject p;
public boolean q;
public boolean r;
public boolean s;
public String l = RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED;
public String m = RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED;
public String n = RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED;
public int h = 0;
public zzdzx i = zzdzx.f6295c;
public zzdzy(zzeak zzeakVar, zzfik zzfikVar, String str) {
this.f6296c = zzeakVar;
this.g = str;
this.f = zzfikVar.g;
}
public static JSONObject c(com.google.android.gms.ads.internal.client.zze zzeVar) {
JSONObject c2;
JSONObject jSONObject = new JSONObject();
jSONObject.put("errorDomain", zzeVar.zzc);
jSONObject.put("errorCode", zzeVar.zza);
jSONObject.put("errorDescription", zzeVar.zzb);
com.google.android.gms.ads.internal.client.zze zzeVar2 = zzeVar.zzd;
if (zzeVar2 == null) {
c2 = null;
} else {
c2 = c(zzeVar2);
}
jSONObject.put("underlyingError", c2);
return jSONObject;
}
@Override // com.google.android.gms.internal.ads.zzdcc
public final void J(zzcvk zzcvkVar) {
zzeak zzeakVar = this.f6296c;
if (zzeakVar.g()) {
this.j = zzcvkVar.f;
this.i = zzdzx.f;
if (((Boolean) com.google.android.gms.ads.internal.client.zzbd.zzc().a(zzbgk.Ja)).booleanValue()) {
zzeakVar.d(this.f, this);
}
}
}
@Override // com.google.android.gms.internal.ads.zzddq
public final void N(zzfic zzficVar) {
zzeak zzeakVar = this.f6296c;
if (zzeakVar.g()) {
zzfib zzfibVar = zzficVar.b;
List list = zzfibVar.f7381a;
int i = 0;
if (!list.isEmpty()) {
this.h = ((zzfhr) list.get(0)).b;
}
zzfhu zzfhuVar = zzfibVar.b;
String str = zzfhuVar.l;
if (!TextUtils.isEmpty(str)) {
this.l = str;
}
String str2 = zzfhuVar.m;
if (!TextUtils.isEmpty(str2)) {
this.m = str2;
}
JSONObject jSONObject = zzfhuVar.p;
if (jSONObject.length() > 0) {
this.p = jSONObject;
}
if (((Boolean) com.google.android.gms.ads.internal.client.zzbd.zzc().a(zzbgk.Fa)).booleanValue()) {
if (zzeakVar.w < ((Long) com.google.android.gms.ads.internal.client.zzbd.zzc().a(zzbgk.Ga)).longValue()) {
String str3 = zzfhuVar.n;
if (!TextUtils.isEmpty(str3)) {
this.n = str3;
}
JSONObject jSONObject2 = zzfhuVar.o;
if (jSONObject2.length() > 0) {
this.o = jSONObject2;
}
JSONObject jSONObject3 = this.o;
if (jSONObject3 != null) {
i = jSONObject3.toString().length();
}
if (!TextUtils.isEmpty(this.n)) {
i += this.n.length();
}
long j = i;
synchronized (zzeakVar) {
zzeakVar.w += j;
}
return;
}
this.s = true;
}
}
}
@Override // com.google.android.gms.internal.ads.zzdan
public final void S(com.google.android.gms.ads.internal.client.zze zzeVar) {
zzeak zzeakVar = this.f6296c;
if (zzeakVar.g()) {
this.i = zzdzx.g;
this.k = zzeVar;
if (((Boolean) com.google.android.gms.ads.internal.client.zzbd.zzc().a(zzbgk.Ja)).booleanValue()) {
zzeakVar.d(this.f, this);
}
}
}
public final JSONObject a() {
JSONObject jSONObject;
IBinder iBinder;
JSONObject jSONObject2 = new JSONObject();
jSONObject2.put("state", this.i);
jSONObject2.put("format", zzfhr.a(this.h));
if (((Boolean) com.google.android.gms.ads.internal.client.zzbd.zzc().a(zzbgk.Ja)).booleanValue()) {
jSONObject2.put("isOutOfContext", this.q);
if (this.q) {
jSONObject2.put("shown", this.r);
}
}
zzdad zzdadVar = this.j;
if (zzdadVar != null) {
jSONObject = b(zzdadVar);
} else {
com.google.android.gms.ads.internal.client.zze zzeVar = this.k;
JSONObject jSONObject3 = null;
if (zzeVar != null && (iBinder = zzeVar.zze) != null) {
zzdad zzdadVar2 = (zzdad) iBinder;
jSONObject3 = b(zzdadVar2);
if (zzdadVar2.i.isEmpty()) {
JSONArray jSONArray = new JSONArray();
jSONArray.put(c(this.k));
jSONObject3.put("errors", jSONArray);
}
}
jSONObject = jSONObject3;
}
jSONObject2.put("responseInfo", jSONObject);
return jSONObject2;
}
public final JSONObject b(zzdad zzdadVar) {
JSONObject c2;
JSONObject jSONObject = new JSONObject();
jSONObject.put("winningAdapterClassName", zzdadVar.f5650c);
jSONObject.put("responseSecsSinceEpoch", zzdadVar.j);
jSONObject.put("responseId", zzdadVar.f);
if (((Boolean) com.google.android.gms.ads.internal.client.zzbd.zzc().a(zzbgk.Ca)).booleanValue()) {
String str = zzdadVar.k;
if (!TextUtils.isEmpty(str)) {
String valueOf = String.valueOf(str);
int i = com.google.android.gms.ads.internal.util.zze.zza;
com.google.android.gms.ads.internal.util.client.zzo.zzd("Bidding data: ".concat(valueOf));
jSONObject.put("biddingData", new JSONObject(str));
}
}
if (!TextUtils.isEmpty(this.l)) {
jSONObject.put("adRequestUrl", this.l);
}
if (!TextUtils.isEmpty(this.m)) {
jSONObject.put("postBody", this.m);
}
if (!TextUtils.isEmpty(this.n)) {
jSONObject.put("adResponseBody", this.n);
}
Object obj = this.o;
if (obj != null) {
jSONObject.put("adResponseHeaders", obj);
}
Object obj2 = this.p;
if (obj2 != null) {
jSONObject.put("transactionExtras", obj2);
}
if (((Boolean) com.google.android.gms.ads.internal.client.zzbd.zzc().a(zzbgk.Fa)).booleanValue()) {
jSONObject.put("hasExceededMemoryLimit", this.s);
}
JSONArray jSONArray = new JSONArray();
for (com.google.android.gms.ads.internal.client.zzv zzvVar : zzdadVar.i) {
JSONObject jSONObject2 = new JSONObject();
jSONObject2.put("adapterClassName", zzvVar.zza);
jSONObject2.put("latencyMillis", zzvVar.zzb);
if (((Boolean) com.google.android.gms.ads.internal.client.zzbd.zzc().a(zzbgk.Da)).booleanValue()) {
jSONObject2.put("credentials", com.google.android.gms.ads.internal.client.zzbb.zza().zzm(zzvVar.zzd));
}
com.google.android.gms.ads.internal.client.zze zzeVar = zzvVar.zzc;
if (zzeVar == null) {
c2 = null;
} else {
c2 = c(zzeVar);
}
jSONObject2.put("error", c2);
jSONArray.put(jSONObject2);
}
jSONObject.put("adNetworks", jSONArray);
return jSONObject;
}
@Override // com.google.android.gms.internal.ads.zzddq
public final void f(zzbza zzbzaVar) {
if (!((Boolean) com.google.android.gms.ads.internal.client.zzbd.zzc().a(zzbgk.Ja)).booleanValue()) {
zzeak zzeakVar = this.f6296c;
if (zzeakVar.g()) {
zzeakVar.d(this.f, this);
}
}
}
}