* 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>
151 lines
4.9 KiB
Java
151 lines
4.9 KiB
Java
package com.google.android.gms.common.images;
|
|
|
|
import android.net.Uri;
|
|
import android.os.Parcel;
|
|
import android.os.Parcelable;
|
|
import android.support.v4.media.a;
|
|
import androidx.annotation.NonNull;
|
|
import androidx.annotation.Nullable;
|
|
import com.google.android.gms.common.annotation.KeepForSdk;
|
|
import com.google.android.gms.common.internal.ImagesContract;
|
|
import com.google.android.gms.common.internal.Objects;
|
|
import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable;
|
|
import com.google.android.gms.common.internal.safeparcel.SafeParcelWriter;
|
|
import com.google.android.gms.common.internal.safeparcel.SafeParcelable;
|
|
import java.util.Locale;
|
|
import org.json.JSONException;
|
|
import org.json.JSONObject;
|
|
|
|
@SafeParcelable.Class(creator = "WebImageCreator")
|
|
/* loaded from: classes.dex */
|
|
public final class WebImage extends AbstractSafeParcelable {
|
|
|
|
@NonNull
|
|
public static final Parcelable.Creator<WebImage> CREATOR = new zah();
|
|
|
|
@SafeParcelable.VersionField(id = 1)
|
|
final int zaa;
|
|
|
|
@SafeParcelable.Field(getter = "getUrl", id = 2)
|
|
private final Uri zab;
|
|
|
|
@SafeParcelable.Field(getter = "getWidth", id = 3)
|
|
private final int zac;
|
|
|
|
@SafeParcelable.Field(getter = "getHeight", id = 4)
|
|
private final int zad;
|
|
|
|
@SafeParcelable.Constructor
|
|
public WebImage(@SafeParcelable.Param(id = 1) int i, @SafeParcelable.Param(id = 2) Uri uri, @SafeParcelable.Param(id = 3) int i2, @SafeParcelable.Param(id = 4) int i3) {
|
|
this.zaa = i;
|
|
this.zab = uri;
|
|
this.zac = i2;
|
|
this.zad = i3;
|
|
}
|
|
|
|
public boolean equals(@Nullable Object obj) {
|
|
if (this == obj) {
|
|
return true;
|
|
}
|
|
if (obj != null && (obj instanceof WebImage)) {
|
|
WebImage webImage = (WebImage) obj;
|
|
if (Objects.equal(this.zab, webImage.zab) && this.zac == webImage.zac && this.zad == webImage.zad) {
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
public int getHeight() {
|
|
return this.zad;
|
|
}
|
|
|
|
@NonNull
|
|
public Uri getUrl() {
|
|
return this.zab;
|
|
}
|
|
|
|
public int getWidth() {
|
|
return this.zac;
|
|
}
|
|
|
|
public int hashCode() {
|
|
return Objects.hashCode(this.zab, Integer.valueOf(this.zac), Integer.valueOf(this.zad));
|
|
}
|
|
|
|
@NonNull
|
|
@KeepForSdk
|
|
public JSONObject toJson() {
|
|
JSONObject jSONObject = new JSONObject();
|
|
try {
|
|
jSONObject.put(ImagesContract.URL, this.zab.toString());
|
|
jSONObject.put("width", this.zac);
|
|
jSONObject.put("height", this.zad);
|
|
} catch (JSONException unused) {
|
|
}
|
|
return jSONObject;
|
|
}
|
|
|
|
@NonNull
|
|
public String toString() {
|
|
Locale locale = Locale.US;
|
|
int i = this.zac;
|
|
int i2 = this.zad;
|
|
String uri = this.zab.toString();
|
|
StringBuilder u = a.u("Image ", i, i2, "x", " ");
|
|
u.append(uri);
|
|
return u.toString();
|
|
}
|
|
|
|
@Override // android.os.Parcelable
|
|
public void writeToParcel(@NonNull Parcel parcel, int i) {
|
|
int i2 = this.zaa;
|
|
int beginObjectHeader = SafeParcelWriter.beginObjectHeader(parcel);
|
|
SafeParcelWriter.writeInt(parcel, 1, i2);
|
|
SafeParcelWriter.writeParcelable(parcel, 2, getUrl(), i, false);
|
|
SafeParcelWriter.writeInt(parcel, 3, getWidth());
|
|
SafeParcelWriter.writeInt(parcel, 4, getHeight());
|
|
SafeParcelWriter.finishObjectHeader(parcel, beginObjectHeader);
|
|
}
|
|
|
|
public WebImage(@NonNull Uri uri) {
|
|
this(uri, 0, 0);
|
|
}
|
|
|
|
public WebImage(@NonNull Uri uri, int i, int i2) {
|
|
this(1, uri, i, i2);
|
|
if (uri == null) {
|
|
throw new IllegalArgumentException("url cannot be null");
|
|
}
|
|
if (i < 0 || i2 < 0) {
|
|
throw new IllegalArgumentException("width and height must not be negative");
|
|
}
|
|
}
|
|
|
|
/* JADX WARN: Illegal instructions before constructor call */
|
|
@com.google.android.gms.common.annotation.KeepForSdk
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
public WebImage(@androidx.annotation.NonNull org.json.JSONObject r5) {
|
|
/*
|
|
r4 = this;
|
|
android.net.Uri r0 = android.net.Uri.EMPTY
|
|
java.lang.String r1 = "url"
|
|
boolean r2 = r5.has(r1)
|
|
if (r2 == 0) goto L12
|
|
java.lang.String r1 = r5.getString(r1) // Catch: org.json.JSONException -> L12
|
|
android.net.Uri r0 = android.net.Uri.parse(r1) // Catch: org.json.JSONException -> L12
|
|
L12:
|
|
java.lang.String r1 = "width"
|
|
r2 = 0
|
|
int r1 = r5.optInt(r1, r2)
|
|
java.lang.String r3 = "height"
|
|
int r5 = r5.optInt(r3, r2)
|
|
r4.<init>(r0, r1, r5)
|
|
return
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.common.images.WebImage.<init>(org.json.JSONObject):void");
|
|
}
|
|
}
|