There is only one boolean that I need to set to false. This value is then returned when this method is called. But I have no experience of Smali so I need help. I decompiled apk to both java code (to know what to look for) and Smali (to edit and recompile). Here is the method in java code:
public PendingResult<Status> setMockMode(GoogleApiClient client, boolean isMockMode) {
return client.zzb(new C06163(this, client, isMockMode));
}
I want to change isMockMode in return to false but its very confusing in smali. Here is smali code of same java code:
.method public setMockMode(Lcom/google/android/gms/common/api/GoogleApiClient;Z)Lcom/google/android/gms/common/api/PendingResult;
.locals 1
.parameter "client"
.parameter "isMockMode"
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/google/android/gms/common/api/GoogleApiClient;",
"Z)",
"Lcom/google/android/gms/common/api/PendingResult",
"<",
"Lcom/google/android/gms/common/api/Status;",
">;"
}
.end annotation
.prologue
new-instance v0, Lcom/google/android/gms/location/internal/zzd$3;
invoke-direct {v0, p0, p1, p2}, Lcom/google/android/gms/location/internal/zzd$3;-><init>(Lcom/google/android/gms/location/internal/zzd;Lcom/google/android/gms/common/api/GoogleApiClient;Z)V
invoke-virtual {p1, v0}, Lcom/google/android/gms/common/api/GoogleApiClient;->zzb(Lcom/google/android/gms/internal/zzlb$zza;)Lcom/google/android/gms/internal/zzlb$zza;
move-result-object v0
return-object v0
.end method
Code is way too complex in Smali for me to understand. So some help please :)
Hope the following is self-explanatory.
.method public setMockMode(Lcom/google/android/gms/common/api/GoogleApiClient;Z)Lcom/google/android/gms/common/api/PendingResult;
# change here 1 -> 2 to allow for another local variable v1
.locals 2
.prologue
new-instance v0, Lcom/google/android/gms/location/internal/zzd$3;
# add this line: v1 = 0; 0 is 'false'
const/4 v1, 0x0
# pass v1, which is set to 'false', instead of p2 containing isMockMode
invoke-direct {v0, p0, p1, v1}, Lcom/google/android/gms/location/internal/zzd$3;-><init>(Lcom/google/android/gms/location/internal/zzd;Lcom/google/android/gms/common/api/GoogleApiClient;Z)V
invoke-virtual {p1, v0}, Lcom/google/android/gms/common/api/GoogleApiClient;->zzb(Lcom/google/android/gms/internal/zzlb$zza;)Lcom/google/android/gms/internal/zzlb$zza;
move-result-object v0
return-object v0
.end method
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With