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

263 lines
5.9 KiB
Smali

.class public final Lcom/google/android/gms/internal/cast/zzgm;
.super Lcom/google/android/gms/common/internal/GmsClient;
.source "SourceFile"
# instance fields
.field public final c:Ljava/util/concurrent/atomic/AtomicReference;
# direct methods
.method public constructor <init>(Landroid/content/Context;Landroid/os/Looper;Lcom/google/android/gms/common/internal/ClientSettings;Lcom/google/android/gms/common/api/GoogleApiClient$ConnectionCallbacks;Lcom/google/android/gms/common/api/GoogleApiClient$OnConnectionFailedListener;)V
.locals 7
.line 1
const/16 v3, 0x29
.line 2
.line 3
move-object v0, p0
.line 4
move-object v1, p1
.line 5
move-object v2, p2
.line 6
move-object v4, p3
.line 7
move-object v5, p4
.line 8
move-object v6, p5
.line 9
invoke-direct/range {v0 .. v6}, Lcom/google/android/gms/common/internal/GmsClient;-><init>(Landroid/content/Context;Landroid/os/Looper;ILcom/google/android/gms/common/internal/ClientSettings;Lcom/google/android/gms/common/api/GoogleApiClient$ConnectionCallbacks;Lcom/google/android/gms/common/api/GoogleApiClient$OnConnectionFailedListener;)V
.line 10
.line 11
.line 12
new-instance p1, Ljava/util/concurrent/atomic/AtomicReference;
.line 13
.line 14
invoke-direct {p1}, Ljava/util/concurrent/atomic/AtomicReference;-><init>()V
.line 15
.line 16
.line 17
iput-object p1, v0, Lcom/google/android/gms/internal/cast/zzgm;->c:Ljava/util/concurrent/atomic/AtomicReference;
.line 18
.line 19
return-void
.end method
# virtual methods
.method public final createServiceInterface(Landroid/os/IBinder;)Landroid/os/IInterface;
.locals 3
.line 1
if-nez p1, :cond_0
.line 2
.line 3
const/4 p1, 0x0
.line 4
return-object p1
.line 5
:cond_0
const-string v0, "com.google.android.gms.usagereporting.internal.IUsageReportingService"
.line 6
.line 7
invoke-interface {p1, v0}, Landroid/os/IBinder;->queryLocalInterface(Ljava/lang/String;)Landroid/os/IInterface;
.line 8
.line 9
.line 10
move-result-object v1
.line 11
instance-of v2, v1, Lcom/google/android/gms/internal/cast/zzgh;
.line 12
.line 13
if-eqz v2, :cond_1
.line 14
.line 15
check-cast v1, Lcom/google/android/gms/internal/cast/zzgh;
.line 16
.line 17
return-object v1
.line 18
:cond_1
new-instance v1, Lcom/google/android/gms/internal/cast/zzgh;
.line 19
.line 20
invoke-direct {v1, p1, v0}, Lcom/google/android/gms/internal/cast/zza;-><init>(Landroid/os/IBinder;Ljava/lang/String;)V
.line 21
.line 22
.line 23
return-object v1
.end method
.method public final disconnect()V
.locals 4
.line 1
:try_start_0
iget-object v0, p0, Lcom/google/android/gms/internal/cast/zzgm;->c:Ljava/util/concurrent/atomic/AtomicReference;
.line 2
.line 3
const/4 v1, 0x0
.line 4
invoke-virtual {v0, v1}, Ljava/util/concurrent/atomic/AtomicReference;->getAndSet(Ljava/lang/Object;)Ljava/lang/Object;
.line 5
.line 6
.line 7
move-result-object v0
.line 8
check-cast v0, Lcom/google/android/gms/internal/cast/zzgl;
.line 9
.line 10
if-eqz v0, :cond_0
.line 11
.line 12
new-instance v1, Lcom/google/android/gms/internal/cast/zzgk;
.line 13
.line 14
invoke-direct {v1}, Lcom/google/android/gms/internal/cast/zzgj;-><init>()V
.line 15
.line 16
.line 17
invoke-virtual {p0}, Lcom/google/android/gms/common/internal/BaseGmsClient;->getService()Landroid/os/IInterface;
.line 18
.line 19
.line 20
move-result-object v2
.line 21
check-cast v2, Lcom/google/android/gms/internal/cast/zzgh;
.line 22
.line 23
invoke-virtual {v2}, Lcom/google/android/gms/internal/cast/zza;->I1()Landroid/os/Parcel;
.line 24
.line 25
.line 26
move-result-object v3
.line 27
invoke-static {v3, v0}, Lcom/google/android/gms/internal/cast/zzc;->c(Landroid/os/Parcel;Landroid/os/IInterface;)V
.line 28
.line 29
.line 30
invoke-static {v3, v1}, Lcom/google/android/gms/internal/cast/zzc;->c(Landroid/os/Parcel;Landroid/os/IInterface;)V
.line 31
.line 32
.line 33
const/4 v0, 0x5
.line 34
invoke-virtual {v2, v0, v3}, Lcom/google/android/gms/internal/cast/zza;->r2(ILandroid/os/Parcel;)V
:try_end_0
.catch Landroid/os/RemoteException; {:try_start_0 .. :try_end_0} :catch_0
.line 35
.line 36
.line 37
goto :goto_0
.line 38
:catch_0
move-exception v0
.line 39
const-string v1, "UsageReportingClientImp"
.line 40
.line 41
const-string v2, "disconnect(): Could not unregister listener from remote:"
.line 42
.line 43
invoke-static {v1, v2, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
.line 44
.line 45
.line 46
:cond_0
:goto_0
invoke-super {p0}, Lcom/google/android/gms/common/internal/BaseGmsClient;->disconnect()V
.line 47
.line 48
.line 49
return-void
.end method
.method public final getApiFeatures()[Lcom/google/android/gms/common/Feature;
.locals 1
.line 1
sget-object v0, Lcom/google/android/gms/internal/cast/zzfr;->a:[Lcom/google/android/gms/common/Feature;
.line 2
.line 3
return-object v0
.end method
.method public final getMinApkVersion()I
.locals 1
const v0, 0xc042c0
return v0
.end method
.method public final getServiceDescriptor()Ljava/lang/String;
.locals 1
const-string v0, "com.google.android.gms.usagereporting.internal.IUsageReportingService"
return-object v0
.end method
.method public final getStartServiceAction()Ljava/lang/String;
.locals 1
const-string v0, "com.google.android.gms.usagereporting.service.START"
return-object v0
.end method
.method public final usesClientTelemetry()Z
.locals 1
const/4 v0, 0x1
return v0
.end method