soul-browser/app/smali/androidx/savedstate/Recreator.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

447 lines
9.9 KiB
Smali

.class public final Landroidx/savedstate/Recreator;
.super Ljava/lang/Object;
.source "SourceFile"
# interfaces
.implements Landroidx/lifecycle/LifecycleEventObserver;
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Landroidx/savedstate/Recreator$Companion;,
Landroidx/savedstate/Recreator$SavedStateProvider;
}
.end annotation
.annotation runtime Lkotlin/Metadata;
d1 = {
"\u0000\u000c\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0008\u0003\u0008\u0000\u0018\u00002\u00020\u0001:\u0002\u0002\u0003\u00a8\u0006\u0004"
}
d2 = {
"Landroidx/savedstate/Recreator;",
"Landroidx/lifecycle/LifecycleEventObserver;",
"Companion",
"SavedStateProvider",
"savedstate_release"
}
k = 0x1
mv = {
0x1,
0x8,
0x0
}
xi = 0x30
.end annotation
# instance fields
.field public final c:Landroidx/savedstate/SavedStateRegistryOwner;
# direct methods
.method public constructor <init>(Landroidx/savedstate/SavedStateRegistryOwner;)V
.locals 1
.line 1
const-string v0, "owner"
.line 2
.line 3
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 4
.line 5
.line 6
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 7
.line 8
.line 9
iput-object p1, p0, Landroidx/savedstate/Recreator;->c:Landroidx/savedstate/SavedStateRegistryOwner;
.line 10
.line 11
return-void
.end method
# virtual methods
.method public final b(Landroidx/lifecycle/LifecycleOwner;Landroidx/lifecycle/Lifecycle$Event;)V
.locals 7
.line 1
const-string v0, "source"
.line 2
.line 3
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 4
.line 5
.line 6
const-string v0, "event"
.line 7
.line 8
invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 9
.line 10
.line 11
sget-object v0, Landroidx/lifecycle/Lifecycle$Event;->ON_CREATE:Landroidx/lifecycle/Lifecycle$Event;
.line 12
.line 13
if-ne p2, v0, :cond_3
.line 14
.line 15
invoke-interface {p1}, Landroidx/lifecycle/LifecycleOwner;->getLifecycle()Landroidx/lifecycle/Lifecycle;
.line 16
.line 17
.line 18
move-result-object p1
.line 19
invoke-virtual {p1, p0}, Landroidx/lifecycle/Lifecycle;->c(Landroidx/lifecycle/LifecycleObserver;)V
.line 20
.line 21
.line 22
iget-object p1, p0, Landroidx/savedstate/Recreator;->c:Landroidx/savedstate/SavedStateRegistryOwner;
.line 23
.line 24
invoke-interface {p1}, Landroidx/savedstate/SavedStateRegistryOwner;->getSavedStateRegistry()Landroidx/savedstate/SavedStateRegistry;
.line 25
.line 26
.line 27
move-result-object p2
.line 28
const-string v0, "androidx.savedstate.Restarter"
.line 29
.line 30
invoke-virtual {p2, v0}, Landroidx/savedstate/SavedStateRegistry;->a(Ljava/lang/String;)Landroid/os/Bundle;
.line 31
.line 32
.line 33
move-result-object p2
.line 34
if-nez p2, :cond_0
.line 35
.line 36
goto/16 :goto_1
.line 37
.line 38
:cond_0
const-string v0, "classes_to_restore"
.line 39
.line 40
invoke-virtual {p2, v0}, Landroid/os/Bundle;->getStringArrayList(Ljava/lang/String;)Ljava/util/ArrayList;
.line 41
.line 42
.line 43
move-result-object p2
.line 44
if-eqz p2, :cond_2
.line 45
.line 46
invoke-virtual {p2}, Ljava/util/ArrayList;->size()I
.line 47
.line 48
.line 49
move-result v0
.line 50
const/4 v1, 0x0
.line 51
move v2, v1
.line 52
:goto_0
if-ge v2, v0, :cond_1
.line 53
.line 54
invoke-virtual {p2, v2}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
.line 55
.line 56
.line 57
move-result-object v3
.line 58
add-int/lit8 v2, v2, 0x1
.line 59
.line 60
check-cast v3, Ljava/lang/String;
.line 61
.line 62
const-string v4, "Class "
.line 63
.line 64
:try_start_0
const-class v5, Landroidx/savedstate/Recreator;
.line 65
.line 66
invoke-virtual {v5}, Ljava/lang/Class;->getClassLoader()Ljava/lang/ClassLoader;
.line 67
.line 68
.line 69
move-result-object v5
.line 70
invoke-static {v3, v1, v5}, Ljava/lang/Class;->forName(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;
.line 71
.line 72
.line 73
move-result-object v5
.line 74
const-class v6, Landroidx/savedstate/SavedStateRegistry$AutoRecreated;
.line 75
.line 76
invoke-virtual {v5, v6}, Ljava/lang/Class;->asSubclass(Ljava/lang/Class;)Ljava/lang/Class;
.line 77
.line 78
.line 79
move-result-object v5
.line 80
const-string v6, "{\n Class.\u2026class.java)\n }"
.line 81
.line 82
invoke-static {v5, v6}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
:try_end_0
.catch Ljava/lang/ClassNotFoundException; {:try_start_0 .. :try_end_0} :catch_2
.line 83
.line 84
.line 85
const/4 v6, 0x0
.line 86
:try_start_1
invoke-virtual {v5, v6}, Ljava/lang/Class;->getDeclaredConstructor([Ljava/lang/Class;)Ljava/lang/reflect/Constructor;
.line 87
.line 88
.line 89
move-result-object v4
:try_end_1
.catch Ljava/lang/NoSuchMethodException; {:try_start_1 .. :try_end_1} :catch_1
.line 90
const/4 v5, 0x1
.line 91
invoke-virtual {v4, v5}, Ljava/lang/reflect/AccessibleObject;->setAccessible(Z)V
.line 92
.line 93
.line 94
:try_start_2
invoke-virtual {v4, v6}, Ljava/lang/reflect/Constructor;->newInstance([Ljava/lang/Object;)Ljava/lang/Object;
.line 95
.line 96
.line 97
move-result-object v4
.line 98
const-string v5, "{\n constr\u2026wInstance()\n }"
.line 99
.line 100
invoke-static {v4, v5}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
.line 101
.line 102
.line 103
check-cast v4, Landroidx/savedstate/SavedStateRegistry$AutoRecreated;
:try_end_2
.catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_0
.line 104
.line 105
invoke-interface {v4, p1}, Landroidx/savedstate/SavedStateRegistry$AutoRecreated;->a(Landroidx/savedstate/SavedStateRegistryOwner;)V
.line 106
.line 107
.line 108
goto :goto_0
.line 109
:catch_0
move-exception p1
.line 110
new-instance p2, Ljava/lang/RuntimeException;
.line 111
.line 112
const-string v0, "Failed to instantiate "
.line 113
.line 114
invoke-static {v0, v3}, Landroid/support/v4/media/a;->C(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
.line 115
.line 116
.line 117
move-result-object v0
.line 118
invoke-direct {p2, v0, p1}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
.line 119
.line 120
.line 121
throw p2
.line 122
:catch_1
move-exception p1
.line 123
new-instance p2, Ljava/lang/IllegalStateException;
.line 124
.line 125
new-instance v0, Ljava/lang/StringBuilder;
.line 126
.line 127
invoke-direct {v0, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
.line 128
.line 129
.line 130
invoke-virtual {v5}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;
.line 131
.line 132
.line 133
move-result-object v1
.line 134
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
.line 135
.line 136
.line 137
const-string v1, " must have default constructor in order to be automatically recreated"
.line 138
.line 139
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
.line 140
.line 141
.line 142
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
.line 143
.line 144
.line 145
move-result-object v0
.line 146
invoke-direct {p2, v0, p1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
.line 147
.line 148
.line 149
throw p2
.line 150
:catch_2
move-exception p1
.line 151
new-instance p2, Ljava/lang/RuntimeException;
.line 152
.line 153
const-string v0, " wasn\'t found"
.line 154
.line 155
invoke-static {v4, v3, v0}, Landroid/support/v4/media/a;->l(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
.line 156
.line 157
.line 158
move-result-object v0
.line 159
invoke-direct {p2, v0, p1}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
.line 160
.line 161
.line 162
throw p2
.line 163
:cond_1
:goto_1
return-void
.line 164
:cond_2
new-instance p1, Ljava/lang/IllegalStateException;
.line 165
.line 166
const-string p2, "Bundle with restored state for the component \"androidx.savedstate.Restarter\" must contain list of strings by the key \"classes_to_restore\""
.line 167
.line 168
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
.line 169
.line 170
.line 171
throw p1
.line 172
:cond_3
new-instance p1, Ljava/lang/AssertionError;
.line 173
.line 174
const-string p2, "Next event must be ON_CREATE"
.line 175
.line 176
invoke-direct {p1, p2}, Ljava/lang/AssertionError;-><init>(Ljava/lang/Object;)V
.line 177
.line 178
.line 179
throw p1
.end method