soul-browser/app/smali_classes4/org/jsoup/parser/HtmlTreeBuilderState$5.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

467 lines
8.8 KiB
Smali

.class final enum Lorg/jsoup/parser/HtmlTreeBuilderState$5;
.super Lorg/jsoup/parser/HtmlTreeBuilderState;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lorg/jsoup/parser/HtmlTreeBuilderState;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x4011
name = null
.end annotation
# direct methods
.method public constructor <init>()V
.locals 2
.line 1
const-string v0, "InHeadNoscript"
.line 2
.line 3
const/4 v1, 0x4
.line 4
invoke-direct {p0, v0, v1}, Ljava/lang/Enum;-><init>(Ljava/lang/String;I)V
.line 5
.line 6
.line 7
return-void
.end method
# virtual methods
.method public final d(Lorg/jsoup/parser/Token;Lorg/jsoup/parser/HtmlTreeBuilder;)Z
.locals 4
.line 1
invoke-virtual {p1}, Lorg/jsoup/parser/Token;->b()Z
.line 2
.line 3
.line 4
move-result v0
.line 5
const/4 v1, 0x1
.line 6
if-eqz v0, :cond_0
.line 7
.line 8
invoke-virtual {p2, p0}, Lorg/jsoup/parser/HtmlTreeBuilder;->B(Lorg/jsoup/parser/HtmlTreeBuilderState;)V
.line 9
.line 10
.line 11
return v1
.line 12
:cond_0
invoke-virtual {p1}, Lorg/jsoup/parser/Token;->e()Z
.line 13
.line 14
.line 15
move-result v0
.line 16
if-eqz v0, :cond_1
.line 17
.line 18
move-object v0, p1
.line 19
check-cast v0, Lorg/jsoup/parser/Token$StartTag;
.line 20
.line 21
invoke-virtual {v0}, Lorg/jsoup/parser/Token$Tag;->m()Ljava/lang/String;
.line 22
.line 23
.line 24
move-result-object v0
.line 25
const-string v2, "html"
.line 26
.line 27
invoke-virtual {v0, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
.line 28
.line 29
.line 30
move-result v0
.line 31
if-eqz v0, :cond_1
.line 32
.line 33
sget-object v0, Lorg/jsoup/parser/HtmlTreeBuilderState;->k:Lorg/jsoup/parser/HtmlTreeBuilderState$7;
.line 34
.line 35
invoke-virtual {v0, p1, p2}, Lorg/jsoup/parser/HtmlTreeBuilderState$7;->d(Lorg/jsoup/parser/Token;Lorg/jsoup/parser/HtmlTreeBuilder;)Z
.line 36
.line 37
.line 38
move-result p1
.line 39
return p1
.line 40
:cond_1
invoke-virtual {p1}, Lorg/jsoup/parser/Token;->d()Z
.line 41
.line 42
.line 43
move-result v0
.line 44
sget-object v2, Lorg/jsoup/parser/HtmlTreeBuilderState;->h:Lorg/jsoup/parser/HtmlTreeBuilderState$4;
.line 45
.line 46
if-eqz v0, :cond_2
.line 47
.line 48
move-object v0, p1
.line 49
check-cast v0, Lorg/jsoup/parser/Token$EndTag;
.line 50
.line 51
invoke-virtual {v0}, Lorg/jsoup/parser/Token$Tag;->m()Ljava/lang/String;
.line 52
.line 53
.line 54
move-result-object v0
.line 55
const-string v3, "noscript"
.line 56
.line 57
invoke-virtual {v0, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
.line 58
.line 59
.line 60
move-result v0
.line 61
if-eqz v0, :cond_2
.line 62
.line 63
invoke-virtual {p2}, Lorg/jsoup/parser/TreeBuilder;->l()Lorg/jsoup/nodes/Element;
.line 64
.line 65
.line 66
iput-object v2, p2, Lorg/jsoup/parser/HtmlTreeBuilder;->n:Lorg/jsoup/parser/HtmlTreeBuilderState;
.line 67
.line 68
return v1
.line 69
:cond_2
invoke-static {p1}, Lorg/jsoup/parser/HtmlTreeBuilderState;->a(Lorg/jsoup/parser/Token;)Z
.line 70
.line 71
.line 72
move-result v0
.line 73
if-nez v0, :cond_8
.line 74
.line 75
invoke-virtual {p1}, Lorg/jsoup/parser/Token;->a()Z
.line 76
.line 77
.line 78
move-result v0
.line 79
if-nez v0, :cond_8
.line 80
.line 81
invoke-virtual {p1}, Lorg/jsoup/parser/Token;->e()Z
.line 82
.line 83
.line 84
move-result v0
.line 85
if-eqz v0, :cond_3
.line 86
.line 87
move-object v0, p1
.line 88
check-cast v0, Lorg/jsoup/parser/Token$StartTag;
.line 89
.line 90
invoke-virtual {v0}, Lorg/jsoup/parser/Token$Tag;->m()Ljava/lang/String;
.line 91
.line 92
.line 93
move-result-object v0
.line 94
sget-object v3, Lorg/jsoup/parser/HtmlTreeBuilderState$Constants;->f:[Ljava/lang/String;
.line 95
.line 96
invoke-static {v0, v3}, Lorg/jsoup/internal/StringUtil;->inSorted(Ljava/lang/String;[Ljava/lang/String;)Z
.line 97
.line 98
.line 99
move-result v0
.line 100
if-eqz v0, :cond_3
.line 101
.line 102
goto :goto_0
.line 103
:cond_3
invoke-virtual {p1}, Lorg/jsoup/parser/Token;->d()Z
.line 104
.line 105
.line 106
move-result v0
.line 107
if-eqz v0, :cond_4
.line 108
.line 109
move-object v0, p1
.line 110
check-cast v0, Lorg/jsoup/parser/Token$EndTag;
.line 111
.line 112
invoke-virtual {v0}, Lorg/jsoup/parser/Token$Tag;->m()Ljava/lang/String;
.line 113
.line 114
.line 115
move-result-object v0
.line 116
const-string v2, "br"
.line 117
.line 118
invoke-virtual {v0, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
.line 119
.line 120
.line 121
move-result v0
.line 122
if-eqz v0, :cond_4
.line 123
.line 124
invoke-virtual {p2, p0}, Lorg/jsoup/parser/HtmlTreeBuilder;->B(Lorg/jsoup/parser/HtmlTreeBuilderState;)V
.line 125
.line 126
.line 127
new-instance v0, Lorg/jsoup/parser/Token$Character;
.line 128
.line 129
invoke-direct {v0}, Lorg/jsoup/parser/Token$Character;-><init>()V
.line 130
.line 131
.line 132
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
.line 133
.line 134
.line 135
move-result-object p1
.line 136
iget-object v2, v0, Lorg/jsoup/parser/Token$Character;->d:Lorg/jsoup/parser/TokenData;
.line 137
.line 138
invoke-virtual {v2}, Lorg/jsoup/parser/TokenData;->d()V
.line 139
.line 140
.line 141
iput-object p1, v2, Lorg/jsoup/parser/TokenData;->a:Ljava/lang/String;
.line 142
.line 143
invoke-virtual {p2, v0}, Lorg/jsoup/parser/HtmlTreeBuilder;->K(Lorg/jsoup/parser/Token$Character;)V
.line 144
.line 145
.line 146
return v1
.line 147
:cond_4
invoke-virtual {p1}, Lorg/jsoup/parser/Token;->e()Z
.line 148
.line 149
.line 150
move-result v0
.line 151
if-eqz v0, :cond_5
.line 152
.line 153
move-object v0, p1
.line 154
check-cast v0, Lorg/jsoup/parser/Token$StartTag;
.line 155
.line 156
invoke-virtual {v0}, Lorg/jsoup/parser/Token$Tag;->m()Ljava/lang/String;
.line 157
.line 158
.line 159
move-result-object v0
.line 160
sget-object v2, Lorg/jsoup/parser/HtmlTreeBuilderState$Constants;->H:[Ljava/lang/String;
.line 161
.line 162
invoke-static {v0, v2}, Lorg/jsoup/internal/StringUtil;->inSorted(Ljava/lang/String;[Ljava/lang/String;)Z
.line 163
.line 164
.line 165
move-result v0
.line 166
if-nez v0, :cond_6
.line 167
.line 168
:cond_5
invoke-virtual {p1}, Lorg/jsoup/parser/Token;->d()Z
.line 169
.line 170
.line 171
move-result v0
.line 172
if-eqz v0, :cond_7
.line 173
.line 174
:cond_6
invoke-virtual {p2, p0}, Lorg/jsoup/parser/HtmlTreeBuilder;->B(Lorg/jsoup/parser/HtmlTreeBuilderState;)V
.line 175
.line 176
.line 177
const/4 p1, 0x0
.line 178
return p1
.line 179
:cond_7
invoke-virtual {p2, p0}, Lorg/jsoup/parser/HtmlTreeBuilder;->B(Lorg/jsoup/parser/HtmlTreeBuilderState;)V
.line 180
.line 181
.line 182
new-instance v0, Lorg/jsoup/parser/Token$Character;
.line 183
.line 184
invoke-direct {v0}, Lorg/jsoup/parser/Token$Character;-><init>()V
.line 185
.line 186
.line 187
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
.line 188
.line 189
.line 190
move-result-object p1
.line 191
iget-object v2, v0, Lorg/jsoup/parser/Token$Character;->d:Lorg/jsoup/parser/TokenData;
.line 192
.line 193
invoke-virtual {v2}, Lorg/jsoup/parser/TokenData;->d()V
.line 194
.line 195
.line 196
iput-object p1, v2, Lorg/jsoup/parser/TokenData;->a:Ljava/lang/String;
.line 197
.line 198
invoke-virtual {p2, v0}, Lorg/jsoup/parser/HtmlTreeBuilder;->K(Lorg/jsoup/parser/Token$Character;)V
.line 199
.line 200
.line 201
return v1
.line 202
:cond_8
:goto_0
invoke-virtual {v2, p1, p2}, Lorg/jsoup/parser/HtmlTreeBuilderState$4;->d(Lorg/jsoup/parser/Token;Lorg/jsoup/parser/HtmlTreeBuilder;)Z
.line 203
.line 204
.line 205
move-result p1
.line 206
return p1
.end method