* 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>
496 lines
10 KiB
Smali
496 lines
10 KiB
Smali
.class public Lcom/google/api/client/util/IOUtils;
|
|
.super Ljava/lang/Object;
|
|
.source "SourceFile"
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
.line 2
|
|
.line 3
|
|
.line 4
|
|
return-void
|
|
.end method
|
|
|
|
.method public static computeLength(Lcom/google/api/client/util/StreamingContent;)J
|
|
.locals 2
|
|
|
|
.line 1
|
|
new-instance v0, Lcom/google/api/client/util/ByteCountingOutputStream;
|
|
|
|
.line 2
|
|
.line 3
|
|
invoke-direct {v0}, Lcom/google/api/client/util/ByteCountingOutputStream;-><init>()V
|
|
|
|
.line 4
|
|
.line 5
|
|
.line 6
|
|
:try_start_0
|
|
invoke-interface {p0, v0}, Lcom/google/api/client/util/StreamingContent;->writeTo(Ljava/io/OutputStream;)V
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
.line 7
|
|
.line 8
|
|
.line 9
|
|
invoke-virtual {v0}, Ljava/io/OutputStream;->close()V
|
|
|
|
.line 10
|
|
.line 11
|
|
.line 12
|
|
iget-wide v0, v0, Lcom/google/api/client/util/ByteCountingOutputStream;->count:J
|
|
|
|
.line 13
|
|
.line 14
|
|
return-wide v0
|
|
|
|
.line 15
|
|
:catchall_0
|
|
move-exception p0
|
|
|
|
.line 16
|
|
invoke-virtual {v0}, Ljava/io/OutputStream;->close()V
|
|
|
|
.line 17
|
|
.line 18
|
|
.line 19
|
|
throw p0
|
|
.end method
|
|
|
|
.method public static copy(Ljava/io/InputStream;Ljava/io/OutputStream;)V
|
|
.locals 1
|
|
.annotation runtime Ljava/lang/Deprecated;
|
|
.end annotation
|
|
|
|
const/4 v0, 0x1
|
|
|
|
.line 1
|
|
invoke-static {p0, p1, v0}, Lcom/google/api/client/util/IOUtils;->copy(Ljava/io/InputStream;Ljava/io/OutputStream;Z)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static copy(Ljava/io/InputStream;Ljava/io/OutputStream;Z)V
|
|
.locals 0
|
|
.annotation runtime Ljava/lang/Deprecated;
|
|
.end annotation
|
|
|
|
.line 2
|
|
:try_start_0
|
|
invoke-static {p0, p1}, Lcom/google/api/client/util/ByteStreams;->copy(Ljava/io/InputStream;Ljava/io/OutputStream;)J
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
.line 3
|
|
invoke-virtual {p0}, Ljava/io/InputStream;->close()V
|
|
|
|
:cond_0
|
|
return-void
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
if-eqz p2, :cond_1
|
|
|
|
invoke-virtual {p0}, Ljava/io/InputStream;->close()V
|
|
|
|
.line 4
|
|
:cond_1
|
|
throw p1
|
|
.end method
|
|
|
|
.method public static deserialize(Ljava/io/InputStream;)Ljava/io/Serializable;
|
|
.locals 3
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<S::",
|
|
"Ljava/io/Serializable;",
|
|
">(",
|
|
"Ljava/io/InputStream;",
|
|
")TS;"
|
|
}
|
|
.end annotation
|
|
|
|
.line 2
|
|
:try_start_0
|
|
new-instance v0, Ljava/io/ObjectInputStream;
|
|
|
|
invoke-direct {v0, p0}, Ljava/io/ObjectInputStream;-><init>(Ljava/io/InputStream;)V
|
|
|
|
invoke-virtual {v0}, Ljava/io/ObjectInputStream;->readObject()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Ljava/io/Serializable;
|
|
:try_end_0
|
|
.catch Ljava/lang/ClassNotFoundException; {:try_start_0 .. :try_end_0} :catch_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
.line 3
|
|
invoke-virtual {p0}, Ljava/io/InputStream;->close()V
|
|
|
|
return-object v0
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
goto :goto_0
|
|
|
|
:catch_0
|
|
move-exception v0
|
|
|
|
.line 4
|
|
:try_start_1
|
|
new-instance v1, Ljava/io/IOException;
|
|
|
|
const-string v2, "Failed to deserialize object"
|
|
|
|
invoke-direct {v1, v2}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
|
|
|
|
.line 5
|
|
invoke-virtual {v1, v0}, Ljava/lang/Throwable;->initCause(Ljava/lang/Throwable;)Ljava/lang/Throwable;
|
|
|
|
.line 6
|
|
throw v1
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
.line 7
|
|
:goto_0
|
|
invoke-virtual {p0}, Ljava/io/InputStream;->close()V
|
|
|
|
.line 8
|
|
throw v0
|
|
.end method
|
|
|
|
.method public static deserialize([B)Ljava/io/Serializable;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<S::",
|
|
"Ljava/io/Serializable;",
|
|
">([B)TS;"
|
|
}
|
|
.end annotation
|
|
|
|
if-nez p0, :cond_0
|
|
|
|
const/4 p0, 0x0
|
|
|
|
return-object p0
|
|
|
|
.line 1
|
|
:cond_0
|
|
new-instance v0, Ljava/io/ByteArrayInputStream;
|
|
|
|
invoke-direct {v0, p0}, Ljava/io/ByteArrayInputStream;-><init>([B)V
|
|
|
|
invoke-static {v0}, Lcom/google/api/client/util/IOUtils;->deserialize(Ljava/io/InputStream;)Ljava/io/Serializable;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static isSymbolicLink(Ljava/io/File;)Z
|
|
.locals 8
|
|
.annotation runtime Ljava/lang/Deprecated;
|
|
.end annotation
|
|
|
|
.line 1
|
|
const/4 v0, 0x0
|
|
|
|
.line 2
|
|
const/4 v1, 0x1
|
|
|
|
.line 3
|
|
:try_start_0
|
|
const-string v2, "java.nio.file.Files"
|
|
|
|
.line 4
|
|
.line 5
|
|
invoke-static {v2}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;
|
|
|
|
.line 6
|
|
.line 7
|
|
.line 8
|
|
move-result-object v2
|
|
|
|
.line 9
|
|
const-string v3, "java.nio.file.Path"
|
|
|
|
.line 10
|
|
.line 11
|
|
invoke-static {v3}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;
|
|
|
|
.line 12
|
|
.line 13
|
|
.line 14
|
|
move-result-object v3
|
|
|
|
.line 15
|
|
const-class v4, Ljava/io/File;
|
|
|
|
.line 16
|
|
.line 17
|
|
const-string v5, "toPath"
|
|
|
|
.line 18
|
|
.line 19
|
|
const/4 v6, 0x0
|
|
|
|
.line 20
|
|
invoke-virtual {v4, v5, v6}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
|
|
|
|
.line 21
|
|
.line 22
|
|
.line 23
|
|
move-result-object v4
|
|
|
|
.line 24
|
|
invoke-virtual {v4, p0, v6}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
.line 25
|
|
.line 26
|
|
.line 27
|
|
move-result-object v4
|
|
|
|
.line 28
|
|
const-string v5, "isSymbolicLink"
|
|
|
|
.line 29
|
|
.line 30
|
|
new-array v7, v1, [Ljava/lang/Class;
|
|
|
|
.line 31
|
|
.line 32
|
|
aput-object v3, v7, v0
|
|
|
|
.line 33
|
|
.line 34
|
|
invoke-virtual {v2, v5, v7}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
|
|
|
|
.line 35
|
|
.line 36
|
|
.line 37
|
|
move-result-object v2
|
|
|
|
.line 38
|
|
new-array v3, v1, [Ljava/lang/Object;
|
|
|
|
.line 39
|
|
.line 40
|
|
aput-object v4, v3, v0
|
|
|
|
.line 41
|
|
.line 42
|
|
invoke-virtual {v2, v6, v3}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
.line 43
|
|
.line 44
|
|
.line 45
|
|
move-result-object v2
|
|
|
|
.line 46
|
|
check-cast v2, Ljava/lang/Boolean;
|
|
|
|
.line 47
|
|
.line 48
|
|
invoke-virtual {v2}, Ljava/lang/Boolean;->booleanValue()Z
|
|
|
|
.line 49
|
|
.line 50
|
|
.line 51
|
|
move-result p0
|
|
:try_end_0
|
|
.catch Ljava/lang/reflect/InvocationTargetException; {:try_start_0 .. :try_end_0} :catch_1
|
|
.catch Ljava/lang/ClassNotFoundException; {:try_start_0 .. :try_end_0} :catch_0
|
|
.catch Ljava/lang/IllegalArgumentException; {:try_start_0 .. :try_end_0} :catch_0
|
|
.catch Ljava/lang/SecurityException; {:try_start_0 .. :try_end_0} :catch_0
|
|
.catch Ljava/lang/IllegalAccessException; {:try_start_0 .. :try_end_0} :catch_0
|
|
.catch Ljava/lang/NoSuchMethodException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
.line 52
|
|
return p0
|
|
|
|
.line 53
|
|
:catch_0
|
|
sget-char v2, Ljava/io/File;->separatorChar:C
|
|
|
|
.line 54
|
|
.line 55
|
|
const/16 v3, 0x5c
|
|
|
|
.line 56
|
|
.line 57
|
|
if-ne v2, v3, :cond_0
|
|
|
|
.line 58
|
|
.line 59
|
|
return v0
|
|
|
|
.line 60
|
|
:cond_0
|
|
invoke-virtual {p0}, Ljava/io/File;->getParent()Ljava/lang/String;
|
|
|
|
.line 61
|
|
.line 62
|
|
.line 63
|
|
move-result-object v0
|
|
|
|
.line 64
|
|
if-eqz v0, :cond_1
|
|
|
|
.line 65
|
|
.line 66
|
|
new-instance v0, Ljava/io/File;
|
|
|
|
.line 67
|
|
.line 68
|
|
invoke-virtual {p0}, Ljava/io/File;->getParentFile()Ljava/io/File;
|
|
|
|
.line 69
|
|
.line 70
|
|
.line 71
|
|
move-result-object v2
|
|
|
|
.line 72
|
|
invoke-virtual {v2}, Ljava/io/File;->getCanonicalFile()Ljava/io/File;
|
|
|
|
.line 73
|
|
.line 74
|
|
.line 75
|
|
move-result-object v2
|
|
|
|
.line 76
|
|
invoke-virtual {p0}, Ljava/io/File;->getName()Ljava/lang/String;
|
|
|
|
.line 77
|
|
.line 78
|
|
.line 79
|
|
move-result-object p0
|
|
|
|
.line 80
|
|
invoke-direct {v0, v2, p0}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
|
|
|
|
.line 81
|
|
.line 82
|
|
.line 83
|
|
move-object p0, v0
|
|
|
|
.line 84
|
|
:cond_1
|
|
invoke-virtual {p0}, Ljava/io/File;->getCanonicalFile()Ljava/io/File;
|
|
|
|
.line 85
|
|
.line 86
|
|
.line 87
|
|
move-result-object v0
|
|
|
|
.line 88
|
|
invoke-virtual {p0}, Ljava/io/File;->getAbsoluteFile()Ljava/io/File;
|
|
|
|
.line 89
|
|
.line 90
|
|
.line 91
|
|
move-result-object p0
|
|
|
|
.line 92
|
|
invoke-virtual {v0, p0}, Ljava/io/File;->equals(Ljava/lang/Object;)Z
|
|
|
|
.line 93
|
|
.line 94
|
|
.line 95
|
|
move-result p0
|
|
|
|
.line 96
|
|
xor-int/2addr p0, v1
|
|
|
|
.line 97
|
|
return p0
|
|
|
|
.line 98
|
|
:catch_1
|
|
move-exception p0
|
|
|
|
.line 99
|
|
invoke-virtual {p0}, Ljava/lang/reflect/InvocationTargetException;->getCause()Ljava/lang/Throwable;
|
|
|
|
.line 100
|
|
.line 101
|
|
.line 102
|
|
move-result-object p0
|
|
|
|
.line 103
|
|
const-class v0, Ljava/io/IOException;
|
|
|
|
.line 104
|
|
.line 105
|
|
invoke-static {p0, v0}, Lcom/google/api/client/util/Throwables;->propagateIfPossible(Ljava/lang/Throwable;Ljava/lang/Class;)V
|
|
|
|
.line 106
|
|
.line 107
|
|
.line 108
|
|
new-instance v0, Ljava/lang/RuntimeException;
|
|
|
|
.line 109
|
|
.line 110
|
|
invoke-direct {v0, p0}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/Throwable;)V
|
|
|
|
.line 111
|
|
.line 112
|
|
.line 113
|
|
throw v0
|
|
.end method
|
|
|
|
.method public static serialize(Ljava/lang/Object;Ljava/io/OutputStream;)V
|
|
.locals 1
|
|
|
|
.line 4
|
|
:try_start_0
|
|
new-instance v0, Ljava/io/ObjectOutputStream;
|
|
|
|
invoke-direct {v0, p1}, Ljava/io/ObjectOutputStream;-><init>(Ljava/io/OutputStream;)V
|
|
|
|
invoke-virtual {v0, p0}, Ljava/io/ObjectOutputStream;->writeObject(Ljava/lang/Object;)V
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
.line 5
|
|
invoke-virtual {p1}, Ljava/io/OutputStream;->close()V
|
|
|
|
return-void
|
|
|
|
:catchall_0
|
|
move-exception p0
|
|
|
|
invoke-virtual {p1}, Ljava/io/OutputStream;->close()V
|
|
|
|
.line 6
|
|
throw p0
|
|
.end method
|
|
|
|
.method public static serialize(Ljava/lang/Object;)[B
|
|
.locals 1
|
|
|
|
.line 1
|
|
new-instance v0, Ljava/io/ByteArrayOutputStream;
|
|
|
|
invoke-direct {v0}, Ljava/io/ByteArrayOutputStream;-><init>()V
|
|
|
|
.line 2
|
|
invoke-static {p0, v0}, Lcom/google/api/client/util/IOUtils;->serialize(Ljava/lang/Object;Ljava/io/OutputStream;)V
|
|
|
|
.line 3
|
|
invoke-virtual {v0}, Ljava/io/ByteArrayOutputStream;->toByteArray()[B
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|