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

115 lines
4.1 KiB
Java

package com.google.android.gms.internal.ads;
import android.app.Activity;
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import java.util.concurrent.Executor;
/* loaded from: classes.dex */
public final class zzdol {
public static final ImageView.ScaleType k = ImageView.ScaleType.CENTER_INSIDE;
/* renamed from: a, reason: collision with root package name */
public final com.google.android.gms.ads.internal.util.zzg f5963a;
public final zzfik b;
/* renamed from: c, reason: collision with root package name */
public final zzdnr f5964c;
public final zzdnm d;
public final zzdoz e;
public final zzdph f;
public final Executor g;
public final Executor h;
public final zzbjn i;
public final zzdnj j;
public zzdol(com.google.android.gms.ads.internal.util.zzj zzjVar, zzfik zzfikVar, zzdnr zzdnrVar, zzdnm zzdnmVar, zzdoz zzdozVar, zzdph zzdphVar, Executor executor, Executor executor2, zzdnj zzdnjVar) {
this.f5963a = zzjVar;
this.b = zzfikVar;
this.i = zzfikVar.j;
this.f5964c = zzdnrVar;
this.d = zzdnmVar;
this.e = zzdozVar;
this.f = zzdphVar;
this.g = executor;
this.h = executor2;
this.j = zzdnjVar;
}
public static void b(RelativeLayout.LayoutParams layoutParams, int i) {
if (i != 0) {
if (i != 2) {
if (i != 3) {
layoutParams.addRule(10);
layoutParams.addRule(11);
return;
} else {
layoutParams.addRule(12);
layoutParams.addRule(9);
return;
}
}
layoutParams.addRule(12);
layoutParams.addRule(11);
return;
}
layoutParams.addRule(10);
layoutParams.addRule(9);
}
public final void a(zzdpj zzdpjVar) {
if (zzdpjVar != null) {
Context context = zzdpjVar.f2().getContext();
if (com.google.android.gms.ads.internal.util.zzbs.zzi(context, this.f5964c.f5943a)) {
if (!(context instanceof Activity)) {
int i = com.google.android.gms.ads.internal.util.zze.zza;
com.google.android.gms.ads.internal.util.client.zzo.zzd("Activity context is needed for policy validator.");
return;
}
zzdph zzdphVar = this.f;
if (zzdphVar != null && zzdpjVar.F4() != null) {
try {
WindowManager windowManager = (WindowManager) context.getSystemService("window");
windowManager.addView(zzdphVar.a(zzdpjVar.F4(), windowManager), com.google.android.gms.ads.internal.util.zzbs.zzk());
} catch (zzcjg e) {
com.google.android.gms.ads.internal.util.zze.zzb("web view can not be obtained", e);
}
}
}
}
}
public final boolean c(ViewGroup viewGroup, boolean z) {
View view;
View view2;
FrameLayout.LayoutParams layoutParams;
if (z) {
view2 = this.d.i();
} else {
zzdnm zzdnmVar = this.d;
synchronized (zzdnmVar) {
view = zzdnmVar.p;
}
view2 = view;
}
if (view2 == null) {
return false;
}
viewGroup.removeAllViews();
if (view2.getParent() instanceof ViewGroup) {
((ViewGroup) view2.getParent()).removeView(view2);
}
if (((Boolean) com.google.android.gms.ads.internal.client.zzbd.zzc().a(zzbgk.H4)).booleanValue()) {
layoutParams = new FrameLayout.LayoutParams(-1, -1, 17);
} else {
layoutParams = new FrameLayout.LayoutParams(-2, -2, 17);
}
viewGroup.addView(view2, layoutParams);
return true;
}
}