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,231 @@
|
||||
package com.google.android.gms.location;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
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.ReflectedParcelable;
|
||||
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 com.google.android.gms.common.util.VisibleForTesting;
|
||||
import java.lang.reflect.Array;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@SafeParcelable.Class(creator = "ActivityRecognitionResultCreator")
|
||||
@SafeParcelable.Reserved({1000})
|
||||
/* loaded from: classes3.dex */
|
||||
public class ActivityRecognitionResult extends AbstractSafeParcelable implements ReflectedParcelable {
|
||||
public static final Parcelable.Creator<ActivityRecognitionResult> CREATOR = new zzd();
|
||||
|
||||
@SafeParcelable.Field(id = 1)
|
||||
List zza;
|
||||
|
||||
@SafeParcelable.Field(id = 2)
|
||||
long zzb;
|
||||
|
||||
@SafeParcelable.Field(id = 3)
|
||||
long zzc;
|
||||
|
||||
@SafeParcelable.Field(id = 4)
|
||||
int zzd;
|
||||
|
||||
@SafeParcelable.Field(id = 5)
|
||||
Bundle zze;
|
||||
|
||||
@VisibleForTesting
|
||||
public ActivityRecognitionResult(DetectedActivity detectedActivity, long j4, long j5) {
|
||||
this(Collections.singletonList(detectedActivity), j4, j5, 0, null);
|
||||
}
|
||||
|
||||
/* JADX WARN: Removed duplicated region for block: B:5:0x002d A[RETURN] */
|
||||
/* JADX WARN: Removed duplicated region for block: B:7:0x002e */
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct add '--show-bad-code' argument
|
||||
*/
|
||||
public static com.google.android.gms.location.ActivityRecognitionResult extractResult(android.content.Intent r3) {
|
||||
/*
|
||||
boolean r0 = hasResult(r3)
|
||||
r1 = 0
|
||||
if (r0 != 0) goto L9
|
||||
L7:
|
||||
r0 = r1
|
||||
goto L2b
|
||||
L9:
|
||||
android.os.Bundle r0 = r3.getExtras()
|
||||
if (r0 != 0) goto L10
|
||||
goto L7
|
||||
L10:
|
||||
java.lang.String r2 = "com.google.android.location.internal.EXTRA_ACTIVITY_RESULT"
|
||||
java.lang.Object r0 = r0.get(r2)
|
||||
boolean r2 = r0 instanceof byte[]
|
||||
if (r2 == 0) goto L25
|
||||
byte[] r0 = (byte[]) r0
|
||||
android.os.Parcelable$Creator<com.google.android.gms.location.ActivityRecognitionResult> r2 = com.google.android.gms.location.ActivityRecognitionResult.CREATOR
|
||||
com.google.android.gms.common.internal.safeparcel.SafeParcelable r0 = com.google.android.gms.common.internal.safeparcel.SafeParcelableSerializer.deserializeFromBytes(r0, r2)
|
||||
com.google.android.gms.location.ActivityRecognitionResult r0 = (com.google.android.gms.location.ActivityRecognitionResult) r0
|
||||
goto L2b
|
||||
L25:
|
||||
boolean r2 = r0 instanceof com.google.android.gms.location.ActivityRecognitionResult
|
||||
if (r2 == 0) goto L7
|
||||
com.google.android.gms.location.ActivityRecognitionResult r0 = (com.google.android.gms.location.ActivityRecognitionResult) r0
|
||||
L2b:
|
||||
if (r0 == 0) goto L2e
|
||||
return r0
|
||||
L2e:
|
||||
java.util.List r3 = zza(r3)
|
||||
if (r3 == 0) goto L48
|
||||
boolean r0 = r3.isEmpty()
|
||||
if (r0 == 0) goto L3b
|
||||
goto L48
|
||||
L3b:
|
||||
int r0 = r3.size()
|
||||
int r0 = r0 + (-1)
|
||||
java.lang.Object r3 = r3.get(r0)
|
||||
com.google.android.gms.location.ActivityRecognitionResult r3 = (com.google.android.gms.location.ActivityRecognitionResult) r3
|
||||
return r3
|
||||
L48:
|
||||
return r1
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.location.ActivityRecognitionResult.extractResult(android.content.Intent):com.google.android.gms.location.ActivityRecognitionResult");
|
||||
}
|
||||
|
||||
public static boolean hasResult(Intent intent) {
|
||||
if (intent == null) {
|
||||
return false;
|
||||
}
|
||||
if (intent.hasExtra("com.google.android.location.internal.EXTRA_ACTIVITY_RESULT")) {
|
||||
return true;
|
||||
}
|
||||
List zza = zza(intent);
|
||||
return (zza == null || zza.isEmpty()) ? false : true;
|
||||
}
|
||||
|
||||
public static List zza(Intent intent) {
|
||||
if (intent != null && intent.hasExtra("com.google.android.location.internal.EXTRA_ACTIVITY_RESULT_LIST")) {
|
||||
return SafeParcelableSerializer.deserializeIterableFromIntentExtra(intent, "com.google.android.location.internal.EXTRA_ACTIVITY_RESULT_LIST", CREATOR);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static boolean zzb(Bundle bundle, Bundle bundle2) {
|
||||
int length;
|
||||
if (bundle == null) {
|
||||
return bundle2 == null;
|
||||
}
|
||||
if (bundle2 == null || bundle.size() != bundle2.size()) {
|
||||
return false;
|
||||
}
|
||||
for (String str : bundle.keySet()) {
|
||||
if (!bundle2.containsKey(str)) {
|
||||
return false;
|
||||
}
|
||||
Object obj = bundle.get(str);
|
||||
Object obj2 = bundle2.get(str);
|
||||
if (obj == null) {
|
||||
if (obj2 != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (obj instanceof Bundle) {
|
||||
if (!zzb(bundle.getBundle(str), bundle2.getBundle(str))) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
if (obj.getClass().isArray()) {
|
||||
if (obj2 != null && obj2.getClass().isArray() && (length = Array.getLength(obj)) == Array.getLength(obj2)) {
|
||||
for (int i = 0; i < length; i++) {
|
||||
if (Objects.equal(Array.get(obj, i), Array.get(obj2, i))) {
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (!obj.equals(obj2)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@ShowFirstParty
|
||||
public final boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj != null && getClass() == obj.getClass()) {
|
||||
ActivityRecognitionResult activityRecognitionResult = (ActivityRecognitionResult) obj;
|
||||
if (this.zzb == activityRecognitionResult.zzb && this.zzc == activityRecognitionResult.zzc && this.zzd == activityRecognitionResult.zzd && Objects.equal(this.zza, activityRecognitionResult.zza) && zzb(this.zze, activityRecognitionResult.zze)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public int getActivityConfidence(int i) {
|
||||
for (DetectedActivity detectedActivity : this.zza) {
|
||||
if (detectedActivity.getType() == i) {
|
||||
return detectedActivity.getConfidence();
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
public long getElapsedRealtimeMillis() {
|
||||
return this.zzc;
|
||||
}
|
||||
|
||||
public DetectedActivity getMostProbableActivity() {
|
||||
return (DetectedActivity) this.zza.get(0);
|
||||
}
|
||||
|
||||
public List<DetectedActivity> getProbableActivities() {
|
||||
return this.zza;
|
||||
}
|
||||
|
||||
public long getTime() {
|
||||
return this.zzb;
|
||||
}
|
||||
|
||||
@ShowFirstParty
|
||||
public final int hashCode() {
|
||||
return Objects.hashCode(Long.valueOf(this.zzb), Long.valueOf(this.zzc), Integer.valueOf(this.zzd), this.zza, this.zze);
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "ActivityRecognitionResult [probableActivities=" + String.valueOf(this.zza) + ", timeMillis=" + this.zzb + ", elapsedRealtimeMillis=" + this.zzc + "]";
|
||||
}
|
||||
|
||||
@Override // android.os.Parcelable
|
||||
public void writeToParcel(Parcel parcel, int i) {
|
||||
int beginObjectHeader = SafeParcelWriter.beginObjectHeader(parcel);
|
||||
SafeParcelWriter.writeTypedList(parcel, 1, this.zza, false);
|
||||
SafeParcelWriter.writeLong(parcel, 2, this.zzb);
|
||||
SafeParcelWriter.writeLong(parcel, 3, this.zzc);
|
||||
SafeParcelWriter.writeInt(parcel, 4, this.zzd);
|
||||
SafeParcelWriter.writeBundle(parcel, 5, this.zze, false);
|
||||
SafeParcelWriter.finishObjectHeader(parcel, beginObjectHeader);
|
||||
}
|
||||
|
||||
public ActivityRecognitionResult(List<DetectedActivity> list, long j4, long j5) {
|
||||
this(list, j4, j5, 0, null);
|
||||
}
|
||||
|
||||
@ShowFirstParty
|
||||
@SafeParcelable.Constructor
|
||||
public ActivityRecognitionResult(@SafeParcelable.Param(id = 1) List list, @SafeParcelable.Param(id = 2) long j4, @SafeParcelable.Param(id = 3) long j5, @SafeParcelable.Param(id = 4) int i, @SafeParcelable.Param(id = 5) Bundle bundle) {
|
||||
Preconditions.checkArgument(list != null && list.size() > 0, "Must have at least 1 detected activity");
|
||||
Preconditions.checkArgument(j4 > 0 && j5 > 0, "Must set times");
|
||||
this.zza = list;
|
||||
this.zzb = j4;
|
||||
this.zzc = j5;
|
||||
this.zzd = i;
|
||||
this.zze = bundle;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user