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

139 lines
5.2 KiB
Java

package com.google.android.gms.internal.ads;
import android.app.ActivityManager;
import android.content.Context;
import android.os.Bundle;
import android.text.TextUtils;
import j$.util.concurrent.ConcurrentHashMap;
import java.util.Locale;
/* loaded from: classes.dex */
public final class zzdwy {
/* renamed from: a, reason: collision with root package name */
public final ConcurrentHashMap f6219a;
public final zzcdf b;
/* renamed from: c, reason: collision with root package name */
public final zzfik f6220c;
public final zzayq d;
public final Bundle e;
public zzdwy(Context context, zzdxj zzdxjVar, zzcdf zzcdfVar, zzfik zzfikVar, String str, String str2, zzayq zzayqVar) {
ActivityManager.MemoryInfo zze;
String str3;
com.google.android.gms.ads.internal.client.zzm zzmVar = zzfikVar.d;
this.e = new Bundle();
zzdxjVar.getClass();
ConcurrentHashMap concurrentHashMap = new ConcurrentHashMap(zzdxjVar.f6237a);
this.f6219a = concurrentHashMap;
this.b = zzcdfVar;
this.f6220c = zzfikVar;
this.d = zzayqVar;
concurrentHashMap.put("ad_format", str2.toUpperCase(Locale.ROOT));
c();
if (((Boolean) com.google.android.gms.ads.internal.client.zzbd.zzc().a(zzbgk.I2)).booleanValue()) {
Runtime runtime = Runtime.getRuntime();
b("rt_f", String.valueOf(runtime.freeMemory()));
b("rt_m", String.valueOf(runtime.maxMemory()));
b("rt_t", String.valueOf(runtime.totalMemory()));
b("wv_c", String.valueOf(com.google.android.gms.ads.internal.zzt.zzh().k.get()));
if (((Boolean) com.google.android.gms.ads.internal.client.zzbd.zzc().a(zzbgk.Q2)).booleanValue() && (zze = com.google.android.gms.ads.internal.util.client.zzf.zze(context)) != null) {
b("mem_avl", String.valueOf(zze.availMem));
b("mem_tt", String.valueOf(zze.totalMem));
if (true != zze.lowMemory) {
str3 = "0";
} else {
str3 = "1";
}
b("low_m", str3);
}
}
if (((Boolean) com.google.android.gms.ads.internal.client.zzbd.zzc().a(zzbgk.S2)).booleanValue()) {
b("ad_unit_id", zzfikVar.g);
}
if (!((Boolean) com.google.android.gms.ads.internal.client.zzbd.zzc().a(zzbgk.M7)).booleanValue()) {
return;
}
int zzg = com.google.android.gms.ads.nonagon.signalgeneration.zzaa.zzg(zzfikVar) - 1;
if (zzg != 0) {
if (zzg != 1) {
if (zzg != 2) {
if (zzg != 3) {
concurrentHashMap.put("se", "r_both");
} else {
concurrentHashMap.put("se", "r_adstring");
}
} else {
concurrentHashMap.put("se", "r_adinfo");
}
} else {
concurrentHashMap.put("request_id", str);
concurrentHashMap.put("se", "query_g");
}
concurrentHashMap.put("scar", "true");
b("ragent", zzmVar.zzp);
b("rtype", com.google.android.gms.ads.nonagon.signalgeneration.zzaa.zzb(com.google.android.gms.ads.nonagon.signalgeneration.zzaa.zzc(zzmVar)));
return;
}
concurrentHashMap.put("request_id", str);
concurrentHashMap.put("scar", "false");
}
public final void a(Bundle bundle) {
if (bundle != null) {
if (bundle.containsKey("cnt")) {
b("network_coarse", Integer.toString(bundle.getInt("cnt")));
}
if (bundle.containsKey("gnt")) {
b("network_fine", Integer.toString(bundle.getInt("gnt")));
}
}
}
public final void b(String str, String str2) {
if (!TextUtils.isEmpty(str) && !TextUtils.isEmpty(str2)) {
this.f6219a.put(str, str2);
}
}
public final void c() {
int zzg;
String str;
if (!((Boolean) com.google.android.gms.ads.internal.client.zzbd.zzc().a(zzbgk.Sa)).booleanValue()) {
return;
}
zzayl zzaylVar = this.d.b;
boolean z = zzaylVar instanceof com.google.android.gms.ads.internal.zzk;
ConcurrentHashMap concurrentHashMap = this.f6219a;
if (z) {
concurrentHashMap.put("asv", ((com.google.android.gms.ads.internal.zzk) zzaylVar).zzc());
return;
}
if (zzaylVar instanceof zzclf) {
zzgct zzgctVar = (zzgct) ((zzclf) zzaylVar).f.f7764a.b.f.get();
if (zzgctVar == null) {
zzg = 1;
} else {
zzg = zzgctVar.zzg();
}
int i = zzg - 1;
if (i != 1) {
if (i != 2) {
if (i != 3) {
str = "uns";
} else {
str = "3.0";
}
} else {
str = "2.0";
}
} else {
str = "1.0";
}
concurrentHashMap.put("asv", str);
return;
}
concurrentHashMap.put("asv", "NA");
}
}