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

216 lines
2.9 KiB
Smali

.class public final Lorg/tukaani/xz/simple/PowerPC;
.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 8
.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_1
.line 6
.line 7
aget-byte v1, p1, v0
.line 8
.line 9
and-int/lit16 v2, v1, 0xfc
.line 10
.line 11
const/16 v3, 0x48
.line 12
.line 13
if-ne v2, v3, :cond_0
.line 14
.line 15
add-int/lit8 v2, v0, 0x3
.line 16
.line 17
aget-byte v4, p1, v2
.line 18
.line 19
and-int/lit8 v5, v4, 0x3
.line 20
.line 21
const/4 v6, 0x1
.line 22
if-ne v5, v6, :cond_0
.line 23
.line 24
and-int/lit8 v1, v1, 0x3
.line 25
.line 26
shl-int/lit8 v1, v1, 0x18
.line 27
.line 28
add-int/lit8 v5, v0, 0x1
.line 29
.line 30
aget-byte v6, p1, v5
.line 31
.line 32
and-int/lit16 v6, v6, 0xff
.line 33
.line 34
shl-int/lit8 v6, v6, 0x10
.line 35
.line 36
or-int/2addr v1, v6
.line 37
add-int/lit8 v6, v0, 0x2
.line 38
.line 39
aget-byte v7, p1, v6
.line 40
.line 41
and-int/lit16 v7, v7, 0xff
.line 42
.line 43
shl-int/lit8 v7, v7, 0x8
.line 44
.line 45
or-int/2addr v1, v7
.line 46
and-int/lit16 v4, v4, 0xfc
.line 47
.line 48
or-int/2addr v1, v4
.line 49
iget v4, p0, Lorg/tukaani/xz/simple/PowerPC;->a:I
.line 50
.line 51
add-int/2addr v4, v0
.line 52
sub-int/2addr v4, p2
.line 53
sub-int/2addr v1, v4
.line 54
ushr-int/lit8 v4, v1, 0x18
.line 55
.line 56
and-int/lit8 v4, v4, 0x3
.line 57
.line 58
or-int/2addr v3, v4
.line 59
int-to-byte v3, v3
.line 60
aput-byte v3, p1, v0
.line 61
.line 62
ushr-int/lit8 v3, v1, 0x10
.line 63
.line 64
int-to-byte v3, v3
.line 65
aput-byte v3, p1, v5
.line 66
.line 67
ushr-int/lit8 v3, v1, 0x8
.line 68
.line 69
int-to-byte v3, v3
.line 70
aput-byte v3, p1, v6
.line 71
.line 72
aget-byte v3, p1, v2
.line 73
.line 74
and-int/lit8 v3, v3, 0x3
.line 75
.line 76
or-int/2addr v1, v3
.line 77
int-to-byte v1, v1
.line 78
aput-byte v1, p1, v2
.line 79
.line 80
:cond_0
add-int/lit8 v0, v0, 0x4
.line 81
.line 82
goto :goto_0
.line 83
:cond_1
sub-int/2addr v0, p2
.line 84
iget p1, p0, Lorg/tukaani/xz/simple/PowerPC;->a:I
.line 85
.line 86
add-int/2addr p1, v0
.line 87
iput p1, p0, Lorg/tukaani/xz/simple/PowerPC;->a:I
.line 88
.line 89
return v0
.end method