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

223 lines
7.5 KiB
Java

package com.google.android.gms.internal.ads;
import android.content.Context;
import android.text.TextUtils;
import android.view.View;
import android.view.ViewGroup;
import androidx.collection.SimpleArrayMap;
import com.google.android.gms.dynamic.IObjectWrapper;
import com.google.android.gms.dynamic.ObjectWrapper;
import j$.util.Objects;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/* loaded from: classes.dex */
public final class zzdry extends zzbkr {
/* renamed from: c, reason: collision with root package name */
public final Context f6083c;
public final zzdnm f;
public zzdol g;
public zzdnh h;
public zzdry(Context context, zzdnm zzdnmVar, zzdol zzdolVar, zzdnh zzdnhVar) {
super("com.google.android.gms.ads.internal.formats.client.INativeCustomTemplateAd");
this.f6083c = context;
this.f = zzdnmVar;
this.g = zzdolVar;
this.h = zzdnhVar;
}
@Override // com.google.android.gms.internal.ads.zzbks
public final void H1(IObjectWrapper iObjectWrapper) {
zzdnh zzdnhVar;
Object f2 = ObjectWrapper.f2(iObjectWrapper);
if ((f2 instanceof View) && this.f.u() != null && (zzdnhVar = this.h) != null) {
zzdnhVar.h((View) f2);
}
}
@Override // com.google.android.gms.internal.ads.zzbks
public final boolean l0() {
zzdnh zzdnhVar = this.h;
if (zzdnhVar != null && !zzdnhVar.p.c()) {
return false;
}
zzdnm zzdnmVar = this.f;
if (zzdnmVar.r() == null || zzdnmVar.p() != null) {
return false;
}
return true;
}
@Override // com.google.android.gms.internal.ads.zzbks
public final boolean q(IObjectWrapper iObjectWrapper) {
zzdol zzdolVar;
Object f2 = ObjectWrapper.f2(iObjectWrapper);
if (!(f2 instanceof ViewGroup) || (zzdolVar = this.g) == null || !zzdolVar.c((ViewGroup) f2, false)) {
return false;
}
this.f.q().t(new zzdrx(this));
return true;
}
@Override // com.google.android.gms.internal.ads.zzbks
public final String zze(String str) {
SimpleArrayMap simpleArrayMap;
zzdnm zzdnmVar = this.f;
synchronized (zzdnmVar) {
simpleArrayMap = zzdnmVar.w;
}
return (String) simpleArrayMap.get(str);
}
@Override // com.google.android.gms.internal.ads.zzbks
public final zzbjy zzf(String str) {
SimpleArrayMap simpleArrayMap;
zzdnm zzdnmVar = this.f;
synchronized (zzdnmVar) {
simpleArrayMap = zzdnmVar.v;
}
return (zzbjy) simpleArrayMap.get(str);
}
@Override // com.google.android.gms.internal.ads.zzbks
public final List zzg() {
SimpleArrayMap simpleArrayMap;
try {
zzdnm zzdnmVar = this.f;
synchronized (zzdnmVar) {
simpleArrayMap = zzdnmVar.v;
}
SimpleArrayMap w = zzdnmVar.w();
String[] strArr = new String[simpleArrayMap.g + w.g];
int i = 0;
for (int i2 = 0; i2 < simpleArrayMap.g; i2++) {
strArr[i] = (String) simpleArrayMap.f(i2);
i++;
}
for (int i3 = 0; i3 < w.g; i3++) {
strArr[i] = (String) w.f(i3);
i++;
}
return Arrays.asList(strArr);
} catch (NullPointerException e) {
com.google.android.gms.ads.internal.zzt.zzh().f("InternalNativeCustomTemplateAdShim.getAvailableAssetNames", e);
return new ArrayList();
}
}
@Override // com.google.android.gms.internal.ads.zzbks
public final String zzh() {
return this.f.o();
}
@Override // com.google.android.gms.internal.ads.zzbks
public final void zzi(String str) {
zzdnh zzdnhVar = this.h;
if (zzdnhVar != null) {
synchronized (zzdnhVar) {
zzdnhVar.n.i(str);
}
}
}
@Override // com.google.android.gms.internal.ads.zzbks
public final void zzj() {
zzdnh zzdnhVar = this.h;
if (zzdnhVar != null) {
synchronized (zzdnhVar) {
if (zzdnhVar.y) {
return;
}
zzdnhVar.n.A();
}
}
}
@Override // com.google.android.gms.internal.ads.zzbks
public final void zzl() {
zzdnh zzdnhVar = this.h;
if (zzdnhVar != null) {
zzdnhVar.q();
}
this.h = null;
this.g = null;
}
@Override // com.google.android.gms.internal.ads.zzbks
public final IObjectWrapper zzm() {
return new ObjectWrapper(this.f6083c);
}
@Override // com.google.android.gms.internal.ads.zzbks
public final boolean zzn(IObjectWrapper iObjectWrapper) {
zzdol zzdolVar;
Object f2 = ObjectWrapper.f2(iObjectWrapper);
if ((f2 instanceof ViewGroup) && (zzdolVar = this.g) != null && zzdolVar.c((ViewGroup) f2, true)) {
this.f.p().t(new zzdrx(this));
return true;
}
return false;
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r1v3, types: [java.util.Map, androidx.collection.SimpleArrayMap] */
@Override // com.google.android.gms.internal.ads.zzbks
public final boolean zzp() {
zzdnm zzdnmVar = this.f;
zzejb u = zzdnmVar.u();
if (u != null) {
com.google.android.gms.ads.internal.zzt.zzu().b(u.f6553a);
if (zzdnmVar.r() != null) {
zzdnmVar.r().S("onSdkLoaded", new SimpleArrayMap(0));
return true;
}
return true;
}
int i = com.google.android.gms.ads.internal.util.zze.zza;
com.google.android.gms.ads.internal.util.client.zzo.zzi("Trying to start OMID session before creation.");
return false;
}
@Override // com.google.android.gms.internal.ads.zzbks
public final void zzr() {
String str;
try {
zzdnm zzdnmVar = this.f;
synchronized (zzdnmVar) {
str = zzdnmVar.y;
}
if (Objects.equals(str, "Google")) {
int i = com.google.android.gms.ads.internal.util.zze.zza;
com.google.android.gms.ads.internal.util.client.zzo.zzi("Illegal argument specified for omid partner name.");
} else if (TextUtils.isEmpty(str)) {
int i2 = com.google.android.gms.ads.internal.util.zze.zza;
com.google.android.gms.ads.internal.util.client.zzo.zzi("Not starting OMID session. OM partner name has not been configured.");
} else {
zzdnh zzdnhVar = this.h;
if (zzdnhVar != null) {
zzdnhVar.g(str, false);
}
}
} catch (NullPointerException e) {
com.google.android.gms.ads.internal.zzt.zzh().f("InternalNativeCustomTemplateAdShim.initializeDisplayOpenMeasurement", e);
}
}
@Override // com.google.android.gms.internal.ads.zzbks
public final zzbjv zzs() {
zzbjv zzbjvVar;
try {
zzdnj zzdnjVar = this.h.F;
synchronized (zzdnjVar) {
zzbjvVar = zzdnjVar.f5937a;
}
return zzbjvVar;
} catch (NullPointerException e) {
com.google.android.gms.ads.internal.zzt.zzh().f("InternalNativeCustomTemplateAdShim.getMediaContent", e);
return null;
}
}
}