soul-browser/app/smali/com/google/android/gms/internal/cast/zzxg.smali
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

228 lines
4 KiB
Smali

.class final Lcom/google/android/gms/internal/cast/zzxg;
.super Lcom/google/android/gms/internal/cast/zzxj;
.source "SourceFile"
# instance fields
.field public final h:I
# direct methods
.method public constructor <init>([B)V
.locals 0
.line 1
invoke-direct {p0, p1}, Lcom/google/android/gms/internal/cast/zzxj;-><init>([B)V
.line 2
.line 3
.line 4
array-length p1, p1
.line 5
invoke-static {p1}, Lcom/google/android/gms/internal/cast/zzxk;->d(I)V
.line 6
.line 7
.line 8
const/16 p1, 0x2f
.line 9
.line 10
iput p1, p0, Lcom/google/android/gms/internal/cast/zzxg;->h:I
.line 11
.line 12
return-void
.end method
# virtual methods
.method public final a(I)B
.locals 5
.line 1
add-int/lit8 v0, p1, 0x1
.line 2
.line 3
iget v1, p0, Lcom/google/android/gms/internal/cast/zzxg;->h:I
.line 4
.line 5
sub-int v0, v1, v0
.line 6
.line 7
or-int/2addr v0, p1
.line 8
if-gez v0, :cond_1
.line 9
.line 10
new-instance v0, Ljava/lang/ArrayIndexOutOfBoundsException;
.line 11
.line 12
if-gez p1, :cond_0
.line 13
.line 14
invoke-static {p1}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
.line 15
.line 16
.line 17
move-result-object v1
.line 18
invoke-virtual {v1}, Ljava/lang/String;->length()I
.line 19
.line 20
.line 21
move-result v1
.line 22
new-instance v2, Ljava/lang/StringBuilder;
.line 23
.line 24
add-int/lit8 v1, v1, 0xb
.line 25
.line 26
invoke-direct {v2, v1}, Ljava/lang/StringBuilder;-><init>(I)V
.line 27
.line 28
.line 29
const-string v1, "Index < 0: "
.line 30
.line 31
invoke-static {p1, v1, v2}, Landroidx/work/impl/workers/a;->r(ILjava/lang/String;Ljava/lang/StringBuilder;)Ljava/lang/String;
.line 32
.line 33
.line 34
move-result-object p1
.line 35
invoke-direct {v0, p1}, Ljava/lang/ArrayIndexOutOfBoundsException;-><init>(Ljava/lang/String;)V
.line 36
.line 37
.line 38
throw v0
.line 39
:cond_0
invoke-static {p1}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
.line 40
.line 41
.line 42
move-result-object v2
.line 43
invoke-virtual {v2}, Ljava/lang/String;->length()I
.line 44
.line 45
.line 46
move-result v2
.line 47
invoke-static {v1}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
.line 48
.line 49
.line 50
move-result-object v3
.line 51
add-int/lit8 v2, v2, 0x12
.line 52
.line 53
invoke-virtual {v3}, Ljava/lang/String;->length()I
.line 54
.line 55
.line 56
move-result v3
.line 57
new-instance v4, Ljava/lang/StringBuilder;
.line 58
.line 59
add-int/2addr v2, v3
.line 60
invoke-direct {v4, v2}, Ljava/lang/StringBuilder;-><init>(I)V
.line 61
.line 62
.line 63
const-string v2, "Index > length: "
.line 64
.line 65
const-string v3, ", "
.line 66
.line 67
invoke-static {v4, v2, p1, v3, v1}, Lcom/mycompany/app/dialog/a;->m(Ljava/lang/StringBuilder;Ljava/lang/String;ILjava/lang/String;I)Ljava/lang/String;
.line 68
.line 69
.line 70
move-result-object p1
.line 71
invoke-direct {v0, p1}, Ljava/lang/ArrayIndexOutOfBoundsException;-><init>(Ljava/lang/String;)V
.line 72
.line 73
.line 74
throw v0
.line 75
:cond_1
iget-object v0, p0, Lcom/google/android/gms/internal/cast/zzxj;->g:[B
.line 76
.line 77
aget-byte p1, v0, p1
.line 78
.line 79
return p1
.end method
.method public final c(I)B
.locals 1
.line 1
iget-object v0, p0, Lcom/google/android/gms/internal/cast/zzxj;->g:[B
.line 2
.line 3
aget-byte p1, v0, p1
.line 4
.line 5
return p1
.end method
.method public final g()I
.locals 1
.line 1
iget v0, p0, Lcom/google/android/gms/internal/cast/zzxg;->h:I
return v0
.end method