soul-browser/app/smali_classes4/okhttp3/internal/connection/RouteSelector.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

401 lines
8.4 KiB
Smali

.class public final Lokhttp3/internal/connection/RouteSelector;
.super Ljava/lang/Object;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lokhttp3/internal/connection/RouteSelector$Companion;,
Lokhttp3/internal/connection/RouteSelector$Selection;
}
.end annotation
.annotation runtime Lkotlin/Metadata;
d1 = {
"\u0000\u000c\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0008\u0003\u0018\u00002\u00020\u0001:\u0002\u0002\u0003\u00a8\u0006\u0004"
}
d2 = {
"Lokhttp3/internal/connection/RouteSelector;",
"",
"Selection",
"Companion",
"okhttp"
}
k = 0x1
mv = {
0x2,
0x2,
0x0
}
xi = 0x30
.end annotation
# instance fields
.field public final a:Lokhttp3/Address;
.field public final b:Lokhttp3/internal/connection/RouteDatabase;
.field public final c:Lokhttp3/internal/connection/RealCall;
.field public final d:Z
.field public final e:Ljava/util/List;
.field public f:I
.field public g:Ljava/util/List;
.field public final h:Ljava/util/ArrayList;
# direct methods
.method public constructor <init>(Lokhttp3/Address;Lokhttp3/internal/connection/RouteDatabase;Lokhttp3/internal/connection/RealCall;Z)V
.locals 7
.line 1
const-string v0, "address"
.line 2
.line 3
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 4
.line 5
.line 6
const-string v0, "routeDatabase"
.line 7
.line 8
invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 9
.line 10
.line 11
const-string v0, "call"
.line 12
.line 13
invoke-static {p3, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 14
.line 15
.line 16
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 17
.line 18
.line 19
iput-object p1, p0, Lokhttp3/internal/connection/RouteSelector;->a:Lokhttp3/Address;
.line 20
.line 21
iput-object p2, p0, Lokhttp3/internal/connection/RouteSelector;->b:Lokhttp3/internal/connection/RouteDatabase;
.line 22
.line 23
iput-object p3, p0, Lokhttp3/internal/connection/RouteSelector;->c:Lokhttp3/internal/connection/RealCall;
.line 24
.line 25
iput-boolean p4, p0, Lokhttp3/internal/connection/RouteSelector;->d:Z
.line 26
.line 27
invoke-static {}, Lkotlin/collections/CollectionsKt;->emptyList()Ljava/util/List;
.line 28
.line 29
.line 30
move-result-object p2
.line 31
iput-object p2, p0, Lokhttp3/internal/connection/RouteSelector;->e:Ljava/util/List;
.line 32
.line 33
invoke-static {}, Lkotlin/collections/CollectionsKt;->emptyList()Ljava/util/List;
.line 34
.line 35
.line 36
move-result-object p2
.line 37
iput-object p2, p0, Lokhttp3/internal/connection/RouteSelector;->g:Ljava/util/List;
.line 38
.line 39
new-instance p2, Ljava/util/ArrayList;
.line 40
.line 41
invoke-direct {p2}, Ljava/util/ArrayList;-><init>()V
.line 42
.line 43
.line 44
iput-object p2, p0, Lokhttp3/internal/connection/RouteSelector;->h:Ljava/util/ArrayList;
.line 45
.line 46
iget-object p2, p1, Lokhttp3/Address;->h:Lokhttp3/HttpUrl;
.line 47
.line 48
iget-object p4, p3, Lokhttp3/internal/connection/RealCall;->h:Lokhttp3/EventListener$Companion$NONE$1;
.line 49
.line 50
invoke-virtual {p4}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
.line 51
.line 52
.line 53
invoke-static {p3, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 54
.line 55
.line 56
const-string v1, "url"
.line 57
.line 58
invoke-static {p2, v1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 59
.line 60
.line 61
invoke-virtual {p2}, Lokhttp3/HttpUrl;->g()Ljava/net/URI;
.line 62
.line 63
.line 64
move-result-object v2
.line 65
invoke-virtual {v2}, Ljava/net/URI;->getHost()Ljava/lang/String;
.line 66
.line 67
.line 68
move-result-object v3
.line 69
const/4 v4, 0x1
.line 70
const/4 v5, 0x0
.line 71
const-string v6, "elements"
.line 72
.line 73
if-nez v3, :cond_0
.line 74
.line 75
new-array p1, v4, [Ljava/net/Proxy;
.line 76
.line 77
sget-object v2, Ljava/net/Proxy;->NO_PROXY:Ljava/net/Proxy;
.line 78
.line 79
aput-object v2, p1, v5
.line 80
.line 81
sget-object v2, Lokhttp3/internal/_UtilJvmKt;->a:Ljava/util/TimeZone;
.line 82
.line 83
invoke-static {p1, v6}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 84
.line 85
.line 86
invoke-static {p1}, Lokhttp3/internal/_UtilJvmKt;->i([Ljava/lang/Object;)Ljava/util/List;
.line 87
.line 88
.line 89
move-result-object p1
.line 90
goto :goto_1
.line 91
:cond_0
iget-object p1, p1, Lokhttp3/Address;->g:Ljava/net/ProxySelector;
.line 92
.line 93
invoke-virtual {p1, v2}, Ljava/net/ProxySelector;->select(Ljava/net/URI;)Ljava/util/List;
.line 94
.line 95
.line 96
move-result-object p1
.line 97
if-eqz p1, :cond_2
.line 98
.line 99
invoke-interface {p1}, Ljava/util/Collection;->isEmpty()Z
.line 100
.line 101
.line 102
move-result v2
.line 103
if-eqz v2, :cond_1
.line 104
.line 105
goto :goto_0
.line 106
:cond_1
invoke-static {p1}, Lokhttp3/internal/_UtilJvmKt;->h(Ljava/util/List;)Ljava/util/List;
.line 107
.line 108
.line 109
move-result-object p1
.line 110
goto :goto_1
.line 111
:cond_2
:goto_0
new-array p1, v4, [Ljava/net/Proxy;
.line 112
.line 113
sget-object v2, Ljava/net/Proxy;->NO_PROXY:Ljava/net/Proxy;
.line 114
.line 115
aput-object v2, p1, v5
.line 116
.line 117
sget-object v2, Lokhttp3/internal/_UtilJvmKt;->a:Ljava/util/TimeZone;
.line 118
.line 119
invoke-static {p1, v6}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 120
.line 121
.line 122
invoke-static {p1}, Lokhttp3/internal/_UtilJvmKt;->i([Ljava/lang/Object;)Ljava/util/List;
.line 123
.line 124
.line 125
move-result-object p1
.line 126
:goto_1
iput-object p1, p0, Lokhttp3/internal/connection/RouteSelector;->e:Ljava/util/List;
.line 127
.line 128
iput v5, p0, Lokhttp3/internal/connection/RouteSelector;->f:I
.line 129
.line 130
invoke-virtual {p4}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
.line 131
.line 132
.line 133
invoke-static {p3, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 134
.line 135
.line 136
invoke-static {p2, v1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 137
.line 138
.line 139
const-string p2, "proxies"
.line 140
.line 141
invoke-static {p1, p2}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 142
.line 143
.line 144
return-void
.end method
# virtual methods
.method public final a()Z
.locals 2
.line 1
iget v0, p0, Lokhttp3/internal/connection/RouteSelector;->f:I
.line 2
.line 3
iget-object v1, p0, Lokhttp3/internal/connection/RouteSelector;->e:Ljava/util/List;
.line 4
.line 5
invoke-interface {v1}, Ljava/util/List;->size()I
.line 6
.line 7
.line 8
move-result v1
.line 9
if-ge v0, v1, :cond_0
.line 10
.line 11
goto :goto_0
.line 12
:cond_0
iget-object v0, p0, Lokhttp3/internal/connection/RouteSelector;->h:Ljava/util/ArrayList;
.line 13
.line 14
invoke-virtual {v0}, Ljava/util/ArrayList;->isEmpty()Z
.line 15
.line 16
.line 17
move-result v0
.line 18
if-nez v0, :cond_1
.line 19
.line 20
:goto_0
const/4 v0, 0x1
.line 21
return v0
.line 22
:cond_1
const/4 v0, 0x0
.line 23
return v0
.end method