soul-browser/sources/java/kotlin/text/UHexExtensionsKt.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

230 lines
13 KiB
Java

package kotlin.text;
import com.google.android.gms.ads.RequestConfiguration;
import kotlin.ExperimentalStdlibApi;
import kotlin.ExperimentalUnsignedTypes;
import kotlin.Metadata;
import kotlin.SinceKotlin;
import kotlin.UByte;
import kotlin.UByteArray;
import kotlin.UInt;
import kotlin.ULong;
import kotlin.UShort;
import kotlin.WasExperimental;
import kotlin.internal.InlineOnly;
import kotlin.jvm.internal.Intrinsics;
@Metadata(d1 = {"\u0000<\n\u0000\n\u0002\u0010\u000e\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\b\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0005\u001a\u001e\u0010\u0000\u001a\u00020\u0001*\u00020\u00022\b\b\u0002\u0010\u0003\u001a\u00020\u0004H\u0087\\u0006\u0004\b\u0005\u0010\u0006\u001a2\u0010\u0000\u001a\u00020\u0001*\u00020\u00022\b\b\u0002\u0010\u0007\u001a\u00020\b2\b\b\u0002\u0010\t\u001a\u00020\b2\b\b\u0002\u0010\u0003\u001a\u00020\u0004H\u0087\\u0006\u0004\b\n\u0010\u000b\u001a\u001c\u0010\f\u001a\u00020\u0002*\u00020\u00012\b\b\u0002\u0010\u0003\u001a\u00020\u0004H\u0087\\u0006\u0002\u0010\r\u001a\u001e\u0010\u0000\u001a\u00020\u0001*\u00020\u000e2\b\b\u0002\u0010\u0003\u001a\u00020\u0004H\u0087\\u0006\u0004\b\u000f\u0010\u0010\u001a\u001c\u0010\u0011\u001a\u00020\u000e*\u00020\u00012\b\b\u0002\u0010\u0003\u001a\u00020\u0004H\u0087\\u0006\u0002\u0010\u0012\u001a\u001e\u0010\u0000\u001a\u00020\u0001*\u00020\u00132\b\b\u0002\u0010\u0003\u001a\u00020\u0004H\u0087\\u0006\u0004\b\u0014\u0010\u0015\u001a\u001c\u0010\u0016\u001a\u00020\u0013*\u00020\u00012\b\b\u0002\u0010\u0003\u001a\u00020\u0004H\u0087\\u0006\u0002\u0010\u0017\u001a\u001e\u0010\u0000\u001a\u00020\u0001*\u00020\u00182\b\b\u0002\u0010\u0003\u001a\u00020\u0004H\u0087\\u0006\u0004\b\u0019\u0010\u001a\u001a\u001c\u0010\u001b\u001a\u00020\u0018*\u00020\u00012\b\b\u0002\u0010\u0003\u001a\u00020\u0004H\u0087\\u0006\u0002\u0010\u001c\u001a\u001e\u0010\u0000\u001a\u00020\u0001*\u00020\u001d2\b\b\u0002\u0010\u0003\u001a\u00020\u0004H\u0087\\u0006\u0004\b\u001e\u0010\u001f\u001a\u001c\u0010 \u001a\u00020\u001d*\u00020\u00012\b\b\u0002\u0010\u0003\u001a\u00020\u0004H\u0087\\u0006\u0002\u0010!¨\u0006\""}, d2 = {"toHexString", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "Lkotlin/UByteArray;", "format", "Lkotlin/text/HexFormat;", "toHexString-zHuV2wU", "([BLkotlin/text/HexFormat;)Ljava/lang/String;", "startIndex", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "endIndex", "toHexString-lZCiFrA", "([BIILkotlin/text/HexFormat;)Ljava/lang/String;", "hexToUByteArray", "(Ljava/lang/String;Lkotlin/text/HexFormat;)[B", "Lkotlin/UByte;", "toHexString-ZQbaR00", "(BLkotlin/text/HexFormat;)Ljava/lang/String;", "hexToUByte", "(Ljava/lang/String;Lkotlin/text/HexFormat;)B", "Lkotlin/UShort;", "toHexString-r3ox_E0", "(SLkotlin/text/HexFormat;)Ljava/lang/String;", "hexToUShort", "(Ljava/lang/String;Lkotlin/text/HexFormat;)S", "Lkotlin/UInt;", "toHexString-8M7LxHw", "(ILkotlin/text/HexFormat;)Ljava/lang/String;", "hexToUInt", "(Ljava/lang/String;Lkotlin/text/HexFormat;)I", "Lkotlin/ULong;", "toHexString-8UJCm-I", "(JLkotlin/text/HexFormat;)Ljava/lang/String;", "hexToULong", "(Ljava/lang/String;Lkotlin/text/HexFormat;)J", "kotlin-stdlib"}, k = 2, mv = {2, 2, 0}, xi = 48)
/* loaded from: classes4.dex */
public final class UHexExtensionsKt {
@SinceKotlin(version = "2.2")
@WasExperimental(markerClass = {ExperimentalStdlibApi.class})
@InlineOnly
private static final byte hexToUByte(String str, HexFormat format) {
Intrinsics.checkNotNullParameter(str, "<this>");
Intrinsics.checkNotNullParameter(format, "format");
return UByte.m48constructorimpl(HexExtensionsKt.hexToByte(str, format));
}
public static /* synthetic */ byte hexToUByte$default(String str, HexFormat format, int i, Object obj) {
if ((i & 1) != 0) {
format = HexFormat.INSTANCE.getDefault();
}
Intrinsics.checkNotNullParameter(str, "<this>");
Intrinsics.checkNotNullParameter(format, "format");
return UByte.m48constructorimpl(HexExtensionsKt.hexToByte(str, format));
}
@SinceKotlin(version = "2.2")
@ExperimentalUnsignedTypes
@InlineOnly
@WasExperimental(markerClass = {ExperimentalStdlibApi.class})
private static final byte[] hexToUByteArray(String str, HexFormat format) {
Intrinsics.checkNotNullParameter(str, "<this>");
Intrinsics.checkNotNullParameter(format, "format");
return UByteArray.m101constructorimpl(HexExtensionsKt.hexToByteArray(str, format));
}
public static /* synthetic */ byte[] hexToUByteArray$default(String str, HexFormat format, int i, Object obj) {
if ((i & 1) != 0) {
format = HexFormat.INSTANCE.getDefault();
}
Intrinsics.checkNotNullParameter(str, "<this>");
Intrinsics.checkNotNullParameter(format, "format");
return UByteArray.m101constructorimpl(HexExtensionsKt.hexToByteArray(str, format));
}
@SinceKotlin(version = "2.2")
@WasExperimental(markerClass = {ExperimentalStdlibApi.class})
@InlineOnly
private static final int hexToUInt(String str, HexFormat format) {
Intrinsics.checkNotNullParameter(str, "<this>");
Intrinsics.checkNotNullParameter(format, "format");
return UInt.m125constructorimpl(HexExtensionsKt.hexToInt(str, format));
}
public static /* synthetic */ int hexToUInt$default(String str, HexFormat format, int i, Object obj) {
if ((i & 1) != 0) {
format = HexFormat.INSTANCE.getDefault();
}
Intrinsics.checkNotNullParameter(str, "<this>");
Intrinsics.checkNotNullParameter(format, "format");
return UInt.m125constructorimpl(HexExtensionsKt.hexToInt(str, format));
}
@SinceKotlin(version = "2.2")
@WasExperimental(markerClass = {ExperimentalStdlibApi.class})
@InlineOnly
private static final long hexToULong(String str, HexFormat format) {
Intrinsics.checkNotNullParameter(str, "<this>");
Intrinsics.checkNotNullParameter(format, "format");
return ULong.m204constructorimpl(HexExtensionsKt.hexToLong(str, format));
}
public static /* synthetic */ long hexToULong$default(String str, HexFormat format, int i, Object obj) {
if ((i & 1) != 0) {
format = HexFormat.INSTANCE.getDefault();
}
Intrinsics.checkNotNullParameter(str, "<this>");
Intrinsics.checkNotNullParameter(format, "format");
return ULong.m204constructorimpl(HexExtensionsKt.hexToLong(str, format));
}
@SinceKotlin(version = "2.2")
@WasExperimental(markerClass = {ExperimentalStdlibApi.class})
@InlineOnly
private static final short hexToUShort(String str, HexFormat format) {
Intrinsics.checkNotNullParameter(str, "<this>");
Intrinsics.checkNotNullParameter(format, "format");
return UShort.m311constructorimpl(HexExtensionsKt.hexToShort(str, format));
}
public static /* synthetic */ short hexToUShort$default(String str, HexFormat format, int i, Object obj) {
if ((i & 1) != 0) {
format = HexFormat.INSTANCE.getDefault();
}
Intrinsics.checkNotNullParameter(str, "<this>");
Intrinsics.checkNotNullParameter(format, "format");
return UShort.m311constructorimpl(HexExtensionsKt.hexToShort(str, format));
}
@SinceKotlin(version = "2.2")
@WasExperimental(markerClass = {ExperimentalStdlibApi.class})
@InlineOnly
/* renamed from: toHexString-8M7LxHw, reason: not valid java name */
private static final String m1332toHexString8M7LxHw(int i, HexFormat format) {
Intrinsics.checkNotNullParameter(format, "format");
return HexExtensionsKt.toHexString(i, format);
}
/* renamed from: toHexString-8M7LxHw$default, reason: not valid java name */
public static /* synthetic */ String m1333toHexString8M7LxHw$default(int i, HexFormat format, int i2, Object obj) {
if ((i2 & 1) != 0) {
format = HexFormat.INSTANCE.getDefault();
}
Intrinsics.checkNotNullParameter(format, "format");
return HexExtensionsKt.toHexString(i, format);
}
@SinceKotlin(version = "2.2")
@WasExperimental(markerClass = {ExperimentalStdlibApi.class})
@InlineOnly
/* renamed from: toHexString-8UJCm-I, reason: not valid java name */
private static final String m1334toHexString8UJCmI(long j, HexFormat format) {
Intrinsics.checkNotNullParameter(format, "format");
return HexExtensionsKt.toHexString(j, format);
}
/* renamed from: toHexString-8UJCm-I$default, reason: not valid java name */
public static /* synthetic */ String m1335toHexString8UJCmI$default(long j, HexFormat format, int i, Object obj) {
if ((i & 1) != 0) {
format = HexFormat.INSTANCE.getDefault();
}
Intrinsics.checkNotNullParameter(format, "format");
return HexExtensionsKt.toHexString(j, format);
}
@SinceKotlin(version = "2.2")
@WasExperimental(markerClass = {ExperimentalStdlibApi.class})
@InlineOnly
/* renamed from: toHexString-ZQbaR00, reason: not valid java name */
private static final String m1336toHexStringZQbaR00(byte b, HexFormat format) {
Intrinsics.checkNotNullParameter(format, "format");
return HexExtensionsKt.toHexString(b, format);
}
/* renamed from: toHexString-ZQbaR00$default, reason: not valid java name */
public static /* synthetic */ String m1337toHexStringZQbaR00$default(byte b, HexFormat format, int i, Object obj) {
if ((i & 1) != 0) {
format = HexFormat.INSTANCE.getDefault();
}
Intrinsics.checkNotNullParameter(format, "format");
return HexExtensionsKt.toHexString(b, format);
}
@SinceKotlin(version = "2.2")
@ExperimentalUnsignedTypes
@InlineOnly
@WasExperimental(markerClass = {ExperimentalStdlibApi.class})
/* renamed from: toHexString-lZCiFrA, reason: not valid java name */
private static final String m1338toHexStringlZCiFrA(byte[] bArr, int i, int i2, HexFormat format) {
Intrinsics.checkNotNullParameter(bArr, "$v$c$kotlin-UByteArray$-$this$toHexString$0");
Intrinsics.checkNotNullParameter(format, "format");
return HexExtensionsKt.toHexString(bArr, i, i2, format);
}
/* renamed from: toHexString-lZCiFrA$default, reason: not valid java name */
public static /* synthetic */ String m1339toHexStringlZCiFrA$default(byte[] bArr, int i, int i2, HexFormat format, int i3, Object obj) {
if ((i3 & 1) != 0) {
i = 0;
}
if ((i3 & 2) != 0) {
i2 = UByteArray.m107getSizeimpl(bArr);
}
if ((i3 & 4) != 0) {
format = HexFormat.INSTANCE.getDefault();
}
Intrinsics.checkNotNullParameter(bArr, "$v$c$kotlin-UByteArray$-$this$toHexString$0");
Intrinsics.checkNotNullParameter(format, "format");
return HexExtensionsKt.toHexString(bArr, i, i2, format);
}
@SinceKotlin(version = "2.2")
@WasExperimental(markerClass = {ExperimentalStdlibApi.class})
@InlineOnly
/* renamed from: toHexString-r3ox_E0, reason: not valid java name */
private static final String m1340toHexStringr3ox_E0(short s, HexFormat format) {
Intrinsics.checkNotNullParameter(format, "format");
return HexExtensionsKt.toHexString(s, format);
}
/* renamed from: toHexString-r3ox_E0$default, reason: not valid java name */
public static /* synthetic */ String m1341toHexStringr3ox_E0$default(short s, HexFormat format, int i, Object obj) {
if ((i & 1) != 0) {
format = HexFormat.INSTANCE.getDefault();
}
Intrinsics.checkNotNullParameter(format, "format");
return HexExtensionsKt.toHexString(s, format);
}
@SinceKotlin(version = "2.2")
@ExperimentalUnsignedTypes
@InlineOnly
@WasExperimental(markerClass = {ExperimentalStdlibApi.class})
/* renamed from: toHexString-zHuV2wU, reason: not valid java name */
private static final String m1342toHexStringzHuV2wU(byte[] bArr, HexFormat format) {
Intrinsics.checkNotNullParameter(bArr, "$v$c$kotlin-UByteArray$-$this$toHexString$0");
Intrinsics.checkNotNullParameter(format, "format");
return HexExtensionsKt.toHexString(bArr, format);
}
/* renamed from: toHexString-zHuV2wU$default, reason: not valid java name */
public static /* synthetic */ String m1343toHexStringzHuV2wU$default(byte[] bArr, HexFormat format, int i, Object obj) {
if ((i & 1) != 0) {
format = HexFormat.INSTANCE.getDefault();
}
Intrinsics.checkNotNullParameter(bArr, "$v$c$kotlin-UByteArray$-$this$toHexString$0");
Intrinsics.checkNotNullParameter(format, "format");
return HexExtensionsKt.toHexString(bArr, format);
}
}