soul-browser/app/smali_classes3/com/google/auth/oauth2/ServiceAccountJwtAccessCredentials.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

459 lines
9 KiB
Smali

.class public Lcom/google/auth/oauth2/ServiceAccountJwtAccessCredentials;
.super Lcom/google/auth/Credentials;
.source "SourceFile"
# interfaces
.implements Lcom/google/auth/oauth2/JwtProvider;
.implements Lcom/google/auth/ServiceAccountSigner;
.implements Lcom/google/auth/oauth2/QuotaProjectIdProvider;
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/google/auth/oauth2/ServiceAccountJwtAccessCredentials$Builder;
}
.end annotation
# static fields
.field public static final synthetic c:I
# direct methods
.method static constructor <clinit>()V
.locals 3
.line 1
sget-object v0, Ljava/util/concurrent/TimeUnit;->HOURS:Ljava/util/concurrent/TimeUnit;
.line 2
.line 3
const-wide/16 v1, 0x1
.line 4
.line 5
invoke-virtual {v0, v1, v2}, Ljava/util/concurrent/TimeUnit;->toSeconds(J)J
.line 6
.line 7
.line 8
sget-object v0, Ljava/util/concurrent/TimeUnit;->MINUTES:Ljava/util/concurrent/TimeUnit;
.line 9
.line 10
const-wide/16 v1, 0x5
.line 11
.line 12
invoke-virtual {v0, v1, v2}, Ljava/util/concurrent/TimeUnit;->toSeconds(J)J
.line 13
.line 14
.line 15
return-void
.end method
# virtual methods
.method public final a(Ljava/net/URI;)Ljava/util/Map;
.locals 3
.line 1
if-eqz p1, :cond_4
.line 2
.line 3
:try_start_0
new-instance v0, Lcom/google/auth/oauth2/AutoValue_JwtClaims$Builder;
.line 4
.line 5
invoke-direct {v0}, Ljava/lang/Object;-><init>()V
.line 6
.line 7
.line 8
invoke-static {}, Lcom/google/common/collect/ImmutableMap;->k()Lcom/google/common/collect/ImmutableMap;
.line 9
.line 10
.line 11
move-result-object v1
.line 12
iput-object v1, v0, Lcom/google/auth/oauth2/AutoValue_JwtClaims$Builder;->d:Ljava/util/Map;
.line 13
.line 14
invoke-virtual {p1}, Ljava/net/URI;->toString()Ljava/lang/String;
.line 15
.line 16
.line 17
move-result-object p1
.line 18
iput-object p1, v0, Lcom/google/auth/oauth2/AutoValue_JwtClaims$Builder;->a:Ljava/lang/String;
.line 19
.line 20
const/4 p1, 0x0
.line 21
iput-object p1, v0, Lcom/google/auth/oauth2/AutoValue_JwtClaims$Builder;->b:Ljava/lang/String;
.line 22
.line 23
iput-object p1, v0, Lcom/google/auth/oauth2/AutoValue_JwtClaims$Builder;->c:Ljava/lang/String;
.line 24
.line 25
iget-object v0, v0, Lcom/google/auth/oauth2/AutoValue_JwtClaims$Builder;->d:Ljava/util/Map;
:try_end_0
.catch Ljava/util/concurrent/ExecutionException; {:try_start_0 .. :try_end_0} :catch_1
.catch Lcom/google/common/util/concurrent/UncheckedExecutionException; {:try_start_0 .. :try_end_0} :catch_0
.line 26
.line 27
if-eqz v0, :cond_0
.line 28
.line 29
throw p1
.line 30
:cond_0
:try_start_1
new-instance p1, Ljava/lang/IllegalStateException;
.line 31
.line 32
const-string v0, "Missing required properties: additionalClaims"
.line 33
.line 34
invoke-direct {p1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
.line 35
.line 36
.line 37
throw p1
:try_end_1
.catch Ljava/util/concurrent/ExecutionException; {:try_start_1 .. :try_end_1} :catch_1
.catch Lcom/google/common/util/concurrent/UncheckedExecutionException; {:try_start_1 .. :try_end_1} :catch_0
.line 38
:catch_0
move-exception p1
.line 39
goto :goto_0
.line 40
:catch_1
move-exception p1
.line 41
goto :goto_1
.line 42
:goto_0
invoke-static {p1}, Lcom/google/common/base/Throwables;->a(Ljava/lang/Throwable;)V
.line 43
.line 44
.line 45
new-instance v0, Ljava/lang/IllegalStateException;
.line 46
.line 47
const-string v1, "generateJwtAccess threw an unchecked exception that couldn\'t be rethrown"
.line 48
.line 49
invoke-direct {v0, v1, p1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
.line 50
.line 51
.line 52
throw v0
.line 53
:goto_1
invoke-virtual {p1}, Ljava/lang/Throwable;->getCause()Ljava/lang/Throwable;
.line 54
.line 55
.line 56
move-result-object v0
.line 57
sget-object v1, Lcom/google/common/base/Throwables;->a:Ljava/lang/Object;
.line 58
.line 59
if-eqz v0, :cond_2
.line 60
.line 61
const-class v1, Ljava/io/IOException;
.line 62
.line 63
invoke-virtual {v1, v0}, Ljava/lang/Class;->isInstance(Ljava/lang/Object;)Z
.line 64
.line 65
.line 66
move-result v2
.line 67
if-nez v2, :cond_1
.line 68
.line 69
goto :goto_2
.line 70
:cond_1
invoke-virtual {v1, v0}, Ljava/lang/Class;->cast(Ljava/lang/Object;)Ljava/lang/Object;
.line 71
.line 72
.line 73
move-result-object p1
.line 74
check-cast p1, Ljava/lang/Throwable;
.line 75
.line 76
throw p1
.line 77
:cond_2
:goto_2
if-eqz v0, :cond_3
.line 78
.line 79
invoke-static {v0}, Lcom/google/common/base/Throwables;->a(Ljava/lang/Throwable;)V
.line 80
.line 81
.line 82
:cond_3
new-instance v0, Ljava/lang/IllegalStateException;
.line 83
.line 84
const-string v1, "generateJwtAccess threw an unexpected checked exception"
.line 85
.line 86
invoke-virtual {p1}, Ljava/lang/Throwable;->getCause()Ljava/lang/Throwable;
.line 87
.line 88
.line 89
move-result-object p1
.line 90
invoke-direct {v0, v1, p1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
.line 91
.line 92
.line 93
throw v0
.line 94
:cond_4
new-instance p1, Ljava/io/IOException;
.line 95
.line 96
const-string v0, "JwtAccess requires Audience uri to be passed in or the defaultAudience to be specified"
.line 97
.line 98
invoke-direct {p1, v0}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
.line 99
.line 100
.line 101
throw p1
.end method
.method public final b()V
.locals 1
.line 1
const/4 v0, 0x0
.line 2
throw v0
.end method
.method public final equals(Ljava/lang/Object;)Z
.locals 0
.line 1
instance-of p1, p1, Lcom/google/auth/oauth2/ServiceAccountJwtAccessCredentials;
.line 2
.line 3
if-nez p1, :cond_0
.line 4
.line 5
const/4 p1, 0x0
.line 6
return p1
.line 7
:cond_0
const/4 p1, 0x1
.line 8
return p1
.end method
.method public final hashCode()I
.locals 3
.line 1
const/4 v0, 0x6
.line 2
new-array v0, v0, [Ljava/lang/Object;
.line 3
.line 4
const/4 v1, 0x0
.line 5
const/4 v2, 0x0
.line 6
aput-object v2, v0, v1
.line 7
.line 8
const/4 v1, 0x1
.line 9
aput-object v2, v0, v1
.line 10
.line 11
const/4 v1, 0x2
.line 12
aput-object v2, v0, v1
.line 13
.line 14
const/4 v1, 0x3
.line 15
aput-object v2, v0, v1
.line 16
.line 17
const/4 v1, 0x4
.line 18
aput-object v2, v0, v1
.line 19
.line 20
const/4 v1, 0x5
.line 21
aput-object v2, v0, v1
.line 22
.line 23
invoke-static {v0}, Lj$/util/Objects;->hash([Ljava/lang/Object;)I
.line 24
.line 25
.line 26
move-result v0
.line 27
return v0
.end method
.method public final toString()Ljava/lang/String;
.locals 3
.line 1
invoke-static {p0}, Lcom/google/common/base/MoreObjects;->b(Ljava/lang/Object;)Lcom/google/common/base/MoreObjects$ToStringHelper;
.line 2
.line 3
.line 4
move-result-object v0
.line 5
const/4 v1, 0x0
.line 6
const-string v2, "clientId"
.line 7
.line 8
invoke-virtual {v0, v1, v2}, Lcom/google/common/base/MoreObjects$ToStringHelper;->b(Ljava/lang/Object;Ljava/lang/String;)V
.line 9
.line 10
.line 11
const-string v2, "clientEmail"
.line 12
.line 13
invoke-virtual {v0, v1, v2}, Lcom/google/common/base/MoreObjects$ToStringHelper;->b(Ljava/lang/Object;Ljava/lang/String;)V
.line 14
.line 15
.line 16
const-string v2, "privateKeyId"
.line 17
.line 18
invoke-virtual {v0, v1, v2}, Lcom/google/common/base/MoreObjects$ToStringHelper;->b(Ljava/lang/Object;Ljava/lang/String;)V
.line 19
.line 20
.line 21
const-string v2, "defaultAudience"
.line 22
.line 23
invoke-virtual {v0, v1, v2}, Lcom/google/common/base/MoreObjects$ToStringHelper;->b(Ljava/lang/Object;Ljava/lang/String;)V
.line 24
.line 25
.line 26
const-string v2, "quotaProjectId"
.line 27
.line 28
invoke-virtual {v0, v1, v2}, Lcom/google/common/base/MoreObjects$ToStringHelper;->b(Ljava/lang/Object;Ljava/lang/String;)V
.line 29
.line 30
.line 31
invoke-virtual {v0}, Lcom/google/common/base/MoreObjects$ToStringHelper;->toString()Ljava/lang/String;
.line 32
.line 33
.line 34
move-result-object v0
.line 35
return-object v0
.end method