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

192 lines
6.2 KiB
Java

package com.google.android.gms.internal.ads;
import android.support.v4.media.session.PlaybackStateCompat;
/* loaded from: classes.dex */
public final class zzaku {
/* renamed from: a, reason: collision with root package name */
public static final int[] f4140a = {1769172845, 1769172786, 1769172787, 1769172788, 1769172789, 1769172790, 1769172793, 1635148593, 1752589105, 1751479857, 1635135537, 1836069937, 1836069938, 862401121, 862401122, 862417462, 862417718, 862414134, 862414646, 1295275552, 1295270176, 1714714144, 1801741417, 1295275600, 1903435808, 1297305174, 1684175153, 1769172332, 1885955686};
public static zzafv a(zzaep zzaepVar, boolean z, boolean z2) {
zzafv zzafvVar;
long j;
zzer zzerVar;
int i;
int i2;
long j2;
int i3;
int i4;
int i5;
int[] iArr;
long zzo = zzaepVar.zzo();
long j3 = -1;
long j4 = PlaybackStateCompat.ACTION_SKIP_TO_QUEUE_ITEM;
if (zzo != -1 && zzo <= PlaybackStateCompat.ACTION_SKIP_TO_QUEUE_ITEM) {
j4 = zzo;
}
zzer zzerVar2 = new zzer(64);
int i6 = (int) j4;
int i7 = 0;
int i8 = 0;
int i9 = 0;
while (i8 < i6) {
zzerVar2.y(8);
if (!zzaepVar.m(zzerVar2.f6834a, i7, 8, true)) {
break;
}
long P = zzerVar2.P();
int b = zzerVar2.b();
if (P == 1) {
j = j3;
zzaepVar.j(zzerVar2.f6834a, 8, 8);
i = 16;
zzerVar2.C(16);
P = zzerVar2.d();
zzerVar = zzerVar2;
} else {
j = j3;
if (P == 0) {
long zzo2 = zzaepVar.zzo();
if (zzo2 != j) {
P = (zzo2 - zzaepVar.zzm()) + 8;
}
}
zzerVar = zzerVar2;
i = 8;
}
long j5 = P;
zzafvVar = null;
long j6 = i;
if (j5 < j6) {
i2 = 1;
if (b == 1718773093) {
if (i == 8) {
j5 = 8;
b = 1718773093;
} else {
b = 1718773093;
}
}
return new zzajo(j5, b, i);
}
i2 = 1;
i8 += i;
if (b == 1836019574) {
i6 += (int) j5;
if (zzo != -1 && i6 > zzo) {
i6 = (int) zzo;
}
zzerVar2 = zzerVar;
j3 = j;
i7 = 0;
} else {
if (b == 1953653099 || b == 1835297121 || b == 1835626086) {
j2 = zzo;
i3 = 0;
} else {
if (b == 1836019558 || b == 1836475768) {
i7 = i2;
break;
}
if (b == 1835295092) {
i4 = 0;
} else {
i4 = i2;
}
i9 |= i4 ^ 1;
if (b == 1937007212) {
if (j5 > 1000000) {
i7 = 0;
break;
}
b = 1937007212;
}
j2 = zzo;
if ((i8 + j5) - j6 >= i6) {
i7 = 0;
break;
}
int i10 = (int) (j5 - j6);
i8 += i10;
if (b == 1718909296) {
if (i10 < 8) {
return new zzajo(i10, 1718909296, 8);
}
zzerVar.y(i10);
i3 = 0;
zzaepVar.j(zzerVar.f6834a, 0, i10);
int b2 = zzerVar.b();
int i11 = (b(b2, z2) ? 1 : 0) | i9;
zzerVar.G(4);
int B = zzerVar.B() / 4;
if (i11 == 0 && B > 0) {
iArr = new int[B];
int i12 = 0;
while (true) {
if (i12 < B) {
int b3 = zzerVar.b();
iArr[i12] = b3;
if (b(b3, z2)) {
i5 = i2;
break;
}
i12++;
} else {
i5 = i11;
break;
}
}
} else {
i5 = i11;
iArr = null;
}
if (i5 != 0) {
i9 = i5;
} else {
return new zzakz(b2, iArr);
}
} else {
i3 = 0;
if (i10 != 0) {
zzaepVar.h(i10);
}
}
}
i7 = i3;
zzerVar2 = zzerVar;
zzo = j2;
j3 = j;
}
}
zzafvVar = null;
if (i9 == 0) {
return zzakq.f4135a;
}
if (z != i7) {
if (i7 != 0) {
return zzaki.b;
}
return zzaki.f4126c;
}
return zzafvVar;
}
public static boolean b(int i, boolean z) {
if ((i >>> 8) == 3368816) {
return true;
}
if (i == 1751476579) {
if (z) {
return true;
}
i = 1751476579;
}
for (int i2 = 0; i2 < 29; i2++) {
if (f4140a[i2] == i) {
return true;
}
}
return false;
}
}