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

190 lines
3.7 KiB
Smali

.class final Lcom/google/android/gms/internal/cast/zzjk;
.super Ljava/lang/Object;
.source "SourceFile"
# direct methods
.method static constructor <clinit>()V
.locals 7
.line 1
const/4 v0, 0x0
.line 2
:try_start_0
sget-object v1, Lcom/google/android/gms/internal/cast/zzjr;->a:Lcom/google/android/gms/internal/cast/zzjq;
:try_end_0
.catch Ljava/lang/NoClassDefFoundError; {:try_start_0 .. :try_end_0} :catch_0
.line 3
.line 4
goto :goto_0
.line 5
:catch_0
move-object v1, v0
.line 6
:goto_0
if-eqz v1, :cond_0
.line 7
.line 8
goto :goto_2
.line 9
:cond_0
new-instance v1, Ljava/lang/StringBuilder;
.line 10
.line 11
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
.line 12
.line 13
.line 14
const/4 v2, 0x0
.line 15
move v3, v2
.line 16
:goto_1
const/4 v4, 0x3
.line 17
if-ge v3, v4, :cond_2
.line 18
.line 19
sget-object v4, Lcom/google/android/gms/internal/cast/zzjm;->a:[Ljava/lang/String;
.line 20
.line 21
aget-object v4, v4, v3
.line 22
.line 23
:try_start_1
invoke-static {v4}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;
.line 24
.line 25
.line 26
move-result-object v5
.line 27
invoke-virtual {v5, v0}, Ljava/lang/Class;->getConstructor([Ljava/lang/Class;)Ljava/lang/reflect/Constructor;
.line 28
.line 29
.line 30
move-result-object v5
.line 31
invoke-virtual {v5, v0}, Ljava/lang/reflect/Constructor;->newInstance([Ljava/lang/Object;)Ljava/lang/Object;
.line 32
.line 33
.line 34
move-result-object v5
.line 35
check-cast v5, Lcom/google/android/gms/internal/cast/zzjm;
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
.line 36
.line 37
:goto_2
return-void
.line 38
:catchall_0
move-exception v5
.line 39
const/16 v6, 0xa
.line 40
.line 41
invoke-virtual {v1, v6}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
.line 42
.line 43
.line 44
invoke-virtual {v1, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
.line 45
.line 46
.line 47
const-string v4, ": "
.line 48
.line 49
invoke-virtual {v1, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
.line 50
.line 51
.line 52
instance-of v4, v5, Ljava/lang/reflect/InvocationTargetException;
.line 53
.line 54
if-eqz v4, :cond_1
.line 55
.line 56
invoke-virtual {v5}, Ljava/lang/Throwable;->getCause()Ljava/lang/Throwable;
.line 57
.line 58
.line 59
move-result-object v5
.line 60
:cond_1
invoke-virtual {v1, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
.line 61
.line 62
.line 63
add-int/lit8 v3, v3, 0x1
.line 64
.line 65
goto :goto_1
.line 66
:cond_2
new-instance v0, Ljava/lang/IllegalStateException;
.line 67
.line 68
const-string v3, "No logging platforms found:"
.line 69
.line 70
invoke-virtual {v1, v2, v3}, Ljava/lang/StringBuilder;->insert(ILjava/lang/String;)Ljava/lang/StringBuilder;
.line 71
.line 72
.line 73
move-result-object v1
.line 74
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
.line 75
.line 76
.line 77
move-result-object v1
.line 78
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
.line 79
.line 80
.line 81
throw v0
.end method