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:
@@ -0,0 +1,266 @@
|
||||
package com.google.firebase.sessions;
|
||||
|
||||
import Y.InterfaceC0091g;
|
||||
import android.content.Context;
|
||||
import b0.AbstractC0262g;
|
||||
import b0.C0260e;
|
||||
import com.google.android.gms.measurement.api.AppMeasurementSdk;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.ResultKt;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.CoroutineContext;
|
||||
import kotlin.coroutines.intrinsics.IntrinsicsKt;
|
||||
import kotlin.coroutines.jvm.internal.ContinuationImpl;
|
||||
import kotlin.coroutines.jvm.internal.DebugMetadata;
|
||||
import kotlin.coroutines.jvm.internal.SuspendLambda;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
import kotlin.jvm.internal.DefaultConstructorMarker;
|
||||
import kotlin.jvm.internal.IntCompanionObject;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.PropertyReference2Impl;
|
||||
import kotlin.jvm.internal.Reflection;
|
||||
import kotlin.properties.ReadOnlyProperty;
|
||||
import kotlin.reflect.KProperty;
|
||||
import kotlinx.coroutines.BuildersKt__Builders_commonKt;
|
||||
import kotlinx.coroutines.CoroutineScope;
|
||||
import kotlinx.coroutines.CoroutineScopeKt;
|
||||
import kotlinx.coroutines.flow.Flow;
|
||||
import kotlinx.coroutines.flow.FlowCollector;
|
||||
import kotlinx.coroutines.flow.FlowKt;
|
||||
import m3.l;
|
||||
|
||||
@Metadata(d1 = {"\u0000B\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\b\u0000\u0018\u0000 \u001c2\u00020\u0001:\u0002\u001c\u001dB\u0017\u0012\u0006\u0010\u0003\u001a\u00020\u0002\u0012\u0006\u0010\u0005\u001a\u00020\u0004¢\u0006\u0004\b\u0006\u0010\u0007J\u0017\u0010\u000b\u001a\u00020\n2\u0006\u0010\t\u001a\u00020\bH\u0002¢\u0006\u0004\b\u000b\u0010\fJ\u0017\u0010\u0010\u001a\u00020\u000f2\u0006\u0010\u000e\u001a\u00020\rH\u0016¢\u0006\u0004\b\u0010\u0010\u0011J\u0011\u0010\u0012\u001a\u0004\u0018\u00010\rH\u0016¢\u0006\u0004\b\u0012\u0010\u0013R\u0014\u0010\u0003\u001a\u00020\u00028\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\u0003\u0010\u0014R\u0014\u0010\u0005\u001a\u00020\u00048\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\u0005\u0010\u0015R\u001a\u0010\u0017\u001a\b\u0012\u0004\u0012\u00020\n0\u00168\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\u0017\u0010\u0018R\u001a\u0010\u001a\u001a\b\u0012\u0004\u0012\u00020\n0\u00198\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\u001a\u0010\u001b¨\u0006\u001e"}, d2 = {"Lcom/google/firebase/sessions/SessionDatastoreImpl;", "Lcom/google/firebase/sessions/SessionDatastore;", "Landroid/content/Context;", "context", "Lkotlin/coroutines/CoroutineContext;", "backgroundDispatcher", "<init>", "(Landroid/content/Context;Lkotlin/coroutines/CoroutineContext;)V", "Lb0/g;", "preferences", "Lcom/google/firebase/sessions/FirebaseSessionsData;", "mapSessionsData", "(Lb0/g;)Lcom/google/firebase/sessions/FirebaseSessionsData;", "", "sessionId", "", "updateSessionId", "(Ljava/lang/String;)V", "getCurrentSessionId", "()Ljava/lang/String;", "Landroid/content/Context;", "Lkotlin/coroutines/CoroutineContext;", "Ljava/util/concurrent/atomic/AtomicReference;", "currentSessionFromDatastore", "Ljava/util/concurrent/atomic/AtomicReference;", "Lkotlinx/coroutines/flow/Flow;", "firebaseSessionDataFlow", "Lkotlinx/coroutines/flow/Flow;", "Companion", "FirebaseSessionDataKeys", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
|
||||
/* loaded from: classes3.dex */
|
||||
public final class SessionDatastoreImpl implements SessionDatastore {
|
||||
|
||||
@Deprecated
|
||||
private static final String TAG = "FirebaseSessionsRepo";
|
||||
private final CoroutineContext backgroundDispatcher;
|
||||
private final Context context;
|
||||
private final AtomicReference<FirebaseSessionsData> currentSessionFromDatastore;
|
||||
private final Flow<FirebaseSessionsData> firebaseSessionDataFlow;
|
||||
private static final Companion Companion = new Companion(null);
|
||||
|
||||
@Deprecated
|
||||
private static final ReadOnlyProperty<Context, InterfaceC0091g> dataStore$delegate = l.S(SessionDataStoreConfigs.INSTANCE.getSESSIONS_CONFIG_NAME());
|
||||
|
||||
@Metadata(d1 = {"\u0000\n\n\u0000\n\u0002\u0010\u0002\n\u0002\u0018\u0002\u0010\u0000\u001a\u00020\u0001*\u00020\u0002H\u008a@"}, d2 = {"<anonymous>", "", "Lkotlinx/coroutines/CoroutineScope;"}, k = 3, mv = {1, 7, 1}, xi = 48)
|
||||
@DebugMetadata(c = "com.google.firebase.sessions.SessionDatastoreImpl$1", f = "SessionDatastore.kt", i = {}, l = {79}, m = "invokeSuspend", n = {}, s = {})
|
||||
/* renamed from: com.google.firebase.sessions.SessionDatastoreImpl$1, reason: invalid class name */
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class AnonymousClass1 extends SuspendLambda implements Function2<CoroutineScope, Continuation<? super Unit>, Object> {
|
||||
int label;
|
||||
|
||||
public AnonymousClass1(Continuation<? super AnonymousClass1> continuation) {
|
||||
super(2, continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
|
||||
return new AnonymousClass1(continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
Object coroutine_suspended = IntrinsicsKt.getCOROUTINE_SUSPENDED();
|
||||
int i = this.label;
|
||||
if (i == 0) {
|
||||
ResultKt.throwOnFailure(obj);
|
||||
Flow flow = SessionDatastoreImpl.this.firebaseSessionDataFlow;
|
||||
final SessionDatastoreImpl sessionDatastoreImpl = SessionDatastoreImpl.this;
|
||||
FlowCollector flowCollector = new FlowCollector() { // from class: com.google.firebase.sessions.SessionDatastoreImpl.1.1
|
||||
public final Object emit(FirebaseSessionsData firebaseSessionsData, Continuation<? super Unit> continuation) {
|
||||
SessionDatastoreImpl.this.currentSessionFromDatastore.set(firebaseSessionsData);
|
||||
return Unit.INSTANCE;
|
||||
}
|
||||
|
||||
@Override // kotlinx.coroutines.flow.FlowCollector
|
||||
public /* bridge */ /* synthetic */ Object emit(Object obj2, Continuation continuation) {
|
||||
return emit((FirebaseSessionsData) obj2, (Continuation<? super Unit>) continuation);
|
||||
}
|
||||
};
|
||||
this.label = 1;
|
||||
if (flow.collect(flowCollector, this) == coroutine_suspended) {
|
||||
return coroutine_suspended;
|
||||
}
|
||||
} else {
|
||||
if (i != 1) {
|
||||
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
|
||||
}
|
||||
ResultKt.throwOnFailure(obj);
|
||||
}
|
||||
return Unit.INSTANCE;
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final Object invoke(CoroutineScope coroutineScope, Continuation<? super Unit> continuation) {
|
||||
return ((AnonymousClass1) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE);
|
||||
}
|
||||
}
|
||||
|
||||
@Metadata(d1 = {"\u0000$\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0010\u000e\n\u0002\b\u0003\b\u0082\u0003\u0018\u00002\u00020\u0001B\t\b\u0002¢\u0006\u0004\b\u0002\u0010\u0003R%\u0010\u000b\u001a\b\u0012\u0004\u0012\u00020\u00060\u0005*\u00020\u00048BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b\u0007\u0010\b\u001a\u0004\b\t\u0010\nR\u0014\u0010\r\u001a\u00020\f8\u0002X\u0082T¢\u0006\u0006\n\u0004\b\r\u0010\u000e¨\u0006\u000f"}, d2 = {"Lcom/google/firebase/sessions/SessionDatastoreImpl$Companion;", "", "<init>", "()V", "Landroid/content/Context;", "LY/g;", "Lb0/g;", "dataStore$delegate", "Lkotlin/properties/ReadOnlyProperty;", "getDataStore", "(Landroid/content/Context;)LY/g;", "dataStore", "", "TAG", "Ljava/lang/String;", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class Companion {
|
||||
static final /* synthetic */ KProperty<Object>[] $$delegatedProperties = {Reflection.property2(new PropertyReference2Impl(Companion.class, "dataStore", "getDataStore(Landroid/content/Context;)Landroidx/datastore/core/DataStore;", 0))};
|
||||
|
||||
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
|
||||
this();
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public final InterfaceC0091g getDataStore(Context context) {
|
||||
return (InterfaceC0091g) SessionDatastoreImpl.dataStore$delegate.getValue(context, $$delegatedProperties[0]);
|
||||
}
|
||||
|
||||
private Companion() {
|
||||
}
|
||||
}
|
||||
|
||||
@Metadata(d1 = {"\u0000\u0018\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0002\b\u0005\bÂ\u0002\u0018\u00002\u00020\u0001B\t\b\u0002¢\u0006\u0004\b\u0002\u0010\u0003R\u001d\u0010\u0006\u001a\b\u0012\u0004\u0012\u00020\u00050\u00048\u0006¢\u0006\f\n\u0004\b\u0006\u0010\u0007\u001a\u0004\b\b\u0010\t¨\u0006\n"}, d2 = {"Lcom/google/firebase/sessions/SessionDatastoreImpl$FirebaseSessionDataKeys;", "", "<init>", "()V", "Lb0/e;", "", "SESSION_ID", "Lb0/e;", "getSESSION_ID", "()Lb0/e;", "com.google.firebase-firebase-sessions"}, k = 1, mv = {1, 7, 1}, xi = 48)
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class FirebaseSessionDataKeys {
|
||||
public static final FirebaseSessionDataKeys INSTANCE = new FirebaseSessionDataKeys();
|
||||
private static final C0260e SESSION_ID;
|
||||
|
||||
static {
|
||||
Intrinsics.checkNotNullParameter("session_id", AppMeasurementSdk.ConditionalUserProperty.NAME);
|
||||
SESSION_ID = new C0260e("session_id");
|
||||
}
|
||||
|
||||
private FirebaseSessionDataKeys() {
|
||||
}
|
||||
|
||||
public final C0260e getSESSION_ID() {
|
||||
return SESSION_ID;
|
||||
}
|
||||
}
|
||||
|
||||
public SessionDatastoreImpl(Context context, CoroutineContext backgroundDispatcher) {
|
||||
Intrinsics.checkNotNullParameter(context, "context");
|
||||
Intrinsics.checkNotNullParameter(backgroundDispatcher, "backgroundDispatcher");
|
||||
this.context = context;
|
||||
this.backgroundDispatcher = backgroundDispatcher;
|
||||
this.currentSessionFromDatastore = new AtomicReference<>();
|
||||
final Flow m1659catch = FlowKt.m1659catch(Companion.getDataStore(context).b(), new SessionDatastoreImpl$firebaseSessionDataFlow$1(null));
|
||||
this.firebaseSessionDataFlow = new Flow<FirebaseSessionsData>() { // from class: com.google.firebase.sessions.SessionDatastoreImpl$special$$inlined$map$1
|
||||
|
||||
@Metadata(d1 = {"\u0000\n\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0007\u0010\u0000\u001a\u00020\u0001\"\u0004\b\u0000\u0010\u0002\"\u0004\b\u0001\u0010\u00032\u0006\u0010\u0004\u001a\u0002H\u0002H\u008a@¢\u0006\u0004\b\u0005\u0010\u0006¨\u0006\b"}, d2 = {"<anonymous>", "", "T", "R", "value", "emit", "(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "kotlinx/coroutines/flow/FlowKt__EmittersKt$unsafeTransform$1$1", "kotlinx/coroutines/flow/FlowKt__TransformKt$map$$inlined$unsafeTransform$1$2"}, k = 3, mv = {1, 7, 1}, xi = 48)
|
||||
/* renamed from: com.google.firebase.sessions.SessionDatastoreImpl$special$$inlined$map$1$2, reason: invalid class name */
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class AnonymousClass2<T> implements FlowCollector {
|
||||
final /* synthetic */ FlowCollector $this_unsafeFlow;
|
||||
final /* synthetic */ SessionDatastoreImpl this$0;
|
||||
|
||||
@Metadata(k = 3, mv = {1, 7, 1}, xi = 48)
|
||||
@DebugMetadata(c = "com.google.firebase.sessions.SessionDatastoreImpl$special$$inlined$map$1$2", f = "SessionDatastore.kt", i = {}, l = {224}, m = "emit", n = {}, s = {})
|
||||
/* renamed from: com.google.firebase.sessions.SessionDatastoreImpl$special$$inlined$map$1$2$1, reason: invalid class name */
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class AnonymousClass1 extends ContinuationImpl {
|
||||
Object L$0;
|
||||
int label;
|
||||
/* synthetic */ Object result;
|
||||
|
||||
public AnonymousClass1(Continuation continuation) {
|
||||
super(continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
this.result = obj;
|
||||
this.label |= IntCompanionObject.MIN_VALUE;
|
||||
return AnonymousClass2.this.emit(null, this);
|
||||
}
|
||||
}
|
||||
|
||||
public AnonymousClass2(FlowCollector flowCollector, SessionDatastoreImpl sessionDatastoreImpl) {
|
||||
this.$this_unsafeFlow = flowCollector;
|
||||
this.this$0 = sessionDatastoreImpl;
|
||||
}
|
||||
|
||||
/* JADX WARN: Removed duplicated region for block: B:15:0x0031 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:8:0x0023 */
|
||||
@Override // kotlinx.coroutines.flow.FlowCollector
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct add '--show-bad-code' argument
|
||||
*/
|
||||
public final java.lang.Object emit(java.lang.Object r5, kotlin.coroutines.Continuation r6) {
|
||||
/*
|
||||
r4 = this;
|
||||
boolean r0 = r6 instanceof com.google.firebase.sessions.SessionDatastoreImpl$special$$inlined$map$1.AnonymousClass2.AnonymousClass1
|
||||
if (r0 == 0) goto L13
|
||||
r0 = r6
|
||||
com.google.firebase.sessions.SessionDatastoreImpl$special$$inlined$map$1$2$1 r0 = (com.google.firebase.sessions.SessionDatastoreImpl$special$$inlined$map$1.AnonymousClass2.AnonymousClass1) r0
|
||||
int r1 = r0.label
|
||||
r2 = -2147483648(0xffffffff80000000, float:-0.0)
|
||||
r3 = r1 & r2
|
||||
if (r3 == 0) goto L13
|
||||
int r1 = r1 - r2
|
||||
r0.label = r1
|
||||
goto L18
|
||||
L13:
|
||||
com.google.firebase.sessions.SessionDatastoreImpl$special$$inlined$map$1$2$1 r0 = new com.google.firebase.sessions.SessionDatastoreImpl$special$$inlined$map$1$2$1
|
||||
r0.<init>(r6)
|
||||
L18:
|
||||
java.lang.Object r6 = r0.result
|
||||
java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
|
||||
int r2 = r0.label
|
||||
r3 = 1
|
||||
if (r2 == 0) goto L31
|
||||
if (r2 != r3) goto L29
|
||||
kotlin.ResultKt.throwOnFailure(r6)
|
||||
goto L47
|
||||
L29:
|
||||
java.lang.IllegalStateException r4 = new java.lang.IllegalStateException
|
||||
java.lang.String r5 = "call to 'resume' before 'invoke' with coroutine"
|
||||
r4.<init>(r5)
|
||||
throw r4
|
||||
L31:
|
||||
kotlin.ResultKt.throwOnFailure(r6)
|
||||
kotlinx.coroutines.flow.FlowCollector r6 = r4.$this_unsafeFlow
|
||||
b0.g r5 = (b0.AbstractC0262g) r5
|
||||
com.google.firebase.sessions.SessionDatastoreImpl r4 = r4.this$0
|
||||
com.google.firebase.sessions.FirebaseSessionsData r4 = com.google.firebase.sessions.SessionDatastoreImpl.access$mapSessionsData(r4, r5)
|
||||
r0.label = r3
|
||||
java.lang.Object r4 = r6.emit(r4, r0)
|
||||
if (r4 != r1) goto L47
|
||||
return r1
|
||||
L47:
|
||||
kotlin.Unit r4 = kotlin.Unit.INSTANCE
|
||||
return r4
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: com.google.firebase.sessions.SessionDatastoreImpl$special$$inlined$map$1.AnonymousClass2.emit(java.lang.Object, kotlin.coroutines.Continuation):java.lang.Object");
|
||||
}
|
||||
}
|
||||
|
||||
@Override // kotlinx.coroutines.flow.Flow
|
||||
public Object collect(FlowCollector<? super FirebaseSessionsData> flowCollector, Continuation continuation) {
|
||||
Object collect = Flow.this.collect(new AnonymousClass2(flowCollector, this), continuation);
|
||||
return collect == IntrinsicsKt.getCOROUTINE_SUSPENDED() ? collect : Unit.INSTANCE;
|
||||
}
|
||||
};
|
||||
BuildersKt__Builders_commonKt.launch$default(CoroutineScopeKt.CoroutineScope(backgroundDispatcher), null, null, new AnonymousClass1(null), 3, null);
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public final FirebaseSessionsData mapSessionsData(AbstractC0262g preferences) {
|
||||
return new FirebaseSessionsData((String) preferences.a(FirebaseSessionDataKeys.INSTANCE.getSESSION_ID()));
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.sessions.SessionDatastore
|
||||
public String getCurrentSessionId() {
|
||||
FirebaseSessionsData firebaseSessionsData = this.currentSessionFromDatastore.get();
|
||||
if (firebaseSessionsData != null) {
|
||||
return firebaseSessionsData.getSessionId();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override // com.google.firebase.sessions.SessionDatastore
|
||||
public void updateSessionId(String sessionId) {
|
||||
Intrinsics.checkNotNullParameter(sessionId, "sessionId");
|
||||
BuildersKt__Builders_commonKt.launch$default(CoroutineScopeKt.CoroutineScope(this.backgroundDispatcher), null, null, new SessionDatastoreImpl$updateSessionId$1(this, sessionId, null), 3, null);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user