soul-browser/app/smali_classes4/org/slf4j/helpers/Util.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

279 lines
5 KiB
Smali

.class public final Lorg/slf4j/helpers/Util;
.super Ljava/lang/Object;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lorg/slf4j/helpers/Util$ClassContextSecurityManager;
}
.end annotation
# static fields
.field public static a:Lorg/slf4j/helpers/Util$ClassContextSecurityManager; = null
.field public static b:Z = false
# direct methods
.method public static a()Ljava/lang/Class;
.locals 4
.line 1
sget-object v0, Lorg/slf4j/helpers/Util;->a:Lorg/slf4j/helpers/Util$ClassContextSecurityManager;
.line 2
.line 3
const/4 v1, 0x0
.line 4
if-eqz v0, :cond_0
.line 5
.line 6
goto :goto_1
.line 7
:cond_0
sget-boolean v0, Lorg/slf4j/helpers/Util;->b:Z
.line 8
.line 9
if-eqz v0, :cond_1
.line 10
.line 11
move-object v0, v1
.line 12
goto :goto_1
.line 13
:cond_1
:try_start_0
new-instance v0, Lorg/slf4j/helpers/Util$ClassContextSecurityManager;
.line 14
.line 15
invoke-direct {v0}, Ljava/lang/SecurityManager;-><init>()V
:try_end_0
.catch Ljava/lang/SecurityException; {:try_start_0 .. :try_end_0} :catch_0
.line 16
.line 17
.line 18
goto :goto_0
.line 19
:catch_0
move-object v0, v1
.line 20
:goto_0
sput-object v0, Lorg/slf4j/helpers/Util;->a:Lorg/slf4j/helpers/Util$ClassContextSecurityManager;
.line 21
.line 22
const/4 v2, 0x1
.line 23
sput-boolean v2, Lorg/slf4j/helpers/Util;->b:Z
.line 24
.line 25
:goto_1
if-nez v0, :cond_2
.line 26
.line 27
return-object v1
.line 28
:cond_2
invoke-virtual {v0}, Lorg/slf4j/helpers/Util$ClassContextSecurityManager;->getClassContext()[Ljava/lang/Class;
.line 29
.line 30
.line 31
move-result-object v0
.line 32
const-class v1, Lorg/slf4j/helpers/Util;
.line 33
.line 34
invoke-virtual {v1}, Ljava/lang/Class;->getName()Ljava/lang/String;
.line 35
.line 36
.line 37
move-result-object v1
.line 38
const/4 v2, 0x0
.line 39
:goto_2
array-length v3, v0
.line 40
if-ge v2, v3, :cond_4
.line 41
.line 42
aget-object v3, v0, v2
.line 43
.line 44
invoke-virtual {v3}, Ljava/lang/Class;->getName()Ljava/lang/String;
.line 45
.line 46
.line 47
move-result-object v3
.line 48
invoke-virtual {v1, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
.line 49
.line 50
.line 51
move-result v3
.line 52
if-eqz v3, :cond_3
.line 53
.line 54
goto :goto_3
.line 55
:cond_3
add-int/lit8 v2, v2, 0x1
.line 56
.line 57
goto :goto_2
.line 58
:cond_4
:goto_3
array-length v1, v0
.line 59
if-ge v2, v1, :cond_5
.line 60
.line 61
add-int/lit8 v2, v2, 0x2
.line 62
.line 63
array-length v1, v0
.line 64
if-ge v2, v1, :cond_5
.line 65
.line 66
aget-object v0, v0, v2
.line 67
.line 68
return-object v0
.line 69
:cond_5
new-instance v0, Ljava/lang/IllegalStateException;
.line 70
.line 71
const-string v1, "Failed to find org.slf4j.helpers.Util or its caller in the stack; this should not happen"
.line 72
.line 73
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
.line 74
.line 75
.line 76
throw v0
.end method
.method public static final b(Ljava/lang/String;)V
.locals 3
.line 1
sget-object v0, Ljava/lang/System;->err:Ljava/io/PrintStream;
.line 2
.line 3
new-instance v1, Ljava/lang/StringBuilder;
.line 4
.line 5
const-string v2, "SLF4J: "
.line 6
.line 7
invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
.line 8
.line 9
.line 10
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
.line 11
.line 12
.line 13
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
.line 14
.line 15
.line 16
move-result-object p0
.line 17
invoke-virtual {v0, p0}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V
.line 18
.line 19
.line 20
return-void
.end method
.method public static final c(Ljava/lang/String;Ljava/lang/Throwable;)V
.locals 1
.line 1
sget-object v0, Ljava/lang/System;->err:Ljava/io/PrintStream;
.line 2
.line 3
invoke-virtual {v0, p0}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V
.line 4
.line 5
.line 6
sget-object p0, Ljava/lang/System;->err:Ljava/io/PrintStream;
.line 7
.line 8
const-string v0, "Reported exception:"
.line 9
.line 10
invoke-virtual {p0, v0}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V
.line 11
.line 12
.line 13
invoke-virtual {p1}, Ljava/lang/Throwable;->printStackTrace()V
.line 14
.line 15
.line 16
return-void
.end method