soul-browser/app/smali_classes4/org/tukaani/xz/simple/SPARC.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

277 lines
3.8 KiB
Smali

.class public final Lorg/tukaani/xz/simple/SPARC;
.super Ljava/lang/Object;
.source "SourceFile"
# interfaces
.implements Lorg/tukaani/xz/simple/SimpleFilter;
# instance fields
.field public a:I
# virtual methods
.method public final a([BII)I
.locals 7
.line 1
add-int/2addr p3, p2
.line 2
add-int/lit8 p3, p3, -0x4
.line 3
.line 4
move v0, p2
.line 5
:goto_0
if-gt v0, p3, :cond_3
.line 6
.line 7
aget-byte v1, p1, v0
.line 8
.line 9
const/16 v2, 0x40
.line 10
.line 11
const/16 v3, 0xc0
.line 12
.line 13
if-ne v1, v2, :cond_0
.line 14
.line 15
add-int/lit8 v2, v0, 0x1
.line 16
.line 17
aget-byte v2, p1, v2
.line 18
.line 19
and-int/2addr v2, v3
.line 20
if-eqz v2, :cond_1
.line 21
.line 22
:cond_0
const/16 v2, 0x7f
.line 23
.line 24
if-ne v1, v2, :cond_2
.line 25
.line 26
add-int/lit8 v2, v0, 0x1
.line 27
.line 28
aget-byte v2, p1, v2
.line 29
.line 30
and-int/2addr v2, v3
.line 31
if-ne v2, v3, :cond_2
.line 32
.line 33
:cond_1
and-int/lit16 v1, v1, 0xff
.line 34
.line 35
shl-int/lit8 v1, v1, 0x18
.line 36
.line 37
add-int/lit8 v2, v0, 0x1
.line 38
.line 39
aget-byte v3, p1, v2
.line 40
.line 41
and-int/lit16 v3, v3, 0xff
.line 42
.line 43
shl-int/lit8 v3, v3, 0x10
.line 44
.line 45
or-int/2addr v1, v3
.line 46
add-int/lit8 v3, v0, 0x2
.line 47
.line 48
aget-byte v4, p1, v3
.line 49
.line 50
and-int/lit16 v4, v4, 0xff
.line 51
.line 52
shl-int/lit8 v4, v4, 0x8
.line 53
.line 54
or-int/2addr v1, v4
.line 55
add-int/lit8 v4, v0, 0x3
.line 56
.line 57
aget-byte v5, p1, v4
.line 58
.line 59
and-int/lit16 v5, v5, 0xff
.line 60
.line 61
or-int/2addr v1, v5
.line 62
shl-int/lit8 v1, v1, 0x2
.line 63
.line 64
iget v5, p0, Lorg/tukaani/xz/simple/SPARC;->a:I
.line 65
.line 66
add-int/2addr v5, v0
.line 67
sub-int/2addr v5, p2
.line 68
sub-int/2addr v1, v5
.line 69
ushr-int/lit8 v5, v1, 0x2
.line 70
.line 71
ushr-int/lit8 v1, v1, 0x18
.line 72
.line 73
and-int/lit8 v1, v1, 0x1
.line 74
.line 75
rsub-int/lit8 v1, v1, 0x0
.line 76
.line 77
shl-int/lit8 v1, v1, 0x16
.line 78
.line 79
const v6, 0x3fffffff # 1.9999999f
.line 80
.line 81
.line 82
and-int/2addr v1, v6
.line 83
const v6, 0x3fffff
.line 84
.line 85
.line 86
and-int/2addr v5, v6
.line 87
or-int/2addr v1, v5
.line 88
const/high16 v5, 0x40000000 # 2.0f
.line 89
.line 90
or-int/2addr v1, v5
.line 91
ushr-int/lit8 v5, v1, 0x18
.line 92
.line 93
int-to-byte v5, v5
.line 94
aput-byte v5, p1, v0
.line 95
.line 96
ushr-int/lit8 v5, v1, 0x10
.line 97
.line 98
int-to-byte v5, v5
.line 99
aput-byte v5, p1, v2
.line 100
.line 101
ushr-int/lit8 v2, v1, 0x8
.line 102
.line 103
int-to-byte v2, v2
.line 104
aput-byte v2, p1, v3
.line 105
.line 106
int-to-byte v1, v1
.line 107
aput-byte v1, p1, v4
.line 108
.line 109
:cond_2
add-int/lit8 v0, v0, 0x4
.line 110
.line 111
goto :goto_0
.line 112
:cond_3
sub-int/2addr v0, p2
.line 113
iget p1, p0, Lorg/tukaani/xz/simple/SPARC;->a:I
.line 114
.line 115
add-int/2addr p1, v0
.line 116
iput p1, p0, Lorg/tukaani/xz/simple/SPARC;->a:I
.line 117
.line 118
return v0
.end method