Primer paso de la investigacion. Se aportan el .apk, las carpetas con el apk extraido y el apk descompilado. El archivo API_DOCUMENTATION.md es un archivo donde se anotaran los descubrimientos del funcionamiento de la API, y los .py son scripts para probar la funcionalidad de la API con los métodos que vayamos encontrando. Finalmente, los archivos .js son scripts de Frida para extraer informacion de la APP durante la ejecucion.
This commit is contained in:
67
apk_decompiled/sources/d2/C0310a.java
Normal file
67
apk_decompiled/sources/d2/C0310a.java
Normal file
@@ -0,0 +1,67 @@
|
||||
package d2;
|
||||
|
||||
import com.adif.elcanomovil.domain.usecases.logos.ManageLogosUseCaseKt;
|
||||
|
||||
/* renamed from: d2.a, reason: case insensitive filesystem */
|
||||
/* loaded from: classes3.dex */
|
||||
public final class C0310a {
|
||||
|
||||
/* renamed from: f, reason: collision with root package name */
|
||||
public static final C0310a f6171f = new C0310a(10485760, ManageLogosUseCaseKt.OPERATOR_LOGO_CACHE_TIMEOUT, 200, 10000, 81920);
|
||||
|
||||
/* renamed from: a, reason: collision with root package name */
|
||||
public final long f6172a;
|
||||
|
||||
/* renamed from: b, reason: collision with root package name */
|
||||
public final int f6173b;
|
||||
|
||||
/* renamed from: c, reason: collision with root package name */
|
||||
public final int f6174c;
|
||||
|
||||
/* renamed from: d, reason: collision with root package name */
|
||||
public final long f6175d;
|
||||
|
||||
/* renamed from: e, reason: collision with root package name */
|
||||
public final int f6176e;
|
||||
|
||||
public C0310a(long j4, long j5, int i, int i4, int i5) {
|
||||
this.f6172a = j4;
|
||||
this.f6173b = i;
|
||||
this.f6174c = i4;
|
||||
this.f6175d = j5;
|
||||
this.f6176e = i5;
|
||||
}
|
||||
|
||||
public final boolean equals(Object obj) {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (obj instanceof C0310a) {
|
||||
C0310a c0310a = (C0310a) obj;
|
||||
if (this.f6172a == c0310a.f6172a && this.f6173b == c0310a.f6173b && this.f6174c == c0310a.f6174c && this.f6175d == c0310a.f6175d && this.f6176e == c0310a.f6176e) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public final int hashCode() {
|
||||
long j4 = this.f6172a;
|
||||
int i = (((((((int) (j4 ^ (j4 >>> 32))) ^ 1000003) * 1000003) ^ this.f6173b) * 1000003) ^ this.f6174c) * 1000003;
|
||||
long j5 = this.f6175d;
|
||||
return this.f6176e ^ ((i ^ ((int) ((j5 >>> 32) ^ j5))) * 1000003);
|
||||
}
|
||||
|
||||
public final String toString() {
|
||||
StringBuilder sb = new StringBuilder("EventStoreConfig{maxStorageSizeInBytes=");
|
||||
sb.append(this.f6172a);
|
||||
sb.append(", loadBatchSize=");
|
||||
sb.append(this.f6173b);
|
||||
sb.append(", criticalSectionEnterTimeoutMs=");
|
||||
sb.append(this.f6174c);
|
||||
sb.append(", eventCleanUpAge=");
|
||||
sb.append(this.f6175d);
|
||||
sb.append(", maxBlobByteSizePerRow=");
|
||||
return com.google.android.gms.measurement.internal.a.m(sb, this.f6176e, "}");
|
||||
}
|
||||
}
|
||||
42
apk_decompiled/sources/d2/b.java
Normal file
42
apk_decompiled/sources/d2/b.java
Normal file
@@ -0,0 +1,42 @@
|
||||
package d2;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class b {
|
||||
|
||||
/* renamed from: a, reason: collision with root package name */
|
||||
public final long f6177a;
|
||||
|
||||
/* renamed from: b, reason: collision with root package name */
|
||||
public final W1.j f6178b;
|
||||
|
||||
/* renamed from: c, reason: collision with root package name */
|
||||
public final W1.i f6179c;
|
||||
|
||||
public b(long j4, W1.j jVar, W1.i iVar) {
|
||||
this.f6177a = j4;
|
||||
this.f6178b = jVar;
|
||||
this.f6179c = iVar;
|
||||
}
|
||||
|
||||
public final boolean equals(Object obj) {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (obj instanceof b) {
|
||||
b bVar = (b) obj;
|
||||
if (this.f6177a == bVar.f6177a && this.f6178b.equals(bVar.f6178b) && this.f6179c.equals(bVar.f6179c)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public final int hashCode() {
|
||||
long j4 = this.f6177a;
|
||||
return this.f6179c.hashCode() ^ ((((((int) ((j4 >>> 32) ^ j4)) ^ 1000003) * 1000003) ^ this.f6178b.hashCode()) * 1000003);
|
||||
}
|
||||
|
||||
public final String toString() {
|
||||
return "PersistedEvent{id=" + this.f6177a + ", transportContext=" + this.f6178b + ", event=" + this.f6179c + "}";
|
||||
}
|
||||
}
|
||||
5
apk_decompiled/sources/d2/c.java
Normal file
5
apk_decompiled/sources/d2/c.java
Normal file
@@ -0,0 +1,5 @@
|
||||
package d2;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface c {
|
||||
}
|
||||
7
apk_decompiled/sources/d2/d.java
Normal file
7
apk_decompiled/sources/d2/d.java
Normal file
@@ -0,0 +1,7 @@
|
||||
package d2;
|
||||
|
||||
import java.io.Closeable;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface d extends Closeable {
|
||||
}
|
||||
36
apk_decompiled/sources/d2/e.java
Normal file
36
apk_decompiled/sources/d2/e.java
Normal file
@@ -0,0 +1,36 @@
|
||||
package d2;
|
||||
|
||||
import android.content.ContentValues;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import g2.AbstractC0377a;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final /* synthetic */ class e implements f {
|
||||
|
||||
/* renamed from: a, reason: collision with root package name */
|
||||
public final /* synthetic */ long f6180a;
|
||||
|
||||
/* renamed from: b, reason: collision with root package name */
|
||||
public final /* synthetic */ W1.j f6181b;
|
||||
|
||||
public /* synthetic */ e(long j4, W1.j jVar) {
|
||||
this.f6180a = j4;
|
||||
this.f6181b = jVar;
|
||||
}
|
||||
|
||||
@Override // d2.f
|
||||
public final Object apply(Object obj) {
|
||||
SQLiteDatabase sQLiteDatabase = (SQLiteDatabase) obj;
|
||||
ContentValues contentValues = new ContentValues();
|
||||
contentValues.put("next_request_ms", Long.valueOf(this.f6180a));
|
||||
W1.j jVar = this.f6181b;
|
||||
String str = jVar.f1933a;
|
||||
T1.d dVar = jVar.f1935c;
|
||||
if (sQLiteDatabase.update("transport_contexts", contentValues, "backend_name = ? and priority = ?", new String[]{str, String.valueOf(AbstractC0377a.a(dVar))}) < 1) {
|
||||
contentValues.put("backend_name", jVar.f1933a);
|
||||
contentValues.put("priority", Integer.valueOf(AbstractC0377a.a(dVar)));
|
||||
sQLiteDatabase.insert("transport_contexts", null, contentValues);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
6
apk_decompiled/sources/d2/f.java
Normal file
6
apk_decompiled/sources/d2/f.java
Normal file
@@ -0,0 +1,6 @@
|
||||
package d2;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface f {
|
||||
Object apply(Object obj);
|
||||
}
|
||||
16
apk_decompiled/sources/d2/g.java
Normal file
16
apk_decompiled/sources/d2/g.java
Normal file
@@ -0,0 +1,16 @@
|
||||
package d2;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class g {
|
||||
|
||||
/* renamed from: a, reason: collision with root package name */
|
||||
public final String f6182a;
|
||||
|
||||
/* renamed from: b, reason: collision with root package name */
|
||||
public final String f6183b;
|
||||
|
||||
public g(String str, String str2) {
|
||||
this.f6182a = str;
|
||||
this.f6183b = str2;
|
||||
}
|
||||
}
|
||||
157
apk_decompiled/sources/d2/h.java
Normal file
157
apk_decompiled/sources/d2/h.java
Normal file
@@ -0,0 +1,157 @@
|
||||
package d2;
|
||||
|
||||
import B0.C0031i;
|
||||
import android.database.Cursor;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.database.sqlite.SQLiteDatabaseLockedException;
|
||||
import android.os.SystemClock;
|
||||
import android.util.Base64;
|
||||
import e2.InterfaceC0313b;
|
||||
import e2.InterfaceC0314c;
|
||||
import f0.C0338b;
|
||||
import g2.AbstractC0377a;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Iterator;
|
||||
import java.util.Objects;
|
||||
import javax.inject.Provider;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class h implements d, InterfaceC0314c, c {
|
||||
|
||||
/* renamed from: f, reason: collision with root package name */
|
||||
public static final T1.c f6184f = new T1.c("proto");
|
||||
|
||||
/* renamed from: a, reason: collision with root package name */
|
||||
public final j f6185a;
|
||||
|
||||
/* renamed from: b, reason: collision with root package name */
|
||||
public final C0338b f6186b;
|
||||
|
||||
/* renamed from: c, reason: collision with root package name */
|
||||
public final C0338b f6187c;
|
||||
|
||||
/* renamed from: d, reason: collision with root package name */
|
||||
public final C0310a f6188d;
|
||||
|
||||
/* renamed from: e, reason: collision with root package name */
|
||||
public final Provider f6189e;
|
||||
|
||||
public h(C0338b c0338b, C0338b c0338b2, C0310a c0310a, j jVar, Provider provider) {
|
||||
this.f6185a = jVar;
|
||||
this.f6186b = c0338b;
|
||||
this.f6187c = c0338b2;
|
||||
this.f6188d = c0310a;
|
||||
this.f6189e = provider;
|
||||
}
|
||||
|
||||
public static String Z(Iterable iterable) {
|
||||
StringBuilder sb = new StringBuilder("(");
|
||||
Iterator it = iterable.iterator();
|
||||
while (it.hasNext()) {
|
||||
sb.append(((b) it.next()).f6177a);
|
||||
if (it.hasNext()) {
|
||||
sb.append(',');
|
||||
}
|
||||
}
|
||||
sb.append(')');
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public static Object a0(Cursor cursor, f fVar) {
|
||||
try {
|
||||
return fVar.apply(cursor);
|
||||
} finally {
|
||||
cursor.close();
|
||||
}
|
||||
}
|
||||
|
||||
public static Long e(SQLiteDatabase sQLiteDatabase, W1.j jVar) {
|
||||
StringBuilder sb = new StringBuilder("backend_name = ? and priority = ?");
|
||||
ArrayList arrayList = new ArrayList(Arrays.asList(jVar.f1933a, String.valueOf(AbstractC0377a.a(jVar.f1935c))));
|
||||
byte[] bArr = jVar.f1934b;
|
||||
if (bArr != null) {
|
||||
sb.append(" and extras = ?");
|
||||
arrayList.add(Base64.encodeToString(bArr, 0));
|
||||
} else {
|
||||
sb.append(" and extras is null");
|
||||
}
|
||||
Cursor query = sQLiteDatabase.query("transport_contexts", new String[]{"_id"}, sb.toString(), (String[]) arrayList.toArray(new String[0]), null, null, null);
|
||||
try {
|
||||
return !query.moveToNext() ? null : Long.valueOf(query.getLong(0));
|
||||
} finally {
|
||||
query.close();
|
||||
}
|
||||
}
|
||||
|
||||
public final void O(long j4, Z1.c cVar, String str) {
|
||||
s(new c2.j(str, j4, cVar));
|
||||
}
|
||||
|
||||
public final Object Y(InterfaceC0313b interfaceC0313b) {
|
||||
SQLiteDatabase d4 = d();
|
||||
C0338b c0338b = this.f6187c;
|
||||
long q4 = c0338b.q();
|
||||
while (true) {
|
||||
try {
|
||||
d4.beginTransaction();
|
||||
try {
|
||||
Object execute = interfaceC0313b.execute();
|
||||
d4.setTransactionSuccessful();
|
||||
return execute;
|
||||
} finally {
|
||||
d4.endTransaction();
|
||||
}
|
||||
} catch (SQLiteDatabaseLockedException e4) {
|
||||
if (c0338b.q() >= this.f6188d.f6174c + q4) {
|
||||
throw new RuntimeException("Timed out while trying to acquire the lock.", e4);
|
||||
}
|
||||
SystemClock.sleep(50L);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override // java.io.Closeable, java.lang.AutoCloseable
|
||||
public final void close() {
|
||||
this.f6185a.close();
|
||||
}
|
||||
|
||||
public final SQLiteDatabase d() {
|
||||
j jVar = this.f6185a;
|
||||
Objects.requireNonNull(jVar);
|
||||
C0338b c0338b = this.f6187c;
|
||||
long q4 = c0338b.q();
|
||||
while (true) {
|
||||
try {
|
||||
return jVar.getWritableDatabase();
|
||||
} catch (SQLiteDatabaseLockedException e4) {
|
||||
if (c0338b.q() >= this.f6188d.f6174c + q4) {
|
||||
throw new RuntimeException("Timed out while trying to open db.", e4);
|
||||
}
|
||||
SystemClock.sleep(50L);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public final Object s(f fVar) {
|
||||
SQLiteDatabase d4 = d();
|
||||
d4.beginTransaction();
|
||||
try {
|
||||
Object apply = fVar.apply(d4);
|
||||
d4.setTransactionSuccessful();
|
||||
return apply;
|
||||
} finally {
|
||||
d4.endTransaction();
|
||||
}
|
||||
}
|
||||
|
||||
public final ArrayList x(SQLiteDatabase sQLiteDatabase, W1.j jVar, int i) {
|
||||
ArrayList arrayList = new ArrayList();
|
||||
Long e4 = e(sQLiteDatabase, jVar);
|
||||
if (e4 == null) {
|
||||
return arrayList;
|
||||
}
|
||||
a0(sQLiteDatabase.query("events", new String[]{"_id", "transport_name", "timestamp_ms", "uptime_ms", "payload_encoding", "payload", "code", "inline"}, "context_id = ?", new String[]{e4.toString()}, null, null, null, String.valueOf(i)), new C0031i(this, arrayList, jVar, 4));
|
||||
return arrayList;
|
||||
}
|
||||
}
|
||||
8
apk_decompiled/sources/d2/i.java
Normal file
8
apk_decompiled/sources/d2/i.java
Normal file
@@ -0,0 +1,8 @@
|
||||
package d2;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final /* synthetic */ class i {
|
||||
|
||||
/* renamed from: a, reason: collision with root package name */
|
||||
public final /* synthetic */ int f6190a;
|
||||
}
|
||||
116
apk_decompiled/sources/d2/j.java
Normal file
116
apk_decompiled/sources/d2/j.java
Normal file
@@ -0,0 +1,116 @@
|
||||
package d2;
|
||||
|
||||
import android.content.Context;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.database.sqlite.SQLiteOpenHelper;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class j extends SQLiteOpenHelper {
|
||||
|
||||
/* renamed from: c, reason: collision with root package name */
|
||||
public static final String f6191c = "INSERT INTO global_log_event_state VALUES (" + System.currentTimeMillis() + ")";
|
||||
|
||||
/* renamed from: d, reason: collision with root package name */
|
||||
public static final int f6192d = 5;
|
||||
|
||||
/* renamed from: e, reason: collision with root package name */
|
||||
public static final List f6193e = Arrays.asList(new i(0), new i(1), new i(2), new i(3), new i(4));
|
||||
|
||||
/* renamed from: a, reason: collision with root package name */
|
||||
public final int f6194a;
|
||||
|
||||
/* renamed from: b, reason: collision with root package name */
|
||||
public boolean f6195b;
|
||||
|
||||
public j(Context context, int i, String str) {
|
||||
super(context, str, (SQLiteDatabase.CursorFactory) null, i);
|
||||
this.f6195b = false;
|
||||
this.f6194a = i;
|
||||
}
|
||||
|
||||
public static void d(SQLiteDatabase sQLiteDatabase, int i, int i4) {
|
||||
List list = f6193e;
|
||||
if (i4 > list.size()) {
|
||||
throw new IllegalArgumentException("Migration from " + i + " to " + i4 + " was requested, but cannot be performed. Only " + list.size() + " migrations are provided");
|
||||
}
|
||||
while (i < i4) {
|
||||
switch (((i) list.get(i)).f6190a) {
|
||||
case 0:
|
||||
sQLiteDatabase.execSQL("CREATE TABLE events (_id INTEGER PRIMARY KEY, context_id INTEGER NOT NULL, transport_name TEXT NOT NULL, timestamp_ms INTEGER NOT NULL, uptime_ms INTEGER NOT NULL, payload BLOB NOT NULL, code INTEGER, num_attempts INTEGER NOT NULL,FOREIGN KEY (context_id) REFERENCES transport_contexts(_id) ON DELETE CASCADE)");
|
||||
sQLiteDatabase.execSQL("CREATE TABLE event_metadata (_id INTEGER PRIMARY KEY, event_id INTEGER NOT NULL, name TEXT NOT NULL, value TEXT NOT NULL,FOREIGN KEY (event_id) REFERENCES events(_id) ON DELETE CASCADE)");
|
||||
sQLiteDatabase.execSQL("CREATE TABLE transport_contexts (_id INTEGER PRIMARY KEY, backend_name TEXT NOT NULL, priority INTEGER NOT NULL, next_request_ms INTEGER NOT NULL)");
|
||||
sQLiteDatabase.execSQL("CREATE INDEX events_backend_id on events(context_id)");
|
||||
sQLiteDatabase.execSQL("CREATE UNIQUE INDEX contexts_backend_priority on transport_contexts(backend_name, priority)");
|
||||
break;
|
||||
case 1:
|
||||
sQLiteDatabase.execSQL("ALTER TABLE transport_contexts ADD COLUMN extras BLOB");
|
||||
sQLiteDatabase.execSQL("CREATE UNIQUE INDEX contexts_backend_priority_extras on transport_contexts(backend_name, priority, extras)");
|
||||
sQLiteDatabase.execSQL("DROP INDEX contexts_backend_priority");
|
||||
break;
|
||||
case 2:
|
||||
sQLiteDatabase.execSQL("ALTER TABLE events ADD COLUMN payload_encoding TEXT");
|
||||
break;
|
||||
case 3:
|
||||
sQLiteDatabase.execSQL("ALTER TABLE events ADD COLUMN inline BOOLEAN NOT NULL DEFAULT 1");
|
||||
sQLiteDatabase.execSQL("DROP TABLE IF EXISTS event_payloads");
|
||||
sQLiteDatabase.execSQL("CREATE TABLE event_payloads (sequence_num INTEGER NOT NULL, event_id INTEGER NOT NULL, bytes BLOB NOT NULL,FOREIGN KEY (event_id) REFERENCES events(_id) ON DELETE CASCADE,PRIMARY KEY (sequence_num, event_id))");
|
||||
break;
|
||||
default:
|
||||
sQLiteDatabase.execSQL("DROP TABLE IF EXISTS log_event_dropped");
|
||||
sQLiteDatabase.execSQL("DROP TABLE IF EXISTS global_log_event_state");
|
||||
sQLiteDatabase.execSQL("CREATE TABLE log_event_dropped (log_source VARCHAR(45) NOT NULL,reason INTEGER NOT NULL,events_dropped_count BIGINT NOT NULL,PRIMARY KEY(log_source, reason))");
|
||||
sQLiteDatabase.execSQL("CREATE TABLE global_log_event_state (last_metrics_upload_ms BIGINT PRIMARY KEY)");
|
||||
sQLiteDatabase.execSQL(f6191c);
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
@Override // android.database.sqlite.SQLiteOpenHelper
|
||||
public final void onConfigure(SQLiteDatabase sQLiteDatabase) {
|
||||
this.f6195b = true;
|
||||
sQLiteDatabase.rawQuery("PRAGMA busy_timeout=0;", new String[0]).close();
|
||||
sQLiteDatabase.setForeignKeyConstraintsEnabled(true);
|
||||
}
|
||||
|
||||
@Override // android.database.sqlite.SQLiteOpenHelper
|
||||
public final void onCreate(SQLiteDatabase sQLiteDatabase) {
|
||||
if (!this.f6195b) {
|
||||
onConfigure(sQLiteDatabase);
|
||||
}
|
||||
d(sQLiteDatabase, 0, this.f6194a);
|
||||
}
|
||||
|
||||
@Override // android.database.sqlite.SQLiteOpenHelper
|
||||
public final void onDowngrade(SQLiteDatabase sQLiteDatabase, int i, int i4) {
|
||||
sQLiteDatabase.execSQL("DROP TABLE events");
|
||||
sQLiteDatabase.execSQL("DROP TABLE event_metadata");
|
||||
sQLiteDatabase.execSQL("DROP TABLE transport_contexts");
|
||||
sQLiteDatabase.execSQL("DROP TABLE IF EXISTS event_payloads");
|
||||
sQLiteDatabase.execSQL("DROP TABLE IF EXISTS log_event_dropped");
|
||||
sQLiteDatabase.execSQL("DROP TABLE IF EXISTS global_log_event_state");
|
||||
if (!this.f6195b) {
|
||||
onConfigure(sQLiteDatabase);
|
||||
}
|
||||
d(sQLiteDatabase, 0, i4);
|
||||
}
|
||||
|
||||
@Override // android.database.sqlite.SQLiteOpenHelper
|
||||
public final void onOpen(SQLiteDatabase sQLiteDatabase) {
|
||||
if (this.f6195b) {
|
||||
return;
|
||||
}
|
||||
onConfigure(sQLiteDatabase);
|
||||
}
|
||||
|
||||
@Override // android.database.sqlite.SQLiteOpenHelper
|
||||
public final void onUpgrade(SQLiteDatabase sQLiteDatabase, int i, int i4) {
|
||||
if (!this.f6195b) {
|
||||
onConfigure(sQLiteDatabase);
|
||||
}
|
||||
d(sQLiteDatabase, i, i4);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user