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

113 lines
4.5 KiB
Java

package com.google.android.gms.internal.ads;
import com.google.common.util.concurrent.ListenableFuture;
import java.util.ArrayList;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Executor;
import java.util.concurrent.Future;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
/* loaded from: classes.dex */
public final class zzgym extends zzgyo {
public static ListenableFuture a(Object obj) {
if (obj == null) {
return zzgyq.f;
}
return new zzgyq(obj);
}
/* JADX WARN: Type inference failed for: r0v0, types: [com.google.common.util.concurrent.ListenableFuture, com.google.android.gms.internal.ads.zzgxf, java.lang.Object] */
public static ListenableFuture b(Throwable th) {
th.getClass();
?? obj = new Object();
obj.d(th);
return obj;
}
public static ListenableFuture c(Callable callable, Executor executor) {
zzgzl zzgzlVar = new zzgzl(callable);
executor.execute(zzgzlVar);
return zzgzlVar;
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r0v0, types: [com.google.common.util.concurrent.ListenableFuture, com.google.android.gms.internal.ads.zzgzl, java.lang.Object, java.lang.Runnable] */
public static ListenableFuture d(zzgxt zzgxtVar, Executor executor) {
?? obj = new Object();
obj.l = new zzgzj(obj, zzgxtVar);
executor.execute(obj);
return obj;
}
public static ListenableFuture e(ListenableFuture listenableFuture, Class cls, zzgpr zzgprVar, Executor executor) {
int i = zzgxe.o;
zzgxe zzgxeVar = new zzgxe(listenableFuture, cls, zzgprVar);
listenableFuture.k(zzgxeVar, zzgzd.a(executor, zzgxeVar));
return zzgxeVar;
}
public static ListenableFuture f(ListenableFuture listenableFuture, Class cls, zzgxu zzgxuVar, Executor executor) {
int i = zzgxe.o;
zzgxe zzgxeVar = new zzgxe(listenableFuture, cls, zzgxuVar);
listenableFuture.k(zzgxeVar, zzgzd.a(executor, zzgxeVar));
return zzgxeVar;
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r0v1, types: [com.google.android.gms.internal.ads.zzgzi, com.google.common.util.concurrent.ListenableFuture, java.lang.Object] */
/* JADX WARN: Type inference failed for: r1v0, types: [com.google.android.gms.internal.ads.zzgzg, java.lang.Object, java.lang.Runnable] */
public static ListenableFuture g(ListenableFuture listenableFuture, long j, TimeUnit timeUnit, ScheduledExecutorService scheduledExecutorService) {
if (listenableFuture.isDone()) {
return listenableFuture;
}
?? obj = new Object();
obj.l = listenableFuture;
?? obj2 = new Object();
obj2.f8312c = obj;
obj.m = scheduledExecutorService.schedule((Runnable) obj2, j, timeUnit);
listenableFuture.k(obj2, zzgyb.f8301c);
return obj;
}
public static ListenableFuture h(ListenableFuture listenableFuture, zzgxu zzgxuVar, Executor executor) {
int i = zzgxl.n;
zzgxl zzgxlVar = new zzgxl(listenableFuture, zzgxuVar);
listenableFuture.k(zzgxlVar, zzgzd.a(executor, zzgxlVar));
return zzgxlVar;
}
public static ListenableFuture i(ListenableFuture listenableFuture, zzgpr zzgprVar, Executor executor) {
int i = zzgxl.n;
zzgxl zzgxlVar = new zzgxl(listenableFuture, zzgprVar);
listenableFuture.k(zzgxlVar, zzgzd.a(executor, zzgxlVar));
return zzgxlVar;
}
public static ListenableFuture j(ArrayList arrayList) {
return new zzgxv(zzgtd.v(arrayList), true);
}
public static void k(ListenableFuture listenableFuture, zzgyj zzgyjVar, Executor executor) {
listenableFuture.k(new zzgyk(listenableFuture, zzgyjVar), executor);
}
public static Object l(Future future) {
if (future.isDone()) {
return zzgzn.a(future);
}
throw new IllegalStateException(zzgqr.b("Future was expected to be done: %s", future));
}
public static Object m(zzcdt zzcdtVar) {
try {
return zzgzn.a(zzcdtVar);
} catch (ExecutionException e) {
if (e.getCause() instanceof Error) {
throw new Error((Error) e.getCause());
}
throw new RuntimeException(e.getCause());
}
}
}