soul-browser/app/smali_classes4/okhttp3/internal/http2/Hpack$Reader.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

992 lines
18 KiB
Smali

.class public final Lokhttp3/internal/http2/Hpack$Reader;
.super Ljava/lang/Object;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lokhttp3/internal/http2/Hpack;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "Reader"
.end annotation
.annotation runtime Lkotlin/Metadata;
d1 = {
"\u0000\n\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\u0018\u00002\u00020\u0001\u00a8\u0006\u0002"
}
d2 = {
"Lokhttp3/internal/http2/Hpack$Reader;",
"",
"okhttp"
}
k = 0x1
mv = {
0x2,
0x2,
0x0
}
xi = 0x30
.end annotation
# instance fields
.field public a:I
.field public final b:Ljava/util/ArrayList;
.field public final c:Lokio/RealBufferedSource;
.field public d:[Lokhttp3/internal/http2/Header;
.field public e:I
.field public f:I
.field public g:I
# direct methods
.method public constructor <init>(Lokhttp3/internal/http2/Http2Reader$ContinuationSource;)V
.locals 1
.line 1
const-string v0, "source"
.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
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 7
.line 8
.line 9
const/16 v0, 0x1000
.line 10
.line 11
iput v0, p0, Lokhttp3/internal/http2/Hpack$Reader;->a:I
.line 12
.line 13
new-instance v0, Ljava/util/ArrayList;
.line 14
.line 15
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
.line 16
.line 17
.line 18
iput-object v0, p0, Lokhttp3/internal/http2/Hpack$Reader;->b:Ljava/util/ArrayList;
.line 19
.line 20
invoke-static {p1}, Lokio/Okio;->b(Lokio/Source;)Lokio/RealBufferedSource;
.line 21
.line 22
.line 23
move-result-object p1
.line 24
iput-object p1, p0, Lokhttp3/internal/http2/Hpack$Reader;->c:Lokio/RealBufferedSource;
.line 25
.line 26
const/16 p1, 0x8
.line 27
.line 28
new-array p1, p1, [Lokhttp3/internal/http2/Header;
.line 29
.line 30
iput-object p1, p0, Lokhttp3/internal/http2/Hpack$Reader;->d:[Lokhttp3/internal/http2/Header;
.line 31
.line 32
const/4 p1, 0x7
.line 33
iput p1, p0, Lokhttp3/internal/http2/Hpack$Reader;->e:I
.line 34
.line 35
return-void
.end method
# virtual methods
.method public final a(I)I
.locals 4
.line 1
const/4 v0, 0x0
.line 2
if-lez p1, :cond_1
.line 3
.line 4
iget-object v1, p0, Lokhttp3/internal/http2/Hpack$Reader;->d:[Lokhttp3/internal/http2/Header;
.line 5
.line 6
array-length v1, v1
.line 7
add-int/lit8 v1, v1, -0x1
.line 8
.line 9
:goto_0
iget v2, p0, Lokhttp3/internal/http2/Hpack$Reader;->e:I
.line 10
.line 11
if-lt v1, v2, :cond_0
.line 12
.line 13
if-lez p1, :cond_0
.line 14
.line 15
iget-object v2, p0, Lokhttp3/internal/http2/Hpack$Reader;->d:[Lokhttp3/internal/http2/Header;
.line 16
.line 17
aget-object v2, v2, v1
.line 18
.line 19
invoke-static {v2}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;)V
.line 20
.line 21
.line 22
iget v2, v2, Lokhttp3/internal/http2/Header;->c:I
.line 23
.line 24
sub-int/2addr p1, v2
.line 25
iget v3, p0, Lokhttp3/internal/http2/Hpack$Reader;->g:I
.line 26
.line 27
sub-int/2addr v3, v2
.line 28
iput v3, p0, Lokhttp3/internal/http2/Hpack$Reader;->g:I
.line 29
.line 30
iget v2, p0, Lokhttp3/internal/http2/Hpack$Reader;->f:I
.line 31
.line 32
add-int/lit8 v2, v2, -0x1
.line 33
.line 34
iput v2, p0, Lokhttp3/internal/http2/Hpack$Reader;->f:I
.line 35
.line 36
add-int/lit8 v0, v0, 0x1
.line 37
.line 38
add-int/lit8 v1, v1, -0x1
.line 39
.line 40
goto :goto_0
.line 41
:cond_0
iget-object p1, p0, Lokhttp3/internal/http2/Hpack$Reader;->d:[Lokhttp3/internal/http2/Header;
.line 42
.line 43
add-int/lit8 v1, v2, 0x1
.line 44
.line 45
add-int/lit8 v2, v2, 0x1
.line 46
.line 47
add-int/2addr v2, v0
.line 48
iget v3, p0, Lokhttp3/internal/http2/Hpack$Reader;->f:I
.line 49
.line 50
invoke-static {p1, v1, p1, v2, v3}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
.line 51
.line 52
.line 53
iget p1, p0, Lokhttp3/internal/http2/Hpack$Reader;->e:I
.line 54
.line 55
add-int/2addr p1, v0
.line 56
iput p1, p0, Lokhttp3/internal/http2/Hpack$Reader;->e:I
.line 57
.line 58
:cond_1
return v0
.end method
.method public final b(I)Lokio/ByteString;
.locals 3
.line 1
if-ltz p1, :cond_0
.line 2
.line 3
sget-object v0, Lokhttp3/internal/http2/Hpack;->a:[Lokhttp3/internal/http2/Header;
.line 4
.line 5
array-length v1, v0
.line 6
add-int/lit8 v1, v1, -0x1
.line 7
.line 8
if-gt p1, v1, :cond_0
.line 9
.line 10
aget-object p1, v0, p1
.line 11
.line 12
iget-object p1, p1, Lokhttp3/internal/http2/Header;->a:Lokio/ByteString;
.line 13
.line 14
return-object p1
.line 15
:cond_0
sget-object v0, Lokhttp3/internal/http2/Hpack;->a:[Lokhttp3/internal/http2/Header;
.line 16
.line 17
array-length v0, v0
.line 18
sub-int v0, p1, v0
.line 19
.line 20
iget v1, p0, Lokhttp3/internal/http2/Hpack$Reader;->e:I
.line 21
.line 22
add-int/lit8 v1, v1, 0x1
.line 23
.line 24
add-int/2addr v1, v0
.line 25
if-ltz v1, :cond_1
.line 26
.line 27
iget-object v0, p0, Lokhttp3/internal/http2/Hpack$Reader;->d:[Lokhttp3/internal/http2/Header;
.line 28
.line 29
array-length v2, v0
.line 30
if-ge v1, v2, :cond_1
.line 31
.line 32
aget-object p1, v0, v1
.line 33
.line 34
invoke-static {p1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;)V
.line 35
.line 36
.line 37
iget-object p1, p1, Lokhttp3/internal/http2/Header;->a:Lokio/ByteString;
.line 38
.line 39
return-object p1
.line 40
:cond_1
new-instance v0, Ljava/io/IOException;
.line 41
.line 42
new-instance v1, Ljava/lang/StringBuilder;
.line 43
.line 44
const-string v2, "Header index too large "
.line 45
.line 46
invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
.line 47
.line 48
.line 49
add-int/lit8 p1, p1, 0x1
.line 50
.line 51
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
.line 52
.line 53
.line 54
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
.line 55
.line 56
.line 57
move-result-object p1
.line 58
invoke-direct {v0, p1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
.line 59
.line 60
.line 61
throw v0
.end method
.method public final c(Lokhttp3/internal/http2/Header;)V
.locals 6
.line 1
iget-object v0, p0, Lokhttp3/internal/http2/Hpack$Reader;->b:Ljava/util/ArrayList;
.line 2
.line 3
invoke-virtual {v0, p1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
.line 4
.line 5
.line 6
iget v0, p1, Lokhttp3/internal/http2/Header;->c:I
.line 7
.line 8
iget v1, p0, Lokhttp3/internal/http2/Hpack$Reader;->a:I
.line 9
.line 10
const/4 v2, 0x0
.line 11
if-le v0, v1, :cond_0
.line 12
.line 13
iget-object p1, p0, Lokhttp3/internal/http2/Hpack$Reader;->d:[Lokhttp3/internal/http2/Header;
.line 14
.line 15
const/4 v0, 0x0
.line 16
invoke-static {p1, v0}, Lkotlin/collections/ArraysKt;->t([Ljava/lang/Object;Lkotlinx/coroutines/internal/Symbol;)V
.line 17
.line 18
.line 19
iget-object p1, p0, Lokhttp3/internal/http2/Hpack$Reader;->d:[Lokhttp3/internal/http2/Header;
.line 20
.line 21
array-length p1, p1
.line 22
add-int/lit8 p1, p1, -0x1
.line 23
.line 24
iput p1, p0, Lokhttp3/internal/http2/Hpack$Reader;->e:I
.line 25
.line 26
iput v2, p0, Lokhttp3/internal/http2/Hpack$Reader;->f:I
.line 27
.line 28
iput v2, p0, Lokhttp3/internal/http2/Hpack$Reader;->g:I
.line 29
.line 30
return-void
.line 31
:cond_0
iget v3, p0, Lokhttp3/internal/http2/Hpack$Reader;->g:I
.line 32
.line 33
add-int/2addr v3, v0
.line 34
sub-int/2addr v3, v1
.line 35
invoke-virtual {p0, v3}, Lokhttp3/internal/http2/Hpack$Reader;->a(I)I
.line 36
.line 37
.line 38
iget v1, p0, Lokhttp3/internal/http2/Hpack$Reader;->f:I
.line 39
.line 40
add-int/lit8 v1, v1, 0x1
.line 41
.line 42
iget-object v3, p0, Lokhttp3/internal/http2/Hpack$Reader;->d:[Lokhttp3/internal/http2/Header;
.line 43
.line 44
array-length v4, v3
.line 45
if-le v1, v4, :cond_1
.line 46
.line 47
array-length v1, v3
.line 48
mul-int/lit8 v1, v1, 0x2
.line 49
.line 50
new-array v1, v1, [Lokhttp3/internal/http2/Header;
.line 51
.line 52
array-length v4, v3
.line 53
array-length v5, v3
.line 54
invoke-static {v3, v2, v1, v4, v5}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
.line 55
.line 56
.line 57
iget-object v2, p0, Lokhttp3/internal/http2/Hpack$Reader;->d:[Lokhttp3/internal/http2/Header;
.line 58
.line 59
array-length v2, v2
.line 60
add-int/lit8 v2, v2, -0x1
.line 61
.line 62
iput v2, p0, Lokhttp3/internal/http2/Hpack$Reader;->e:I
.line 63
.line 64
iput-object v1, p0, Lokhttp3/internal/http2/Hpack$Reader;->d:[Lokhttp3/internal/http2/Header;
.line 65
.line 66
:cond_1
iget v1, p0, Lokhttp3/internal/http2/Hpack$Reader;->e:I
.line 67
.line 68
add-int/lit8 v2, v1, -0x1
.line 69
.line 70
iput v2, p0, Lokhttp3/internal/http2/Hpack$Reader;->e:I
.line 71
.line 72
iget-object v2, p0, Lokhttp3/internal/http2/Hpack$Reader;->d:[Lokhttp3/internal/http2/Header;
.line 73
.line 74
aput-object p1, v2, v1
.line 75
.line 76
iget p1, p0, Lokhttp3/internal/http2/Hpack$Reader;->f:I
.line 77
.line 78
add-int/lit8 p1, p1, 0x1
.line 79
.line 80
iput p1, p0, Lokhttp3/internal/http2/Hpack$Reader;->f:I
.line 81
.line 82
iget p1, p0, Lokhttp3/internal/http2/Hpack$Reader;->g:I
.line 83
.line 84
add-int/2addr p1, v0
.line 85
iput p1, p0, Lokhttp3/internal/http2/Hpack$Reader;->g:I
.line 86
.line 87
return-void
.end method
.method public final d()Lokio/ByteString;
.locals 12
.line 1
iget-object v0, p0, Lokhttp3/internal/http2/Hpack$Reader;->c:Lokio/RealBufferedSource;
.line 2
.line 3
invoke-virtual {v0}, Lokio/RealBufferedSource;->readByte()B
.line 4
.line 5
.line 6
move-result v1
.line 7
sget-object v2, Lokhttp3/internal/_UtilCommonKt;->a:[B
.line 8
.line 9
and-int/lit16 v2, v1, 0xff
.line 10
.line 11
const/16 v3, 0x80
.line 12
.line 13
and-int/2addr v1, v3
.line 14
const/4 v4, 0x0
.line 15
if-ne v1, v3, :cond_0
.line 16
.line 17
const/4 v1, 0x1
.line 18
goto :goto_0
.line 19
:cond_0
move v1, v4
.line 20
:goto_0
const/16 v3, 0x7f
.line 21
.line 22
invoke-virtual {p0, v2, v3}, Lokhttp3/internal/http2/Hpack$Reader;->e(II)I
.line 23
.line 24
.line 25
move-result v2
.line 26
int-to-long v2, v2
.line 27
if-eqz v1, :cond_6
.line 28
.line 29
new-instance v1, Lokio/Buffer;
.line 30
.line 31
invoke-direct {v1}, Ljava/lang/Object;-><init>()V
.line 32
.line 33
.line 34
sget-object v5, Lokhttp3/internal/http2/Huffman;->a:[I
.line 35
.line 36
const-string v5, "source"
.line 37
.line 38
invoke-static {v0, v5}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 39
.line 40
.line 41
const-string v5, "sink"
.line 42
.line 43
invoke-static {v1, v5}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 44
.line 45
.line 46
sget-object v5, Lokhttp3/internal/http2/Huffman;->c:Lokhttp3/internal/http2/Huffman$Node;
.line 47
.line 48
const-wide/16 v6, 0x0
.line 49
.line 50
move-object v9, v5
.line 51
move-wide v7, v6
.line 52
move v6, v4
.line 53
:goto_1
cmp-long v10, v7, v2
.line 54
.line 55
if-gez v10, :cond_3
.line 56
.line 57
invoke-virtual {v0}, Lokio/RealBufferedSource;->readByte()B
.line 58
.line 59
.line 60
move-result v10
.line 61
sget-object v11, Lokhttp3/internal/_UtilCommonKt;->a:[B
.line 62
.line 63
and-int/lit16 v10, v10, 0xff
.line 64
.line 65
shl-int/lit8 v4, v4, 0x8
.line 66
.line 67
or-int/2addr v4, v10
.line 68
add-int/lit8 v6, v6, 0x8
.line 69
.line 70
:goto_2
const/16 v10, 0x8
.line 71
.line 72
if-lt v6, v10, :cond_2
.line 73
.line 74
add-int/lit8 v10, v6, -0x8
.line 75
.line 76
ushr-int v10, v4, v10
.line 77
.line 78
and-int/lit16 v10, v10, 0xff
.line 79
.line 80
iget-object v9, v9, Lokhttp3/internal/http2/Huffman$Node;->a:[Lokhttp3/internal/http2/Huffman$Node;
.line 81
.line 82
invoke-static {v9}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;)V
.line 83
.line 84
.line 85
aget-object v9, v9, v10
.line 86
.line 87
invoke-static {v9}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;)V
.line 88
.line 89
.line 90
iget-object v10, v9, Lokhttp3/internal/http2/Huffman$Node;->a:[Lokhttp3/internal/http2/Huffman$Node;
.line 91
.line 92
if-nez v10, :cond_1
.line 93
.line 94
iget v10, v9, Lokhttp3/internal/http2/Huffman$Node;->b:I
.line 95
.line 96
invoke-virtual {v1, v10}, Lokio/Buffer;->v(I)V
.line 97
.line 98
.line 99
iget v9, v9, Lokhttp3/internal/http2/Huffman$Node;->c:I
.line 100
.line 101
sub-int/2addr v6, v9
.line 102
move-object v9, v5
.line 103
goto :goto_2
.line 104
:cond_1
add-int/lit8 v6, v6, -0x8
.line 105
.line 106
goto :goto_2
.line 107
:cond_2
const-wide/16 v10, 0x1
.line 108
.line 109
add-long/2addr v7, v10
.line 110
goto :goto_1
.line 111
:cond_3
:goto_3
if-lez v6, :cond_5
.line 112
.line 113
rsub-int/lit8 v0, v6, 0x8
.line 114
.line 115
shl-int v0, v4, v0
.line 116
.line 117
and-int/lit16 v0, v0, 0xff
.line 118
.line 119
iget-object v2, v9, Lokhttp3/internal/http2/Huffman$Node;->a:[Lokhttp3/internal/http2/Huffman$Node;
.line 120
.line 121
invoke-static {v2}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;)V
.line 122
.line 123
.line 124
aget-object v0, v2, v0
.line 125
.line 126
invoke-static {v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;)V
.line 127
.line 128
.line 129
iget-object v2, v0, Lokhttp3/internal/http2/Huffman$Node;->a:[Lokhttp3/internal/http2/Huffman$Node;
.line 130
.line 131
iget v3, v0, Lokhttp3/internal/http2/Huffman$Node;->c:I
.line 132
.line 133
if-nez v2, :cond_5
.line 134
.line 135
if-le v3, v6, :cond_4
.line 136
.line 137
goto :goto_4
.line 138
:cond_4
iget v0, v0, Lokhttp3/internal/http2/Huffman$Node;->b:I
.line 139
.line 140
invoke-virtual {v1, v0}, Lokio/Buffer;->v(I)V
.line 141
.line 142
.line 143
sub-int/2addr v6, v3
.line 144
move-object v9, v5
.line 145
goto :goto_3
.line 146
:cond_5
:goto_4
iget-wide v2, v1, Lokio/Buffer;->f:J
.line 147
.line 148
invoke-virtual {v1, v2, v3}, Lokio/Buffer;->r(J)Lokio/ByteString;
.line 149
.line 150
.line 151
move-result-object v0
.line 152
return-object v0
.line 153
:cond_6
invoke-virtual {v0, v2, v3}, Lokio/RealBufferedSource;->r(J)Lokio/ByteString;
.line 154
.line 155
.line 156
move-result-object v0
.line 157
return-object v0
.end method
.method public final e(II)I
.locals 3
.line 1
and-int/2addr p1, p2
.line 2
if-ge p1, p2, :cond_0
.line 3
.line 4
return p1
.line 5
:cond_0
const/4 p1, 0x0
.line 6
:goto_0
iget-object v0, p0, Lokhttp3/internal/http2/Hpack$Reader;->c:Lokio/RealBufferedSource;
.line 7
.line 8
invoke-virtual {v0}, Lokio/RealBufferedSource;->readByte()B
.line 9
.line 10
.line 11
move-result v0
.line 12
sget-object v1, Lokhttp3/internal/_UtilCommonKt;->a:[B
.line 13
.line 14
and-int/lit16 v1, v0, 0xff
.line 15
.line 16
and-int/lit16 v2, v0, 0x80
.line 17
.line 18
if-eqz v2, :cond_1
.line 19
.line 20
and-int/lit8 v0, v0, 0x7f
.line 21
.line 22
shl-int/2addr v0, p1
.line 23
add-int/2addr p2, v0
.line 24
add-int/lit8 p1, p1, 0x7
.line 25
.line 26
goto :goto_0
.line 27
:cond_1
shl-int p1, v1, p1
.line 28
.line 29
add-int/2addr p2, p1
.line 30
return p2
.end method