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

661 lines
18 KiB
Smali

.class public Lcom/google/android/gms/common/GoogleApiAvailabilityLight;
.super Ljava/lang/Object;
.source "SourceFile"
# annotations
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
.annotation build Lcom/google/android/gms/common/internal/ShowFirstParty;
.end annotation
# static fields
.field public static final GOOGLE_PLAY_SERVICES_PACKAGE:Ljava/lang/String; = "com.google.android.gms"
.annotation build Landroidx/annotation/NonNull;
.end annotation
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
.end field
.field public static final GOOGLE_PLAY_SERVICES_VERSION_CODE:I
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
.end field
.field public static final GOOGLE_PLAY_STORE_PACKAGE:Ljava/lang/String; = "com.android.vending"
.annotation build Landroidx/annotation/NonNull;
.end annotation
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
.end field
.field static final TRACKING_SOURCE_DIALOG:Ljava/lang/String; = "d"
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
.end field
.field static final TRACKING_SOURCE_NOTIFICATION:Ljava/lang/String; = "n"
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
.end field
.field private static final zza:Lcom/google/android/gms/common/GoogleApiAvailabilityLight;
# direct methods
.method static constructor <clinit>()V
.locals 1
.line 1
sget v0, Lcom/google/android/gms/common/GooglePlayServicesUtilLight;->GOOGLE_PLAY_SERVICES_VERSION_CODE:I
.line 2
.line 3
sput v0, Lcom/google/android/gms/common/GoogleApiAvailabilityLight;->GOOGLE_PLAY_SERVICES_VERSION_CODE:I
.line 4
.line 5
new-instance v0, Lcom/google/android/gms/common/GoogleApiAvailabilityLight;
.line 6
.line 7
invoke-direct {v0}, Lcom/google/android/gms/common/GoogleApiAvailabilityLight;-><init>()V
.line 8
.line 9
.line 10
sput-object v0, Lcom/google/android/gms/common/GoogleApiAvailabilityLight;->zza:Lcom/google/android/gms/common/GoogleApiAvailabilityLight;
.line 11
.line 12
return-void
.end method
.method public constructor <init>()V
.locals 0
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static getInstance()Lcom/google/android/gms/common/GoogleApiAvailabilityLight;
.locals 1
.annotation build Landroidx/annotation/NonNull;
.end annotation
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
.annotation build Lcom/google/android/gms/common/internal/ShowFirstParty;
.end annotation
sget-object v0, Lcom/google/android/gms/common/GoogleApiAvailabilityLight;->zza:Lcom/google/android/gms/common/GoogleApiAvailabilityLight;
return-object v0
.end method
# virtual methods
.method public cancelAvailabilityErrorNotifications(Landroid/content/Context;)V
.locals 0
.param p1 # Landroid/content/Context;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
.line 1
invoke-static {p1}, Lcom/google/android/gms/common/GooglePlayServicesUtilLight;->cancelAvailabilityErrorNotifications(Landroid/content/Context;)V
.line 2
.line 3
.line 4
return-void
.end method
.method public getApkVersion(Landroid/content/Context;)I
.locals 0
.param p1 # Landroid/content/Context;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
.annotation build Lcom/google/android/gms/common/internal/ShowFirstParty;
.end annotation
.line 1
invoke-static {p1}, Lcom/google/android/gms/common/GooglePlayServicesUtilLight;->getApkVersion(Landroid/content/Context;)I
.line 2
.line 3
.line 4
move-result p1
.line 5
return p1
.end method
.method public getClientVersion(Landroid/content/Context;)I
.locals 0
.param p1 # Landroid/content/Context;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
.annotation build Lcom/google/android/gms/common/internal/ShowFirstParty;
.end annotation
.line 1
invoke-static {p1}, Lcom/google/android/gms/common/GooglePlayServicesUtilLight;->getClientVersion(Landroid/content/Context;)I
.line 2
.line 3
.line 4
move-result p1
.line 5
return p1
.end method
.method public getErrorResolutionIntent(I)Landroid/content/Intent;
.locals 1
.annotation build Landroidx/annotation/Nullable;
.end annotation
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
.annotation build Lcom/google/android/gms/common/internal/ShowFirstParty;
.end annotation
.annotation runtime Ljava/lang/Deprecated;
.end annotation
const/4 v0, 0x0
.line 1
invoke-virtual {p0, v0, p1, v0}, Lcom/google/android/gms/common/GoogleApiAvailabilityLight;->getErrorResolutionIntent(Landroid/content/Context;ILjava/lang/String;)Landroid/content/Intent;
move-result-object p1
return-object p1
.end method
.method public getErrorResolutionIntent(Landroid/content/Context;ILjava/lang/String;)Landroid/content/Intent;
.locals 3
.param p1 # Landroid/content/Context;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
.param p3 # Ljava/lang/String;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
.annotation build Landroidx/annotation/Nullable;
.end annotation
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
.annotation build Lcom/google/android/gms/common/internal/ShowFirstParty;
.end annotation
const/4 v0, 0x1
.line 2
const-string v1, "com.google.android.gms"
if-eq p2, v0, :cond_1
const/4 v0, 0x2
if-eq p2, v0, :cond_1
const/4 p1, 0x3
const/4 p3, 0x0
if-eq p2, p1, :cond_0
return-object p3
:cond_0
const-string p1, "package"
invoke-static {p1, v1, p3}, Landroid/net/Uri;->fromParts(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Landroid/net/Uri;
move-result-object p1
new-instance p2, Landroid/content/Intent;
const-string p3, "android.settings.APPLICATION_DETAILS_SETTINGS"
.line 3
invoke-direct {p2, p3}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
.line 4
invoke-virtual {p2, p1}, Landroid/content/Intent;->setData(Landroid/net/Uri;)Landroid/content/Intent;
return-object p2
:cond_1
if-eqz p1, :cond_3
.line 5
invoke-static {p1}, Lcom/google/android/gms/common/util/DeviceProperties;->isWearableWithoutPlayStore(Landroid/content/Context;)Z
move-result p2
if-nez p2, :cond_2
goto :goto_0
.line 6
:cond_2
new-instance p1, Landroid/content/Intent;
const-string p2, "com.google.android.clockwork.home.UPDATE_ANDROID_WEAR_ACTION"
.line 7
invoke-direct {p1, p2}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
const-string p2, "com.google.android.wearable.app"
.line 8
invoke-virtual {p1, p2}, Landroid/content/Intent;->setPackage(Ljava/lang/String;)Landroid/content/Intent;
return-object p1
.line 9
:cond_3
:goto_0
new-instance p2, Ljava/lang/StringBuilder;
const-string v0, "gcore_"
.line 10
invoke-direct {p2, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
.line 11
sget v0, Lcom/google/android/gms/common/GoogleApiAvailabilityLight;->GOOGLE_PLAY_SERVICES_VERSION_CODE:I
.line 12
invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
.line 13
const-string v0, "-"
invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
.line 14
invoke-static {p3}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v2
if-nez v2, :cond_4
.line 15
invoke-virtual {p2, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
.line 16
:cond_4
invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
if-eqz p1, :cond_5
.line 17
invoke-virtual {p1}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
move-result-object p3
invoke-virtual {p2, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
.line 18
:cond_5
invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
if-eqz p1, :cond_6
.line 19
:try_start_0
invoke-static {p1}, Lcom/google/android/gms/common/wrappers/Wrappers;->packageManager(Landroid/content/Context;)Lcom/google/android/gms/common/wrappers/PackageManagerWrapper;
move-result-object p3
.line 20
invoke-virtual {p1}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
move-result-object p1
const/4 v0, 0x0
invoke-virtual {p3, p1, v0}, Lcom/google/android/gms/common/wrappers/PackageManagerWrapper;->getPackageInfo(Ljava/lang/String;I)Landroid/content/pm/PackageInfo;
move-result-object p1
.line 21
iget p1, p1, Landroid/content/pm/PackageInfo;->versionCode:I
invoke-virtual {p2, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
:try_end_0
.catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_0 .. :try_end_0} :catch_0
:catch_0
:cond_6
invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
new-instance p2, Landroid/content/Intent;
const-string p3, "android.intent.action.VIEW"
.line 22
invoke-direct {p2, p3}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
const-string p3, "market://details"
.line 23
invoke-static {p3}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;
move-result-object p3
.line 24
invoke-virtual {p3}, Landroid/net/Uri;->buildUpon()Landroid/net/Uri$Builder;
move-result-object p3
const-string v0, "id"
.line 25
invoke-virtual {p3, v0, v1}, Landroid/net/Uri$Builder;->appendQueryParameter(Ljava/lang/String;Ljava/lang/String;)Landroid/net/Uri$Builder;
move-result-object p3
.line 26
invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v0
if-nez v0, :cond_7
const-string v0, "pcampaignid"
.line 27
invoke-virtual {p3, v0, p1}, Landroid/net/Uri$Builder;->appendQueryParameter(Ljava/lang/String;Ljava/lang/String;)Landroid/net/Uri$Builder;
.line 28
:cond_7
invoke-virtual {p3}, Landroid/net/Uri$Builder;->build()Landroid/net/Uri;
move-result-object p1
.line 29
invoke-virtual {p2, p1}, Landroid/content/Intent;->setData(Landroid/net/Uri;)Landroid/content/Intent;
const-string p1, "com.android.vending"
.line 30
invoke-virtual {p2, p1}, Landroid/content/Intent;->setPackage(Ljava/lang/String;)Landroid/content/Intent;
const/high16 p1, 0x80000
.line 31
invoke-virtual {p2, p1}, Landroid/content/Intent;->addFlags(I)Landroid/content/Intent;
return-object p2
.end method
.method public getErrorResolutionPendingIntent(Landroid/content/Context;II)Landroid/app/PendingIntent;
.locals 1
.param p1 # Landroid/content/Context;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.annotation build Landroidx/annotation/Nullable;
.end annotation
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
const/4 v0, 0x0
.line 1
invoke-virtual {p0, p1, p2, p3, v0}, Lcom/google/android/gms/common/GoogleApiAvailabilityLight;->getErrorResolutionPendingIntent(Landroid/content/Context;IILjava/lang/String;)Landroid/app/PendingIntent;
move-result-object p1
return-object p1
.end method
.method public getErrorResolutionPendingIntent(Landroid/content/Context;IILjava/lang/String;)Landroid/app/PendingIntent;
.locals 0
.param p1 # Landroid/content/Context;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.param p4 # Ljava/lang/String;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
.annotation build Landroidx/annotation/Nullable;
.end annotation
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
.annotation build Lcom/google/android/gms/common/internal/ShowFirstParty;
.end annotation
.line 2
invoke-virtual {p0, p1, p2, p4}, Lcom/google/android/gms/common/GoogleApiAvailabilityLight;->getErrorResolutionIntent(Landroid/content/Context;ILjava/lang/String;)Landroid/content/Intent;
move-result-object p2
if-nez p2, :cond_0
const/4 p1, 0x0
return-object p1
:cond_0
const/high16 p4, 0xc000000
.line 3
invoke-static {p1, p3, p2, p4}, Landroid/app/PendingIntent;->getActivity(Landroid/content/Context;ILandroid/content/Intent;I)Landroid/app/PendingIntent;
move-result-object p1
return-object p1
.end method
.method public getErrorString(I)Ljava/lang/String;
.locals 0
.annotation build Landroidx/annotation/NonNull;
.end annotation
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
.line 1
invoke-static {p1}, Lcom/google/android/gms/common/GooglePlayServicesUtilLight;->getErrorString(I)Ljava/lang/String;
.line 2
.line 3
.line 4
move-result-object p1
.line 5
return-object p1
.end method
.method public isGooglePlayServicesAvailable(Landroid/content/Context;)I
.locals 1
.param p1 # Landroid/content/Context;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
.annotation build Lcom/google/android/gms/common/internal/HideFirstParty;
.end annotation
.line 1
sget v0, Lcom/google/android/gms/common/GoogleApiAvailabilityLight;->GOOGLE_PLAY_SERVICES_VERSION_CODE:I
invoke-virtual {p0, p1, v0}, Lcom/google/android/gms/common/GoogleApiAvailabilityLight;->isGooglePlayServicesAvailable(Landroid/content/Context;I)I
move-result p1
return p1
.end method
.method public isGooglePlayServicesAvailable(Landroid/content/Context;I)I
.locals 0
.param p1 # Landroid/content/Context;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
.line 2
invoke-static {p1, p2}, Lcom/google/android/gms/common/GooglePlayServicesUtilLight;->isGooglePlayServicesAvailable(Landroid/content/Context;I)I
move-result p2
.line 3
invoke-static {p1, p2}, Lcom/google/android/gms/common/GooglePlayServicesUtilLight;->isPlayServicesPossiblyUpdating(Landroid/content/Context;I)Z
move-result p1
if-eqz p1, :cond_0
const/16 p1, 0x12
return p1
:cond_0
return p2
.end method
.method public isPlayServicesPossiblyUpdating(Landroid/content/Context;I)Z
.locals 0
.param p1 # Landroid/content/Context;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
.annotation build Lcom/google/android/gms/common/internal/ShowFirstParty;
.end annotation
.line 1
invoke-static {p1, p2}, Lcom/google/android/gms/common/GooglePlayServicesUtilLight;->isPlayServicesPossiblyUpdating(Landroid/content/Context;I)Z
.line 2
.line 3
.line 4
move-result p1
.line 5
return p1
.end method
.method public isPlayStorePossiblyUpdating(Landroid/content/Context;I)Z
.locals 0
.param p1 # Landroid/content/Context;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
.annotation build Lcom/google/android/gms/common/internal/ShowFirstParty;
.end annotation
.line 1
invoke-static {p1, p2}, Lcom/google/android/gms/common/GooglePlayServicesUtilLight;->isPlayStorePossiblyUpdating(Landroid/content/Context;I)Z
.line 2
.line 3
.line 4
move-result p1
.line 5
return p1
.end method
.method public isUninstalledAppPossiblyUpdating(Landroid/content/Context;Ljava/lang/String;)Z
.locals 0
.param p1 # Landroid/content/Context;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.param p2 # Ljava/lang/String;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
.line 1
invoke-static {p1, p2}, Lcom/google/android/gms/common/GooglePlayServicesUtilLight;->zza(Landroid/content/Context;Ljava/lang/String;)Z
.line 2
.line 3
.line 4
move-result p1
.line 5
return p1
.end method
.method public isUserResolvableError(I)Z
.locals 0
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
.line 1
invoke-static {p1}, Lcom/google/android/gms/common/GooglePlayServicesUtilLight;->isUserRecoverableError(I)Z
.line 2
.line 3
.line 4
move-result p1
.line 5
return p1
.end method
.method public verifyGooglePlayServicesIsAvailable(Landroid/content/Context;I)V
.locals 0
.param p1 # Landroid/content/Context;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.annotation build Lcom/google/android/gms/common/annotation/KeepForSdk;
.end annotation
.line 1
invoke-static {p1, p2}, Lcom/google/android/gms/common/GooglePlayServicesUtilLight;->ensurePlayServicesAvailable(Landroid/content/Context;I)V
.line 2
.line 3
.line 4
return-void
.end method