soul-browser/app/smali_classes4/okhttp3/Response$Builder.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

489 lines
9.6 KiB
Smali

.class public Lokhttp3/Response$Builder;
.super Ljava/lang/Object;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lokhttp3/Response;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x9
name = "Builder"
.end annotation
.annotation runtime Lkotlin/Metadata;
d1 = {
"\u0000\n\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\u0008\u0016\u0018\u00002\u00020\u0001\u00a8\u0006\u0002"
}
d2 = {
"Lokhttp3/Response$Builder;",
"",
"okhttp"
}
k = 0x1
mv = {
0x2,
0x2,
0x0
}
xi = 0x30
.end annotation
.annotation build Lkotlin/jvm/internal/SourceDebugExtension;
value = {
"SMAP\nResponse.kt\nKotlin\n*S Kotlin\n*F\n+ 1 Response.kt\nokhttp3/Response$Builder\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,530:1\n1#2:531\n*E\n"
}
.end annotation
# instance fields
.field public a:Lokhttp3/Request;
.field public b:Lokhttp3/Protocol;
.field public c:I
.field public d:Ljava/lang/String;
.field public e:Lokhttp3/Handshake;
.field public f:Lokhttp3/Headers$Builder;
.field public g:Lokhttp3/ResponseBody;
.field public h:Lokio/Socket;
.field public i:Lokhttp3/Response;
.field public j:Lokhttp3/Response;
.field public k:Lokhttp3/Response;
.field public l:J
.field public m:J
.field public n:Lokhttp3/internal/connection/Exchange;
.field public o:Lokhttp3/TrailersSource;
# 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
const/4 v0, -0x1
.line 5
iput v0, p0, Lokhttp3/Response$Builder;->c:I
.line 6
.line 7
sget-object v0, Lokhttp3/ResponseBody;->c:Lokhttp3/ResponseBody$Companion$asResponseBody$1;
.line 8
.line 9
iput-object v0, p0, Lokhttp3/Response$Builder;->g:Lokhttp3/ResponseBody;
.line 10
.line 11
sget-object v0, Lokhttp3/TrailersSource;->a:Lokhttp3/TrailersSource$Companion$EMPTY$1;
.line 12
.line 13
iput-object v0, p0, Lokhttp3/Response$Builder;->o:Lokhttp3/TrailersSource;
.line 14
.line 15
new-instance v0, Lokhttp3/Headers$Builder;
.line 16
.line 17
invoke-direct {v0}, Lokhttp3/Headers$Builder;-><init>()V
.line 18
.line 19
.line 20
iput-object v0, p0, Lokhttp3/Response$Builder;->f:Lokhttp3/Headers$Builder;
.line 21
.line 22
return-void
.end method
.method public static b(Ljava/lang/String;Lokhttp3/Response;)V
.locals 1
.line 1
if-eqz p1, :cond_3
.line 2
.line 3
iget-object v0, p1, Lokhttp3/Response;->m:Lokhttp3/Response;
.line 4
.line 5
if-nez v0, :cond_2
.line 6
.line 7
iget-object v0, p1, Lokhttp3/Response;->n:Lokhttp3/Response;
.line 8
.line 9
if-nez v0, :cond_1
.line 10
.line 11
iget-object p1, p1, Lokhttp3/Response;->o:Lokhttp3/Response;
.line 12
.line 13
if-nez p1, :cond_0
.line 14
.line 15
goto :goto_0
.line 16
:cond_0
const-string p1, ".priorResponse != null"
.line 17
.line 18
invoke-virtual {p0, p1}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
.line 19
.line 20
.line 21
move-result-object p0
.line 22
new-instance p1, Ljava/lang/IllegalArgumentException;
.line 23
.line 24
invoke-virtual {p0}, Ljava/lang/Object;->toString()Ljava/lang/String;
.line 25
.line 26
.line 27
move-result-object p0
.line 28
invoke-direct {p1, p0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
.line 29
.line 30
.line 31
throw p1
.line 32
:cond_1
const-string p1, ".cacheResponse != null"
.line 33
.line 34
invoke-virtual {p0, p1}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
.line 35
.line 36
.line 37
move-result-object p0
.line 38
new-instance p1, Ljava/lang/IllegalArgumentException;
.line 39
.line 40
invoke-virtual {p0}, Ljava/lang/Object;->toString()Ljava/lang/String;
.line 41
.line 42
.line 43
move-result-object p0
.line 44
invoke-direct {p1, p0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
.line 45
.line 46
.line 47
throw p1
.line 48
:cond_2
const-string p1, ".networkResponse != null"
.line 49
.line 50
invoke-virtual {p0, p1}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
.line 51
.line 52
.line 53
move-result-object p0
.line 54
new-instance p1, Ljava/lang/IllegalArgumentException;
.line 55
.line 56
invoke-virtual {p0}, Ljava/lang/Object;->toString()Ljava/lang/String;
.line 57
.line 58
.line 59
move-result-object p0
.line 60
invoke-direct {p1, p0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
.line 61
.line 62
.line 63
throw p1
.line 64
:cond_3
:goto_0
return-void
.end method
# virtual methods
.method public final a()Lokhttp3/Response;
.locals 19
.line 1
move-object/from16 v0, p0
.line 2
.line 3
iget v5, v0, Lokhttp3/Response$Builder;->c:I
.line 4
.line 5
if-ltz v5, :cond_3
.line 6
.line 7
iget-object v2, v0, Lokhttp3/Response$Builder;->a:Lokhttp3/Request;
.line 8
.line 9
if-eqz v2, :cond_2
.line 10
.line 11
iget-object v3, v0, Lokhttp3/Response$Builder;->b:Lokhttp3/Protocol;
.line 12
.line 13
if-eqz v3, :cond_1
.line 14
.line 15
iget-object v4, v0, Lokhttp3/Response$Builder;->d:Ljava/lang/String;
.line 16
.line 17
if-eqz v4, :cond_0
.line 18
.line 19
iget-object v6, v0, Lokhttp3/Response$Builder;->e:Lokhttp3/Handshake;
.line 20
.line 21
iget-object v1, v0, Lokhttp3/Response$Builder;->f:Lokhttp3/Headers$Builder;
.line 22
.line 23
invoke-virtual {v1}, Lokhttp3/Headers$Builder;->b()Lokhttp3/Headers;
.line 24
.line 25
.line 26
move-result-object v7
.line 27
iget-object v8, v0, Lokhttp3/Response$Builder;->g:Lokhttp3/ResponseBody;
.line 28
.line 29
iget-object v9, v0, Lokhttp3/Response$Builder;->h:Lokio/Socket;
.line 30
.line 31
iget-object v10, v0, Lokhttp3/Response$Builder;->i:Lokhttp3/Response;
.line 32
.line 33
iget-object v11, v0, Lokhttp3/Response$Builder;->j:Lokhttp3/Response;
.line 34
.line 35
iget-object v12, v0, Lokhttp3/Response$Builder;->k:Lokhttp3/Response;
.line 36
.line 37
iget-wide v13, v0, Lokhttp3/Response$Builder;->l:J
.line 38
.line 39
move-object v15, v2
.line 40
iget-wide v1, v0, Lokhttp3/Response$Builder;->m:J
.line 41
.line 42
move-wide/from16 v16, v1
.line 43
.line 44
iget-object v1, v0, Lokhttp3/Response$Builder;->n:Lokhttp3/internal/connection/Exchange;
.line 45
.line 46
iget-object v2, v0, Lokhttp3/Response$Builder;->o:Lokhttp3/TrailersSource;
.line 47
.line 48
move-object/from16 v18, v2
.line 49
.line 50
move-object v2, v15
.line 51
move-wide/from16 v15, v16
.line 52
.line 53
move-object/from16 v17, v1
.line 54
.line 55
new-instance v1, Lokhttp3/Response;
.line 56
.line 57
invoke-direct/range {v1 .. v18}, Lokhttp3/Response;-><init>(Lokhttp3/Request;Lokhttp3/Protocol;Ljava/lang/String;ILokhttp3/Handshake;Lokhttp3/Headers;Lokhttp3/ResponseBody;Lokio/Socket;Lokhttp3/Response;Lokhttp3/Response;Lokhttp3/Response;JJLokhttp3/internal/connection/Exchange;Lokhttp3/TrailersSource;)V
.line 58
.line 59
.line 60
return-object v1
.line 61
:cond_0
new-instance v1, Ljava/lang/IllegalStateException;
.line 62
.line 63
const-string v2, "message == null"
.line 64
.line 65
invoke-direct {v1, v2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
.line 66
.line 67
.line 68
throw v1
.line 69
:cond_1
new-instance v1, Ljava/lang/IllegalStateException;
.line 70
.line 71
const-string v2, "protocol == null"
.line 72
.line 73
invoke-direct {v1, v2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
.line 74
.line 75
.line 76
throw v1
.line 77
:cond_2
new-instance v1, Ljava/lang/IllegalStateException;
.line 78
.line 79
const-string v2, "request == null"
.line 80
.line 81
invoke-direct {v1, v2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
.line 82
.line 83
.line 84
throw v1
.line 85
:cond_3
new-instance v1, Ljava/lang/StringBuilder;
.line 86
.line 87
const-string v2, "code < 0: "
.line 88
.line 89
invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
.line 90
.line 91
.line 92
iget v2, v0, Lokhttp3/Response$Builder;->c:I
.line 93
.line 94
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
.line 95
.line 96
.line 97
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
.line 98
.line 99
.line 100
move-result-object v1
.line 101
new-instance v2, Ljava/lang/IllegalStateException;
.line 102
.line 103
invoke-virtual {v1}, Ljava/lang/Object;->toString()Ljava/lang/String;
.line 104
.line 105
.line 106
move-result-object v1
.line 107
invoke-direct {v2, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
.line 108
.line 109
.line 110
throw v2
.end method