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

112 lines
4.3 KiB
Java

package com.google.android.gms.internal.auth;
import android.os.Build;
import android.os.UserManager;
/* loaded from: classes.dex */
public final class zzcc {
/* renamed from: a, reason: collision with root package name */
public static UserManager f9503a;
public static volatile boolean b;
static {
boolean z;
if (Build.VERSION.SDK_INT >= 24) {
z = true;
} else {
z = false;
}
b = !z;
}
/* JADX WARN: Code restructure failed: missing block: B:27:0x003f, code lost:
if (r4.isUserRunning(android.os.Process.myUserHandle()) == false) goto L28;
*/
/* JADX WARN: Code restructure failed: missing block: B:28:0x0041, code lost:
r8 = true;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public static boolean a(android.content.Context r8) {
/*
int r0 = android.os.Build.VERSION.SDK_INT
r1 = 24
r2 = 0
if (r0 < r1) goto L61
boolean r0 = com.google.android.gms.internal.auth.zzcc.b
if (r0 == 0) goto Lc
goto L5e
Lc:
java.lang.Class<com.google.android.gms.internal.auth.zzcc> r0 = com.google.android.gms.internal.auth.zzcc.class
monitor-enter(r0)
boolean r1 = com.google.android.gms.internal.auth.zzcc.b // Catch: java.lang.Throwable -> L15
if (r1 == 0) goto L17
monitor-exit(r0) // Catch: java.lang.Throwable -> L15
return r2
L15:
r8 = move-exception
goto L5f
L17:
r1 = 1
r3 = r1
L19:
r4 = 2
r5 = 0
if (r3 > r4) goto L43
android.os.UserManager r4 = com.google.android.gms.internal.auth.zzcc.f9503a // Catch: java.lang.Throwable -> L15
if (r4 != 0) goto L2b
java.lang.Class<android.os.UserManager> r4 = android.os.UserManager.class
java.lang.Object r4 = r8.getSystemService(r4) // Catch: java.lang.Throwable -> L15
android.os.UserManager r4 = (android.os.UserManager) r4 // Catch: java.lang.Throwable -> L15
com.google.android.gms.internal.auth.zzcc.f9503a = r4 // Catch: java.lang.Throwable -> L15
L2b:
android.os.UserManager r4 = com.google.android.gms.internal.auth.zzcc.f9503a // Catch: java.lang.Throwable -> L15
if (r4 != 0) goto L31
r8 = r1
goto L56
L31:
boolean r6 = r4.isUserUnlocked() // Catch: java.lang.Throwable -> L15 java.lang.NullPointerException -> L45
if (r6 != 0) goto L41
android.os.UserHandle r6 = android.os.Process.myUserHandle() // Catch: java.lang.Throwable -> L15 java.lang.NullPointerException -> L45
boolean r8 = r4.isUserRunning(r6) // Catch: java.lang.Throwable -> L15 java.lang.NullPointerException -> L45
if (r8 != 0) goto L43
L41:
r8 = r1
goto L52
L43:
r8 = r2
goto L52
L45:
r4 = move-exception
java.lang.String r6 = "DirectBootUtils"
java.lang.String r7 = "Failed to check if user is unlocked."
android.util.Log.w(r6, r7, r4) // Catch: java.lang.Throwable -> L15
com.google.android.gms.internal.auth.zzcc.f9503a = r5 // Catch: java.lang.Throwable -> L15
int r3 = r3 + 1
goto L19
L52:
if (r8 == 0) goto L56
com.google.android.gms.internal.auth.zzcc.f9503a = r5 // Catch: java.lang.Throwable -> L15
L56:
if (r8 == 0) goto L5a
com.google.android.gms.internal.auth.zzcc.b = r1 // Catch: java.lang.Throwable -> L15
L5a:
monitor-exit(r0) // Catch: java.lang.Throwable -> L15
if (r8 != 0) goto L5e
return r1
L5e:
return r2
L5f:
monitor-exit(r0) // Catch: java.lang.Throwable -> L15
throw r8
L61:
return r2
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.internal.auth.zzcc.a(android.content.Context):boolean");
}
}