soul-browser/app/smali_classes4/net/dankito/readability4j/processor/ArticleGrabber$clean$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

294 lines
6.1 KiB
Smali

.class final Lnet/dankito/readability4j/processor/ArticleGrabber$clean$1;
.super Lkotlin/jvm/internal/Lambda;
.source "SourceFile"
# interfaces
.implements Lkotlin/jvm/functions/Function1;
# annotations
.annotation system Ldalvik/annotation/Signature;
value = {
"Lkotlin/jvm/internal/Lambda;",
"Lkotlin/jvm/functions/Function1<",
"Lorg/jsoup/nodes/Element;",
"Ljava/lang/Boolean;",
">;"
}
.end annotation
.annotation runtime Lkotlin/Metadata;
bv = {
0x1,
0x0,
0x3
}
d1 = {
"\u0000\u000e\n\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0018\u0002\n\u0000\u0010\u0000\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u0003H\n\u00a2\u0006\u0002\u0008\u0004"
}
d2 = {
"<anonymous>",
"",
"element",
"Lorg/jsoup/nodes/Element;",
"invoke"
}
k = 0x3
mv = {
0x1,
0x1,
0x10
}
.end annotation
# instance fields
.field public final synthetic c:Lnet/dankito/readability4j/processor/ArticleGrabber;
.field public final synthetic f:Z
# direct methods
.method public constructor <init>(Lnet/dankito/readability4j/processor/ArticleGrabber;Z)V
.locals 0
iput-object p1, p0, Lnet/dankito/readability4j/processor/ArticleGrabber$clean$1;->c:Lnet/dankito/readability4j/processor/ArticleGrabber;
iput-boolean p2, p0, Lnet/dankito/readability4j/processor/ArticleGrabber$clean$1;->f:Z
const/4 p1, 0x1
invoke-direct {p0, p1}, Lkotlin/jvm/internal/Lambda;-><init>(I)V
return-void
.end method
# virtual methods
.method public final invoke(Ljava/lang/Object;)Ljava/lang/Object;
.locals 9
.line 1
check-cast p1, Lorg/jsoup/nodes/Element;
.line 2
.line 3
iget-object v0, p0, Lnet/dankito/readability4j/processor/ArticleGrabber$clean$1;->c:Lnet/dankito/readability4j/processor/ArticleGrabber;
.line 4
.line 5
iget-object v0, v0, Lnet/dankito/readability4j/processor/ArticleGrabber;->h:Lnet/dankito/readability4j/util/RegExUtil;
.line 6
.line 7
iget-boolean v1, p0, Lnet/dankito/readability4j/processor/ArticleGrabber$clean$1;->f:Z
.line 8
.line 9
if-eqz v1, :cond_2
.line 10
.line 11
invoke-virtual {p1}, Lorg/jsoup/nodes/Element;->attributes()Lorg/jsoup/nodes/Attributes;
.line 12
.line 13
.line 14
move-result-object v1
.line 15
const-string v2, "element.attributes()"
.line 16
.line 17
invoke-static {v1, v2}, Lkotlin/jvm/internal/Intrinsics;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
.line 18
.line 19
.line 20
new-instance v3, Ljava/util/ArrayList;
.line 21
.line 22
const/16 v2, 0xa
.line 23
.line 24
invoke-static {v1, v2}, Lkotlin/collections/CollectionsKt;->collectionSizeOrDefault(Ljava/lang/Iterable;I)I
.line 25
.line 26
.line 27
move-result v2
.line 28
invoke-direct {v3, v2}, Ljava/util/ArrayList;-><init>(I)V
.line 29
.line 30
.line 31
invoke-interface {v1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
.line 32
.line 33
.line 34
move-result-object v1
.line 35
:goto_0
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
.line 36
.line 37
.line 38
move-result v2
.line 39
if-eqz v2, :cond_0
.line 40
.line 41
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
.line 42
.line 43
.line 44
move-result-object v2
.line 45
check-cast v2, Lorg/jsoup/nodes/Attribute;
.line 46
.line 47
invoke-virtual {v2}, Lorg/jsoup/nodes/Attribute;->getValue()Ljava/lang/String;
.line 48
.line 49
.line 50
move-result-object v2
.line 51
invoke-virtual {v3, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
.line 52
.line 53
.line 54
goto :goto_0
.line 55
:cond_0
const/4 v7, 0x0
.line 56
const/16 v8, 0x3e
.line 57
.line 58
const-string v4, "|"
.line 59
.line 60
const/4 v5, 0x0
.line 61
const/4 v6, 0x0
.line 62
invoke-static/range {v3 .. v8}, Lkotlin/collections/CollectionsKt;->n(Ljava/lang/Iterable;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function1;I)Ljava/lang/String;
.line 63
.line 64
.line 65
move-result-object v1
.line 66
iget-object v2, v0, Lnet/dankito/readability4j/util/RegExUtil;->g:Ljava/util/regex/Pattern;
.line 67
.line 68
invoke-virtual {v2, v1}, Ljava/util/regex/Pattern;->matcher(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;
.line 69
.line 70
.line 71
move-result-object v1
.line 72
invoke-virtual {v1}, Ljava/util/regex/Matcher;->find()Z
.line 73
.line 74
.line 75
move-result v1
.line 76
const/4 v2, 0x0
.line 77
if-eqz v1, :cond_1
.line 78
.line 79
goto :goto_1
.line 80
:cond_1
invoke-virtual {p1}, Lorg/jsoup/nodes/Element;->html()Ljava/lang/String;
.line 81
.line 82
.line 83
move-result-object p1
.line 84
const-string v1, "element.html()"
.line 85
.line 86
invoke-static {p1, v1}, Lkotlin/jvm/internal/Intrinsics;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
.line 87
.line 88
.line 89
iget-object v0, v0, Lnet/dankito/readability4j/util/RegExUtil;->g:Ljava/util/regex/Pattern;
.line 90
.line 91
invoke-virtual {v0, p1}, Ljava/util/regex/Pattern;->matcher(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;
.line 92
.line 93
.line 94
move-result-object p1
.line 95
invoke-virtual {p1}, Ljava/util/regex/Matcher;->find()Z
.line 96
.line 97
.line 98
move-result p1
.line 99
if-eqz p1, :cond_2
.line 100
.line 101
goto :goto_1
.line 102
:cond_2
const/4 v2, 0x1
.line 103
:goto_1
invoke-static {v2}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
.line 104
.line 105
.line 106
move-result-object p1
.line 107
return-object p1
.end method