* 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>
174 lines
6.5 KiB
Java
174 lines
6.5 KiB
Java
package com.google.android.gms.internal.ads;
|
|
|
|
import android.graphics.SurfaceTexture;
|
|
import android.opengl.EGL14;
|
|
import android.opengl.EGLConfig;
|
|
import android.opengl.EGLContext;
|
|
import android.opengl.EGLDisplay;
|
|
import android.opengl.EGLSurface;
|
|
import android.opengl.GLES20;
|
|
import android.os.Handler;
|
|
import java.util.Locale;
|
|
|
|
/* loaded from: classes.dex */
|
|
public final class zzdt implements SurfaceTexture.OnFrameAvailableListener, Runnable {
|
|
public static final int[] k = {12352, 4, 12324, 8, 12323, 8, 12322, 8, 12321, 8, 12325, 0, 12327, 12344, 12339, 4, 12344};
|
|
|
|
/* renamed from: c, reason: collision with root package name */
|
|
public final Handler f6121c;
|
|
public final int[] f = new int[1];
|
|
public EGLDisplay g;
|
|
public EGLContext h;
|
|
public EGLSurface i;
|
|
public SurfaceTexture j;
|
|
|
|
public zzdt(Handler handler) {
|
|
this.f6121c = handler;
|
|
}
|
|
|
|
public final void a(int i) {
|
|
boolean z;
|
|
boolean z2;
|
|
int[] iArr;
|
|
boolean z3;
|
|
int[] iArr2;
|
|
EGLSurface eglCreatePbufferSurface;
|
|
boolean z4;
|
|
EGLDisplay eglGetDisplay = EGL14.eglGetDisplay(0);
|
|
if (eglGetDisplay != null) {
|
|
z = true;
|
|
} else {
|
|
z = false;
|
|
}
|
|
zzdv.c("eglGetDisplay failed", z);
|
|
int[] iArr3 = new int[2];
|
|
zzdv.c("eglInitialize failed", EGL14.eglInitialize(eglGetDisplay, iArr3, 0, iArr3, 1));
|
|
this.g = eglGetDisplay;
|
|
EGLConfig[] eGLConfigArr = new EGLConfig[1];
|
|
int[] iArr4 = new int[1];
|
|
boolean eglChooseConfig = EGL14.eglChooseConfig(eglGetDisplay, k, 0, eGLConfigArr, 0, 1, iArr4, 0);
|
|
if (eglChooseConfig && iArr4[0] > 0 && eGLConfigArr[0] != null) {
|
|
z2 = true;
|
|
} else {
|
|
z2 = false;
|
|
}
|
|
Object[] objArr = {Boolean.valueOf(eglChooseConfig), Integer.valueOf(iArr4[0]), eGLConfigArr[0]};
|
|
String str = zzfj.f7405a;
|
|
zzdv.c(String.format(Locale.US, "eglChooseConfig failed: success=%b, numConfigs[0]=%d, configs[0]=%s", objArr), z2);
|
|
EGLConfig eGLConfig = eGLConfigArr[0];
|
|
EGLDisplay eGLDisplay = this.g;
|
|
if (i == 0) {
|
|
iArr = new int[]{12440, 2, 12344};
|
|
} else {
|
|
iArr = new int[]{12440, 2, 12992, 1, 12344};
|
|
}
|
|
EGLContext eglCreateContext = EGL14.eglCreateContext(eGLDisplay, eGLConfig, EGL14.EGL_NO_CONTEXT, iArr, 0);
|
|
if (eglCreateContext != null) {
|
|
z3 = true;
|
|
} else {
|
|
z3 = false;
|
|
}
|
|
zzdv.c("eglCreateContext failed", z3);
|
|
this.h = eglCreateContext;
|
|
EGLDisplay eGLDisplay2 = this.g;
|
|
if (i == 1) {
|
|
eglCreatePbufferSurface = EGL14.EGL_NO_SURFACE;
|
|
} else {
|
|
if (i == 2) {
|
|
iArr2 = new int[]{12375, 1, 12374, 1, 12992, 1, 12344};
|
|
} else {
|
|
iArr2 = new int[]{12375, 1, 12374, 1, 12344};
|
|
}
|
|
eglCreatePbufferSurface = EGL14.eglCreatePbufferSurface(eGLDisplay2, eGLConfig, iArr2, 0);
|
|
if (eglCreatePbufferSurface != null) {
|
|
z4 = true;
|
|
} else {
|
|
z4 = false;
|
|
}
|
|
zzdv.c("eglCreatePbufferSurface failed", z4);
|
|
}
|
|
zzdv.c("eglMakeCurrent failed", EGL14.eglMakeCurrent(eGLDisplay2, eglCreatePbufferSurface, eglCreatePbufferSurface, eglCreateContext));
|
|
this.i = eglCreatePbufferSurface;
|
|
int[] iArr5 = this.f;
|
|
GLES20.glGenTextures(1, iArr5, 0);
|
|
zzdv.b();
|
|
SurfaceTexture surfaceTexture = new SurfaceTexture(iArr5[0]);
|
|
this.j = surfaceTexture;
|
|
surfaceTexture.setOnFrameAvailableListener(this);
|
|
}
|
|
|
|
public final void b() {
|
|
this.f6121c.removeCallbacks(this);
|
|
try {
|
|
SurfaceTexture surfaceTexture = this.j;
|
|
if (surfaceTexture != null) {
|
|
surfaceTexture.release();
|
|
GLES20.glDeleteTextures(1, this.f, 0);
|
|
}
|
|
EGLDisplay eGLDisplay = this.g;
|
|
if (eGLDisplay != null && !eGLDisplay.equals(EGL14.EGL_NO_DISPLAY)) {
|
|
EGLDisplay eGLDisplay2 = this.g;
|
|
EGLSurface eGLSurface = EGL14.EGL_NO_SURFACE;
|
|
EGL14.eglMakeCurrent(eGLDisplay2, eGLSurface, eGLSurface, EGL14.EGL_NO_CONTEXT);
|
|
}
|
|
EGLSurface eGLSurface2 = this.i;
|
|
if (eGLSurface2 != null && !eGLSurface2.equals(EGL14.EGL_NO_SURFACE)) {
|
|
EGL14.eglDestroySurface(this.g, this.i);
|
|
}
|
|
EGLContext eGLContext = this.h;
|
|
if (eGLContext != null) {
|
|
EGL14.eglDestroyContext(this.g, eGLContext);
|
|
}
|
|
EGL14.eglReleaseThread();
|
|
EGLDisplay eGLDisplay3 = this.g;
|
|
if (eGLDisplay3 != null && !eGLDisplay3.equals(EGL14.EGL_NO_DISPLAY)) {
|
|
EGL14.eglTerminate(this.g);
|
|
}
|
|
this.g = null;
|
|
this.h = null;
|
|
this.i = null;
|
|
this.j = null;
|
|
} catch (Throwable th) {
|
|
EGLDisplay eGLDisplay4 = this.g;
|
|
if (eGLDisplay4 != null && !eGLDisplay4.equals(EGL14.EGL_NO_DISPLAY)) {
|
|
EGLDisplay eGLDisplay5 = this.g;
|
|
EGLSurface eGLSurface3 = EGL14.EGL_NO_SURFACE;
|
|
EGL14.eglMakeCurrent(eGLDisplay5, eGLSurface3, eGLSurface3, EGL14.EGL_NO_CONTEXT);
|
|
}
|
|
EGLSurface eGLSurface4 = this.i;
|
|
if (eGLSurface4 != null && !eGLSurface4.equals(EGL14.EGL_NO_SURFACE)) {
|
|
EGL14.eglDestroySurface(this.g, this.i);
|
|
}
|
|
EGLContext eGLContext2 = this.h;
|
|
if (eGLContext2 != null) {
|
|
EGL14.eglDestroyContext(this.g, eGLContext2);
|
|
}
|
|
EGL14.eglReleaseThread();
|
|
EGLDisplay eGLDisplay6 = this.g;
|
|
if (eGLDisplay6 != null && !eGLDisplay6.equals(EGL14.EGL_NO_DISPLAY)) {
|
|
EGL14.eglTerminate(this.g);
|
|
}
|
|
this.g = null;
|
|
this.h = null;
|
|
this.i = null;
|
|
this.j = null;
|
|
throw th;
|
|
}
|
|
}
|
|
|
|
@Override // android.graphics.SurfaceTexture.OnFrameAvailableListener
|
|
public final void onFrameAvailable(SurfaceTexture surfaceTexture) {
|
|
this.f6121c.post(this);
|
|
}
|
|
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
SurfaceTexture surfaceTexture = this.j;
|
|
if (surfaceTexture != null) {
|
|
try {
|
|
surfaceTexture.updateTexImage();
|
|
} catch (RuntimeException unused) {
|
|
}
|
|
}
|
|
}
|
|
}
|