* 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>
113 lines
6.8 KiB
Java
113 lines
6.8 KiB
Java
package kotlin.uuid;
|
|
|
|
import android.support.v4.media.a;
|
|
import com.google.android.gms.ads.RequestConfiguration;
|
|
import kotlin.Metadata;
|
|
import kotlin.jvm.internal.ByteCompanionObject;
|
|
import kotlin.jvm.internal.Intrinsics;
|
|
import kotlin.jvm.internal.SourceDebugExtension;
|
|
import kotlin.text.HexExtensionsKt;
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
@Metadata(d1 = {"\u0000*\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0012\n\u0000\n\u0002\u0010\t\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0005\n\u0002\u0010\u000e\n\u0002\b\u000b\u001a\u0010\u0010\u0000\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u0003H\u0001\u001a\u0014\u0010\u0004\u001a\u00020\u0005*\u00020\u00032\u0006\u0010\u0006\u001a\u00020\u0007H\u0000\u001a,\u0010\b\u001a\u00020\t*\u00020\u00052\u0006\u0010\n\u001a\u00020\u00032\u0006\u0010\u000b\u001a\u00020\u00072\u0006\u0010\f\u001a\u00020\u00072\u0006\u0010\r\u001a\u00020\u0007H\u0001\u001a\u0014\u0010\u000e\u001a\u00020\t*\u00020\u000f2\u0006\u0010\u0006\u001a\u00020\u0007H\u0000\u001a\u001c\u0010\u0010\u001a\u00020\t*\u00020\u00032\u0006\u0010\u0006\u001a\u00020\u00072\u0006\u0010\u0011\u001a\u00020\u0005H\u0000\u001a\u0010\u0010\u0012\u001a\u00020\u00012\u0006\u0010\u0013\u001a\u00020\u000fH\u0001\u001a\u0010\u0010\u0014\u001a\u00020\u00012\u0006\u0010\u0015\u001a\u00020\u000fH\u0001\u001a\u0019\u0010\u0016\u001a\u00020\u000f*\u00020\u000f2\u0006\u0010\u0017\u001a\u00020\u0007H\u0002¢\u0006\u0002\b\u0018\u001a\u0019\u0010\u0016\u001a\u00020\u000f*\u00020\u00032\u0006\u0010\u0019\u001a\u00020\u0007H\u0002¢\u0006\u0002\b\u0018¨\u0006\u001a"}, d2 = {"uuidFromRandomBytes", "Lkotlin/uuid/Uuid;", "randomBytes", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "getLongAtCommonImpl", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "index", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "formatBytesIntoCommonImpl", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "dst", "dstOffset", "startIndex", "endIndex", "checkHyphenAt", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "setLongAtCommonImpl", "value", "uuidParseHexDashCommonImpl", "hexDashString", "uuidParseHexCommonImpl", "hexString", "truncateForErrorMessage", "maxLength", "truncateForErrorMessage$UuidKt__UuidKt", "maxSize", "kotlin-stdlib"}, k = 5, mv = {2, 2, 0}, xi = 49, xs = "kotlin/uuid/UuidKt")
|
|
@SourceDebugExtension({"SMAP\nUuid.kt\nKotlin\n*S Kotlin\n*F\n+ 1 Uuid.kt\nkotlin/uuid/UuidKt__UuidKt\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,648:1\n1#2:649\n*E\n"})
|
|
/* loaded from: classes4.dex */
|
|
public class UuidKt__UuidKt extends UuidKt__UuidJVMKt {
|
|
public static final void checkHyphenAt(@NotNull String str, int i) {
|
|
Intrinsics.checkNotNullParameter(str, "<this>");
|
|
if (str.charAt(i) == '-') {
|
|
return;
|
|
}
|
|
StringBuilder s = a.s(i, "Expected '-' (hyphen) at index ", ", but was '");
|
|
s.append(str.charAt(i));
|
|
s.append('\'');
|
|
throw new IllegalArgumentException(s.toString().toString());
|
|
}
|
|
|
|
@ExperimentalUuidApi
|
|
public static final void formatBytesIntoCommonImpl(long j, @NotNull byte[] dst, int i, int i2, int i3) {
|
|
Intrinsics.checkNotNullParameter(dst, "dst");
|
|
int i4 = 7 - i2;
|
|
int i5 = 8 - i3;
|
|
if (i5 > i4) {
|
|
return;
|
|
}
|
|
while (true) {
|
|
int i6 = HexExtensionsKt.getBYTE_TO_LOWER_CASE_HEX_DIGITS()[(int) ((j >> (i4 << 3)) & 255)];
|
|
int i7 = i + 1;
|
|
dst[i] = (byte) (i6 >> 8);
|
|
i += 2;
|
|
dst[i7] = (byte) i6;
|
|
if (i4 != i5) {
|
|
i4--;
|
|
} else {
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
|
|
public static final long getLongAtCommonImpl(@NotNull byte[] bArr, int i) {
|
|
Intrinsics.checkNotNullParameter(bArr, "<this>");
|
|
return (bArr[i + 7] & 255) | ((bArr[i] & 255) << 56) | ((bArr[i + 1] & 255) << 48) | ((bArr[i + 2] & 255) << 40) | ((bArr[i + 3] & 255) << 32) | ((bArr[i + 4] & 255) << 24) | ((bArr[i + 5] & 255) << 16) | ((bArr[i + 6] & 255) << 8);
|
|
}
|
|
|
|
public static final void setLongAtCommonImpl(@NotNull byte[] bArr, int i, long j) {
|
|
Intrinsics.checkNotNullParameter(bArr, "<this>");
|
|
int i2 = 7;
|
|
while (-1 < i2) {
|
|
bArr[i] = (byte) (j >> (i2 << 3));
|
|
i2--;
|
|
i++;
|
|
}
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public static final String truncateForErrorMessage$UuidKt__UuidKt(String str, int i) {
|
|
if (str.length() <= i) {
|
|
return str;
|
|
}
|
|
StringBuilder sb = new StringBuilder();
|
|
Intrinsics.checkNotNull(str, "null cannot be cast to non-null type java.lang.String");
|
|
String substring = str.substring(0, i);
|
|
Intrinsics.checkNotNullExpressionValue(substring, "substring(...)");
|
|
sb.append(substring);
|
|
sb.append("...");
|
|
return sb.toString();
|
|
}
|
|
|
|
@ExperimentalUuidApi
|
|
@NotNull
|
|
public static final Uuid uuidFromRandomBytes(@NotNull byte[] randomBytes) {
|
|
Intrinsics.checkNotNullParameter(randomBytes, "randomBytes");
|
|
byte b = (byte) (randomBytes[6] & 15);
|
|
randomBytes[6] = b;
|
|
randomBytes[6] = (byte) (b | 64);
|
|
byte b2 = (byte) (randomBytes[8] & 63);
|
|
randomBytes[8] = b2;
|
|
randomBytes[8] = (byte) (b2 | ByteCompanionObject.MIN_VALUE);
|
|
return Uuid.Companion.fromByteArray(randomBytes);
|
|
}
|
|
|
|
@ExperimentalUuidApi
|
|
@NotNull
|
|
public static final Uuid uuidParseHexCommonImpl(@NotNull String hexString) {
|
|
Intrinsics.checkNotNullParameter(hexString, "hexString");
|
|
return Uuid.Companion.fromLongs(HexExtensionsKt.hexToLong$default(hexString, 0, 16, null, 4, null), HexExtensionsKt.hexToLong$default(hexString, 16, 32, null, 4, null));
|
|
}
|
|
|
|
@ExperimentalUuidApi
|
|
@NotNull
|
|
public static final Uuid uuidParseHexDashCommonImpl(@NotNull String hexDashString) {
|
|
Intrinsics.checkNotNullParameter(hexDashString, "hexDashString");
|
|
long hexToLong$default = HexExtensionsKt.hexToLong$default(hexDashString, 0, 8, null, 4, null);
|
|
checkHyphenAt(hexDashString, 8);
|
|
long hexToLong$default2 = HexExtensionsKt.hexToLong$default(hexDashString, 9, 13, null, 4, null);
|
|
checkHyphenAt(hexDashString, 13);
|
|
long hexToLong$default3 = HexExtensionsKt.hexToLong$default(hexDashString, 14, 18, null, 4, null);
|
|
checkHyphenAt(hexDashString, 18);
|
|
long hexToLong$default4 = HexExtensionsKt.hexToLong$default(hexDashString, 19, 23, null, 4, null);
|
|
checkHyphenAt(hexDashString, 23);
|
|
return Uuid.Companion.fromLongs((hexToLong$default2 << 16) | (hexToLong$default << 32) | hexToLong$default3, (hexToLong$default4 << 48) | HexExtensionsKt.hexToLong$default(hexDashString, 24, 36, null, 4, null));
|
|
}
|
|
}
|