soul-browser/app/smali_classes4/kotlin/random/XorWowRandom.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

402 lines
8.6 KiB
Smali

.class public final Lkotlin/random/XorWowRandom;
.super Lkotlin/random/Random;
.source "SourceFile"
# interfaces
.implements Ljava/io/Serializable;
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lkotlin/random/XorWowRandom$Companion;
}
.end annotation
.annotation runtime Lkotlin/Metadata;
d1 = {
"\u0000(\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0008\n\u0002\u0008\u000b\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\u0000\n\u0002\u0008\u0005\u0008\u0000\u0018\u0000 \u00172\u00020\u00012\u00060\u0002j\u0002`\u0003:\u0001\u0017B9\u0008\u0000\u0012\u0006\u0010\u0004\u001a\u00020\u0005\u0012\u0006\u0010\u0006\u001a\u00020\u0005\u0012\u0006\u0010\u0007\u001a\u00020\u0005\u0012\u0006\u0010\u0008\u001a\u00020\u0005\u0012\u0006\u0010\t\u001a\u00020\u0005\u0012\u0006\u0010\n\u001a\u00020\u0005\u00a2\u0006\u0004\u0008\u000b\u0010\u000cB\u0019\u0008\u0010\u0012\u0006\u0010\r\u001a\u00020\u0005\u0012\u0006\u0010\u000e\u001a\u00020\u0005\u00a2\u0006\u0004\u0008\u000b\u0010\u000fJ\u0008\u0010\u0010\u001a\u00020\u0011H\u0002J\u0008\u0010\u0012\u001a\u00020\u0013H\u0002J\u0008\u0010\u0014\u001a\u00020\u0005H\u0016J\u0010\u0010\u0015\u001a\u00020\u00052\u0006\u0010\u0016\u001a\u00020\u0005H\u0016R\u000e\u0010\u0004\u001a\u00020\u0005X\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0006\u001a\u00020\u0005X\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0007\u001a\u00020\u0005X\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0008\u001a\u00020\u0005X\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u000e\u0010\t\u001a\u00020\u0005X\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u000e\u0010\n\u001a\u00020\u0005X\u0082\u000e\u00a2\u0006\u0002\n\u0000\u00a8\u0006\u0018"
}
d2 = {
"Lkotlin/random/XorWowRandom;",
"Lkotlin/random/Random;",
"Ljava/io/Serializable;",
"Lkotlin/io/Serializable;",
"x",
"",
"y",
"z",
"w",
"v",
"addend",
"<init>",
"(IIIIII)V",
"seed1",
"seed2",
"(II)V",
"checkInvariants",
"",
"readResolve",
"",
"nextInt",
"nextBits",
"bitCount",
"Companion",
"kotlin-stdlib"
}
k = 0x1
mv = {
0x2,
0x2,
0x0
}
xi = 0x30
.end annotation
.annotation build Lkotlin/jvm/internal/SourceDebugExtension;
value = {
"SMAP\nXorWowRandom.kt\nKotlin\n*S Kotlin\n*F\n+ 1 XorWowRandom.kt\nkotlin/random/XorWowRandom\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,68:1\n1#2:69\n*E\n"
}
.end annotation
# static fields
.field private static final Companion:Lkotlin/random/XorWowRandom$Companion;
.annotation build Lorg/jetbrains/annotations/NotNull;
.end annotation
.end field
.field private static final serialVersionUID:J
# instance fields
.field private addend:I
.field private v:I
.field private w:I
.field private x:I
.field private y:I
.field private z:I
# direct methods
.method static constructor <clinit>()V
.locals 2
new-instance v0, Lkotlin/random/XorWowRandom$Companion;
const/4 v1, 0x0
invoke-direct {v0, v1}, Lkotlin/random/XorWowRandom$Companion;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
sput-object v0, Lkotlin/random/XorWowRandom;->Companion:Lkotlin/random/XorWowRandom$Companion;
return-void
.end method
.method public constructor <init>(II)V
.locals 7
not-int v5, p1
shl-int/lit8 v0, p1, 0xa
ushr-int/lit8 v1, p2, 0x4
xor-int v6, v0, v1
const/4 v3, 0x0
const/4 v4, 0x0
move-object v0, p0
move v1, p1
move v2, p2
.line 10
invoke-direct/range {v0 .. v6}, Lkotlin/random/XorWowRandom;-><init>(IIIIII)V
return-void
.end method
.method public constructor <init>(IIIIII)V
.locals 0
.line 1
invoke-direct {p0}, Lkotlin/random/Random;-><init>()V
.line 2
iput p1, p0, Lkotlin/random/XorWowRandom;->x:I
.line 3
iput p2, p0, Lkotlin/random/XorWowRandom;->y:I
.line 4
iput p3, p0, Lkotlin/random/XorWowRandom;->z:I
.line 5
iput p4, p0, Lkotlin/random/XorWowRandom;->w:I
.line 6
iput p5, p0, Lkotlin/random/XorWowRandom;->v:I
.line 7
iput p6, p0, Lkotlin/random/XorWowRandom;->addend:I
.line 8
invoke-direct {p0}, Lkotlin/random/XorWowRandom;->checkInvariants()V
const/4 p1, 0x0
:goto_0
const/16 p2, 0x40
if-ge p1, p2, :cond_0
.line 9
invoke-virtual {p0}, Lkotlin/random/XorWowRandom;->nextInt()I
add-int/lit8 p1, p1, 0x1
goto :goto_0
:cond_0
return-void
.end method
.method private final checkInvariants()V
.locals 2
.line 1
iget v0, p0, Lkotlin/random/XorWowRandom;->x:I
.line 2
.line 3
iget v1, p0, Lkotlin/random/XorWowRandom;->y:I
.line 4
.line 5
or-int/2addr v0, v1
.line 6
iget v1, p0, Lkotlin/random/XorWowRandom;->z:I
.line 7
.line 8
or-int/2addr v0, v1
.line 9
iget v1, p0, Lkotlin/random/XorWowRandom;->w:I
.line 10
.line 11
or-int/2addr v0, v1
.line 12
iget v1, p0, Lkotlin/random/XorWowRandom;->v:I
.line 13
.line 14
or-int/2addr v0, v1
.line 15
if-eqz v0, :cond_0
.line 16
.line 17
return-void
.line 18
:cond_0
new-instance v0, Ljava/lang/IllegalArgumentException;
.line 19
.line 20
const-string v1, "Initial state must have at least one non-zero element."
.line 21
.line 22
invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
.line 23
.line 24
.line 25
throw v0
.end method
.method private final readResolve()Ljava/lang/Object;
.locals 3
.line 1
:try_start_0
invoke-direct {p0}, Lkotlin/random/XorWowRandom;->checkInvariants()V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 2
.line 3
.line 4
return-object p0
.line 5
:catchall_0
move-exception v0
.line 6
new-instance v1, Ljava/io/InvalidObjectException;
.line 7
.line 8
invoke-virtual {v0}, Ljava/lang/Throwable;->getMessage()Ljava/lang/String;
.line 9
.line 10
.line 11
move-result-object v2
.line 12
invoke-direct {v1, v2}, Ljava/io/InvalidObjectException;-><init>(Ljava/lang/String;)V
.line 13
.line 14
.line 15
invoke-virtual {v1, v0}, Ljava/lang/Throwable;->initCause(Ljava/lang/Throwable;)Ljava/lang/Throwable;
.line 16
.line 17
.line 18
move-result-object v0
.line 19
const-string v1, "initCause(...)"
.line 20
.line 21
invoke-static {v0, v1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
.line 22
.line 23
.line 24
throw v0
.end method
# virtual methods
.method public nextBits(I)I
.locals 1
.line 1
invoke-virtual {p0}, Lkotlin/random/XorWowRandom;->nextInt()I
.line 2
.line 3
.line 4
move-result v0
.line 5
invoke-static {v0, p1}, Lkotlin/random/RandomKt;->takeUpperBits(II)I
.line 6
.line 7
.line 8
move-result p1
.line 9
return p1
.end method
.method public nextInt()I
.locals 3
.line 1
iget v0, p0, Lkotlin/random/XorWowRandom;->x:I
.line 2
.line 3
ushr-int/lit8 v1, v0, 0x2
.line 4
.line 5
xor-int/2addr v0, v1
.line 6
iget v1, p0, Lkotlin/random/XorWowRandom;->y:I
.line 7
.line 8
iput v1, p0, Lkotlin/random/XorWowRandom;->x:I
.line 9
.line 10
iget v1, p0, Lkotlin/random/XorWowRandom;->z:I
.line 11
.line 12
iput v1, p0, Lkotlin/random/XorWowRandom;->y:I
.line 13
.line 14
iget v1, p0, Lkotlin/random/XorWowRandom;->w:I
.line 15
.line 16
iput v1, p0, Lkotlin/random/XorWowRandom;->z:I
.line 17
.line 18
iget v1, p0, Lkotlin/random/XorWowRandom;->v:I
.line 19
.line 20
iput v1, p0, Lkotlin/random/XorWowRandom;->w:I
.line 21
.line 22
shl-int/lit8 v2, v0, 0x1
.line 23
.line 24
xor-int/2addr v0, v2
.line 25
xor-int/2addr v0, v1
.line 26
shl-int/lit8 v1, v1, 0x4
.line 27
.line 28
xor-int/2addr v0, v1
.line 29
iput v0, p0, Lkotlin/random/XorWowRandom;->v:I
.line 30
.line 31
iget v1, p0, Lkotlin/random/XorWowRandom;->addend:I
.line 32
.line 33
const v2, 0x587c5
.line 34
.line 35
.line 36
add-int/2addr v1, v2
.line 37
iput v1, p0, Lkotlin/random/XorWowRandom;->addend:I
.line 38
.line 39
add-int/2addr v0, v1
.line 40
return v0
.end method