soul-browser/app/smali_classes4/okio/-SegmentedByteString.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

527 lines
8 KiB
Smali

.class public final Lokio/-SegmentedByteString;
.super Ljava/lang/Object;
.source "SourceFile"
# annotations
.annotation runtime Lkotlin/Metadata;
d1 = {
"\u0000\u0002\n\u0000\u00a8\u0006\u0000"
}
d2 = {
"okio"
}
k = 0x2
mv = {
0x2,
0x2,
0x0
}
xi = 0x30
.end annotation
.annotation build Lkotlin/jvm/JvmName;
name = "-SegmentedByteString"
.end annotation
.annotation build Lkotlin/jvm/internal/SourceDebugExtension;
value = {
"SMAP\nUtil.kt\nKotlin\n*S Kotlin\n*F\n+ 1 Util.kt\nokio/-SegmentedByteString\n*L\n1#1,185:1\n67#1:186\n73#1:187\n*S KotlinDebug\n*F\n+ 1 Util.kt\nokio/-SegmentedByteString\n*L\n105#1:186\n106#1:187\n*E\n"
}
.end annotation
# direct methods
.method static constructor <clinit>()V
.locals 0
return-void
.end method
.method public static final a([B[BIII)Z
.locals 4
.line 1
const-string v0, "a"
.line 2
.line 3
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 4
.line 5
.line 6
const-string v0, "b"
.line 7
.line 8
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 9
.line 10
.line 11
const/4 v0, 0x0
.line 12
move v1, v0
.line 13
:goto_0
if-ge v1, p4, :cond_1
.line 14
.line 15
add-int v2, v1, p2
.line 16
.line 17
aget-byte v2, p0, v2
.line 18
.line 19
add-int v3, v1, p3
.line 20
.line 21
aget-byte v3, p1, v3
.line 22
.line 23
if-eq v2, v3, :cond_0
.line 24
.line 25
return v0
.line 26
:cond_0
add-int/lit8 v1, v1, 0x1
.line 27
.line 28
goto :goto_0
.line 29
:cond_1
const/4 p0, 0x1
.line 30
return p0
.end method
.method public static final b(JJJ)V
.locals 4
.line 1
or-long v0, p2, p4
.line 2
.line 3
const-wide/16 v2, 0x0
.line 4
.line 5
cmp-long v0, v0, v2
.line 6
.line 7
if-ltz v0, :cond_0
.line 8
.line 9
cmp-long v0, p2, p0
.line 10
.line 11
if-gtz v0, :cond_0
.line 12
.line 13
sub-long v0, p0, p2
.line 14
.line 15
cmp-long v0, v0, p4
.line 16
.line 17
if-ltz v0, :cond_0
.line 18
.line 19
return-void
.line 20
:cond_0
new-instance v0, Ljava/lang/ArrayIndexOutOfBoundsException;
.line 21
.line 22
new-instance v1, Ljava/lang/StringBuilder;
.line 23
.line 24
const-string v2, "size="
.line 25
.line 26
invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
.line 27
.line 28
.line 29
invoke-virtual {v1, p0, p1}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
.line 30
.line 31
.line 32
const-string p0, " offset="
.line 33
.line 34
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
.line 35
.line 36
.line 37
invoke-virtual {v1, p2, p3}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
.line 38
.line 39
.line 40
const-string p0, " byteCount="
.line 41
.line 42
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
.line 43
.line 44
.line 45
invoke-virtual {v1, p4, p5}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
.line 46
.line 47
.line 48
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
.line 49
.line 50
.line 51
move-result-object p0
.line 52
invoke-direct {v0, p0}, Ljava/lang/ArrayIndexOutOfBoundsException;-><init>(Ljava/lang/String;)V
.line 53
.line 54
.line 55
throw v0
.end method
.method public static final c(I)I
.locals 2
.line 1
const/high16 v0, -0x1000000
and-int/2addr v0, p0
ushr-int/lit8 v0, v0, 0x18
const/high16 v1, 0xff0000
and-int/2addr v1, p0
ushr-int/lit8 v1, v1, 0x8
or-int/2addr v0, v1
const v1, 0xff00
and-int/2addr v1, p0
shl-int/lit8 v1, v1, 0x8
or-int/2addr v0, v1
and-int/lit16 p0, p0, 0xff
shl-int/lit8 p0, p0, 0x18
or-int/2addr p0, v0
return p0
.end method
.method public static final d(B)Ljava/lang/String;
.locals 3
.line 1
shr-int/lit8 v0, p0, 0x4
.line 2
.line 3
and-int/lit8 v0, v0, 0xf
.line 4
.line 5
sget-object v1, Lokio/internal/-ByteString;->a:[C
.line 6
.line 7
aget-char v0, v1, v0
.line 8
.line 9
and-int/lit8 p0, p0, 0xf
.line 10
.line 11
aget-char p0, v1, p0
.line 12
.line 13
const/4 v1, 0x2
.line 14
new-array v1, v1, [C
.line 15
.line 16
const/4 v2, 0x0
.line 17
aput-char v0, v1, v2
.line 18
.line 19
const/4 v0, 0x1
.line 20
aput-char p0, v1, v0
.line 21
.line 22
invoke-static {v1}, Lkotlin/text/StringsKt;->concatToString([C)Ljava/lang/String;
.line 23
.line 24
.line 25
move-result-object p0
.line 26
return-object p0
.end method
.method public static final e(I)Ljava/lang/String;
.locals 10
.line 1
if-nez p0, :cond_0
.line 2
.line 3
const-string p0, "0"
.line 4
.line 5
return-object p0
.line 6
:cond_0
shr-int/lit8 v0, p0, 0x1c
.line 7
.line 8
and-int/lit8 v0, v0, 0xf
.line 9
.line 10
sget-object v1, Lokio/internal/-ByteString;->a:[C
.line 11
.line 12
aget-char v0, v1, v0
.line 13
.line 14
shr-int/lit8 v2, p0, 0x18
.line 15
.line 16
and-int/lit8 v2, v2, 0xf
.line 17
.line 18
aget-char v2, v1, v2
.line 19
.line 20
shr-int/lit8 v3, p0, 0x14
.line 21
.line 22
and-int/lit8 v3, v3, 0xf
.line 23
.line 24
aget-char v3, v1, v3
.line 25
.line 26
shr-int/lit8 v4, p0, 0x10
.line 27
.line 28
and-int/lit8 v4, v4, 0xf
.line 29
.line 30
aget-char v4, v1, v4
.line 31
.line 32
shr-int/lit8 v5, p0, 0xc
.line 33
.line 34
and-int/lit8 v5, v5, 0xf
.line 35
.line 36
aget-char v5, v1, v5
.line 37
.line 38
shr-int/lit8 v6, p0, 0x8
.line 39
.line 40
and-int/lit8 v6, v6, 0xf
.line 41
.line 42
aget-char v6, v1, v6
.line 43
.line 44
shr-int/lit8 v7, p0, 0x4
.line 45
.line 46
and-int/lit8 v7, v7, 0xf
.line 47
.line 48
aget-char v7, v1, v7
.line 49
.line 50
and-int/lit8 p0, p0, 0xf
.line 51
.line 52
aget-char p0, v1, p0
.line 53
.line 54
const/16 v1, 0x8
.line 55
.line 56
new-array v8, v1, [C
.line 57
.line 58
const/4 v9, 0x0
.line 59
aput-char v0, v8, v9
.line 60
.line 61
const/4 v0, 0x1
.line 62
aput-char v2, v8, v0
.line 63
.line 64
const/4 v0, 0x2
.line 65
aput-char v3, v8, v0
.line 66
.line 67
const/4 v0, 0x3
.line 68
aput-char v4, v8, v0
.line 69
.line 70
const/4 v0, 0x4
.line 71
aput-char v5, v8, v0
.line 72
.line 73
const/4 v0, 0x5
.line 74
aput-char v6, v8, v0
.line 75
.line 76
const/4 v0, 0x6
.line 77
aput-char v7, v8, v0
.line 78
.line 79
const/4 v0, 0x7
.line 80
aput-char p0, v8, v0
.line 81
.line 82
:goto_0
if-ge v9, v1, :cond_1
.line 83
.line 84
aget-char p0, v8, v9
.line 85
.line 86
const/16 v0, 0x30
.line 87
.line 88
if-ne p0, v0, :cond_1
.line 89
.line 90
add-int/lit8 v9, v9, 0x1
.line 91
.line 92
goto :goto_0
.line 93
:cond_1
invoke-static {v8, v9}, Lkotlin/text/StringsKt;->m([CI)Ljava/lang/String;
.line 94
.line 95
.line 96
move-result-object p0
.line 97
return-object p0
.end method