soul-browser/app/smali/androidx/room/RoomDatabase.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

430 lines
9.2 KiB
Smali

.class public abstract Landroidx/room/RoomDatabase;
.super Ljava/lang/Object;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Landroidx/room/RoomDatabase$Callback;,
Landroidx/room/RoomDatabase$MigrationContainer;,
Landroidx/room/RoomDatabase$Builder;,
Landroidx/room/RoomDatabase$JournalMode;
}
.end annotation
# instance fields
.field public volatile a:Landroidx/sqlite/db/SupportSQLiteDatabase;
.field public b:Ljava/util/concurrent/Executor;
.field public c:Ljava/util/concurrent/Executor;
.field public d:Landroidx/sqlite/db/SupportSQLiteOpenHelper;
.field public final e:Landroidx/room/InvalidationTracker;
.field public f:Z
.field public g:Z
.field public h:Ljava/util/List;
.field public final i:Ljava/util/concurrent/locks/ReentrantReadWriteLock;
.field public final j:Ljava/lang/ThreadLocal;
# 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/ReentrantReadWriteLock;
.line 5
.line 6
invoke-direct {v0}, Ljava/util/concurrent/locks/ReentrantReadWriteLock;-><init>()V
.line 7
.line 8
.line 9
iput-object v0, p0, Landroidx/room/RoomDatabase;->i:Ljava/util/concurrent/locks/ReentrantReadWriteLock;
.line 10
.line 11
new-instance v0, Ljava/lang/ThreadLocal;
.line 12
.line 13
invoke-direct {v0}, Ljava/lang/ThreadLocal;-><init>()V
.line 14
.line 15
.line 16
iput-object v0, p0, Landroidx/room/RoomDatabase;->j:Ljava/lang/ThreadLocal;
.line 17
.line 18
new-instance v0, Lj$/util/concurrent/ConcurrentHashMap;
.line 19
.line 20
invoke-direct {v0}, Lj$/util/concurrent/ConcurrentHashMap;-><init>()V
.line 21
.line 22
.line 23
invoke-virtual {p0}, Landroidx/room/RoomDatabase;->d()Landroidx/room/InvalidationTracker;
.line 24
.line 25
.line 26
move-result-object v0
.line 27
iput-object v0, p0, Landroidx/room/RoomDatabase;->e:Landroidx/room/InvalidationTracker;
.line 28
.line 29
return-void
.end method
# virtual methods
.method public final a()V
.locals 2
.line 1
iget-boolean v0, p0, Landroidx/room/RoomDatabase;->f:Z
.line 2
.line 3
if-eqz v0, :cond_0
.line 4
.line 5
goto :goto_0
.line 6
:cond_0
invoke-static {}, Landroid/os/Looper;->getMainLooper()Landroid/os/Looper;
.line 7
.line 8
.line 9
move-result-object v0
.line 10
invoke-virtual {v0}, Landroid/os/Looper;->getThread()Ljava/lang/Thread;
.line 11
.line 12
.line 13
move-result-object v0
.line 14
invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
.line 15
.line 16
.line 17
move-result-object v1
.line 18
if-eq v0, v1, :cond_1
.line 19
.line 20
:goto_0
return-void
.line 21
:cond_1
new-instance v0, Ljava/lang/IllegalStateException;
.line 22
.line 23
const-string v1, "Cannot access database on the main thread since it may potentially lock the UI for a long period of time."
.line 24
.line 25
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
.line 26
.line 27
.line 28
throw v0
.end method
.method public final b()V
.locals 2
.line 1
iget-object v0, p0, Landroidx/room/RoomDatabase;->d:Landroidx/sqlite/db/SupportSQLiteOpenHelper;
.line 2
.line 3
invoke-interface {v0}, Landroidx/sqlite/db/SupportSQLiteOpenHelper;->O()Landroidx/sqlite/db/SupportSQLiteDatabase;
.line 4
.line 5
.line 6
move-result-object v0
.line 7
invoke-interface {v0}, Landroidx/sqlite/db/SupportSQLiteDatabase;->m0()Z
.line 8
.line 9
.line 10
move-result v0
.line 11
if-nez v0, :cond_1
.line 12
.line 13
iget-object v0, p0, Landroidx/room/RoomDatabase;->j:Ljava/lang/ThreadLocal;
.line 14
.line 15
invoke-virtual {v0}, Ljava/lang/ThreadLocal;->get()Ljava/lang/Object;
.line 16
.line 17
.line 18
move-result-object v0
.line 19
if-nez v0, :cond_0
.line 20
.line 21
goto :goto_0
.line 22
:cond_0
new-instance v0, Ljava/lang/IllegalStateException;
.line 23
.line 24
const-string v1, "Cannot access database on a different coroutine context inherited from a suspending transaction."
.line 25
.line 26
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
.line 27
.line 28
.line 29
throw v0
.line 30
:cond_1
:goto_0
return-void
.end method
.method public final c()V
.locals 2
.line 1
invoke-virtual {p0}, Landroidx/room/RoomDatabase;->a()V
.line 2
.line 3
.line 4
iget-object v0, p0, Landroidx/room/RoomDatabase;->d:Landroidx/sqlite/db/SupportSQLiteOpenHelper;
.line 5
.line 6
invoke-interface {v0}, Landroidx/sqlite/db/SupportSQLiteOpenHelper;->O()Landroidx/sqlite/db/SupportSQLiteDatabase;
.line 7
.line 8
.line 9
move-result-object v0
.line 10
iget-object v1, p0, Landroidx/room/RoomDatabase;->e:Landroidx/room/InvalidationTracker;
.line 11
.line 12
invoke-virtual {v1, v0}, Landroidx/room/InvalidationTracker;->c(Landroidx/sqlite/db/SupportSQLiteDatabase;)V
.line 13
.line 14
.line 15
invoke-interface {v0}, Landroidx/sqlite/db/SupportSQLiteDatabase;->p()V
.line 16
.line 17
.line 18
return-void
.end method
.method public abstract d()Landroidx/room/InvalidationTracker;
.end method
.method public abstract e(Landroidx/room/DatabaseConfiguration;)Landroidx/sqlite/db/SupportSQLiteOpenHelper;
.end method
.method public final f()V
.locals 4
.line 1
iget-object v0, p0, Landroidx/room/RoomDatabase;->d:Landroidx/sqlite/db/SupportSQLiteOpenHelper;
.line 2
.line 3
invoke-interface {v0}, Landroidx/sqlite/db/SupportSQLiteOpenHelper;->O()Landroidx/sqlite/db/SupportSQLiteDatabase;
.line 4
.line 5
.line 6
move-result-object v0
.line 7
invoke-interface {v0}, Landroidx/sqlite/db/SupportSQLiteDatabase;->V()V
.line 8
.line 9
.line 10
iget-object v0, p0, Landroidx/room/RoomDatabase;->d:Landroidx/sqlite/db/SupportSQLiteOpenHelper;
.line 11
.line 12
invoke-interface {v0}, Landroidx/sqlite/db/SupportSQLiteOpenHelper;->O()Landroidx/sqlite/db/SupportSQLiteDatabase;
.line 13
.line 14
.line 15
move-result-object v0
.line 16
invoke-interface {v0}, Landroidx/sqlite/db/SupportSQLiteDatabase;->m0()Z
.line 17
.line 18
.line 19
move-result v0
.line 20
if-nez v0, :cond_0
.line 21
.line 22
iget-object v0, p0, Landroidx/room/RoomDatabase;->e:Landroidx/room/InvalidationTracker;
.line 23
.line 24
iget-object v1, v0, Landroidx/room/InvalidationTracker;->d:Ljava/util/concurrent/atomic/AtomicBoolean;
.line 25
.line 26
const/4 v2, 0x0
.line 27
const/4 v3, 0x1
.line 28
invoke-virtual {v1, v2, v3}, Ljava/util/concurrent/atomic/AtomicBoolean;->compareAndSet(ZZ)Z
.line 29
.line 30
.line 31
move-result v1
.line 32
if-eqz v1, :cond_0
.line 33
.line 34
iget-object v1, v0, Landroidx/room/InvalidationTracker;->c:Landroidx/work/impl/WorkDatabase_Impl;
.line 35
.line 36
iget-object v1, v1, Landroidx/room/RoomDatabase;->b:Ljava/util/concurrent/Executor;
.line 37
.line 38
iget-object v0, v0, Landroidx/room/InvalidationTracker;->i:Ljava/lang/Runnable;
.line 39
.line 40
invoke-interface {v1, v0}, Ljava/util/concurrent/Executor;->execute(Ljava/lang/Runnable;)V
.line 41
.line 42
.line 43
:cond_0
return-void
.end method
.method public final g(Landroidx/sqlite/db/SupportSQLiteQuery;)Landroid/database/Cursor;
.locals 1
.line 1
invoke-virtual {p0}, Landroidx/room/RoomDatabase;->a()V
.line 2
.line 3
.line 4
invoke-virtual {p0}, Landroidx/room/RoomDatabase;->b()V
.line 5
.line 6
.line 7
iget-object v0, p0, Landroidx/room/RoomDatabase;->d:Landroidx/sqlite/db/SupportSQLiteOpenHelper;
.line 8
.line 9
invoke-interface {v0}, Landroidx/sqlite/db/SupportSQLiteOpenHelper;->O()Landroidx/sqlite/db/SupportSQLiteDatabase;
.line 10
.line 11
.line 12
move-result-object v0
.line 13
invoke-interface {v0, p1}, Landroidx/sqlite/db/SupportSQLiteDatabase;->f0(Landroidx/sqlite/db/SupportSQLiteQuery;)Landroid/database/Cursor;
.line 14
.line 15
.line 16
move-result-object p1
.line 17
return-object p1
.end method
.method public final h()V
.locals 1
.line 1
iget-object v0, p0, Landroidx/room/RoomDatabase;->d:Landroidx/sqlite/db/SupportSQLiteOpenHelper;
.line 2
.line 3
invoke-interface {v0}, Landroidx/sqlite/db/SupportSQLiteOpenHelper;->O()Landroidx/sqlite/db/SupportSQLiteDatabase;
.line 4
.line 5
.line 6
move-result-object v0
.line 7
invoke-interface {v0}, Landroidx/sqlite/db/SupportSQLiteDatabase;->K()V
.line 8
.line 9
.line 10
return-void
.end method