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

354 lines
7.9 KiB
Smali

.class public Lcom/google/android/gms/cast/MediaError;
.super Lcom/google/android/gms/common/internal/safeparcel/AbstractSafeParcelable;
.source "SourceFile"
# interfaces
.implements Lcom/google/android/gms/common/internal/ReflectedParcelable;
# annotations
.annotation build Lcom/google/android/gms/common/internal/safeparcel/SafeParcelable$Class;
creator = "MediaErrorCreator"
.end annotation
.annotation build Lcom/google/android/gms/common/internal/safeparcel/SafeParcelable$Reserved;
value = {
0x1
}
.end annotation
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/google/android/gms/cast/MediaError$Builder;,
Lcom/google/android/gms/cast/MediaError$DetailedErrorCode;
}
.end annotation
# static fields
.field public static final CREATOR:Landroid/os/Parcelable$Creator;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"Landroid/os/Parcelable$Creator<",
"Lcom/google/android/gms/cast/MediaError;",
">;"
}
.end annotation
.end field
# instance fields
.field public final c:Ljava/lang/String;
.field public final f:J
.field public final g:Ljava/lang/Integer;
.field public final h:Ljava/lang/String;
.field public i:Ljava/lang/String;
.field public final j:Lorg/json/JSONObject;
# direct methods
.method static constructor <clinit>()V
.locals 1
.line 1
new-instance v0, Lcom/google/android/gms/cast/zzbq;
.line 2
.line 3
invoke-direct {v0}, Ljava/lang/Object;-><init>()V
.line 4
.line 5
.line 6
sput-object v0, Lcom/google/android/gms/cast/MediaError;->CREATOR:Landroid/os/Parcelable$Creator;
.line 7
.line 8
return-void
.end method
.method public constructor <init>(Ljava/lang/String;JLjava/lang/Integer;Ljava/lang/String;Lorg/json/JSONObject;)V
.locals 0
.line 1
invoke-direct {p0}, Lcom/google/android/gms/common/internal/safeparcel/AbstractSafeParcelable;-><init>()V
.line 2
.line 3
.line 4
iput-object p1, p0, Lcom/google/android/gms/cast/MediaError;->c:Ljava/lang/String;
.line 5
.line 6
iput-wide p2, p0, Lcom/google/android/gms/cast/MediaError;->f:J
.line 7
.line 8
iput-object p4, p0, Lcom/google/android/gms/cast/MediaError;->g:Ljava/lang/Integer;
.line 9
.line 10
iput-object p5, p0, Lcom/google/android/gms/cast/MediaError;->h:Ljava/lang/String;
.line 11
.line 12
iput-object p6, p0, Lcom/google/android/gms/cast/MediaError;->j:Lorg/json/JSONObject;
.line 13
.line 14
return-void
.end method
.method public static F(Lorg/json/JSONObject;)Lcom/google/android/gms/cast/MediaError;
.locals 9
.line 1
const-string v0, "type"
.line 2
.line 3
const-string v1, "ERROR"
.line 4
.line 5
invoke-virtual {p0, v0, v1}, Lorg/json/JSONObject;->optString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
.line 6
.line 7
.line 8
move-result-object v3
.line 9
const-string v0, "requestId"
.line 10
.line 11
invoke-virtual {p0, v0}, Lorg/json/JSONObject;->optLong(Ljava/lang/String;)J
.line 12
.line 13
.line 14
move-result-wide v4
.line 15
const-string v0, "detailedErrorCode"
.line 16
.line 17
invoke-virtual {p0, v0}, Lorg/json/JSONObject;->has(Ljava/lang/String;)Z
.line 18
.line 19
.line 20
move-result v1
.line 21
const/4 v2, 0x0
.line 22
if-eqz v1, :cond_0
.line 23
.line 24
invoke-virtual {p0, v0}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I
.line 25
.line 26
.line 27
move-result v0
.line 28
invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
.line 29
.line 30
.line 31
move-result-object v0
.line 32
move-object v6, v0
.line 33
goto :goto_0
.line 34
:cond_0
move-object v6, v2
.line 35
:goto_0
const-string v0, "reason"
.line 36
.line 37
invoke-static {p0, v0}, Lcom/google/android/gms/cast/internal/CastUtils;->a(Lorg/json/JSONObject;Ljava/lang/String;)Ljava/lang/String;
.line 38
.line 39
.line 40
move-result-object v7
.line 41
const-string v0, "customData"
.line 42
.line 43
invoke-virtual {p0, v0}, Lorg/json/JSONObject;->has(Ljava/lang/String;)Z
.line 44
.line 45
.line 46
move-result v1
.line 47
if-eqz v1, :cond_1
.line 48
.line 49
invoke-virtual {p0, v0}, Lorg/json/JSONObject;->optJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;
.line 50
.line 51
.line 52
move-result-object v2
.line 53
:cond_1
move-object v8, v2
.line 54
new-instance v2, Lcom/google/android/gms/cast/MediaError;
.line 55
.line 56
invoke-direct/range {v2 .. v8}, Lcom/google/android/gms/cast/MediaError;-><init>(Ljava/lang/String;JLjava/lang/Integer;Ljava/lang/String;Lorg/json/JSONObject;)V
.line 57
.line 58
.line 59
return-object v2
.end method
# virtual methods
.method public final writeToParcel(Landroid/os/Parcel;I)V
.locals 5
.line 1
iget-object p2, p0, Lcom/google/android/gms/cast/MediaError;->j:Lorg/json/JSONObject;
.line 2
.line 3
if-nez p2, :cond_0
.line 4
.line 5
const/4 p2, 0x0
.line 6
goto :goto_0
.line 7
:cond_0
invoke-virtual {p2}, Lorg/json/JSONObject;->toString()Ljava/lang/String;
.line 8
.line 9
.line 10
move-result-object p2
.line 11
:goto_0
iput-object p2, p0, Lcom/google/android/gms/cast/MediaError;->i:Ljava/lang/String;
.line 12
.line 13
invoke-static {p1}, Lcom/google/android/gms/common/internal/safeparcel/SafeParcelWriter;->beginObjectHeader(Landroid/os/Parcel;)I
.line 14
.line 15
.line 16
move-result p2
.line 17
const/4 v0, 0x2
.line 18
iget-object v1, p0, Lcom/google/android/gms/cast/MediaError;->c:Ljava/lang/String;
.line 19
.line 20
const/4 v2, 0x0
.line 21
invoke-static {p1, v0, v1, v2}, Lcom/google/android/gms/common/internal/safeparcel/SafeParcelWriter;->writeString(Landroid/os/Parcel;ILjava/lang/String;Z)V
.line 22
.line 23
.line 24
const/4 v0, 0x3
.line 25
iget-wide v3, p0, Lcom/google/android/gms/cast/MediaError;->f:J
.line 26
.line 27
invoke-static {p1, v0, v3, v4}, Lcom/google/android/gms/common/internal/safeparcel/SafeParcelWriter;->writeLong(Landroid/os/Parcel;IJ)V
.line 28
.line 29
.line 30
const/4 v0, 0x4
.line 31
iget-object v1, p0, Lcom/google/android/gms/cast/MediaError;->g:Ljava/lang/Integer;
.line 32
.line 33
invoke-static {p1, v0, v1, v2}, Lcom/google/android/gms/common/internal/safeparcel/SafeParcelWriter;->writeIntegerObject(Landroid/os/Parcel;ILjava/lang/Integer;Z)V
.line 34
.line 35
.line 36
const/4 v0, 0x5
.line 37
iget-object v1, p0, Lcom/google/android/gms/cast/MediaError;->h:Ljava/lang/String;
.line 38
.line 39
invoke-static {p1, v0, v1, v2}, Lcom/google/android/gms/common/internal/safeparcel/SafeParcelWriter;->writeString(Landroid/os/Parcel;ILjava/lang/String;Z)V
.line 40
.line 41
.line 42
const/4 v0, 0x6
.line 43
iget-object v1, p0, Lcom/google/android/gms/cast/MediaError;->i:Ljava/lang/String;
.line 44
.line 45
invoke-static {p1, v0, v1, v2}, Lcom/google/android/gms/common/internal/safeparcel/SafeParcelWriter;->writeString(Landroid/os/Parcel;ILjava/lang/String;Z)V
.line 46
.line 47
.line 48
invoke-static {p1, p2}, Lcom/google/android/gms/common/internal/safeparcel/SafeParcelWriter;->finishObjectHeader(Landroid/os/Parcel;I)V
.line 49
.line 50
.line 51
return-void
.end method