* 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>
328 lines
6.9 KiB
Smali
328 lines
6.9 KiB
Smali
.class Lcom/google/auth/oauth2/AwsRequestSigner;
|
|
.super Ljava/lang/Object;
|
|
.source "SourceFile"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/google/auth/oauth2/AwsRequestSigner$Builder;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public final a:Ljava/util/HashMap;
|
|
|
|
.field public final b:Ljava/lang/String;
|
|
|
|
.field public final c:Ljava/lang/String;
|
|
|
|
.field public final d:Ljava/net/URI;
|
|
|
|
.field public final e:Lcom/google/auth/oauth2/AwsDates;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lcom/google/auth/oauth2/AwsSecurityCredentials;Ljava/lang/String;Ljava/lang/String;Ljava/util/HashMap;Lcom/google/auth/oauth2/AwsDates;)V
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
.line 2
|
|
.line 3
|
|
.line 4
|
|
invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
|
|
|
.line 5
|
|
.line 6
|
|
.line 7
|
|
invoke-static {p2}, Ljava/net/URI;->create(Ljava/lang/String;)Ljava/net/URI;
|
|
|
|
.line 8
|
|
.line 9
|
|
.line 10
|
|
move-result-object p1
|
|
|
|
.line 11
|
|
invoke-virtual {p1}, Ljava/net/URI;->normalize()Ljava/net/URI;
|
|
|
|
.line 12
|
|
.line 13
|
|
.line 14
|
|
move-result-object p1
|
|
|
|
.line 15
|
|
iput-object p1, p0, Lcom/google/auth/oauth2/AwsRequestSigner;->d:Ljava/net/URI;
|
|
|
|
.line 16
|
|
.line 17
|
|
invoke-virtual {p3}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
|
|
|
.line 18
|
|
.line 19
|
|
.line 20
|
|
iput-object p3, p0, Lcom/google/auth/oauth2/AwsRequestSigner;->b:Ljava/lang/String;
|
|
|
|
.line 21
|
|
.line 22
|
|
const-string p1, ""
|
|
|
|
.line 23
|
|
.line 24
|
|
iput-object p1, p0, Lcom/google/auth/oauth2/AwsRequestSigner;->c:Ljava/lang/String;
|
|
|
|
.line 25
|
|
.line 26
|
|
new-instance p1, Ljava/util/HashMap;
|
|
|
|
.line 27
|
|
.line 28
|
|
invoke-direct {p1, p4}, Ljava/util/HashMap;-><init>(Ljava/util/Map;)V
|
|
|
|
.line 29
|
|
.line 30
|
|
.line 31
|
|
iput-object p1, p0, Lcom/google/auth/oauth2/AwsRequestSigner;->a:Ljava/util/HashMap;
|
|
|
|
.line 32
|
|
.line 33
|
|
if-nez p5, :cond_0
|
|
|
|
.line 34
|
|
.line 35
|
|
new-instance p1, Ljava/text/SimpleDateFormat;
|
|
|
|
.line 36
|
|
.line 37
|
|
const-string p2, "yyyyMMdd\'T\'HHmmss\'Z\'"
|
|
|
|
.line 38
|
|
.line 39
|
|
invoke-direct {p1, p2}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;)V
|
|
|
|
.line 40
|
|
.line 41
|
|
.line 42
|
|
const-string p2, "UTC"
|
|
|
|
.line 43
|
|
.line 44
|
|
invoke-static {p2}, Lj$/util/DesugarTimeZone;->getTimeZone(Ljava/lang/String;)Ljava/util/TimeZone;
|
|
|
|
.line 45
|
|
.line 46
|
|
.line 47
|
|
move-result-object p2
|
|
|
|
.line 48
|
|
invoke-virtual {p1, p2}, Ljava/text/DateFormat;->setTimeZone(Ljava/util/TimeZone;)V
|
|
|
|
.line 49
|
|
.line 50
|
|
.line 51
|
|
new-instance p2, Ljava/util/Date;
|
|
|
|
.line 52
|
|
.line 53
|
|
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
|
|
|
|
.line 54
|
|
.line 55
|
|
.line 56
|
|
move-result-wide p3
|
|
|
|
.line 57
|
|
invoke-direct {p2, p3, p4}, Ljava/util/Date;-><init>(J)V
|
|
|
|
.line 58
|
|
.line 59
|
|
.line 60
|
|
invoke-virtual {p1, p2}, Ljava/text/DateFormat;->format(Ljava/util/Date;)Ljava/lang/String;
|
|
|
|
.line 61
|
|
.line 62
|
|
.line 63
|
|
move-result-object p1
|
|
|
|
.line 64
|
|
new-instance p5, Lcom/google/auth/oauth2/AwsDates;
|
|
|
|
.line 65
|
|
.line 66
|
|
invoke-direct {p5, p1}, Lcom/google/auth/oauth2/AwsDates;-><init>(Ljava/lang/String;)V
|
|
|
|
.line 67
|
|
.line 68
|
|
.line 69
|
|
:cond_0
|
|
iput-object p5, p0, Lcom/google/auth/oauth2/AwsRequestSigner;->e:Lcom/google/auth/oauth2/AwsDates;
|
|
|
|
.line 70
|
|
.line 71
|
|
return-void
|
|
.end method
|
|
|
|
.method public static a([B)Ljava/lang/String;
|
|
.locals 2
|
|
|
|
.line 1
|
|
:try_start_0
|
|
const-string v0, "SHA-256"
|
|
|
|
.line 2
|
|
.line 3
|
|
invoke-static {v0}, Ljava/security/MessageDigest;->getInstance(Ljava/lang/String;)Ljava/security/MessageDigest;
|
|
|
|
.line 4
|
|
.line 5
|
|
.line 6
|
|
move-result-object v0
|
|
|
|
.line 7
|
|
sget-object v1, Lcom/google/common/io/BaseEncoding;->c:Lcom/google/common/io/BaseEncoding;
|
|
|
|
.line 8
|
|
.line 9
|
|
invoke-virtual {v1}, Lcom/google/common/io/BaseEncoding;->e()Lcom/google/common/io/BaseEncoding;
|
|
|
|
.line 10
|
|
.line 11
|
|
.line 12
|
|
move-result-object v1
|
|
|
|
.line 13
|
|
invoke-virtual {v0, p0}, Ljava/security/MessageDigest;->digest([B)[B
|
|
|
|
.line 14
|
|
.line 15
|
|
.line 16
|
|
move-result-object p0
|
|
|
|
.line 17
|
|
invoke-virtual {v1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
|
|
|
.line 18
|
|
.line 19
|
|
.line 20
|
|
array-length v0, p0
|
|
|
|
.line 21
|
|
invoke-virtual {v1, p0, v0}, Lcom/google/common/io/BaseEncoding;->c([BI)Ljava/lang/String;
|
|
|
|
.line 22
|
|
.line 23
|
|
.line 24
|
|
move-result-object p0
|
|
:try_end_0
|
|
.catch Ljava/security/NoSuchAlgorithmException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
.line 25
|
|
return-object p0
|
|
|
|
.line 26
|
|
:catch_0
|
|
move-exception p0
|
|
|
|
.line 27
|
|
new-instance v0, Ljava/lang/RuntimeException;
|
|
|
|
.line 28
|
|
.line 29
|
|
const-string v1, "Failed to compute SHA-256 hash."
|
|
|
|
.line 30
|
|
.line 31
|
|
invoke-direct {v0, v1, p0}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
.line 32
|
|
.line 33
|
|
.line 34
|
|
throw v0
|
|
.end method
|
|
|
|
.method public static b([B[B)[B
|
|
.locals 3
|
|
|
|
.line 1
|
|
:try_start_0
|
|
const-string v0, "HmacSHA256"
|
|
|
|
.line 2
|
|
.line 3
|
|
invoke-static {v0}, Ljavax/crypto/Mac;->getInstance(Ljava/lang/String;)Ljavax/crypto/Mac;
|
|
|
|
.line 4
|
|
.line 5
|
|
.line 6
|
|
move-result-object v1
|
|
|
|
.line 7
|
|
new-instance v2, Ljavax/crypto/spec/SecretKeySpec;
|
|
|
|
.line 8
|
|
.line 9
|
|
invoke-direct {v2, p0, v0}, Ljavax/crypto/spec/SecretKeySpec;-><init>([BLjava/lang/String;)V
|
|
|
|
.line 10
|
|
.line 11
|
|
.line 12
|
|
invoke-virtual {v1, v2}, Ljavax/crypto/Mac;->init(Ljava/security/Key;)V
|
|
|
|
.line 13
|
|
.line 14
|
|
.line 15
|
|
invoke-virtual {v1, p1}, Ljavax/crypto/Mac;->doFinal([B)[B
|
|
|
|
.line 16
|
|
.line 17
|
|
.line 18
|
|
move-result-object p0
|
|
:try_end_0
|
|
.catch Ljava/security/NoSuchAlgorithmException; {:try_start_0 .. :try_end_0} :catch_1
|
|
.catch Ljava/security/InvalidKeyException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
.line 19
|
|
return-object p0
|
|
|
|
.line 20
|
|
:catch_0
|
|
move-exception p0
|
|
|
|
.line 21
|
|
new-instance p1, Lcom/google/auth/ServiceAccountSigner$SigningException;
|
|
|
|
.line 22
|
|
.line 23
|
|
const-string v0, "Invalid key used when calculating the AWS V4 Signature"
|
|
|
|
.line 24
|
|
.line 25
|
|
invoke-direct {p1, v0, p0}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
.line 26
|
|
.line 27
|
|
.line 28
|
|
throw p1
|
|
|
|
.line 29
|
|
:catch_1
|
|
move-exception p0
|
|
|
|
.line 30
|
|
new-instance p1, Ljava/lang/RuntimeException;
|
|
|
|
.line 31
|
|
.line 32
|
|
const-string v0, "HmacSHA256 must be supported by the JVM."
|
|
|
|
.line 33
|
|
.line 34
|
|
invoke-direct {p1, v0, p0}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
.line 35
|
|
.line 36
|
|
.line 37
|
|
throw p1
|
|
.end method
|