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

165 lines
4.2 KiB
Smali

.class public abstract Lcom/google/android/gms/common/internal/zag;
.super Ljava/lang/Object;
.source "SourceFile"
# interfaces
.implements Landroid/content/DialogInterface$OnClickListener;
# direct methods
.method public constructor <init>()V
.locals 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static zab(Landroid/app/Activity;Landroid/content/Intent;I)Lcom/google/android/gms/common/internal/zag;
.locals 1
.param p1 # Landroid/content/Intent;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
new-instance v0, Lcom/google/android/gms/common/internal/zad;
invoke-direct {v0, p1, p0, p2}, Lcom/google/android/gms/common/internal/zad;-><init>(Landroid/content/Intent;Landroid/app/Activity;I)V
return-object v0
.end method
.method public static zac(Landroidx/fragment/app/Fragment;Landroid/content/Intent;I)Lcom/google/android/gms/common/internal/zag;
.locals 1
.param p0 # Landroidx/fragment/app/Fragment;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.param p1 # Landroid/content/Intent;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
new-instance v0, Lcom/google/android/gms/common/internal/zae;
invoke-direct {v0, p1, p0, p2}, Lcom/google/android/gms/common/internal/zae;-><init>(Landroid/content/Intent;Landroidx/fragment/app/Fragment;I)V
return-object v0
.end method
.method public static zad(Lcom/google/android/gms/common/api/internal/LifecycleFragment;Landroid/content/Intent;I)Lcom/google/android/gms/common/internal/zag;
.locals 1
.param p0 # Lcom/google/android/gms/common/api/internal/LifecycleFragment;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.param p1 # Landroid/content/Intent;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
new-instance p2, Lcom/google/android/gms/common/internal/zaf;
const/4 v0, 0x2
invoke-direct {p2, p1, p0, v0}, Lcom/google/android/gms/common/internal/zaf;-><init>(Landroid/content/Intent;Lcom/google/android/gms/common/api/internal/LifecycleFragment;I)V
return-object p2
.end method
# virtual methods
.method public final onClick(Landroid/content/DialogInterface;I)V
.locals 4
.line 1
:try_start_0
invoke-virtual {p0}, Lcom/google/android/gms/common/internal/zag;->zaa()V
:try_end_0
.catch Landroid/content/ActivityNotFoundException; {:try_start_0 .. :try_end_0} :catch_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 2
.line 3
.line 4
goto :goto_0
.line 5
:catchall_0
move-exception p2
.line 6
goto :goto_1
.line 7
:catch_0
move-exception p2
.line 8
:try_start_1
const-string v0, "Failed to start resolution intent."
.line 9
.line 10
const-string v1, "Failed to start resolution intent. This may occur when resolving Google Play services connection issues on emulators with Google APIs but not Google Play Store."
.line 11
.line 12
sget-object v2, Landroid/os/Build;->FINGERPRINT:Ljava/lang/String;
.line 13
.line 14
const-string v3, "generic"
.line 15
.line 16
invoke-virtual {v2, v3}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
.line 17
.line 18
.line 19
move-result v2
.line 20
const/4 v3, 0x1
.line 21
if-ne v3, v2, :cond_0
.line 22
.line 23
move-object v0, v1
.line 24
:cond_0
const-string v1, "DialogRedirect"
.line 25
.line 26
invoke-static {v1, v0, p2}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
.line 27
.line 28
.line 29
:goto_0
invoke-interface {p1}, Landroid/content/DialogInterface;->dismiss()V
.line 30
.line 31
.line 32
return-void
.line 33
:goto_1
invoke-interface {p1}, Landroid/content/DialogInterface;->dismiss()V
.line 34
.line 35
.line 36
throw p2
.end method
.method public abstract zaa()V
.end method