soul-browser/app/smali/com/bumptech/glide/load/resource/bitmap/BitmapImageDecoderResourceDecoder.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

243 lines
6 KiB
Smali

.class public final Lcom/bumptech/glide/load/resource/bitmap/BitmapImageDecoderResourceDecoder;
.super Ljava/lang/Object;
.source "SourceFile"
# interfaces
.implements Lcom/bumptech/glide/load/ResourceDecoder;
# annotations
.annotation build Landroidx/annotation/RequiresApi;
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/lang/Object;",
"Lcom/bumptech/glide/load/ResourceDecoder<",
"Landroid/graphics/ImageDecoder$Source;",
"Landroid/graphics/Bitmap;",
">;"
}
.end annotation
# instance fields
.field public final a:Lcom/bumptech/glide/load/engine/bitmap_recycle/BitmapPoolAdapter;
# 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, Lcom/bumptech/glide/load/engine/bitmap_recycle/BitmapPoolAdapter;
.line 5
.line 6
invoke-direct {v0}, Ljava/lang/Object;-><init>()V
.line 7
.line 8
.line 9
iput-object v0, p0, Lcom/bumptech/glide/load/resource/bitmap/BitmapImageDecoderResourceDecoder;->a:Lcom/bumptech/glide/load/engine/bitmap_recycle/BitmapPoolAdapter;
.line 10
.line 11
return-void
.end method
# virtual methods
.method public final bridge synthetic a(Ljava/lang/Object;Lcom/bumptech/glide/load/Options;)Z
.locals 0
.line 1
invoke-static {p1}, Landroidx/privacysandbox/ads/adservices/topics/a;->f(Ljava/lang/Object;)Landroid/graphics/ImageDecoder$Source;
.line 2
.line 3
.line 4
const/4 p1, 0x1
.line 5
return p1
.end method
.method public final bridge synthetic b(Ljava/lang/Object;IILcom/bumptech/glide/load/Options;)Lcom/bumptech/glide/load/engine/Resource;
.locals 0
.line 1
invoke-static {p1}, Landroidx/privacysandbox/ads/adservices/topics/a;->f(Ljava/lang/Object;)Landroid/graphics/ImageDecoder$Source;
.line 2
.line 3
.line 4
move-result-object p1
.line 5
invoke-virtual {p0, p1, p2, p3, p4}, Lcom/bumptech/glide/load/resource/bitmap/BitmapImageDecoderResourceDecoder;->c(Landroid/graphics/ImageDecoder$Source;IILcom/bumptech/glide/load/Options;)Lcom/bumptech/glide/load/resource/bitmap/BitmapResource;
.line 6
.line 7
.line 8
move-result-object p1
.line 9
return-object p1
.end method
.method public final c(Landroid/graphics/ImageDecoder$Source;IILcom/bumptech/glide/load/Options;)Lcom/bumptech/glide/load/resource/bitmap/BitmapResource;
.locals 3
.line 1
new-instance v0, Lcom/bumptech/glide/load/resource/DefaultOnHeaderDecodedListener;
.line 2
.line 3
invoke-direct {v0, p2, p3, p4}, Lcom/bumptech/glide/load/resource/DefaultOnHeaderDecodedListener;-><init>(IILcom/bumptech/glide/load/Options;)V
.line 4
.line 5
.line 6
invoke-static {p1, v0}, Landroid/graphics/ImageDecoder;->decodeBitmap(Landroid/graphics/ImageDecoder$Source;Landroid/graphics/ImageDecoder$OnHeaderDecodedListener;)Landroid/graphics/Bitmap;
.line 7
.line 8
.line 9
move-result-object p1
.line 10
const/4 p4, 0x2
.line 11
const-string v0, "BitmapImageDecoder"
.line 12
.line 13
invoke-static {v0, p4}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
.line 14
.line 15
.line 16
move-result p4
.line 17
if-eqz p4, :cond_0
.line 18
.line 19
new-instance p4, Ljava/lang/StringBuilder;
.line 20
.line 21
const-string v1, "Decoded ["
.line 22
.line 23
invoke-direct {p4, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
.line 24
.line 25
.line 26
invoke-virtual {p1}, Landroid/graphics/Bitmap;->getWidth()I
.line 27
.line 28
.line 29
move-result v1
.line 30
invoke-virtual {p4, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
.line 31
.line 32
.line 33
const-string v1, "x"
.line 34
.line 35
invoke-virtual {p4, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
.line 36
.line 37
.line 38
invoke-virtual {p1}, Landroid/graphics/Bitmap;->getHeight()I
.line 39
.line 40
.line 41
move-result v2
.line 42
invoke-virtual {p4, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
.line 43
.line 44
.line 45
const-string v2, "] for ["
.line 46
.line 47
invoke-virtual {p4, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
.line 48
.line 49
.line 50
invoke-virtual {p4, p2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
.line 51
.line 52
.line 53
invoke-virtual {p4, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
.line 54
.line 55
.line 56
invoke-virtual {p4, p3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
.line 57
.line 58
.line 59
const-string p2, "]"
.line 60
.line 61
invoke-virtual {p4, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
.line 62
.line 63
.line 64
invoke-virtual {p4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
.line 65
.line 66
.line 67
move-result-object p2
.line 68
invoke-static {v0, p2}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I
.line 69
.line 70
.line 71
:cond_0
new-instance p2, Lcom/bumptech/glide/load/resource/bitmap/BitmapResource;
.line 72
.line 73
iget-object p3, p0, Lcom/bumptech/glide/load/resource/bitmap/BitmapImageDecoderResourceDecoder;->a:Lcom/bumptech/glide/load/engine/bitmap_recycle/BitmapPoolAdapter;
.line 74
.line 75
invoke-direct {p2, p1, p3}, Lcom/bumptech/glide/load/resource/bitmap/BitmapResource;-><init>(Landroid/graphics/Bitmap;Lcom/bumptech/glide/load/engine/bitmap_recycle/BitmapPool;)V
.line 76
.line 77
.line 78
return-object p2
.end method