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

292 lines
6.2 KiB
Smali

.class final enum Lorg/jsoup/parser/HtmlTreeBuilderState$1;
.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, "Initial"
.line 2
.line 3
const/4 v1, 0x0
.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 6
.line 1
invoke-static {p1}, Lorg/jsoup/parser/HtmlTreeBuilderState;->a(Lorg/jsoup/parser/Token;)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
return v1
.line 9
:cond_0
invoke-virtual {p1}, Lorg/jsoup/parser/Token;->a()Z
.line 10
.line 11
.line 12
move-result v0
.line 13
if-eqz v0, :cond_1
.line 14
.line 15
check-cast p1, Lorg/jsoup/parser/Token$Comment;
.line 16
.line 17
invoke-virtual {p2, p1}, Lorg/jsoup/parser/HtmlTreeBuilder;->M(Lorg/jsoup/parser/Token$Comment;)V
.line 18
.line 19
.line 20
return v1
.line 21
:cond_1
invoke-virtual {p1}, Lorg/jsoup/parser/Token;->b()Z
.line 22
.line 23
.line 24
move-result v0
.line 25
sget-object v2, Lorg/jsoup/parser/HtmlTreeBuilderState;->f:Lorg/jsoup/parser/HtmlTreeBuilderState$2;
.line 26
.line 27
if-eqz v0, :cond_4
.line 28
.line 29
check-cast p1, Lorg/jsoup/parser/Token$Doctype;
.line 30
.line 31
new-instance v0, Lorg/jsoup/nodes/DocumentType;
.line 32
.line 33
iget-object v3, p2, Lorg/jsoup/parser/TreeBuilder;->h:Lorg/jsoup/parser/ParseSettings;
.line 34
.line 35
iget-object v4, p1, Lorg/jsoup/parser/Token$Doctype;->d:Lorg/jsoup/parser/TokenData;
.line 36
.line 37
invoke-virtual {v4}, Lorg/jsoup/parser/TokenData;->e()Ljava/lang/String;
.line 38
.line 39
.line 40
move-result-object v4
.line 41
invoke-virtual {v3, v4}, Lorg/jsoup/parser/ParseSettings;->normalizeTag(Ljava/lang/String;)Ljava/lang/String;
.line 42
.line 43
.line 44
move-result-object v3
.line 45
iget-object v4, p1, Lorg/jsoup/parser/Token$Doctype;->f:Lorg/jsoup/parser/TokenData;
.line 46
.line 47
invoke-virtual {v4}, Lorg/jsoup/parser/TokenData;->e()Ljava/lang/String;
.line 48
.line 49
.line 50
move-result-object v4
.line 51
iget-object v5, p1, Lorg/jsoup/parser/Token$Doctype;->g:Lorg/jsoup/parser/TokenData;
.line 52
.line 53
invoke-virtual {v5}, Lorg/jsoup/parser/TokenData;->e()Ljava/lang/String;
.line 54
.line 55
.line 56
move-result-object v5
.line 57
invoke-direct {v0, v3, v4, v5}, Lorg/jsoup/nodes/DocumentType;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
.line 58
.line 59
.line 60
iget-object v3, p1, Lorg/jsoup/parser/Token$Doctype;->e:Ljava/lang/String;
.line 61
.line 62
invoke-virtual {v0, v3}, Lorg/jsoup/nodes/DocumentType;->setPubSysKey(Ljava/lang/String;)V
.line 63
.line 64
.line 65
iget-object v3, p2, Lorg/jsoup/parser/TreeBuilder;->d:Lorg/jsoup/nodes/Document;
.line 66
.line 67
invoke-virtual {v3, v0}, Lorg/jsoup/nodes/Element;->appendChild(Lorg/jsoup/nodes/Node;)Lorg/jsoup/nodes/Element;
.line 68
.line 69
.line 70
invoke-virtual {p2, v0}, Lorg/jsoup/parser/TreeBuilder;->j(Lorg/jsoup/nodes/Node;)V
.line 71
.line 72
.line 73
iget-boolean p1, p1, Lorg/jsoup/parser/Token$Doctype;->h:Z
.line 74
.line 75
if-nez p1, :cond_2
.line 76
.line 77
invoke-virtual {v0}, Lorg/jsoup/nodes/DocumentType;->name()Ljava/lang/String;
.line 78
.line 79
.line 80
move-result-object p1
.line 81
const-string v3, "html"
.line 82
.line 83
invoke-virtual {p1, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
.line 84
.line 85
.line 86
move-result p1
.line 87
if-eqz p1, :cond_2
.line 88
.line 89
invoke-virtual {v0}, Lorg/jsoup/nodes/DocumentType;->publicId()Ljava/lang/String;
.line 90
.line 91
.line 92
move-result-object p1
.line 93
const-string v0, "HTML"
.line 94
.line 95
invoke-virtual {p1, v0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
.line 96
.line 97
.line 98
move-result p1
.line 99
if-eqz p1, :cond_3
.line 100
.line 101
:cond_2
iget-object p1, p2, Lorg/jsoup/parser/TreeBuilder;->d:Lorg/jsoup/nodes/Document;
.line 102
.line 103
sget-object v0, Lorg/jsoup/nodes/Document$QuirksMode;->quirks:Lorg/jsoup/nodes/Document$QuirksMode;
.line 104
.line 105
invoke-virtual {p1, v0}, Lorg/jsoup/nodes/Document;->quirksMode(Lorg/jsoup/nodes/Document$QuirksMode;)Lorg/jsoup/nodes/Document;
.line 106
.line 107
.line 108
:cond_3
iput-object v2, p2, Lorg/jsoup/parser/HtmlTreeBuilder;->n:Lorg/jsoup/parser/HtmlTreeBuilderState;
.line 109
.line 110
return v1
.line 111
:cond_4
iget-object v0, p2, Lorg/jsoup/parser/TreeBuilder;->d:Lorg/jsoup/nodes/Document;
.line 112
.line 113
sget-object v1, Lorg/jsoup/nodes/Document$QuirksMode;->quirks:Lorg/jsoup/nodes/Document$QuirksMode;
.line 114
.line 115
invoke-virtual {v0, v1}, Lorg/jsoup/nodes/Document;->quirksMode(Lorg/jsoup/nodes/Document$QuirksMode;)Lorg/jsoup/nodes/Document;
.line 116
.line 117
.line 118
iput-object v2, p2, Lorg/jsoup/parser/HtmlTreeBuilder;->n:Lorg/jsoup/parser/HtmlTreeBuilderState;
.line 119
.line 120
invoke-virtual {p2, p1}, Lorg/jsoup/parser/HtmlTreeBuilder;->m(Lorg/jsoup/parser/Token;)Z
.line 121
.line 122
.line 123
move-result p1
.line 124
return p1
.end method