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

592 lines
12 KiB
Smali

.class Landroidx/room/InvalidationTracker$1;
.super Ljava/lang/Object;
.source "SourceFile"
# interfaces
.implements Ljava/lang/Runnable;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Landroidx/room/InvalidationTracker;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1
name = null
.end annotation
# instance fields
.field public final synthetic c:Landroidx/room/InvalidationTracker;
# direct methods
.method public constructor <init>(Landroidx/room/InvalidationTracker;)V
.locals 0
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 2
.line 3
.line 4
iput-object p1, p0, Landroidx/room/InvalidationTracker$1;->c:Landroidx/room/InvalidationTracker;
.line 5
.line 6
return-void
.end method
# virtual methods
.method public final a()Ljava/util/HashSet;
.locals 5
.line 1
new-instance v0, Ljava/util/HashSet;
.line 2
.line 3
invoke-direct {v0}, Ljava/util/HashSet;-><init>()V
.line 4
.line 5
.line 6
iget-object v1, p0, Landroidx/room/InvalidationTracker$1;->c:Landroidx/room/InvalidationTracker;
.line 7
.line 8
iget-object v1, v1, Landroidx/room/InvalidationTracker;->c:Landroidx/work/impl/WorkDatabase_Impl;
.line 9
.line 10
new-instance v2, Landroidx/sqlite/db/SimpleSQLiteQuery;
.line 11
.line 12
const-string v3, "SELECT * FROM room_table_modification_log WHERE invalidated = 1;"
.line 13
.line 14
const/4 v4, 0x0
.line 15
invoke-direct {v2, v3, v4}, Landroidx/sqlite/db/SimpleSQLiteQuery;-><init>(Ljava/lang/String;I)V
.line 16
.line 17
.line 18
invoke-virtual {v1, v2}, Landroidx/room/RoomDatabase;->g(Landroidx/sqlite/db/SupportSQLiteQuery;)Landroid/database/Cursor;
.line 19
.line 20
.line 21
move-result-object v1
.line 22
:goto_0
:try_start_0
invoke-interface {v1}, Landroid/database/Cursor;->moveToNext()Z
.line 23
.line 24
.line 25
move-result v2
.line 26
if-eqz v2, :cond_0
.line 27
.line 28
invoke-interface {v1, v4}, Landroid/database/Cursor;->getInt(I)I
.line 29
.line 30
.line 31
move-result v2
.line 32
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
.line 33
.line 34
.line 35
move-result-object v2
.line 36
invoke-virtual {v0, v2}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 37
.line 38
.line 39
goto :goto_0
.line 40
:catchall_0
move-exception v0
.line 41
goto :goto_1
.line 42
:cond_0
invoke-interface {v1}, Landroid/database/Cursor;->close()V
.line 43
.line 44
.line 45
invoke-virtual {v0}, Ljava/util/HashSet;->isEmpty()Z
.line 46
.line 47
.line 48
move-result v1
.line 49
if-nez v1, :cond_1
.line 50
.line 51
iget-object v1, p0, Landroidx/room/InvalidationTracker$1;->c:Landroidx/room/InvalidationTracker;
.line 52
.line 53
iget-object v1, v1, Landroidx/room/InvalidationTracker;->f:Landroidx/sqlite/db/SupportSQLiteStatement;
.line 54
.line 55
invoke-interface {v1}, Landroidx/sqlite/db/SupportSQLiteStatement;->w()I
.line 56
.line 57
.line 58
:cond_1
return-object v0
.line 59
:goto_1
invoke-interface {v1}, Landroid/database/Cursor;->close()V
.line 60
.line 61
.line 62
throw v0
.end method
.method public final run()V
.locals 5
.line 1
iget-object v0, p0, Landroidx/room/InvalidationTracker$1;->c:Landroidx/room/InvalidationTracker;
.line 2
.line 3
iget-object v0, v0, Landroidx/room/InvalidationTracker;->c:Landroidx/work/impl/WorkDatabase_Impl;
.line 4
.line 5
iget-object v0, v0, Landroidx/room/RoomDatabase;->i:Ljava/util/concurrent/locks/ReentrantReadWriteLock;
.line 6
.line 7
invoke-virtual {v0}, Ljava/util/concurrent/locks/ReentrantReadWriteLock;->readLock()Ljava/util/concurrent/locks/ReentrantReadWriteLock$ReadLock;
.line 8
.line 9
.line 10
move-result-object v0
.line 11
const/4 v1, 0x0
.line 12
:try_start_0
invoke-interface {v0}, Ljava/util/concurrent/locks/Lock;->lock()V
.line 13
.line 14
.line 15
iget-object v2, p0, Landroidx/room/InvalidationTracker$1;->c:Landroidx/room/InvalidationTracker;
.line 16
.line 17
invoke-virtual {v2}, Landroidx/room/InvalidationTracker;->a()Z
.line 18
.line 19
.line 20
move-result v2
:try_end_0
.catch Ljava/lang/IllegalStateException; {:try_start_0 .. :try_end_0} :catch_1
.catch Landroid/database/sqlite/SQLiteException; {:try_start_0 .. :try_end_0} :catch_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 21
if-nez v2, :cond_0
.line 22
.line 23
invoke-interface {v0}, Ljava/util/concurrent/locks/Lock;->unlock()V
.line 24
.line 25
.line 26
return-void
.line 27
:cond_0
:try_start_1
iget-object v2, p0, Landroidx/room/InvalidationTracker$1;->c:Landroidx/room/InvalidationTracker;
.line 28
.line 29
iget-object v2, v2, Landroidx/room/InvalidationTracker;->d:Ljava/util/concurrent/atomic/AtomicBoolean;
.line 30
.line 31
const/4 v3, 0x0
.line 32
const/4 v4, 0x1
.line 33
invoke-virtual {v2, v4, v3}, Ljava/util/concurrent/atomic/AtomicBoolean;->compareAndSet(ZZ)Z
.line 34
.line 35
.line 36
move-result v2
:try_end_1
.catch Ljava/lang/IllegalStateException; {:try_start_1 .. :try_end_1} :catch_1
.catch Landroid/database/sqlite/SQLiteException; {:try_start_1 .. :try_end_1} :catch_0
.catchall {:try_start_1 .. :try_end_1} :catchall_0
.line 37
if-nez v2, :cond_1
.line 38
.line 39
invoke-interface {v0}, Ljava/util/concurrent/locks/Lock;->unlock()V
.line 40
.line 41
.line 42
return-void
.line 43
:cond_1
:try_start_2
iget-object v2, p0, Landroidx/room/InvalidationTracker$1;->c:Landroidx/room/InvalidationTracker;
.line 44
.line 45
iget-object v2, v2, Landroidx/room/InvalidationTracker;->c:Landroidx/work/impl/WorkDatabase_Impl;
.line 46
.line 47
iget-object v2, v2, Landroidx/room/RoomDatabase;->d:Landroidx/sqlite/db/SupportSQLiteOpenHelper;
.line 48
.line 49
invoke-interface {v2}, Landroidx/sqlite/db/SupportSQLiteOpenHelper;->O()Landroidx/sqlite/db/SupportSQLiteDatabase;
.line 50
.line 51
.line 52
move-result-object v2
.line 53
invoke-interface {v2}, Landroidx/sqlite/db/SupportSQLiteDatabase;->m0()Z
.line 54
.line 55
.line 56
move-result v2
:try_end_2
.catch Ljava/lang/IllegalStateException; {:try_start_2 .. :try_end_2} :catch_1
.catch Landroid/database/sqlite/SQLiteException; {:try_start_2 .. :try_end_2} :catch_0
.catchall {:try_start_2 .. :try_end_2} :catchall_0
.line 57
if-eqz v2, :cond_2
.line 58
.line 59
invoke-interface {v0}, Ljava/util/concurrent/locks/Lock;->unlock()V
.line 60
.line 61
.line 62
return-void
.line 63
:cond_2
:try_start_3
iget-object v2, p0, Landroidx/room/InvalidationTracker$1;->c:Landroidx/room/InvalidationTracker;
.line 64
.line 65
iget-object v2, v2, Landroidx/room/InvalidationTracker;->c:Landroidx/work/impl/WorkDatabase_Impl;
.line 66
.line 67
iget-boolean v3, v2, Landroidx/room/RoomDatabase;->g:Z
.line 68
.line 69
if-eqz v3, :cond_3
.line 70
.line 71
iget-object v2, v2, Landroidx/room/RoomDatabase;->d:Landroidx/sqlite/db/SupportSQLiteOpenHelper;
.line 72
.line 73
invoke-interface {v2}, Landroidx/sqlite/db/SupportSQLiteOpenHelper;->O()Landroidx/sqlite/db/SupportSQLiteDatabase;
.line 74
.line 75
.line 76
move-result-object v2
.line 77
invoke-interface {v2}, Landroidx/sqlite/db/SupportSQLiteDatabase;->p()V
:try_end_3
.catch Ljava/lang/IllegalStateException; {:try_start_3 .. :try_end_3} :catch_1
.catch Landroid/database/sqlite/SQLiteException; {:try_start_3 .. :try_end_3} :catch_0
.catchall {:try_start_3 .. :try_end_3} :catchall_0
.line 78
.line 79
.line 80
:try_start_4
invoke-virtual {p0}, Landroidx/room/InvalidationTracker$1;->a()Ljava/util/HashSet;
.line 81
.line 82
.line 83
move-result-object v1
.line 84
invoke-interface {v2}, Landroidx/sqlite/db/SupportSQLiteDatabase;->K()V
:try_end_4
.catchall {:try_start_4 .. :try_end_4} :catchall_1
.line 85
.line 86
.line 87
:try_start_5
invoke-interface {v2}, Landroidx/sqlite/db/SupportSQLiteDatabase;->V()V
.line 88
.line 89
.line 90
goto :goto_0
.line 91
:catchall_0
move-exception v1
.line 92
goto :goto_5
.line 93
:catch_0
move-exception v2
.line 94
goto :goto_1
.line 95
:catch_1
move-exception v2
.line 96
goto :goto_1
.line 97
:catchall_1
move-exception v3
.line 98
invoke-interface {v2}, Landroidx/sqlite/db/SupportSQLiteDatabase;->V()V
.line 99
.line 100
.line 101
throw v3
.line 102
:cond_3
invoke-virtual {p0}, Landroidx/room/InvalidationTracker$1;->a()Ljava/util/HashSet;
.line 103
.line 104
.line 105
move-result-object v1
:try_end_5
.catch Ljava/lang/IllegalStateException; {:try_start_5 .. :try_end_5} :catch_1
.catch Landroid/database/sqlite/SQLiteException; {:try_start_5 .. :try_end_5} :catch_0
.catchall {:try_start_5 .. :try_end_5} :catchall_0
.line 106
:goto_0
invoke-interface {v0}, Ljava/util/concurrent/locks/Lock;->unlock()V
.line 107
.line 108
.line 109
goto :goto_2
.line 110
:goto_1
:try_start_6
const-string v3, "ROOM"
.line 111
.line 112
const-string v4, "Cannot run invalidation tracker. Is the db closed?"
.line 113
.line 114
invoke-static {v3, v4, v2}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
:try_end_6
.catchall {:try_start_6 .. :try_end_6} :catchall_0
.line 115
.line 116
.line 117
goto :goto_0
.line 118
:goto_2
if-eqz v1, :cond_5
.line 119
.line 120
invoke-interface {v1}, Ljava/util/Set;->isEmpty()Z
.line 121
.line 122
.line 123
move-result v0
.line 124
if-nez v0, :cond_5
.line 125
.line 126
iget-object v0, p0, Landroidx/room/InvalidationTracker$1;->c:Landroidx/room/InvalidationTracker;
.line 127
.line 128
iget-object v0, v0, Landroidx/room/InvalidationTracker;->h:Landroidx/arch/core/internal/SafeIterableMap;
.line 129
.line 130
monitor-enter v0
.line 131
:try_start_7
iget-object v1, p0, Landroidx/room/InvalidationTracker$1;->c:Landroidx/room/InvalidationTracker;
.line 132
.line 133
iget-object v1, v1, Landroidx/room/InvalidationTracker;->h:Landroidx/arch/core/internal/SafeIterableMap;
.line 134
.line 135
invoke-virtual {v1}, Landroidx/arch/core/internal/SafeIterableMap;->iterator()Ljava/util/Iterator;
.line 136
.line 137
.line 138
move-result-object v1
.line 139
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
.line 140
.line 141
.line 142
move-result v2
.line 143
if-nez v2, :cond_4
.line 144
.line 145
monitor-exit v0
.line 146
goto :goto_4
.line 147
:catchall_2
move-exception v1
.line 148
goto :goto_3
.line 149
:cond_4
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
.line 150
.line 151
.line 152
move-result-object v1
.line 153
check-cast v1, Ljava/util/Map$Entry;
.line 154
.line 155
invoke-interface {v1}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
.line 156
.line 157
.line 158
move-result-object v1
.line 159
check-cast v1, Landroidx/room/InvalidationTracker$ObserverWrapper;
.line 160
.line 161
invoke-virtual {v1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
.line 162
.line 163
.line 164
const/4 v1, 0x0
.line 165
throw v1
.line 166
:goto_3
monitor-exit v0
:try_end_7
.catchall {:try_start_7 .. :try_end_7} :catchall_2
.line 167
throw v1
.line 168
:cond_5
:goto_4
return-void
.line 169
:goto_5
invoke-interface {v0}, Ljava/util/concurrent/locks/Lock;->unlock()V
.line 170
.line 171
.line 172
throw v1
.end method