soul-browser/app/smali/com/google/android/gms/internal/auth/zzcc.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

302 lines
4.9 KiB
Smali

.class public final Lcom/google/android/gms/internal/auth/zzcc;
.super Ljava/lang/Object;
.source "SourceFile"
# static fields
.field public static a:Landroid/os/UserManager;
.field public static volatile b:Z
# direct methods
.method static constructor <clinit>()V
.locals 3
.line 1
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
.line 2
.line 3
const/16 v1, 0x18
.line 4
.line 5
const/4 v2, 0x1
.line 6
if-lt v0, v1, :cond_0
.line 7
.line 8
move v0, v2
.line 9
goto :goto_0
.line 10
:cond_0
const/4 v0, 0x0
.line 11
:goto_0
xor-int/2addr v0, v2
.line 12
sput-boolean v0, Lcom/google/android/gms/internal/auth/zzcc;->b:Z
.line 13
.line 14
return-void
.end method
.method public static a(Landroid/content/Context;)Z
.locals 8
.line 1
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
.line 2
.line 3
const/16 v1, 0x18
.line 4
.line 5
const/4 v2, 0x0
.line 6
if-lt v0, v1, :cond_9
.line 7
.line 8
sget-boolean v0, Lcom/google/android/gms/internal/auth/zzcc;->b:Z
.line 9
.line 10
if-eqz v0, :cond_0
.line 11
.line 12
goto :goto_3
.line 13
:cond_0
const-class v0, Lcom/google/android/gms/internal/auth/zzcc;
.line 14
.line 15
monitor-enter v0
.line 16
:try_start_0
sget-boolean v1, Lcom/google/android/gms/internal/auth/zzcc;->b:Z
.line 17
.line 18
if-eqz v1, :cond_1
.line 19
.line 20
monitor-exit v0
.line 21
return v2
.line 22
:catchall_0
move-exception p0
.line 23
goto :goto_4
.line 24
:cond_1
const/4 v1, 0x1
.line 25
move v3, v1
.line 26
:goto_0
const/4 v4, 0x2
.line 27
const/4 v5, 0x0
.line 28
if-gt v3, v4, :cond_5
.line 29
.line 30
sget-object v4, Lcom/google/android/gms/internal/auth/zzcc;->a:Landroid/os/UserManager;
.line 31
.line 32
if-nez v4, :cond_2
.line 33
.line 34
const-class v4, Landroid/os/UserManager;
.line 35
.line 36
invoke-virtual {p0, v4}, Landroid/content/Context;->getSystemService(Ljava/lang/Class;)Ljava/lang/Object;
.line 37
.line 38
.line 39
move-result-object v4
.line 40
check-cast v4, Landroid/os/UserManager;
.line 41
.line 42
sput-object v4, Lcom/google/android/gms/internal/auth/zzcc;->a:Landroid/os/UserManager;
.line 43
.line 44
:cond_2
sget-object v4, Lcom/google/android/gms/internal/auth/zzcc;->a:Landroid/os/UserManager;
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 45
.line 46
if-nez v4, :cond_3
.line 47
.line 48
move p0, v1
.line 49
goto :goto_2
.line 50
:cond_3
:try_start_1
invoke-virtual {v4}, Landroid/os/UserManager;->isUserUnlocked()Z
.line 51
.line 52
.line 53
move-result v6
.line 54
if-nez v6, :cond_4
.line 55
.line 56
invoke-static {}, Landroid/os/Process;->myUserHandle()Landroid/os/UserHandle;
.line 57
.line 58
.line 59
move-result-object v6
.line 60
invoke-virtual {v4, v6}, Landroid/os/UserManager;->isUserRunning(Landroid/os/UserHandle;)Z
.line 61
.line 62
.line 63
move-result p0
:try_end_1
.catch Ljava/lang/NullPointerException; {:try_start_1 .. :try_end_1} :catch_0
.catchall {:try_start_1 .. :try_end_1} :catchall_0
.line 64
if-nez p0, :cond_5
.line 65
.line 66
:cond_4
move p0, v1
.line 67
goto :goto_1
.line 68
:cond_5
move p0, v2
.line 69
goto :goto_1
.line 70
:catch_0
move-exception v4
.line 71
:try_start_2
const-string v6, "DirectBootUtils"
.line 72
.line 73
const-string v7, "Failed to check if user is unlocked."
.line 74
.line 75
invoke-static {v6, v7, v4}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
.line 76
.line 77
.line 78
sput-object v5, Lcom/google/android/gms/internal/auth/zzcc;->a:Landroid/os/UserManager;
.line 79
.line 80
add-int/lit8 v3, v3, 0x1
.line 81
.line 82
goto :goto_0
.line 83
:goto_1
if-eqz p0, :cond_6
.line 84
.line 85
sput-object v5, Lcom/google/android/gms/internal/auth/zzcc;->a:Landroid/os/UserManager;
.line 86
.line 87
:cond_6
:goto_2
if-eqz p0, :cond_7
.line 88
.line 89
sput-boolean v1, Lcom/google/android/gms/internal/auth/zzcc;->b:Z
.line 90
.line 91
:cond_7
monitor-exit v0
.line 92
if-nez p0, :cond_8
.line 93
.line 94
return v1
.line 95
:cond_8
:goto_3
return v2
.line 96
:goto_4
monitor-exit v0
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
.line 97
throw p0
.line 98
:cond_9
return v2
.end method