* 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>
410 lines
9 KiB
Smali
410 lines
9 KiB
Smali
.class Landroidx/print/PrintHelper$PrintUriAdapter$1;
|
|
.super Landroid/os/AsyncTask;
|
|
.source "SourceFile"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Landroid/os/AsyncTask<",
|
|
"Landroid/net/Uri;",
|
|
"Ljava/lang/Boolean;",
|
|
"Landroid/graphics/Bitmap;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public final synthetic a:Landroid/os/CancellationSignal;
|
|
|
|
.field public final synthetic b:Landroid/print/PrintAttributes;
|
|
|
|
.field public final synthetic c:Landroid/print/PrintAttributes;
|
|
|
|
.field public final synthetic d:Landroid/print/PrintDocumentAdapter$LayoutResultCallback;
|
|
|
|
.field public final synthetic e:Landroidx/print/PrintHelper$PrintUriAdapter;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Landroidx/print/PrintHelper$PrintUriAdapter;Landroid/os/CancellationSignal;Landroid/print/PrintAttributes;Landroid/print/PrintAttributes;Landroid/print/PrintDocumentAdapter$LayoutResultCallback;)V
|
|
.locals 0
|
|
|
|
.line 1
|
|
iput-object p1, p0, Landroidx/print/PrintHelper$PrintUriAdapter$1;->e:Landroidx/print/PrintHelper$PrintUriAdapter;
|
|
|
|
.line 2
|
|
.line 3
|
|
iput-object p2, p0, Landroidx/print/PrintHelper$PrintUriAdapter$1;->a:Landroid/os/CancellationSignal;
|
|
|
|
.line 4
|
|
.line 5
|
|
iput-object p3, p0, Landroidx/print/PrintHelper$PrintUriAdapter$1;->b:Landroid/print/PrintAttributes;
|
|
|
|
.line 6
|
|
.line 7
|
|
iput-object p4, p0, Landroidx/print/PrintHelper$PrintUriAdapter$1;->c:Landroid/print/PrintAttributes;
|
|
|
|
.line 8
|
|
.line 9
|
|
iput-object p5, p0, Landroidx/print/PrintHelper$PrintUriAdapter$1;->d:Landroid/print/PrintDocumentAdapter$LayoutResultCallback;
|
|
|
|
.line 10
|
|
.line 11
|
|
invoke-direct {p0}, Landroid/os/AsyncTask;-><init>()V
|
|
|
|
.line 12
|
|
.line 13
|
|
.line 14
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final doInBackground([Ljava/lang/Object;)Ljava/lang/Object;
|
|
.locals 1
|
|
|
|
.line 1
|
|
check-cast p1, [Landroid/net/Uri;
|
|
|
|
.line 2
|
|
.line 3
|
|
iget-object p1, p0, Landroidx/print/PrintHelper$PrintUriAdapter$1;->e:Landroidx/print/PrintHelper$PrintUriAdapter;
|
|
|
|
.line 4
|
|
.line 5
|
|
const/4 v0, 0x0
|
|
|
|
.line 6
|
|
:try_start_0
|
|
invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
|
:try_end_0
|
|
.catch Ljava/io/FileNotFoundException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
.line 7
|
|
.line 8
|
|
.line 9
|
|
throw v0
|
|
|
|
.line 10
|
|
:catch_0
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final onCancelled(Ljava/lang/Object;)V
|
|
.locals 0
|
|
|
|
.line 1
|
|
check-cast p1, Landroid/graphics/Bitmap;
|
|
|
|
.line 2
|
|
.line 3
|
|
iget-object p1, p0, Landroidx/print/PrintHelper$PrintUriAdapter$1;->d:Landroid/print/PrintDocumentAdapter$LayoutResultCallback;
|
|
|
|
.line 4
|
|
.line 5
|
|
invoke-virtual {p1}, Landroid/print/PrintDocumentAdapter$LayoutResultCallback;->onLayoutCancelled()V
|
|
|
|
.line 6
|
|
.line 7
|
|
.line 8
|
|
return-void
|
|
.end method
|
|
|
|
.method public final onPostExecute(Ljava/lang/Object;)V
|
|
.locals 8
|
|
|
|
.line 1
|
|
move-object v0, p1
|
|
|
|
.line 2
|
|
check-cast v0, Landroid/graphics/Bitmap;
|
|
|
|
.line 3
|
|
.line 4
|
|
invoke-super {p0, v0}, Landroid/os/AsyncTask;->onPostExecute(Ljava/lang/Object;)V
|
|
|
|
.line 5
|
|
.line 6
|
|
.line 7
|
|
const/4 p1, 0x1
|
|
|
|
.line 8
|
|
const/4 v7, 0x0
|
|
|
|
.line 9
|
|
if-eqz v0, :cond_2
|
|
|
|
.line 10
|
|
.line 11
|
|
sget-boolean v1, Landroidx/print/PrintHelper;->a:Z
|
|
|
|
.line 12
|
|
.line 13
|
|
if-nez v1, :cond_1
|
|
|
|
.line 14
|
|
.line 15
|
|
monitor-enter p0
|
|
|
|
.line 16
|
|
:try_start_0
|
|
iget-object v1, p0, Landroidx/print/PrintHelper$PrintUriAdapter$1;->e:Landroidx/print/PrintHelper$PrintUriAdapter;
|
|
|
|
.line 17
|
|
.line 18
|
|
iget-object v1, v1, Landroidx/print/PrintHelper$PrintUriAdapter;->a:Landroid/print/PrintAttributes;
|
|
|
|
.line 19
|
|
.line 20
|
|
invoke-virtual {v1}, Landroid/print/PrintAttributes;->getMediaSize()Landroid/print/PrintAttributes$MediaSize;
|
|
|
|
.line 21
|
|
.line 22
|
|
.line 23
|
|
move-result-object v1
|
|
|
|
.line 24
|
|
monitor-exit p0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
.line 25
|
|
if-eqz v1, :cond_2
|
|
|
|
.line 26
|
|
.line 27
|
|
invoke-virtual {v1}, Landroid/print/PrintAttributes$MediaSize;->isPortrait()Z
|
|
|
|
.line 28
|
|
.line 29
|
|
.line 30
|
|
move-result v1
|
|
|
|
.line 31
|
|
invoke-virtual {v0}, Landroid/graphics/Bitmap;->getWidth()I
|
|
|
|
.line 32
|
|
.line 33
|
|
.line 34
|
|
move-result v2
|
|
|
|
.line 35
|
|
invoke-virtual {v0}, Landroid/graphics/Bitmap;->getHeight()I
|
|
|
|
.line 36
|
|
.line 37
|
|
.line 38
|
|
move-result v3
|
|
|
|
.line 39
|
|
if-gt v2, v3, :cond_0
|
|
|
|
.line 40
|
|
.line 41
|
|
move v2, p1
|
|
|
|
.line 42
|
|
goto :goto_0
|
|
|
|
.line 43
|
|
:cond_0
|
|
const/4 v2, 0x0
|
|
|
|
.line 44
|
|
:goto_0
|
|
if-eq v1, v2, :cond_2
|
|
|
|
.line 45
|
|
.line 46
|
|
new-instance v5, Landroid/graphics/Matrix;
|
|
|
|
.line 47
|
|
.line 48
|
|
invoke-direct {v5}, Landroid/graphics/Matrix;-><init>()V
|
|
|
|
.line 49
|
|
.line 50
|
|
.line 51
|
|
const/high16 v1, 0x42b40000 # 90.0f
|
|
|
|
.line 52
|
|
.line 53
|
|
invoke-virtual {v5, v1}, Landroid/graphics/Matrix;->postRotate(F)Z
|
|
|
|
.line 54
|
|
.line 55
|
|
.line 56
|
|
invoke-virtual {v0}, Landroid/graphics/Bitmap;->getWidth()I
|
|
|
|
.line 57
|
|
.line 58
|
|
.line 59
|
|
move-result v3
|
|
|
|
.line 60
|
|
invoke-virtual {v0}, Landroid/graphics/Bitmap;->getHeight()I
|
|
|
|
.line 61
|
|
.line 62
|
|
.line 63
|
|
move-result v4
|
|
|
|
.line 64
|
|
const/4 v6, 0x1
|
|
|
|
.line 65
|
|
const/4 v1, 0x0
|
|
|
|
.line 66
|
|
const/4 v2, 0x0
|
|
|
|
.line 67
|
|
invoke-static/range {v0 .. v6}, Landroid/graphics/Bitmap;->createBitmap(Landroid/graphics/Bitmap;IIIILandroid/graphics/Matrix;Z)Landroid/graphics/Bitmap;
|
|
|
|
.line 68
|
|
.line 69
|
|
.line 70
|
|
move-result-object v0
|
|
|
|
.line 71
|
|
goto :goto_1
|
|
|
|
.line 72
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
.line 73
|
|
move-object p1, v0
|
|
|
|
.line 74
|
|
:try_start_1
|
|
monitor-exit p0
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
.line 75
|
|
throw p1
|
|
|
|
.line 76
|
|
:cond_1
|
|
throw v7
|
|
|
|
.line 77
|
|
:cond_2
|
|
:goto_1
|
|
iget-object v1, p0, Landroidx/print/PrintHelper$PrintUriAdapter$1;->e:Landroidx/print/PrintHelper$PrintUriAdapter;
|
|
|
|
.line 78
|
|
.line 79
|
|
iput-object v0, v1, Landroidx/print/PrintHelper$PrintUriAdapter;->b:Landroid/graphics/Bitmap;
|
|
|
|
.line 80
|
|
.line 81
|
|
if-eqz v0, :cond_3
|
|
|
|
.line 82
|
|
.line 83
|
|
new-instance v0, Landroid/print/PrintDocumentInfo$Builder;
|
|
|
|
.line 84
|
|
.line 85
|
|
invoke-direct {v0, v7}, Landroid/print/PrintDocumentInfo$Builder;-><init>(Ljava/lang/String;)V
|
|
|
|
.line 86
|
|
.line 87
|
|
.line 88
|
|
invoke-virtual {v0, p1}, Landroid/print/PrintDocumentInfo$Builder;->setContentType(I)Landroid/print/PrintDocumentInfo$Builder;
|
|
|
|
.line 89
|
|
.line 90
|
|
.line 91
|
|
move-result-object v0
|
|
|
|
.line 92
|
|
invoke-virtual {v0, p1}, Landroid/print/PrintDocumentInfo$Builder;->setPageCount(I)Landroid/print/PrintDocumentInfo$Builder;
|
|
|
|
.line 93
|
|
.line 94
|
|
.line 95
|
|
move-result-object v0
|
|
|
|
.line 96
|
|
invoke-virtual {v0}, Landroid/print/PrintDocumentInfo$Builder;->build()Landroid/print/PrintDocumentInfo;
|
|
|
|
.line 97
|
|
.line 98
|
|
.line 99
|
|
move-result-object v0
|
|
|
|
.line 100
|
|
iget-object v1, p0, Landroidx/print/PrintHelper$PrintUriAdapter$1;->b:Landroid/print/PrintAttributes;
|
|
|
|
.line 101
|
|
.line 102
|
|
iget-object v2, p0, Landroidx/print/PrintHelper$PrintUriAdapter$1;->c:Landroid/print/PrintAttributes;
|
|
|
|
.line 103
|
|
.line 104
|
|
invoke-virtual {v1, v2}, Landroid/print/PrintAttributes;->equals(Ljava/lang/Object;)Z
|
|
|
|
.line 105
|
|
.line 106
|
|
.line 107
|
|
move-result v1
|
|
|
|
.line 108
|
|
xor-int/2addr p1, v1
|
|
|
|
.line 109
|
|
iget-object v1, p0, Landroidx/print/PrintHelper$PrintUriAdapter$1;->d:Landroid/print/PrintDocumentAdapter$LayoutResultCallback;
|
|
|
|
.line 110
|
|
.line 111
|
|
invoke-virtual {v1, v0, p1}, Landroid/print/PrintDocumentAdapter$LayoutResultCallback;->onLayoutFinished(Landroid/print/PrintDocumentInfo;Z)V
|
|
|
|
.line 112
|
|
.line 113
|
|
.line 114
|
|
goto :goto_2
|
|
|
|
.line 115
|
|
:cond_3
|
|
iget-object p1, p0, Landroidx/print/PrintHelper$PrintUriAdapter$1;->d:Landroid/print/PrintDocumentAdapter$LayoutResultCallback;
|
|
|
|
.line 116
|
|
.line 117
|
|
invoke-virtual {p1, v7}, Landroid/print/PrintDocumentAdapter$LayoutResultCallback;->onLayoutFailed(Ljava/lang/CharSequence;)V
|
|
|
|
.line 118
|
|
.line 119
|
|
.line 120
|
|
:goto_2
|
|
return-void
|
|
.end method
|
|
|
|
.method public final onPreExecute()V
|
|
.locals 2
|
|
|
|
.line 1
|
|
new-instance v0, Landroidx/print/PrintHelper$PrintUriAdapter$1$1;
|
|
|
|
.line 2
|
|
.line 3
|
|
invoke-direct {v0, p0}, Landroidx/print/PrintHelper$PrintUriAdapter$1$1;-><init>(Landroidx/print/PrintHelper$PrintUriAdapter$1;)V
|
|
|
|
.line 4
|
|
.line 5
|
|
.line 6
|
|
iget-object v1, p0, Landroidx/print/PrintHelper$PrintUriAdapter$1;->a:Landroid/os/CancellationSignal;
|
|
|
|
.line 7
|
|
.line 8
|
|
invoke-virtual {v1, v0}, Landroid/os/CancellationSignal;->setOnCancelListener(Landroid/os/CancellationSignal$OnCancelListener;)V
|
|
|
|
.line 9
|
|
.line 10
|
|
.line 11
|
|
return-void
|
|
.end method
|