* 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>
230 lines
7.8 KiB
Java
230 lines
7.8 KiB
Java
package io.grpc;
|
|
|
|
import io.grpc.Context;
|
|
import java.util.Arrays;
|
|
|
|
/* loaded from: classes3.dex */
|
|
final class PersistentHashArrayMappedTrie {
|
|
|
|
/* loaded from: classes3.dex */
|
|
public static final class CollisionLeaf<K, V> implements Node<K, V> {
|
|
|
|
/* renamed from: a, reason: collision with root package name */
|
|
public final Object[] f21047a;
|
|
public final Object[] b;
|
|
|
|
public CollisionLeaf(Object[] objArr, Object[] objArr2) {
|
|
this.f21047a = objArr;
|
|
this.b = objArr2;
|
|
}
|
|
|
|
@Override // io.grpc.PersistentHashArrayMappedTrie.Node
|
|
public final Object a(Context.Key key, int i, int i2) {
|
|
int i3 = 0;
|
|
while (true) {
|
|
Object[] objArr = this.f21047a;
|
|
if (i3 < objArr.length) {
|
|
if (objArr[i3] == key) {
|
|
return this.b[i3];
|
|
}
|
|
i3++;
|
|
} else {
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
|
|
@Override // io.grpc.PersistentHashArrayMappedTrie.Node
|
|
public final Node b(int i, int i2, Object obj, Object obj2) {
|
|
Object[] objArr = this.f21047a;
|
|
int i3 = 0;
|
|
int hashCode = objArr[0].hashCode();
|
|
if (hashCode != i) {
|
|
return CompressedIndex.c(new Leaf(obj, obj2), i, this, hashCode, i2);
|
|
}
|
|
while (true) {
|
|
if (i3 < objArr.length) {
|
|
if (objArr[i3] == obj) {
|
|
break;
|
|
}
|
|
i3++;
|
|
} else {
|
|
i3 = -1;
|
|
break;
|
|
}
|
|
}
|
|
Object[] objArr2 = this.b;
|
|
if (i3 != -1) {
|
|
Object[] copyOf = Arrays.copyOf(objArr, objArr.length);
|
|
Object[] copyOf2 = Arrays.copyOf(objArr2, objArr.length);
|
|
copyOf[i3] = obj;
|
|
copyOf2[i3] = obj2;
|
|
return new CollisionLeaf(copyOf, copyOf2);
|
|
}
|
|
Object[] copyOf3 = Arrays.copyOf(objArr, objArr.length + 1);
|
|
Object[] copyOf4 = Arrays.copyOf(objArr2, objArr.length + 1);
|
|
copyOf3[objArr.length] = obj;
|
|
copyOf4[objArr.length] = obj2;
|
|
return new CollisionLeaf(copyOf3, copyOf4);
|
|
}
|
|
|
|
@Override // io.grpc.PersistentHashArrayMappedTrie.Node
|
|
public final int size() {
|
|
return this.b.length;
|
|
}
|
|
|
|
public final String toString() {
|
|
StringBuilder sb = new StringBuilder("CollisionLeaf(");
|
|
int i = 0;
|
|
while (true) {
|
|
Object[] objArr = this.b;
|
|
if (i < objArr.length) {
|
|
sb.append("(key=");
|
|
sb.append(this.f21047a[i]);
|
|
sb.append(" value=");
|
|
sb.append(objArr[i]);
|
|
sb.append(") ");
|
|
i++;
|
|
} else {
|
|
sb.append(")");
|
|
return sb.toString();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/* loaded from: classes3.dex */
|
|
public static final class CompressedIndex<K, V> implements Node<K, V> {
|
|
|
|
/* renamed from: a, reason: collision with root package name */
|
|
public final int f21048a;
|
|
public final Node[] b;
|
|
|
|
/* renamed from: c, reason: collision with root package name */
|
|
public final int f21049c;
|
|
|
|
public CompressedIndex(int i, Node[] nodeArr, int i2) {
|
|
this.f21048a = i;
|
|
this.b = nodeArr;
|
|
this.f21049c = i2;
|
|
}
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
public static CompressedIndex c(Leaf leaf, int i, Node node, int i2, int i3) {
|
|
int i4 = (i >>> i3) & 31;
|
|
int i5 = 1 << i4;
|
|
int i6 = (i2 >>> i3) & 31;
|
|
int i7 = 1 << i6;
|
|
Leaf leaf2 = node;
|
|
if (i5 == i7) {
|
|
CompressedIndex c2 = c(leaf, i, node, i2, i3 + 5);
|
|
return new CompressedIndex(i5, new Node[]{c2}, c2.f21049c);
|
|
}
|
|
if (i4 > i6) {
|
|
leaf2 = leaf;
|
|
leaf = node;
|
|
}
|
|
return new CompressedIndex(i5 | i7, new Node[]{leaf, leaf2}, leaf.size() + leaf2.size());
|
|
}
|
|
|
|
@Override // io.grpc.PersistentHashArrayMappedTrie.Node
|
|
public final Object a(Context.Key key, int i, int i2) {
|
|
int i3 = 1 << ((i >>> i2) & 31);
|
|
int i4 = this.f21048a;
|
|
if ((i4 & i3) == 0) {
|
|
return null;
|
|
}
|
|
return this.b[Integer.bitCount((i3 - 1) & i4)].a(key, i, i2 + 5);
|
|
}
|
|
|
|
@Override // io.grpc.PersistentHashArrayMappedTrie.Node
|
|
public final Node b(int i, int i2, Object obj, Object obj2) {
|
|
int i3 = 1 << ((i >>> i2) & 31);
|
|
int i4 = this.f21048a;
|
|
int bitCount = Integer.bitCount((i3 - 1) & i4);
|
|
int i5 = i4 & i3;
|
|
int i6 = this.f21049c;
|
|
Node[] nodeArr = this.b;
|
|
if (i5 == 0) {
|
|
int i7 = i4 | i3;
|
|
Node[] nodeArr2 = new Node[nodeArr.length + 1];
|
|
System.arraycopy(nodeArr, 0, nodeArr2, 0, bitCount);
|
|
nodeArr2[bitCount] = new Leaf(obj, obj2);
|
|
System.arraycopy(nodeArr, bitCount, nodeArr2, bitCount + 1, nodeArr.length - bitCount);
|
|
return new CompressedIndex(i7, nodeArr2, i6 + 1);
|
|
}
|
|
Node[] nodeArr3 = (Node[]) Arrays.copyOf(nodeArr, nodeArr.length);
|
|
Node b = nodeArr[bitCount].b(i, i2 + 5, obj, obj2);
|
|
nodeArr3[bitCount] = b;
|
|
return new CompressedIndex(i4, nodeArr3, (i6 + b.size()) - nodeArr[bitCount].size());
|
|
}
|
|
|
|
@Override // io.grpc.PersistentHashArrayMappedTrie.Node
|
|
public final int size() {
|
|
return this.f21049c;
|
|
}
|
|
|
|
public final String toString() {
|
|
StringBuilder sb = new StringBuilder("CompressedIndex(");
|
|
sb.append("bitmap=" + Integer.toBinaryString(this.f21048a) + " ");
|
|
for (Node node : this.b) {
|
|
sb.append(node);
|
|
sb.append(" ");
|
|
}
|
|
sb.append(")");
|
|
return sb.toString();
|
|
}
|
|
}
|
|
|
|
/* loaded from: classes3.dex */
|
|
public static final class Leaf<K, V> implements Node<K, V> {
|
|
|
|
/* renamed from: a, reason: collision with root package name */
|
|
public final Object f21050a;
|
|
public final Object b;
|
|
|
|
public Leaf(Object obj, Object obj2) {
|
|
this.f21050a = obj;
|
|
this.b = obj2;
|
|
}
|
|
|
|
@Override // io.grpc.PersistentHashArrayMappedTrie.Node
|
|
public final Object a(Context.Key key, int i, int i2) {
|
|
if (this.f21050a == key) {
|
|
return this.b;
|
|
}
|
|
return null;
|
|
}
|
|
|
|
@Override // io.grpc.PersistentHashArrayMappedTrie.Node
|
|
public final Node b(int i, int i2, Object obj, Object obj2) {
|
|
Object obj3 = this.f21050a;
|
|
int hashCode = obj3.hashCode();
|
|
if (hashCode != i) {
|
|
return CompressedIndex.c(new Leaf(obj, obj2), i, this, hashCode, i2);
|
|
}
|
|
if (obj3 == obj) {
|
|
return new Leaf(obj, obj2);
|
|
}
|
|
return new CollisionLeaf(new Object[]{obj3, obj}, new Object[]{this.b, obj2});
|
|
}
|
|
|
|
@Override // io.grpc.PersistentHashArrayMappedTrie.Node
|
|
public final int size() {
|
|
return 1;
|
|
}
|
|
|
|
public final String toString() {
|
|
return String.format("Leaf(key=%s value=%s)", this.f21050a, this.b);
|
|
}
|
|
}
|
|
|
|
/* loaded from: classes3.dex */
|
|
public interface Node<K, V> {
|
|
Object a(Context.Key key, int i, int i2);
|
|
|
|
Node b(int i, int i2, Object obj, Object obj2);
|
|
|
|
int size();
|
|
}
|
|
}
|