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

349 lines
7.2 KiB
Smali

.class public abstract Lokio/FileHandle;
.super Ljava/lang/Object;
.source "SourceFile"
# interfaces
.implements Ljava/io/Closeable;
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lokio/FileHandle$FileHandleSink;,
Lokio/FileHandle$FileHandleSource;
}
.end annotation
.annotation runtime Lkotlin/Metadata;
d1 = {
"\u0000\u0010\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0008\u0003\u0008&\u0018\u00002\u00060\u0001j\u0002`\u0002:\u0002\u0003\u0004\u00a8\u0006\u0005"
}
d2 = {
"Lokio/FileHandle;",
"Ljava/io/Closeable;",
"Lokio/Closeable;",
"FileHandleSink",
"FileHandleSource",
"okio"
}
k = 0x1
mv = {
0x2,
0x2,
0x0
}
xi = 0x30
.end annotation
.annotation build Lkotlin/jvm/internal/SourceDebugExtension;
value = {
"SMAP\nFileHandle.kt\nKotlin\n*S Kotlin\n*F\n+ 1 FileHandle.kt\nokio/FileHandle\n+ 2 -JvmPlatform.kt\nokio/_JvmPlatformKt\n+ 3 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 4 RealBufferedSource.kt\nokio/RealBufferedSource\n+ 5 RealBufferedSink.kt\nokio/RealBufferedSink\n+ 6 Util.kt\nokio/-SegmentedByteString\n*L\n1#1,444:1\n40#2:445\n40#2:447\n40#2:448\n40#2:449\n40#2:450\n40#2:451\n40#2:452\n40#2:453\n40#2:457\n40#2:459\n1#3:446\n63#4:454\n63#4:455\n63#4:456\n51#5:458\n85#6:460\n85#6:461\n*S KotlinDebug\n*F\n+ 1 FileHandle.kt\nokio/FileHandle\n*L\n69#1:445\n81#1:447\n92#1:448\n105#1:449\n119#1:450\n129#1:451\n139#1:452\n151#1:453\n221#1:457\n287#1:459\n169#1:454\n195#1:455\n202#1:456\n248#1:458\n345#1:460\n374#1:461\n*E\n"
}
.end annotation
# instance fields
.field public c:Z
.field public f:I
.field public final g:Ljava/util/concurrent/locks/ReentrantLock;
# direct methods
.method public constructor <init>()V
.locals 1
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 2
.line 3
.line 4
new-instance v0, Ljava/util/concurrent/locks/ReentrantLock;
.line 5
.line 6
invoke-direct {v0}, Ljava/util/concurrent/locks/ReentrantLock;-><init>()V
.line 7
.line 8
.line 9
iput-object v0, p0, Lokio/FileHandle;->g:Ljava/util/concurrent/locks/ReentrantLock;
.line 10
.line 11
return-void
.end method
# virtual methods
.method public abstract a()V
.end method
.method public abstract b(J[BII)I
.end method
.method public final close()V
.locals 2
.line 1
iget-object v0, p0, Lokio/FileHandle;->g:Ljava/util/concurrent/locks/ReentrantLock;
.line 2
.line 3
invoke-virtual {v0}, Ljava/util/concurrent/locks/ReentrantLock;->lock()V
.line 4
.line 5
.line 6
:try_start_0
iget-boolean v1, p0, Lokio/FileHandle;->c:Z
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 7
.line 8
if-eqz v1, :cond_0
.line 9
.line 10
invoke-virtual {v0}, Ljava/util/concurrent/locks/ReentrantLock;->unlock()V
.line 11
.line 12
.line 13
return-void
.line 14
:cond_0
const/4 v1, 0x1
.line 15
:try_start_1
iput-boolean v1, p0, Lokio/FileHandle;->c:Z
.line 16
.line 17
iget v1, p0, Lokio/FileHandle;->f:I
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
.line 18
.line 19
if-eqz v1, :cond_1
.line 20
.line 21
invoke-virtual {v0}, Ljava/util/concurrent/locks/ReentrantLock;->unlock()V
.line 22
.line 23
.line 24
return-void
.line 25
:cond_1
:try_start_2
sget-object v1, Lkotlin/Unit;->INSTANCE:Lkotlin/Unit;
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
.line 26
.line 27
invoke-virtual {v0}, Ljava/util/concurrent/locks/ReentrantLock;->unlock()V
.line 28
.line 29
.line 30
invoke-virtual {p0}, Lokio/FileHandle;->a()V
.line 31
.line 32
.line 33
return-void
.line 34
:catchall_0
move-exception v1
.line 35
invoke-virtual {v0}, Ljava/util/concurrent/locks/ReentrantLock;->unlock()V
.line 36
.line 37
.line 38
throw v1
.end method
.method public abstract d()J
.end method
.method public final e(J)Lokio/Source;
.locals 2
.line 1
iget-object v0, p0, Lokio/FileHandle;->g:Ljava/util/concurrent/locks/ReentrantLock;
.line 2
.line 3
invoke-virtual {v0}, Ljava/util/concurrent/locks/ReentrantLock;->lock()V
.line 4
.line 5
.line 6
:try_start_0
iget-boolean v1, p0, Lokio/FileHandle;->c:Z
.line 7
.line 8
if-nez v1, :cond_0
.line 9
.line 10
iget v1, p0, Lokio/FileHandle;->f:I
.line 11
.line 12
add-int/lit8 v1, v1, 0x1
.line 13
.line 14
iput v1, p0, Lokio/FileHandle;->f:I
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 15
.line 16
invoke-virtual {v0}, Ljava/util/concurrent/locks/ReentrantLock;->unlock()V
.line 17
.line 18
.line 19
new-instance v0, Lokio/FileHandle$FileHandleSource;
.line 20
.line 21
invoke-direct {v0, p0, p1, p2}, Lokio/FileHandle$FileHandleSource;-><init>(Lokio/FileHandle;J)V
.line 22
.line 23
.line 24
return-object v0
.line 25
:catchall_0
move-exception p1
.line 26
goto :goto_0
.line 27
:cond_0
:try_start_1
const-string p1, "closed"
.line 28
.line 29
new-instance p2, Ljava/lang/IllegalStateException;
.line 30
.line 31
invoke-direct {p2, p1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
.line 32
.line 33
.line 34
throw p2
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
.line 35
:goto_0
invoke-virtual {v0}, Ljava/util/concurrent/locks/ReentrantLock;->unlock()V
.line 36
.line 37
.line 38
throw p1
.end method
.method public final size()J
.locals 3
.line 1
iget-object v0, p0, Lokio/FileHandle;->g:Ljava/util/concurrent/locks/ReentrantLock;
.line 2
.line 3
invoke-virtual {v0}, Ljava/util/concurrent/locks/ReentrantLock;->lock()V
.line 4
.line 5
.line 6
:try_start_0
iget-boolean v1, p0, Lokio/FileHandle;->c:Z
.line 7
.line 8
if-nez v1, :cond_0
.line 9
.line 10
sget-object v1, Lkotlin/Unit;->INSTANCE:Lkotlin/Unit;
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 11
.line 12
invoke-virtual {v0}, Ljava/util/concurrent/locks/ReentrantLock;->unlock()V
.line 13
.line 14
.line 15
invoke-virtual {p0}, Lokio/FileHandle;->d()J
.line 16
.line 17
.line 18
move-result-wide v0
.line 19
return-wide v0
.line 20
:catchall_0
move-exception v1
.line 21
goto :goto_0
.line 22
:cond_0
:try_start_1
const-string v1, "closed"
.line 23
.line 24
new-instance v2, Ljava/lang/IllegalStateException;
.line 25
.line 26
invoke-direct {v2, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
.line 27
.line 28
.line 29
throw v2
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
.line 30
:goto_0
invoke-virtual {v0}, Ljava/util/concurrent/locks/ReentrantLock;->unlock()V
.line 31
.line 32
.line 33
throw v1
.end method