Exploit databaseDownload repository ZIP
GH-14fb583d3d1bd2da10251bb1a37b93d6
gitchw/ghostlock-cve-2026-43499
Sources for CVE-2026-43499
170 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files5
gitchw/ghostlock-cve-2026-43499Revision 96acd93156f6
- ↑..Parent directory
- CustomVersionedParcelable.java
- ParcelImpl.java
- VersionedParcel.java
- VersionedParcelParcel.java
- VersionedParcelable.java
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
workspace/decomp/HeyOTA/sources/androidx/versionedparcelable/VersionedParcel.java
Java · 7,788 bytespackage androidx.versionedparcelable;
import android.os.Parcelable;
import androidx.collection.SimpleArrayMap;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
/* loaded from: classes.dex */
public abstract class VersionedParcel {
final SimpleArrayMap<String, Class<?>> mParcelizerCache;
final SimpleArrayMap<String, Method> mReadCache;
final SimpleArrayMap<String, Method> mWriteCache;
protected abstract void closeField();
protected abstract VersionedParcel createSubParcel();
public boolean isStream() {
return false;
}
protected abstract boolean readBoolean();
protected abstract byte[] readByteArray();
protected abstract CharSequence readCharSequence();
protected abstract boolean readField(int i);
protected abstract int readInt();
protected abstract <T extends Parcelable> T readParcelable();
protected abstract String readString();
protected abstract void setOutputField(int i);
public void setSerializationFlags(boolean z, boolean z2) {
}
protected abstract void writeBoolean(boolean z);
protected abstract void writeByteArray(byte[] bArr);
protected abstract void writeCharSequence(CharSequence charSequence);
protected abstract void writeInt(int i);
protected abstract void writeParcelable(Parcelable parcelable);
protected abstract void writeString(String str);
/* JADX INFO: Access modifiers changed from: package-private */
public VersionedParcel(SimpleArrayMap<String, Method> simpleArrayMap, SimpleArrayMap<String, Method> simpleArrayMap2, SimpleArrayMap<String, Class<?>> simpleArrayMap3) {
this.mReadCache = simpleArrayMap;
this.mWriteCache = simpleArrayMap2;
this.mParcelizerCache = simpleArrayMap3;
}
public void writeBoolean(boolean z, int i) {
setOutputField(i);
writeBoolean(z);
}
public void writeByteArray(byte[] bArr, int i) {
setOutputField(i);
writeByteArray(bArr);
}
public void writeCharSequence(CharSequence charSequence, int i) {
setOutputField(i);
writeCharSequence(charSequence);
}
public void writeInt(int i, int i2) {
setOutputField(i2);
writeInt(i);
}
public void writeString(String str, int i) {
setOutputField(i);
writeString(str);
}
public void writeParcelable(Parcelable parcelable, int i) {
setOutputField(i);
writeParcelable(parcelable);
}
public boolean readBoolean(boolean z, int i) {
return !readField(i) ? z : readBoolean();
}
public int readInt(int i, int i2) {
return !readField(i2) ? i : readInt();
}
public String readString(String str, int i) {
return !readField(i) ? str : readString();
}
public byte[] readByteArray(byte[] bArr, int i) {
return !readField(i) ? bArr : readByteArray();
}
public <T extends Parcelable> T readParcelable(T t, int i) {
return !readField(i) ? t : (T) readParcelable();
}
public CharSequence readCharSequence(CharSequence charSequence, int i) {
return !readField(i) ? charSequence : readCharSequence();
}
public void writeVersionedParcelable(VersionedParcelable versionedParcelable, int i) {
setOutputField(i);
writeVersionedParcelable(versionedParcelable);
}
/* JADX INFO: Access modifiers changed from: protected */
public void writeVersionedParcelable(VersionedParcelable versionedParcelable) {
if (versionedParcelable == null) {
writeString(null);
return;
}
writeVersionedParcelableCreator(versionedParcelable);
VersionedParcel createSubParcel = createSubParcel();
writeToParcel(versionedParcelable, createSubParcel);
createSubParcel.closeField();
}
private void writeVersionedParcelableCreator(VersionedParcelable versionedParcelable) {
try {
writeString(findParcelClass(versionedParcelable.getClass()).getName());
} catch (ClassNotFoundException e) {
throw new RuntimeException(versionedParcelable.getClass().getSimpleName() + " does not have a Parcelizer", e);
}
}
public <T extends VersionedParcelable> T readVersionedParcelable(T t, int i) {
return !readField(i) ? t : (T) readVersionedParcelable();
}
/* JADX INFO: Access modifiers changed from: protected */
public <T extends VersionedParcelable> T readVersionedParcelable() {
String readString = readString();
if (readString == null) {
return null;
}
return (T) readFromParcel(readString, createSubParcel());
}
protected <T extends VersionedParcelable> T readFromParcel(String str, VersionedParcel versionedParcel) {
try {
return (T) getReadMethod(str).invoke(null, versionedParcel);
} catch (ClassNotFoundException e) {
throw new RuntimeException(e);
} catch (IllegalAccessException e2) {
throw new RuntimeException(e2);
} catch (NoSuchMethodException e3) {
throw new RuntimeException(e3);
} catch (InvocationTargetException e4) {
Throwable cause = e4.getCause();
if (cause instanceof RuntimeException) {
throw ((RuntimeException) cause);
}
if (cause instanceof Error) {
throw ((Error) cause);
}
throw new RuntimeException(e4);
}
}
protected <T extends VersionedParcelable> void writeToParcel(T t, VersionedParcel versionedParcel) {
try {
getWriteMethod(t.getClass()).invoke(null, t, versionedParcel);
} catch (ClassNotFoundException e) {
throw new RuntimeException(e);
} catch (IllegalAccessException e2) {
throw new RuntimeException(e2);
} catch (NoSuchMethodException e3) {
throw new RuntimeException(e3);
} catch (InvocationTargetException e4) {
Throwable cause = e4.getCause();
if (cause instanceof RuntimeException) {
throw ((RuntimeException) cause);
}
if (cause instanceof Error) {
throw ((Error) cause);
}
throw new RuntimeException(e4);
}
}
private Method getReadMethod(String str) throws IllegalAccessException, NoSuchMethodException, ClassNotFoundException {
Method method = this.mReadCache.get(str);
if (method != null) {
return method;
}
Method declaredMethod = Class.forName(str, true, VersionedParcel.class.getClassLoader()).getDeclaredMethod("read", VersionedParcel.class);
this.mReadCache.put(str, declaredMethod);
return declaredMethod;
}
private Method getWriteMethod(Class<?> cls) throws IllegalAccessException, NoSuchMethodException, ClassNotFoundException {
Method method = this.mWriteCache.get(cls.getName());
if (method != null) {
return method;
}
Method declaredMethod = findParcelClass(cls).getDeclaredMethod("write", cls, VersionedParcel.class);
this.mWriteCache.put(cls.getName(), declaredMethod);
return declaredMethod;
}
private Class<?> findParcelClass(Class<?> cls) throws ClassNotFoundException {
Class<?> cls2 = this.mParcelizerCache.get(cls.getName());
if (cls2 != null) {
return cls2;
}
Class<?> cls3 = Class.forName(String.format("%s.%sParcelizer", cls.getPackage().getName(), cls.getSimpleName()), false, cls.getClassLoader());
this.mParcelizerCache.put(cls.getName(), cls3);
return cls3;
}
}