soul-browser/app/smali/androidx/documentfile/provider/DocumentsContractApi19.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

424 lines
8 KiB
Smali

.class Landroidx/documentfile/provider/DocumentsContractApi19;
.super Ljava/lang/Object;
.source "SourceFile"
# direct methods
.method public static a(Landroid/database/Cursor;)V
.locals 0
.line 1
if-eqz p0, :cond_0
.line 2
.line 3
:try_start_0
invoke-static {p0}, Landroid/support/v4/media/a;->x(Landroid/database/Cursor;)V
:try_end_0
.catch Ljava/lang/RuntimeException; {:try_start_0 .. :try_end_0} :catch_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_1
.line 4
.line 5
.line 6
return-void
.line 7
:catch_0
move-exception p0
.line 8
throw p0
.line 9
:catch_1
:cond_0
return-void
.end method
.method public static b(Landroid/content/Context;Landroid/net/Uri;Ljava/lang/String;)J
.locals 10
.line 1
const-string v1, "Failed query: "
.line 2
.line 3
invoke-virtual {p0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
.line 4
.line 5
.line 6
move-result-object v2
.line 7
const-wide/16 v8, 0x0
.line 8
.line 9
const/4 p0, 0x0
.line 10
:try_start_0
filled-new-array {p2}, [Ljava/lang/String;
.line 11
.line 12
.line 13
move-result-object v4
.line 14
const/4 v6, 0x0
.line 15
const/4 v7, 0x0
.line 16
const/4 v5, 0x0
.line 17
move-object v3, p1
.line 18
invoke-virtual/range {v2 .. v7}, Landroid/content/ContentResolver;->query(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;
.line 19
.line 20
.line 21
move-result-object p0
.line 22
invoke-interface {p0}, Landroid/database/Cursor;->moveToFirst()Z
.line 23
.line 24
.line 25
move-result p1
.line 26
if-eqz p1, :cond_0
.line 27
.line 28
const/4 p1, 0x0
.line 29
invoke-interface {p0, p1}, Landroid/database/Cursor;->isNull(I)Z
.line 30
.line 31
.line 32
move-result p2
.line 33
if-nez p2, :cond_0
.line 34
.line 35
invoke-interface {p0, p1}, Landroid/database/Cursor;->getLong(I)J
.line 36
.line 37
.line 38
move-result-wide p1
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 39
invoke-static {p0}, Landroidx/documentfile/provider/DocumentsContractApi19;->a(Landroid/database/Cursor;)V
.line 40
.line 41
.line 42
return-wide p1
.line 43
:catchall_0
move-exception v0
.line 44
move-object p1, v0
.line 45
goto :goto_1
.line 46
:catch_0
move-exception v0
.line 47
move-object p1, v0
.line 48
goto :goto_0
.line 49
:cond_0
invoke-static {p0}, Landroidx/documentfile/provider/DocumentsContractApi19;->a(Landroid/database/Cursor;)V
.line 50
.line 51
.line 52
return-wide v8
.line 53
:goto_0
:try_start_1
const-string p2, "DocumentFile"
.line 54
.line 55
new-instance v0, Ljava/lang/StringBuilder;
.line 56
.line 57
invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
.line 58
.line 59
.line 60
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
.line 61
.line 62
.line 63
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
.line 64
.line 65
.line 66
move-result-object p1
.line 67
invoke-static {p2, p1}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
.line 68
.line 69
.line 70
invoke-static {p0}, Landroidx/documentfile/provider/DocumentsContractApi19;->a(Landroid/database/Cursor;)V
.line 71
.line 72
.line 73
return-wide v8
.line 74
:goto_1
invoke-static {p0}, Landroidx/documentfile/provider/DocumentsContractApi19;->a(Landroid/database/Cursor;)V
.line 75
.line 76
.line 77
throw p1
.end method
.method public static c(Landroid/content/Context;Landroid/net/Uri;Ljava/lang/String;)Ljava/lang/String;
.locals 9
.line 1
const-string v1, "Failed query: "
.line 2
.line 3
invoke-virtual {p0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
.line 4
.line 5
.line 6
move-result-object v2
.line 7
const/4 p0, 0x0
.line 8
:try_start_0
filled-new-array {p2}, [Ljava/lang/String;
.line 9
.line 10
.line 11
move-result-object v4
.line 12
const/4 v6, 0x0
.line 13
const/4 v7, 0x0
.line 14
const/4 v5, 0x0
.line 15
move-object v3, p1
.line 16
invoke-virtual/range {v2 .. v7}, Landroid/content/ContentResolver;->query(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;
.line 17
.line 18
.line 19
move-result-object p1
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_1
.catchall {:try_start_0 .. :try_end_0} :catchall_1
.line 20
:try_start_1
invoke-interface {p1}, Landroid/database/Cursor;->moveToFirst()Z
.line 21
.line 22
.line 23
move-result p2
.line 24
if-eqz p2, :cond_0
.line 25
.line 26
const/4 p2, 0x0
.line 27
invoke-interface {p1, p2}, Landroid/database/Cursor;->isNull(I)Z
.line 28
.line 29
.line 30
move-result v0
.line 31
if-nez v0, :cond_0
.line 32
.line 33
invoke-interface {p1, p2}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;
.line 34
.line 35
.line 36
move-result-object p0
:try_end_1
.catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0
.catchall {:try_start_1 .. :try_end_1} :catchall_0
.line 37
invoke-static {p1}, Landroidx/documentfile/provider/DocumentsContractApi19;->a(Landroid/database/Cursor;)V
.line 38
.line 39
.line 40
return-object p0
.line 41
:catchall_0
move-exception v0
.line 42
move-object p0, v0
.line 43
goto :goto_1
.line 44
:catch_0
move-exception v0
.line 45
move-object p2, v0
.line 46
goto :goto_0
.line 47
:cond_0
invoke-static {p1}, Landroidx/documentfile/provider/DocumentsContractApi19;->a(Landroid/database/Cursor;)V
.line 48
.line 49
.line 50
return-object p0
.line 51
:catchall_1
move-exception v0
.line 52
move-object p1, v0
.line 53
move-object v8, p1
.line 54
move-object p1, p0
.line 55
move-object p0, v8
.line 56
goto :goto_1
.line 57
:catch_1
move-exception v0
.line 58
move-object p2, v0
.line 59
move-object p1, p0
.line 60
:goto_0
:try_start_2
const-string v0, "DocumentFile"
.line 61
.line 62
new-instance v2, Ljava/lang/StringBuilder;
.line 63
.line 64
invoke-direct {v2, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
.line 65
.line 66
.line 67
invoke-virtual {v2, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
.line 68
.line 69
.line 70
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
.line 71
.line 72
.line 73
move-result-object p2
.line 74
invoke-static {v0, p2}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
.line 75
.line 76
.line 77
invoke-static {p1}, Landroidx/documentfile/provider/DocumentsContractApi19;->a(Landroid/database/Cursor;)V
.line 78
.line 79
.line 80
return-object p0
.line 81
:goto_1
invoke-static {p1}, Landroidx/documentfile/provider/DocumentsContractApi19;->a(Landroid/database/Cursor;)V
.line 82
.line 83
.line 84
throw p0
.end method