soul-browser/app/smali/androidx/core/os/HandlerCompat.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

241 lines
4.4 KiB
Smali

.class public final Landroidx/core/os/HandlerCompat;
.super Ljava/lang/Object;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Landroidx/core/os/HandlerCompat$Api28Impl;,
Landroidx/core/os/HandlerCompat$Api29Impl;
}
.end annotation
# direct methods
.method public static a(Landroid/os/Looper;)Landroid/os/Handler;
.locals 7
.line 1
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
.line 2
.line 3
const/16 v1, 0x1c
.line 4
.line 5
if-lt v0, v1, :cond_0
.line 6
.line 7
invoke-static {p0}, Landroidx/core/os/HandlerCompat$Api28Impl;->a(Landroid/os/Looper;)Landroid/os/Handler;
.line 8
.line 9
.line 10
move-result-object p0
.line 11
return-object p0
.line 12
:cond_0
:try_start_0
const-class v0, Landroid/os/Handler;
.line 13
.line 14
const/4 v1, 0x3
.line 15
new-array v2, v1, [Ljava/lang/Class;
.line 16
.line 17
const-class v3, Landroid/os/Looper;
.line 18
.line 19
const/4 v4, 0x0
.line 20
aput-object v3, v2, v4
.line 21
.line 22
const-class v3, Landroid/os/Handler$Callback;
.line 23
.line 24
const/4 v5, 0x1
.line 25
aput-object v3, v2, v5
.line 26
.line 27
sget-object v3, Ljava/lang/Boolean;->TYPE:Ljava/lang/Class;
.line 28
.line 29
const/4 v6, 0x2
.line 30
aput-object v3, v2, v6
.line 31
.line 32
invoke-virtual {v0, v2}, Ljava/lang/Class;->getDeclaredConstructor([Ljava/lang/Class;)Ljava/lang/reflect/Constructor;
.line 33
.line 34
.line 35
move-result-object v0
.line 36
new-array v1, v1, [Ljava/lang/Object;
.line 37
.line 38
aput-object p0, v1, v4
.line 39
.line 40
const/4 v2, 0x0
.line 41
aput-object v2, v1, v5
.line 42
.line 43
sget-object v2, Ljava/lang/Boolean;->TRUE:Ljava/lang/Boolean;
.line 44
.line 45
aput-object v2, v1, v6
.line 46
.line 47
invoke-virtual {v0, v1}, Ljava/lang/reflect/Constructor;->newInstance([Ljava/lang/Object;)Ljava/lang/Object;
.line 48
.line 49
.line 50
move-result-object v0
.line 51
check-cast v0, Landroid/os/Handler;
:try_end_0
.catch Ljava/lang/IllegalAccessException; {:try_start_0 .. :try_end_0} :catch_2
.catch Ljava/lang/InstantiationException; {:try_start_0 .. :try_end_0} :catch_1
.catch Ljava/lang/NoSuchMethodException; {:try_start_0 .. :try_end_0} :catch_0
.catch Ljava/lang/reflect/InvocationTargetException; {:try_start_0 .. :try_end_0} :catch_3
.line 52
.line 53
return-object v0
.line 54
:catch_0
move-exception v0
.line 55
goto :goto_0
.line 56
:catch_1
move-exception v0
.line 57
goto :goto_0
.line 58
:catch_2
move-exception v0
.line 59
goto :goto_0
.line 60
:catch_3
move-exception p0
.line 61
invoke-virtual {p0}, Ljava/lang/reflect/InvocationTargetException;->getCause()Ljava/lang/Throwable;
.line 62
.line 63
.line 64
move-result-object p0
.line 65
instance-of v0, p0, Ljava/lang/RuntimeException;
.line 66
.line 67
if-nez v0, :cond_2
.line 68
.line 69
instance-of v0, p0, Ljava/lang/Error;
.line 70
.line 71
if-eqz v0, :cond_1
.line 72
.line 73
check-cast p0, Ljava/lang/Error;
.line 74
.line 75
throw p0
.line 76
:cond_1
new-instance v0, Ljava/lang/RuntimeException;
.line 77
.line 78
invoke-direct {v0, p0}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/Throwable;)V
.line 79
.line 80
.line 81
throw v0
.line 82
:cond_2
check-cast p0, Ljava/lang/RuntimeException;
.line 83
.line 84
throw p0
.line 85
:goto_0
const-string v1, "HandlerCompat"
.line 86
.line 87
const-string v2, "Unable to invoke Handler(Looper, Callback, boolean) constructor"
.line 88
.line 89
invoke-static {v1, v2, v0}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
.line 90
.line 91
.line 92
new-instance v0, Landroid/os/Handler;
.line 93
.line 94
invoke-direct {v0, p0}, Landroid/os/Handler;-><init>(Landroid/os/Looper;)V
.line 95
.line 96
.line 97
return-object v0
.end method