soul-browser/app/smali/androidx/browser/customtabs/CustomTabsService$1.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

555 lines
13 KiB
Smali

.class Landroidx/browser/customtabs/CustomTabsService$1;
.super Landroid/support/customtabs/ICustomTabsService$Stub;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Landroidx/browser/customtabs/CustomTabsService;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1
name = null
.end annotation
# direct methods
.method public static I1(Landroid/os/Bundle;)Landroid/app/PendingIntent;
.locals 2
.line 1
if-nez p0, :cond_0
.line 2
.line 3
const/4 p0, 0x0
.line 4
return-object p0
.line 5
:cond_0
const-string v0, "android.support.customtabs.extra.SESSION_ID"
.line 6
.line 7
invoke-virtual {p0, v0}, Landroid/os/Bundle;->getParcelable(Ljava/lang/String;)Landroid/os/Parcelable;
.line 8
.line 9
.line 10
move-result-object v1
.line 11
check-cast v1, Landroid/app/PendingIntent;
.line 12
.line 13
invoke-virtual {p0, v0}, Landroid/os/Bundle;->remove(Ljava/lang/String;)V
.line 14
.line 15
.line 16
return-object v1
.end method
# virtual methods
.method public final extraCommand(Ljava/lang/String;Landroid/os/Bundle;)Landroid/os/Bundle;
.locals 0
.line 1
const/4 p1, 0x0
.line 2
throw p1
.end method
.method public final isEngagementSignalsApiAvailable(Landroid/support/customtabs/ICustomTabsCallback;Landroid/os/Bundle;)Z
.locals 1
.line 1
new-instance v0, Landroidx/browser/customtabs/CustomTabsSessionToken;
.line 2
.line 3
invoke-static {p2}, Landroidx/browser/customtabs/CustomTabsService$1;->I1(Landroid/os/Bundle;)Landroid/app/PendingIntent;
.line 4
.line 5
.line 6
move-result-object p2
.line 7
invoke-direct {v0, p1, p2}, Landroidx/browser/customtabs/CustomTabsSessionToken;-><init>(Landroid/support/customtabs/ICustomTabsCallback;Landroid/app/PendingIntent;)V
.line 8
.line 9
.line 10
const/4 p1, 0x0
.line 11
throw p1
.end method
.method public final mayLaunchUrl(Landroid/support/customtabs/ICustomTabsCallback;Landroid/net/Uri;Landroid/os/Bundle;Ljava/util/List;)Z
.locals 0
.line 1
new-instance p2, Landroidx/browser/customtabs/CustomTabsSessionToken;
.line 2
.line 3
invoke-static {p3}, Landroidx/browser/customtabs/CustomTabsService$1;->I1(Landroid/os/Bundle;)Landroid/app/PendingIntent;
.line 4
.line 5
.line 6
move-result-object p3
.line 7
invoke-direct {p2, p1, p3}, Landroidx/browser/customtabs/CustomTabsSessionToken;-><init>(Landroid/support/customtabs/ICustomTabsCallback;Landroid/app/PendingIntent;)V
.line 8
.line 9
.line 10
const/4 p1, 0x0
.line 11
throw p1
.end method
.method public final newAuthTabSession(Landroid/support/customtabs/IAuthTabCallback;Landroid/os/Bundle;)Z
.locals 1
.line 1
invoke-static {p2}, Landroidx/browser/customtabs/CustomTabsService$1;->I1(Landroid/os/Bundle;)Landroid/app/PendingIntent;
.line 2
.line 3
.line 4
move-result-object p2
.line 5
new-instance v0, Landroidx/browser/auth/AuthTabSessionToken;
.line 6
.line 7
invoke-direct {v0, p1, p2}, Landroidx/browser/auth/AuthTabSessionToken;-><init>(Landroid/support/customtabs/IAuthTabCallback;Landroid/app/PendingIntent;)V
.line 8
.line 9
.line 10
const/4 p1, 0x0
.line 11
throw p1
.end method
.method public final newSession(Landroid/support/customtabs/ICustomTabsCallback;)Z
.locals 2
.line 1
new-instance v0, Landroidx/browser/customtabs/CustomTabsSessionToken;
.line 2
.line 3
const/4 v1, 0x0
.line 4
invoke-direct {v0, p1, v1}, Landroidx/browser/customtabs/CustomTabsSessionToken;-><init>(Landroid/support/customtabs/ICustomTabsCallback;Landroid/app/PendingIntent;)V
.line 5
.line 6
.line 7
throw v1
.end method
.method public final newSessionWithExtras(Landroid/support/customtabs/ICustomTabsCallback;Landroid/os/Bundle;)Z
.locals 1
.line 1
invoke-static {p2}, Landroidx/browser/customtabs/CustomTabsService$1;->I1(Landroid/os/Bundle;)Landroid/app/PendingIntent;
.line 2
.line 3
.line 4
move-result-object p2
.line 5
new-instance v0, Landroidx/browser/customtabs/CustomTabsSessionToken;
.line 6
.line 7
invoke-direct {v0, p1, p2}, Landroidx/browser/customtabs/CustomTabsSessionToken;-><init>(Landroid/support/customtabs/ICustomTabsCallback;Landroid/app/PendingIntent;)V
.line 8
.line 9
.line 10
const/4 p1, 0x0
.line 11
throw p1
.end method
.method public final postMessage(Landroid/support/customtabs/ICustomTabsCallback;Ljava/lang/String;Landroid/os/Bundle;)I
.locals 0
.line 1
new-instance p2, Landroidx/browser/customtabs/CustomTabsSessionToken;
.line 2
.line 3
invoke-static {p3}, Landroidx/browser/customtabs/CustomTabsService$1;->I1(Landroid/os/Bundle;)Landroid/app/PendingIntent;
.line 4
.line 5
.line 6
move-result-object p3
.line 7
invoke-direct {p2, p1, p3}, Landroidx/browser/customtabs/CustomTabsSessionToken;-><init>(Landroid/support/customtabs/ICustomTabsCallback;Landroid/app/PendingIntent;)V
.line 8
.line 9
.line 10
const/4 p1, 0x0
.line 11
throw p1
.end method
.method public final prefetch(Landroid/support/customtabs/ICustomTabsCallback;Landroid/net/Uri;Landroid/os/Bundle;)V
.locals 2
.line 1
new-instance v0, Landroidx/browser/customtabs/CustomTabsSessionToken;
.line 2
.line 3
invoke-static {p3}, Landroidx/browser/customtabs/CustomTabsService$1;->I1(Landroid/os/Bundle;)Landroid/app/PendingIntent;
.line 4
.line 5
.line 6
move-result-object v1
.line 7
invoke-direct {v0, p1, v1}, Landroidx/browser/customtabs/CustomTabsSessionToken;-><init>(Landroid/support/customtabs/ICustomTabsCallback;Landroid/app/PendingIntent;)V
.line 8
.line 9
.line 10
const/4 p1, 0x1
.line 11
new-array v0, p1, [Ljava/lang/Object;
.line 12
.line 13
const/4 v1, 0x0
.line 14
aput-object p2, v0, v1
.line 15
.line 16
new-instance p2, Ljava/util/ArrayList;
.line 17
.line 18
invoke-direct {p2, p1}, Ljava/util/ArrayList;-><init>(I)V
.line 19
.line 20
.line 21
aget-object p1, v0, v1
.line 22
.line 23
invoke-static {p1}, Lj$/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 24
.line 25
.line 26
invoke-virtual {p2, p1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
.line 27
.line 28
.line 29
invoke-static {p2}, Lj$/util/DesugarCollections;->unmodifiableList(Ljava/util/List;)Ljava/util/List;
.line 30
.line 31
.line 32
invoke-static {p3}, Landroidx/browser/customtabs/PrefetchOptions;->a(Landroid/os/Bundle;)V
.line 33
.line 34
.line 35
const/4 p1, 0x0
.line 36
throw p1
.end method
.method public final prefetchWithMultipleUrls(Landroid/support/customtabs/ICustomTabsCallback;Ljava/util/List;Landroid/os/Bundle;)V
.locals 1
.line 1
new-instance p2, Landroidx/browser/customtabs/CustomTabsSessionToken;
.line 2
.line 3
invoke-static {p3}, Landroidx/browser/customtabs/CustomTabsService$1;->I1(Landroid/os/Bundle;)Landroid/app/PendingIntent;
.line 4
.line 5
.line 6
move-result-object v0
.line 7
invoke-direct {p2, p1, v0}, Landroidx/browser/customtabs/CustomTabsSessionToken;-><init>(Landroid/support/customtabs/ICustomTabsCallback;Landroid/app/PendingIntent;)V
.line 8
.line 9
.line 10
invoke-static {p3}, Landroidx/browser/customtabs/PrefetchOptions;->a(Landroid/os/Bundle;)V
.line 11
.line 12
.line 13
const/4 p1, 0x0
.line 14
throw p1
.end method
.method public final receiveFile(Landroid/support/customtabs/ICustomTabsCallback;Landroid/net/Uri;ILandroid/os/Bundle;)Z
.locals 0
.line 1
new-instance p2, Landroidx/browser/customtabs/CustomTabsSessionToken;
.line 2
.line 3
invoke-static {p4}, Landroidx/browser/customtabs/CustomTabsService$1;->I1(Landroid/os/Bundle;)Landroid/app/PendingIntent;
.line 4
.line 5
.line 6
move-result-object p3
.line 7
invoke-direct {p2, p1, p3}, Landroidx/browser/customtabs/CustomTabsSessionToken;-><init>(Landroid/support/customtabs/ICustomTabsCallback;Landroid/app/PendingIntent;)V
.line 8
.line 9
.line 10
const/4 p1, 0x0
.line 11
throw p1
.end method
.method public final requestPostMessageChannel(Landroid/support/customtabs/ICustomTabsCallback;Landroid/net/Uri;)Z
.locals 1
.line 1
new-instance p2, Landroidx/browser/customtabs/CustomTabsSessionToken;
.line 2
.line 3
const/4 v0, 0x0
.line 4
invoke-direct {p2, p1, v0}, Landroidx/browser/customtabs/CustomTabsSessionToken;-><init>(Landroid/support/customtabs/ICustomTabsCallback;Landroid/app/PendingIntent;)V
.line 5
.line 6
.line 7
new-instance p1, Landroid/os/Bundle;
.line 8
.line 9
invoke-direct {p1}, Landroid/os/Bundle;-><init>()V
.line 10
.line 11
.line 12
throw v0
.end method
.method public final requestPostMessageChannelWithExtras(Landroid/support/customtabs/ICustomTabsCallback;Landroid/net/Uri;Landroid/os/Bundle;)Z
.locals 1
.line 1
new-instance p2, Landroidx/browser/customtabs/CustomTabsSessionToken;
.line 2
.line 3
invoke-static {p3}, Landroidx/browser/customtabs/CustomTabsService$1;->I1(Landroid/os/Bundle;)Landroid/app/PendingIntent;
.line 4
.line 5
.line 6
move-result-object v0
.line 7
invoke-direct {p2, p1, v0}, Landroidx/browser/customtabs/CustomTabsSessionToken;-><init>(Landroid/support/customtabs/ICustomTabsCallback;Landroid/app/PendingIntent;)V
.line 8
.line 9
.line 10
if-eqz p3, :cond_1
.line 11
.line 12
sget p1, Landroid/os/Build$VERSION;->SDK_INT:I
.line 13
.line 14
const/16 p2, 0x21
.line 15
.line 16
const-string v0, "target_origin"
.line 17
.line 18
if-lt p1, p2, :cond_0
.line 19
.line 20
invoke-static {v0, p3}, Landroidx/browser/customtabs/Api33Impl;->a(Ljava/lang/String;Landroid/os/Bundle;)Ljava/lang/Object;
.line 21
.line 22
.line 23
move-result-object p1
.line 24
check-cast p1, Landroid/net/Uri;
.line 25
.line 26
goto :goto_0
.line 27
:cond_0
invoke-virtual {p3, v0}, Landroid/os/Bundle;->getParcelable(Ljava/lang/String;)Landroid/os/Parcelable;
.line 28
.line 29
.line 30
move-result-object p1
.line 31
check-cast p1, Landroid/net/Uri;
.line 32
.line 33
:cond_1
:goto_0
const/4 p1, 0x0
.line 34
throw p1
.end method
.method public final setEngagementSignalsCallback(Landroid/support/customtabs/ICustomTabsCallback;Landroid/os/IBinder;Landroid/os/Bundle;)Z
.locals 0
.line 1
invoke-static {p2}, Landroid/support/customtabs/IEngagementSignalsCallback$Stub;->asInterface(Landroid/os/IBinder;)Landroid/support/customtabs/IEngagementSignalsCallback;
.line 2
.line 3
.line 4
new-instance p2, Landroidx/browser/customtabs/CustomTabsSessionToken;
.line 5
.line 6
invoke-static {p3}, Landroidx/browser/customtabs/CustomTabsService$1;->I1(Landroid/os/Bundle;)Landroid/app/PendingIntent;
.line 7
.line 8
.line 9
move-result-object p3
.line 10
invoke-direct {p2, p1, p3}, Landroidx/browser/customtabs/CustomTabsSessionToken;-><init>(Landroid/support/customtabs/ICustomTabsCallback;Landroid/app/PendingIntent;)V
.line 11
.line 12
.line 13
const/4 p1, 0x0
.line 14
throw p1
.end method
.method public final updateVisuals(Landroid/support/customtabs/ICustomTabsCallback;Landroid/os/Bundle;)Z
.locals 1
.line 1
new-instance v0, Landroidx/browser/customtabs/CustomTabsSessionToken;
.line 2
.line 3
invoke-static {p2}, Landroidx/browser/customtabs/CustomTabsService$1;->I1(Landroid/os/Bundle;)Landroid/app/PendingIntent;
.line 4
.line 5
.line 6
move-result-object p2
.line 7
invoke-direct {v0, p1, p2}, Landroidx/browser/customtabs/CustomTabsSessionToken;-><init>(Landroid/support/customtabs/ICustomTabsCallback;Landroid/app/PendingIntent;)V
.line 8
.line 9
.line 10
const/4 p1, 0x0
.line 11
throw p1
.end method
.method public final validateRelationship(Landroid/support/customtabs/ICustomTabsCallback;ILandroid/net/Uri;Landroid/os/Bundle;)Z
.locals 0
.line 1
new-instance p2, Landroidx/browser/customtabs/CustomTabsSessionToken;
.line 2
.line 3
invoke-static {p4}, Landroidx/browser/customtabs/CustomTabsService$1;->I1(Landroid/os/Bundle;)Landroid/app/PendingIntent;
.line 4
.line 5
.line 6
move-result-object p3
.line 7
invoke-direct {p2, p1, p3}, Landroidx/browser/customtabs/CustomTabsSessionToken;-><init>(Landroid/support/customtabs/ICustomTabsCallback;Landroid/app/PendingIntent;)V
.line 8
.line 9
.line 10
const/4 p1, 0x0
.line 11
throw p1
.end method
.method public final warmup(J)Z
.locals 0
.line 1
const/4 p1, 0x0
.line 2
throw p1
.end method