soul-browser/app/smali/androidx/collection/CircularIntArray.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

228 lines
4.3 KiB
Smali

.class public final Landroidx/collection/CircularIntArray;
.super Ljava/lang/Object;
.source "SourceFile"
# annotations
.annotation runtime Lkotlin/Metadata;
d1 = {
"\u0000\n\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\u0018\u00002\u00020\u0001\u00a8\u0006\u0002"
}
d2 = {
"Landroidx/collection/CircularIntArray;",
"",
"collection"
}
k = 0x1
mv = {
0x1,
0x8,
0x0
}
xi = 0x30
.end annotation
.annotation build Lkotlin/jvm/internal/SourceDebugExtension;
value = {
"SMAP\nCircularIntArray.kt\nKotlin\n*S Kotlin\n*F\n+ 1 CircularIntArray.kt\nandroidx/collection/CircularIntArray\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 3 CollectionPlatformUtils.jvm.kt\nandroidx/collection/CollectionPlatformUtils\n*L\n1#1,213:1\n1#2:214\n26#3:215\n26#3:216\n26#3:217\n26#3:218\n26#3:219\n26#3:220\n26#3:221\n*S KotlinDebug\n*F\n+ 1 CircularIntArray.kt\nandroidx/collection/CircularIntArray\n*L\n100#1:215\n113#1:216\n139#1:217\n156#1:218\n169#1:219\n181#1:220\n193#1:221\n*E\n"
}
.end annotation
# instance fields
.field public a:[I
.field public b:I
.field public c:I
.field public d:I
# direct methods
.method public constructor <init>()V
.locals 3
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 2
.line 3
.line 4
const/16 v0, 0x8
.line 5
.line 6
invoke-static {v0}, Ljava/lang/Integer;->bitCount(I)I
.line 7
.line 8
.line 9
move-result v1
.line 10
const/4 v2, 0x1
.line 11
if-eq v1, v2, :cond_0
.line 12
.line 13
const/4 v0, 0x7
.line 14
invoke-static {v0}, Ljava/lang/Integer;->highestOneBit(I)I
.line 15
.line 16
.line 17
move-result v0
.line 18
shl-int/2addr v0, v2
.line 19
:cond_0
add-int/lit8 v1, v0, -0x1
.line 20
.line 21
iput v1, p0, Landroidx/collection/CircularIntArray;->d:I
.line 22
.line 23
new-array v0, v0, [I
.line 24
.line 25
iput-object v0, p0, Landroidx/collection/CircularIntArray;->a:[I
.line 26
.line 27
return-void
.end method
# virtual methods
.method public final a(I)V
.locals 6
.line 1
iget-object v0, p0, Landroidx/collection/CircularIntArray;->a:[I
.line 2
.line 3
iget v1, p0, Landroidx/collection/CircularIntArray;->c:I
.line 4
.line 5
aput p1, v0, v1
.line 6
.line 7
add-int/lit8 v1, v1, 0x1
.line 8
.line 9
iget p1, p0, Landroidx/collection/CircularIntArray;->d:I
.line 10
.line 11
and-int/2addr p1, v1
.line 12
iput p1, p0, Landroidx/collection/CircularIntArray;->c:I
.line 13
.line 14
iget v1, p0, Landroidx/collection/CircularIntArray;->b:I
.line 15
.line 16
if-ne p1, v1, :cond_1
.line 17
.line 18
array-length p1, v0
.line 19
sub-int v2, p1, v1
.line 20
.line 21
shl-int/lit8 v3, p1, 0x1
.line 22
.line 23
if-ltz v3, :cond_0
.line 24
.line 25
new-array v4, v3, [I
.line 26
.line 27
const/4 v5, 0x0
.line 28
invoke-static {v0, v4, v5, v1, p1}, Lkotlin/collections/ArraysKt;->j([I[IIII)V
.line 29
.line 30
.line 31
iget-object v0, p0, Landroidx/collection/CircularIntArray;->a:[I
.line 32
.line 33
iget v1, p0, Landroidx/collection/CircularIntArray;->b:I
.line 34
.line 35
invoke-static {v0, v4, v2, v5, v1}, Lkotlin/collections/ArraysKt;->j([I[IIII)V
.line 36
.line 37
.line 38
iput-object v4, p0, Landroidx/collection/CircularIntArray;->a:[I
.line 39
.line 40
iput v5, p0, Landroidx/collection/CircularIntArray;->b:I
.line 41
.line 42
iput p1, p0, Landroidx/collection/CircularIntArray;->c:I
.line 43
.line 44
add-int/lit8 v3, v3, -0x1
.line 45
.line 46
iput v3, p0, Landroidx/collection/CircularIntArray;->d:I
.line 47
.line 48
return-void
.line 49
:cond_0
new-instance p1, Ljava/lang/RuntimeException;
.line 50
.line 51
const-string v0, "Max array capacity exceeded"
.line 52
.line 53
invoke-direct {p1, v0}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V
.line 54
.line 55
.line 56
throw p1
.line 57
:cond_1
return-void
.end method