soul-browser/sources/java/kotlin/uuid/Uuid.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

282 lines
17 KiB
Java

package kotlin.uuid;
import com.google.android.gms.ads.RequestConfiguration;
import java.io.InvalidObjectException;
import java.io.ObjectInputStream;
import java.io.Serializable;
import java.util.Comparator;
import kotlin.Deprecated;
import kotlin.DeprecatedSinceKotlin;
import kotlin.ExperimentalUnsignedTypes;
import kotlin.Metadata;
import kotlin.PublishedApi;
import kotlin.ReplaceWith;
import kotlin.SinceKotlin;
import kotlin.UByteArray;
import kotlin.ULong;
import kotlin.collections.ArraysKt;
import kotlin.comparisons.ComparisonsKt;
import kotlin.internal.InlineOnly;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.text.StringsKt;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@SinceKotlin(version = "2.0")
@Metadata(d1 = {"\u0000h\n\u0002\u0018\u0002\n\u0002\u0010\u000f\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\t\n\u0002\b\f\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0003\n\u0002\u0010\u0012\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\b\n\u0002\b\u0003\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\b\u0007\u0018\u0000 02\b\u0012\u0004\u0012\u00020\u00000\u00012\u00060\u0002j\u0002`\u0003:\u00010B\u0019\b\u0002\u0012\u0006\u0010\u0004\u001a\u00020\u0005\u0012\u0006\u0010\u0006\u001a\u00020\u0005¢\u0006\u0004\b\u0007\u0010\bJ\\\u0010\u000f\u001a\u0002H\u0010\"\u0004\b\u0000\u0010\u001026\u0010\u0011\u001a2\u0012\u0013\u0012\u00110\u0005¢\u0006\f\b\u0013\u0012\b\b\u0014\u0012\u0004\b\b(\u0004\u0012\u0013\u0012\u00110\u0005¢\u0006\f\b\u0013\u0012\b\b\u0014\u0012\u0004\b\b(\u0006\u0012\u0004\u0012\u0002H\u00100\u0012H\u0087\\u0001\u0000\u0082\u0002\n\n\b\b\u0001\u0012\u0002\u0010\u0001 \u0001¢\u0006\u0002\u0010\u0015J\\\u0010\u0016\u001a\u0002H\u0010\"\u0004\b\u0000\u0010\u001026\u0010\u0011\u001a2\u0012\u0013\u0012\u00110\u0017¢\u0006\f\b\u0013\u0012\b\b\u0014\u0012\u0004\b\b(\u0004\u0012\u0013\u0012\u00110\u0017¢\u0006\f\b\u0013\u0012\b\b\u0014\u0012\u0004\b\b(\u0006\u0012\u0004\u0012\u0002H\u00100\u0012H\u0087\\u0001\u0000\u0082\u0002\n\n\b\b\u0001\u0012\u0002\u0010\u0001 \u0001¢\u0006\u0002\u0010\u0015J\b\u0010\u0018\u001a\u00020\u0019H\u0016J\b\u0010\u001a\u001a\u00020\u0019H\u0007J\u0006\u0010\u001b\u001a\u00020\u0019J\u0006\u0010\u001c\u001a\u00020\u001dJ\u000f\u0010\u001e\u001a\u00020\u001fH\u0007¢\u0006\u0004\b \u0010!J\u0013\u0010\"\u001a\u00020#2\b\u0010$\u001a\u0004\u0018\u00010%H\u0096\u0002J\u0011\u0010&\u001a\u00020'2\u0006\u0010$\u001a\u00020\u0000H\u0097\u0002J\b\u0010(\u001a\u00020'H\u0016J\b\u0010)\u001a\u00020%H\u0002J\u0019\u0010*\u001a\u00020+2\n\u0010,\u001a\u00060-j\u0002`.H\u0002¢\u0006\u0002\u0010/R\u001c\u0010\u0004\u001a\u00020\u00058\u0000X\u0081\u0004¢\u0006\u000e\n\u0000\u0012\u0004\b\t\u0010\n\u001a\u0004\b\u000b\u0010\fR\u001c\u0010\u0006\u001a\u00020\u00058\u0000X\u0081\u0004¢\u0006\u000e\n\u0000\u0012\u0004\b\r\u0010\n\u001a\u0004\b\u000e\u0010\f\u0082\u0002\u0007\n\u0005\b\u009920\u0001¨\u00061"}, d2 = {"Lkotlin/uuid/Uuid;", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "Ljava/io/Serializable;", "Lkotlin/io/Serializable;", "mostSignificantBits", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "leastSignificantBits", "<init>", "(JJ)V", "getMostSignificantBits$annotations", "()V", "getMostSignificantBits", "()J", "getLeastSignificantBits$annotations", "getLeastSignificantBits", "toLongs", RequestConfiguration.MAX_AD_CONTENT_RATING_T, "action", "Lkotlin/Function2;", "Lkotlin/ParameterName;", "name", "(Lkotlin/jvm/functions/Function2;)Ljava/lang/Object;", "toULongs", "Lkotlin/ULong;", "toString", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "toHexDashString", "toHexString", "toByteArray", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "toUByteArray", "Lkotlin/UByteArray;", "toUByteArray-TcUX1vc", "()[B", "equals", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "other", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "compareTo", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "hashCode", "writeReplace", "readObject", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "input", "Ljava/io/ObjectInputStream;", "Lkotlin/internal/ReadObjectParameterType;", "(Ljava/io/ObjectInputStream;)V", "Companion", "kotlin-stdlib"}, k = 1, mv = {2, 2, 0}, xi = 48)
@ExperimentalUuidApi
/* loaded from: classes4.dex */
public final class Uuid implements Comparable<Uuid>, Serializable {
/* renamed from: Companion, reason: from kotlin metadata */
@NotNull
public static final Companion INSTANCE = new Companion(null);
@NotNull
private static final Uuid NIL = new Uuid(0, 0);
public static final int SIZE_BITS = 128;
public static final int SIZE_BYTES = 16;
private final long leastSignificantBits;
private final long mostSignificantBits;
@Metadata(d1 = {"\u0000P\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\b\n\u0002\b\u0003\n\u0002\u0010\t\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010\u0012\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010\u000e\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0004\b\u0086\u0003\u0018\u00002\u00020\u0001B\t\b\u0002¢\u0006\u0004\b\u0002\u0010\u0003J\u0016\u0010\u000b\u001a\u00020\u00052\u0006\u0010\f\u001a\u00020\r2\u0006\u0010\u000e\u001a\u00020\rJ\u001d\u0010\u000f\u001a\u00020\u00052\u0006\u0010\f\u001a\u00020\u00102\u0006\u0010\u000e\u001a\u00020\u0010¢\u0006\u0004\b\u0011\u0010\u0012J\u000e\u0010\u0013\u001a\u00020\u00052\u0006\u0010\u0014\u001a\u00020\u0015J\u0017\u0010\u0016\u001a\u00020\u00052\u0006\u0010\u0017\u001a\u00020\u0018H\u0007¢\u0006\u0004\b\u0019\u0010\u001aJ\u000e\u0010\u001b\u001a\u00020\u00052\u0006\u0010\u001c\u001a\u00020\u001dJ\u0010\u0010\u001e\u001a\u00020\u00052\u0006\u0010\u001f\u001a\u00020\u001dH\u0007J\u000e\u0010 \u001a\u00020\u00052\u0006\u0010!\u001a\u00020\u001dJ\u0006\u0010\"\u001a\u00020\u0005R\u0011\u0010\u0004\u001a\u00020\u0005¢\u0006\b\n\u0000\u001a\u0004\b\u0006\u0010\u0007R\u000e\u0010\b\u001a\u00020\tX\u0086T¢\u0006\u0002\n\u0000R\u000e\u0010\n\u001a\u00020\tX\u0086T¢\u0006\u0002\n\u0000R*\u0010#\u001a\u0012\u0012\u0004\u0012\u00020\u00050$j\b\u0012\u0004\u0012\u00020\u0005`%8FX\u0087\u0004¢\u0006\f\u0012\u0004\b&\u0010\u0003\u001a\u0004\b'\u0010(¨\u0006)"}, d2 = {"Lkotlin/uuid/Uuid$Companion;", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "<init>", "()V", "NIL", "Lkotlin/uuid/Uuid;", "getNIL", "()Lkotlin/uuid/Uuid;", "SIZE_BYTES", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "SIZE_BITS", "fromLongs", "mostSignificantBits", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "leastSignificantBits", "fromULongs", "Lkotlin/ULong;", "fromULongs-eb3DHEI", "(JJ)Lkotlin/uuid/Uuid;", "fromByteArray", "byteArray", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "fromUByteArray", "ubyteArray", "Lkotlin/UByteArray;", "fromUByteArray-GBYM_sE", "([B)Lkotlin/uuid/Uuid;", "parse", "uuidString", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "parseHexDash", "hexDashString", "parseHex", "hexString", "random", "LEXICAL_ORDER", "Ljava/util/Comparator;", "Lkotlin/Comparator;", "getLEXICAL_ORDER$annotations", "getLEXICAL_ORDER", "()Ljava/util/Comparator;", "kotlin-stdlib"}, k = 1, mv = {2, 2, 0}, xi = 48)
/* loaded from: classes4.dex */
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
@Deprecated(message = "Use naturalOrder<Uuid>() instead", replaceWith = @ReplaceWith(expression = "naturalOrder<Uuid>()", imports = {"kotlin.comparisons.naturalOrder"}))
@DeprecatedSinceKotlin(warningSince = "2.1")
public static /* synthetic */ void getLEXICAL_ORDER$annotations() {
}
@NotNull
public final Uuid fromByteArray(@NotNull byte[] byteArray) {
String v;
Intrinsics.checkNotNullParameter(byteArray, "byteArray");
if (byteArray.length == 16) {
return fromLongs(UuidKt__UuidJVMKt.getLongAt(byteArray, 0), UuidKt__UuidJVMKt.getLongAt(byteArray, 8));
}
StringBuilder sb = new StringBuilder("Expected exactly 16 bytes, but was ");
v = ArraysKt.v(byteArray, 32);
sb.append(v);
sb.append(" of size ");
sb.append(byteArray.length);
throw new IllegalArgumentException(sb.toString().toString());
}
@NotNull
public final Uuid fromLongs(long mostSignificantBits, long leastSignificantBits) {
if (mostSignificantBits == 0 && leastSignificantBits == 0) {
return getNIL();
}
return new Uuid(mostSignificantBits, leastSignificantBits, null);
}
@SinceKotlin(version = "2.1")
@ExperimentalUnsignedTypes
@NotNull
/* renamed from: fromUByteArray-GBYM_sE, reason: not valid java name */
public final Uuid m1495fromUByteArrayGBYM_sE(@NotNull byte[] ubyteArray) {
Intrinsics.checkNotNullParameter(ubyteArray, "$v$c$kotlin-UByteArray$-ubyteArray$0");
return fromByteArray(ubyteArray);
}
@NotNull
/* renamed from: fromULongs-eb3DHEI, reason: not valid java name */
public final Uuid m1496fromULongseb3DHEI(long mostSignificantBits, long leastSignificantBits) {
return fromLongs(mostSignificantBits, leastSignificantBits);
}
@NotNull
public final Comparator<Uuid> getLEXICAL_ORDER() {
return ComparisonsKt.naturalOrder();
}
@NotNull
public final Uuid getNIL() {
return Uuid.NIL;
}
@NotNull
public final Uuid parse(@NotNull String uuidString) {
String truncateForErrorMessage$UuidKt__UuidKt;
Intrinsics.checkNotNullParameter(uuidString, "uuidString");
int length = uuidString.length();
if (length != 32) {
if (length == 36) {
return UuidKt__UuidJVMKt.uuidParseHexDash(uuidString);
}
StringBuilder sb = new StringBuilder("Expected either a 36-char string in the standard hex-and-dash UUID format or a 32-char hexadecimal string, but was \"");
truncateForErrorMessage$UuidKt__UuidKt = UuidKt__UuidKt.truncateForErrorMessage$UuidKt__UuidKt(uuidString, 64);
sb.append(truncateForErrorMessage$UuidKt__UuidKt);
sb.append("\" of length ");
sb.append(uuidString.length());
throw new IllegalArgumentException(sb.toString());
}
return UuidKt__UuidJVMKt.uuidParseHex(uuidString);
}
@NotNull
public final Uuid parseHex(@NotNull String hexString) {
String truncateForErrorMessage$UuidKt__UuidKt;
Intrinsics.checkNotNullParameter(hexString, "hexString");
if (hexString.length() == 32) {
return UuidKt__UuidJVMKt.uuidParseHex(hexString);
}
StringBuilder sb = new StringBuilder("Expected a 32-char hexadecimal string, but was \"");
truncateForErrorMessage$UuidKt__UuidKt = UuidKt__UuidKt.truncateForErrorMessage$UuidKt__UuidKt(hexString, 64);
sb.append(truncateForErrorMessage$UuidKt__UuidKt);
sb.append("\" of length ");
sb.append(hexString.length());
throw new IllegalArgumentException(sb.toString().toString());
}
@SinceKotlin(version = "2.1")
@NotNull
public final Uuid parseHexDash(@NotNull String hexDashString) {
String truncateForErrorMessage$UuidKt__UuidKt;
Intrinsics.checkNotNullParameter(hexDashString, "hexDashString");
if (hexDashString.length() == 36) {
return UuidKt__UuidJVMKt.uuidParseHexDash(hexDashString);
}
StringBuilder sb = new StringBuilder("Expected a 36-char string in the standard hex-and-dash UUID format, but was \"");
truncateForErrorMessage$UuidKt__UuidKt = UuidKt__UuidKt.truncateForErrorMessage$UuidKt__UuidKt(hexDashString, 64);
sb.append(truncateForErrorMessage$UuidKt__UuidKt);
sb.append("\" of length ");
sb.append(hexDashString.length());
throw new IllegalArgumentException(sb.toString().toString());
}
@NotNull
public final Uuid random() {
return UuidKt__UuidJVMKt.secureRandomUuid();
}
private Companion() {
}
}
public /* synthetic */ Uuid(long j, long j2, DefaultConstructorMarker defaultConstructorMarker) {
this(j, j2);
}
@PublishedApi
public static /* synthetic */ void getLeastSignificantBits$annotations() {
}
@PublishedApi
public static /* synthetic */ void getMostSignificantBits$annotations() {
}
private final void readObject(ObjectInputStream input) {
throw new InvalidObjectException("Deserialization is supported via proxy only");
}
@InlineOnly
private final <T> T toLongs(Function2<? super Long, ? super Long, ? extends T> action) {
Intrinsics.checkNotNullParameter(action, "action");
return action.invoke(Long.valueOf(getMostSignificantBits()), Long.valueOf(getLeastSignificantBits()));
}
@InlineOnly
private final <T> T toULongs(Function2<? super ULong, ? super ULong, ? extends T> action) {
Intrinsics.checkNotNullParameter(action, "action");
return action.invoke(ULong.m198boximpl(ULong.m204constructorimpl(getMostSignificantBits())), ULong.m198boximpl(ULong.m204constructorimpl(getLeastSignificantBits())));
}
private final Object writeReplace() {
return UuidKt__UuidJVMKt.serializedUuid(this);
}
public boolean equals(@Nullable Object other) {
if (this == other) {
return true;
}
if (!(other instanceof Uuid)) {
return false;
}
Uuid uuid = (Uuid) other;
if (this.mostSignificantBits == uuid.mostSignificantBits && this.leastSignificantBits == uuid.leastSignificantBits) {
return true;
}
return false;
}
public final long getLeastSignificantBits() {
return this.leastSignificantBits;
}
public final long getMostSignificantBits() {
return this.mostSignificantBits;
}
public int hashCode() {
long j = this.mostSignificantBits ^ this.leastSignificantBits;
return (int) (j ^ (j >>> 32));
}
@NotNull
public final byte[] toByteArray() {
byte[] bArr = new byte[16];
UuidKt__UuidJVMKt.setLongAt(bArr, 0, this.mostSignificantBits);
UuidKt__UuidJVMKt.setLongAt(bArr, 8, this.leastSignificantBits);
return bArr;
}
@SinceKotlin(version = "2.1")
@NotNull
public final String toHexDashString() {
byte[] bArr = new byte[36];
UuidKt__UuidJVMKt.formatBytesInto(this.mostSignificantBits, bArr, 0, 0, 4);
bArr[8] = 45;
UuidKt__UuidJVMKt.formatBytesInto(this.mostSignificantBits, bArr, 9, 4, 6);
bArr[13] = 45;
UuidKt__UuidJVMKt.formatBytesInto(this.mostSignificantBits, bArr, 14, 6, 8);
bArr[18] = 45;
UuidKt__UuidJVMKt.formatBytesInto(this.leastSignificantBits, bArr, 19, 0, 2);
bArr[23] = 45;
UuidKt__UuidJVMKt.formatBytesInto(this.leastSignificantBits, bArr, 24, 2, 8);
return StringsKt.decodeToString(bArr);
}
@NotNull
public final String toHexString() {
byte[] bArr = new byte[32];
UuidKt__UuidJVMKt.formatBytesInto(this.mostSignificantBits, bArr, 0, 0, 8);
UuidKt__UuidJVMKt.formatBytesInto(this.leastSignificantBits, bArr, 16, 0, 8);
return StringsKt.decodeToString(bArr);
}
@NotNull
public String toString() {
return toHexDashString();
}
@SinceKotlin(version = "2.1")
@ExperimentalUnsignedTypes
@NotNull
/* renamed from: toUByteArray-TcUX1vc, reason: not valid java name */
public final byte[] m1494toUByteArrayTcUX1vc() {
return UByteArray.m101constructorimpl(toByteArray());
}
private Uuid(long j, long j2) {
this.mostSignificantBits = j;
this.leastSignificantBits = j2;
}
@Override // java.lang.Comparable
@SinceKotlin(version = "2.1")
public int compareTo(@NotNull Uuid other) {
Intrinsics.checkNotNullParameter(other, "other");
long j = this.mostSignificantBits;
if (j != other.mostSignificantBits) {
return Long.compare(ULong.m204constructorimpl(j) ^ Long.MIN_VALUE, Long.MIN_VALUE ^ ULong.m204constructorimpl(other.mostSignificantBits));
}
return Long.compare(ULong.m204constructorimpl(this.leastSignificantBits) ^ Long.MIN_VALUE, Long.MIN_VALUE ^ ULong.m204constructorimpl(other.leastSignificantBits));
}
}