* 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>
361 lines
7.8 KiB
Smali
361 lines
7.8 KiB
Smali
.class public Landroidx/browser/customtabs/CustomTabsClient;
|
|
.super Ljava/lang/Object;
|
|
.source "SourceFile"
|
|
|
|
|
|
# instance fields
|
|
.field public final a:Landroid/support/customtabs/ICustomTabsService;
|
|
|
|
.field public final b:Landroid/content/ComponentName;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Landroid/support/customtabs/ICustomTabsService;Landroid/content/ComponentName;)V
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
.line 2
|
|
.line 3
|
|
.line 4
|
|
iput-object p1, p0, Landroidx/browser/customtabs/CustomTabsClient;->a:Landroid/support/customtabs/ICustomTabsService;
|
|
|
|
.line 5
|
|
.line 6
|
|
iput-object p2, p0, Landroidx/browser/customtabs/CustomTabsClient;->b:Landroid/content/ComponentName;
|
|
|
|
.line 7
|
|
.line 8
|
|
return-void
|
|
.end method
|
|
|
|
.method public static a(Landroid/content/Context;Ljava/lang/String;Landroidx/browser/customtabs/CustomTabsServiceConnection;)V
|
|
.locals 2
|
|
|
|
.line 1
|
|
invoke-virtual {p0}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;
|
|
|
|
.line 2
|
|
.line 3
|
|
.line 4
|
|
move-result-object v0
|
|
|
|
.line 5
|
|
iput-object v0, p2, Landroidx/browser/customtabs/CustomTabsServiceConnection;->c:Landroid/content/Context;
|
|
|
|
.line 6
|
|
.line 7
|
|
new-instance v0, Landroid/content/Intent;
|
|
|
|
.line 8
|
|
.line 9
|
|
const-string v1, "android.support.customtabs.action.CustomTabsService"
|
|
|
|
.line 10
|
|
.line 11
|
|
invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
|
|
|
|
.line 12
|
|
.line 13
|
|
.line 14
|
|
invoke-virtual {p1}, Ljava/lang/String;->isEmpty()Z
|
|
|
|
.line 15
|
|
.line 16
|
|
.line 17
|
|
move-result v1
|
|
|
|
.line 18
|
|
if-nez v1, :cond_0
|
|
|
|
.line 19
|
|
.line 20
|
|
invoke-virtual {v0, p1}, Landroid/content/Intent;->setPackage(Ljava/lang/String;)Landroid/content/Intent;
|
|
|
|
.line 21
|
|
.line 22
|
|
.line 23
|
|
const/16 p1, 0x21
|
|
|
|
.line 24
|
|
.line 25
|
|
invoke-virtual {p0, v0, p2, p1}, Landroid/content/Context;->bindService(Landroid/content/Intent;Landroid/content/ServiceConnection;I)Z
|
|
|
|
.line 26
|
|
.line 27
|
|
.line 28
|
|
return-void
|
|
|
|
.line 29
|
|
:cond_0
|
|
new-instance p0, Ljava/lang/IllegalArgumentException;
|
|
|
|
.line 30
|
|
.line 31
|
|
const-string p1, "Service Intents must be explicit"
|
|
|
|
.line 32
|
|
.line 33
|
|
invoke-direct {p0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
.line 34
|
|
.line 35
|
|
.line 36
|
|
throw p0
|
|
.end method
|
|
|
|
.method public static b(Landroid/content/Context;)Ljava/lang/String;
|
|
.locals 7
|
|
|
|
.line 1
|
|
invoke-virtual {p0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;
|
|
|
|
.line 2
|
|
.line 3
|
|
.line 4
|
|
move-result-object p0
|
|
|
|
.line 5
|
|
new-instance v0, Ljava/util/ArrayList;
|
|
|
|
.line 6
|
|
.line 7
|
|
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
.line 8
|
|
.line 9
|
|
.line 10
|
|
new-instance v1, Landroid/content/Intent;
|
|
|
|
.line 11
|
|
.line 12
|
|
const-string v2, "http://"
|
|
|
|
.line 13
|
|
.line 14
|
|
invoke-static {v2}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;
|
|
|
|
.line 15
|
|
.line 16
|
|
.line 17
|
|
move-result-object v2
|
|
|
|
.line 18
|
|
const-string v3, "android.intent.action.VIEW"
|
|
|
|
.line 19
|
|
.line 20
|
|
invoke-direct {v1, v3, v2}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V
|
|
|
|
.line 21
|
|
.line 22
|
|
.line 23
|
|
const/4 v2, 0x0
|
|
|
|
.line 24
|
|
invoke-virtual {p0, v1, v2}, Landroid/content/pm/PackageManager;->resolveActivity(Landroid/content/Intent;I)Landroid/content/pm/ResolveInfo;
|
|
|
|
.line 25
|
|
.line 26
|
|
.line 27
|
|
move-result-object v1
|
|
|
|
.line 28
|
|
if-eqz v1, :cond_0
|
|
|
|
.line 29
|
|
.line 30
|
|
iget-object v1, v1, Landroid/content/pm/ResolveInfo;->activityInfo:Landroid/content/pm/ActivityInfo;
|
|
|
|
.line 31
|
|
.line 32
|
|
iget-object v1, v1, Landroid/content/pm/ActivityInfo;->packageName:Ljava/lang/String;
|
|
|
|
.line 33
|
|
.line 34
|
|
new-instance v3, Ljava/util/ArrayList;
|
|
|
|
.line 35
|
|
.line 36
|
|
invoke-interface {v0}, Ljava/util/List;->size()I
|
|
|
|
.line 37
|
|
.line 38
|
|
.line 39
|
|
move-result v0
|
|
|
|
.line 40
|
|
add-int/lit8 v0, v0, 0x1
|
|
|
|
.line 41
|
|
.line 42
|
|
invoke-direct {v3, v0}, Ljava/util/ArrayList;-><init>(I)V
|
|
|
|
.line 43
|
|
.line 44
|
|
.line 45
|
|
invoke-virtual {v3, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
.line 46
|
|
.line 47
|
|
.line 48
|
|
move-object v0, v3
|
|
|
|
.line 49
|
|
:cond_0
|
|
new-instance v1, Landroid/content/Intent;
|
|
|
|
.line 50
|
|
.line 51
|
|
const-string v3, "android.support.customtabs.action.CustomTabsService"
|
|
|
|
.line 52
|
|
.line 53
|
|
invoke-direct {v1, v3}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
|
|
|
|
.line 54
|
|
.line 55
|
|
.line 56
|
|
invoke-virtual {v0}, Ljava/util/ArrayList;->size()I
|
|
|
|
.line 57
|
|
.line 58
|
|
.line 59
|
|
move-result v3
|
|
|
|
.line 60
|
|
move v4, v2
|
|
|
|
.line 61
|
|
:cond_1
|
|
if-ge v4, v3, :cond_2
|
|
|
|
.line 62
|
|
.line 63
|
|
invoke-virtual {v0, v4}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
|
|
|
|
.line 64
|
|
.line 65
|
|
.line 66
|
|
move-result-object v5
|
|
|
|
.line 67
|
|
add-int/lit8 v4, v4, 0x1
|
|
|
|
.line 68
|
|
.line 69
|
|
check-cast v5, Ljava/lang/String;
|
|
|
|
.line 70
|
|
.line 71
|
|
invoke-virtual {v1, v5}, Landroid/content/Intent;->setPackage(Ljava/lang/String;)Landroid/content/Intent;
|
|
|
|
.line 72
|
|
.line 73
|
|
.line 74
|
|
invoke-virtual {p0, v1, v2}, Landroid/content/pm/PackageManager;->resolveService(Landroid/content/Intent;I)Landroid/content/pm/ResolveInfo;
|
|
|
|
.line 75
|
|
.line 76
|
|
.line 77
|
|
move-result-object v6
|
|
|
|
.line 78
|
|
if-eqz v6, :cond_1
|
|
|
|
.line 79
|
|
.line 80
|
|
return-object v5
|
|
|
|
.line 81
|
|
:cond_2
|
|
sget p0, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
.line 82
|
|
.line 83
|
|
const/16 v0, 0x1e
|
|
|
|
.line 84
|
|
.line 85
|
|
if-lt p0, v0, :cond_3
|
|
|
|
.line 86
|
|
.line 87
|
|
const-string p0, "CustomTabsClient"
|
|
|
|
.line 88
|
|
.line 89
|
|
const-string v0, "Unable to find any Custom Tabs packages, you may need to add a <queries> element to your manifest. See the docs for CustomTabsClient#getPackageName."
|
|
|
|
.line 90
|
|
.line 91
|
|
invoke-static {p0, v0}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
.line 92
|
|
.line 93
|
|
.line 94
|
|
:cond_3
|
|
const/4 p0, 0x0
|
|
|
|
.line 95
|
|
return-object p0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final c(Landroidx/browser/customtabs/CustomTabsCallback;)Landroidx/browser/customtabs/CustomTabsSession;
|
|
.locals 3
|
|
|
|
.line 1
|
|
iget-object v0, p0, Landroidx/browser/customtabs/CustomTabsClient;->a:Landroid/support/customtabs/ICustomTabsService;
|
|
|
|
.line 2
|
|
.line 3
|
|
new-instance v1, Landroidx/browser/customtabs/CustomTabsClient$3;
|
|
|
|
.line 4
|
|
.line 5
|
|
invoke-direct {v1, p1}, Landroidx/browser/customtabs/CustomTabsClient$3;-><init>(Landroidx/browser/customtabs/CustomTabsCallback;)V
|
|
|
|
.line 6
|
|
.line 7
|
|
.line 8
|
|
const/4 p1, 0x0
|
|
|
|
.line 9
|
|
:try_start_0
|
|
invoke-interface {v0, v1}, Landroid/support/customtabs/ICustomTabsService;->newSession(Landroid/support/customtabs/ICustomTabsCallback;)Z
|
|
|
|
.line 10
|
|
.line 11
|
|
.line 12
|
|
move-result v2
|
|
:try_end_0
|
|
.catch Landroid/os/RemoteException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
.line 13
|
|
if-nez v2, :cond_0
|
|
|
|
.line 14
|
|
.line 15
|
|
return-object p1
|
|
|
|
.line 16
|
|
:cond_0
|
|
new-instance p1, Landroidx/browser/customtabs/CustomTabsSession;
|
|
|
|
.line 17
|
|
.line 18
|
|
iget-object v2, p0, Landroidx/browser/customtabs/CustomTabsClient;->b:Landroid/content/ComponentName;
|
|
|
|
.line 19
|
|
.line 20
|
|
invoke-direct {p1, v0, v1, v2}, Landroidx/browser/customtabs/CustomTabsSession;-><init>(Landroid/support/customtabs/ICustomTabsService;Landroid/support/customtabs/ICustomTabsCallback;Landroid/content/ComponentName;)V
|
|
|
|
.line 21
|
|
.line 22
|
|
.line 23
|
|
:catch_0
|
|
return-object p1
|
|
.end method
|