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,136 @@
|
||||
package com.google.android.gms.location;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import com.google.android.gms.common.internal.Objects;
|
||||
import com.google.android.gms.common.internal.Preconditions;
|
||||
import com.google.android.gms.common.internal.ShowFirstParty;
|
||||
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 com.google.android.gms.common.internal.safeparcel.SafeParcelableSerializer;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@SafeParcelable.Class(creator = "SleepClassifyEventCreator")
|
||||
/* loaded from: classes3.dex */
|
||||
public class SleepClassifyEvent extends AbstractSafeParcelable {
|
||||
public static final Parcelable.Creator<SleepClassifyEvent> CREATOR = new zzaf();
|
||||
|
||||
@SafeParcelable.Field(getter = "getTimestampSec", id = 1)
|
||||
private final int zza;
|
||||
|
||||
@SafeParcelable.Field(getter = "getConfidence", id = 2)
|
||||
private final int zzb;
|
||||
|
||||
@SafeParcelable.Field(getter = "getMotion", id = 3)
|
||||
private final int zzc;
|
||||
|
||||
@SafeParcelable.Field(getter = "getLight", id = 4)
|
||||
private final int zzd;
|
||||
|
||||
@SafeParcelable.Field(getter = "getNoise", id = 5)
|
||||
private final int zze;
|
||||
|
||||
@SafeParcelable.Field(getter = "getLightDiff", id = 6)
|
||||
private final int zzf;
|
||||
|
||||
@SafeParcelable.Field(getter = "getNightOrDay", id = 7)
|
||||
private final int zzg;
|
||||
|
||||
@SafeParcelable.Field(getter = "getConfidenceOverwrittenByAlarmClockTrigger", id = 8)
|
||||
private final boolean zzh;
|
||||
|
||||
@SafeParcelable.Field(getter = "getPresenceConfidence", id = 9)
|
||||
private final int zzi;
|
||||
|
||||
@ShowFirstParty
|
||||
@SafeParcelable.Constructor
|
||||
public SleepClassifyEvent(@SafeParcelable.Param(id = 1) int i, @SafeParcelable.Param(id = 2) int i4, @SafeParcelable.Param(id = 3) int i5, @SafeParcelable.Param(id = 4) int i6, @SafeParcelable.Param(id = 5) int i7, @SafeParcelable.Param(id = 6) int i8, @SafeParcelable.Param(id = 7) int i9, @SafeParcelable.Param(id = 8) boolean z3, @SafeParcelable.Param(id = 9) int i10) {
|
||||
this.zza = i;
|
||||
this.zzb = i4;
|
||||
this.zzc = i5;
|
||||
this.zzd = i6;
|
||||
this.zze = i7;
|
||||
this.zzf = i8;
|
||||
this.zzg = i9;
|
||||
this.zzh = z3;
|
||||
this.zzi = i10;
|
||||
}
|
||||
|
||||
public static List<SleepClassifyEvent> extractEvents(Intent intent) {
|
||||
ArrayList arrayList;
|
||||
Preconditions.checkNotNull(intent);
|
||||
if (hasEvents(intent) && (arrayList = (ArrayList) intent.getSerializableExtra("com.google.android.location.internal.EXTRA_SLEEP_CLASSIFY_RESULT")) != null) {
|
||||
ArrayList arrayList2 = new ArrayList(arrayList.size());
|
||||
int size = arrayList.size();
|
||||
for (int i = 0; i < size; i++) {
|
||||
byte[] bArr = (byte[]) arrayList.get(i);
|
||||
Preconditions.checkNotNull(bArr);
|
||||
arrayList2.add((SleepClassifyEvent) SafeParcelableSerializer.deserializeFromBytes(bArr, CREATOR));
|
||||
}
|
||||
return Collections.unmodifiableList(arrayList2);
|
||||
}
|
||||
return Collections.EMPTY_LIST;
|
||||
}
|
||||
|
||||
public static boolean hasEvents(Intent intent) {
|
||||
if (intent == null) {
|
||||
return false;
|
||||
}
|
||||
return intent.hasExtra("com.google.android.location.internal.EXTRA_SLEEP_CLASSIFY_RESULT");
|
||||
}
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof SleepClassifyEvent)) {
|
||||
return false;
|
||||
}
|
||||
SleepClassifyEvent sleepClassifyEvent = (SleepClassifyEvent) obj;
|
||||
return this.zza == sleepClassifyEvent.zza && this.zzb == sleepClassifyEvent.zzb;
|
||||
}
|
||||
|
||||
public int getConfidence() {
|
||||
return this.zzb;
|
||||
}
|
||||
|
||||
public int getLight() {
|
||||
return this.zzd;
|
||||
}
|
||||
|
||||
public int getMotion() {
|
||||
return this.zzc;
|
||||
}
|
||||
|
||||
public long getTimestampMillis() {
|
||||
return this.zza * 1000;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return Objects.hashCode(Integer.valueOf(this.zza), Integer.valueOf(this.zzb));
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return this.zza + " Conf:" + this.zzb + " Motion:" + this.zzc + " Light:" + this.zzd;
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable
|
||||
public void writeToParcel(Parcel parcel, int i) {
|
||||
Preconditions.checkNotNull(parcel);
|
||||
int beginObjectHeader = SafeParcelWriter.beginObjectHeader(parcel);
|
||||
SafeParcelWriter.writeInt(parcel, 1, this.zza);
|
||||
SafeParcelWriter.writeInt(parcel, 2, getConfidence());
|
||||
SafeParcelWriter.writeInt(parcel, 3, getMotion());
|
||||
SafeParcelWriter.writeInt(parcel, 4, getLight());
|
||||
SafeParcelWriter.writeInt(parcel, 5, this.zze);
|
||||
SafeParcelWriter.writeInt(parcel, 6, this.zzf);
|
||||
SafeParcelWriter.writeInt(parcel, 7, this.zzg);
|
||||
SafeParcelWriter.writeBoolean(parcel, 8, this.zzh);
|
||||
SafeParcelWriter.writeInt(parcel, 9, this.zzi);
|
||||
SafeParcelWriter.finishObjectHeader(parcel, beginObjectHeader);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user