Bypass Signature Check - Android Q&A, Help & Troubleshooting

Hi there,
It the first time here I'm asking for your help !!
I've learn a lot from these forum but can't find an answer to this question !
I first modify waze to alert about speedcamera whatever you speed (I learn from there http://marin.jb.free.fr/waze/) and then patch waze to enable radar in France!
Since Waze 3.9.9.906 alpha, waze added a signature verification at startup which cause the app to crash if signature is different than original.
I tried to dig inside libwaze.so with no sucess (including use of zynamics bindiff) to check for change between 3.9.9.0 and 3.9.9.906.
Can you help me or tell what I can do to bypass signature verification? Is it possible to modify libwaze.so without altering original signature or to spoof waze original signature?
Here is a logcat of the crash :
Code:
03-05 14:36:14.946 25806 25806 E WAZE : [email protected]
--------- beginning of crash
03-05 14:36:14.955 25806 25806 E AndroidRuntime: FATAL EXCEPTION: main
03-05 14:36:14.955 25806 25806 E AndroidRuntime: Process: com.waze, PID: 25806
03-05 14:36:14.955 25806 25806 E AndroidRuntime: java.lang.SecurityException: Signature check failed for com.waze
03-05 14:36:14.955 25806 25806 E AndroidRuntime: at android.os.Parcel.readException(Parcel.java:1620)
03-05 14:36:14.955 25806 25806 E AndroidRuntime: at android.os.Parcel.readException(Parcel.java:1573)
03-05 14:36:14.955 25806 25806 E AndroidRuntime: at com.google.android.gms.common.internal.zzs$zza$zza.zza(Unknown Source)
03-05 14:36:14.955 25806 25806 E AndroidRuntime: at com.google.android.gms.common.internal.zzj.zza(Unknown Source)
03-05 14:36:14.955 25806 25806 E AndroidRuntime: at com.google.android.gms.common.api.internal.zzh$zzc.zzpK(Unknown Source)
03-05 14:36:14.955 25806 25806 E AndroidRuntime: at com.google.android.gms.common.api.internal.zzh$zzf.run(Unknown Source)
03-05 14:36:14.955 25806 25806 E AndroidRuntime: at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423)
03-05 14:36:14.955 25806 25806 E AndroidRuntime: at java.util.concurrent.FutureTask.run(FutureTask.java:237)
03-05 14:36:14.955 25806 25806 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
03-05 14:36:14.955 25806 25806 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
03-05 14:36:14.955 25806 25806 E AndroidRuntime: at com.google.android.gms.internal.zzob.run(Unknown Source)
03-05 14:36:14.955 25806 25806 E AndroidRuntime: at java.lang.Thread.run(Thread.java:818)
03-05 14:36:15.008 919 3085 W ActivityManager: Force finishing activity com.waze/.MainActivity
Thank you all!

Come on hackers!!!

Not an option without ripping the app apart. Even then it may refuse to work. I would just forget about it.

I think I've found the smali files to reverse engineer :
Code:
.class public Lcom/google/android/gms/common/GoogleSignatureVerifier;
.super Ljava/lang/Object;
# static fields
.field private static final zzaqd:Lcom/google/android/gms/common/GoogleSignatureVerifier;
# direct methods
.method static constructor <clinit>()V
.locals 1
new-instance v0, Lcom/google/android/gms/common/GoogleSignatureVerifier;
invoke-direct {v0}, Lcom/google/android/gms/common/GoogleSignatureVerifier;-><init>()V
sput-object v0, Lcom/google/android/gms/common/GoogleSignatureVerifier;->zzaqd:Lcom/google/android/gms/common/GoogleSignatureVerifier;
return-void
.end method
.method private constructor <init>()V
.locals 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static getInstance()Lcom/google/android/gms/common/GoogleSignatureVerifier;
.locals 1
sget-object v0, Lcom/google/android/gms/common/GoogleSignatureVerifier;->zzaqd:Lcom/google/android/gms/common/GoogleSignatureVerifier;
return-object v0
.end method
.method private zzb(Landroid/content/pm/PackageInfo;Z)Z
.locals 5
const/4 v2, 0x1
const/4 v1, 0x0
iget-object v0, p1, Landroid/content/pm/PackageInfo;->signatures:[Landroid/content/pm/Signature;
array-length v0, v0
if-eq v0, v2, :cond_0
const-string/jumbo v0, "GoogleSignatureVerifier"
const-string/jumbo v2, "Package has more than one signature."
invoke-static {v0, v2}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
move v0, v1
:goto_0
return v0
:cond_0
new-instance v3, Lcom/google/android/gms/common/zzc$zzb;
iget-object v0, p1, Landroid/content/pm/PackageInfo;->signatures:[Landroid/content/pm/Signature;
aget-object v0, v0, v1
invoke-virtual {v0}, Landroid/content/pm/Signature;->toByteArray()[B
move-result-object v0
invoke-direct {v3, v0}, Lcom/google/android/gms/common/zzc$zzb;-><init>([B)V
if-eqz p2, :cond_1
invoke-static {}, Lcom/google/android/gms/common/zzc;->zzpc()Ljava/util/Set;
move-result-object v0
:goto_1
invoke-interface {v0, v3}, Ljava/util/Set;->contains(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_2
move v0, v2
goto :goto_0
:cond_1
invoke-static {}, Lcom/google/android/gms/common/zzc;->zzpd()Ljava/util/Set;
move-result-object v0
goto :goto_1
:cond_2
const-string/jumbo v0, "GoogleSignatureVerifier"
const/4 v2, 0x2
invoke-static {v0, v2}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
move-result v0
if-eqz v0, :cond_3
const-string/jumbo v0, "GoogleSignatureVerifier"
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
const-string/jumbo v4, "Signature not valid. Found: \n"
invoke-virtual {v2, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v3}, Lcom/google/android/gms/common/zzc$zza;->getBytes()[B
move-result-object v3
invoke-static {v3, v1}, Landroid/util/Base64;->encodeToString([BI)Ljava/lang/String;
move-result-object v3
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
invoke-static {v0, v2}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I
:cond_3
move v0, v1
goto :goto_0
.end method
# virtual methods
.method public isPackageGoogleSigned(Landroid/content/pm/PackageManager;Landroid/content/pm/PackageInfo;)Z
.locals 3
.param p1, "packageManager" # Landroid/content/pm/PackageManager;
.param p2, "packageInfo" # Landroid/content/pm/PackageInfo;
.prologue
const/4 v2, 0x1
const/4 v0, 0x0
if-nez p2, :cond_1
:cond_0
:goto_0
return v0
:cond_1
invoke-static {p1}, Lcom/google/android/gms/common/GooglePlayServicesUtilLight;->honorsDebugCertificates(Landroid/content/pm/PackageManager;)Z
move-result v1
if-eqz v1, :cond_2
invoke-direct {p0, p2, v2}, Lcom/google/android/gms/common/GoogleSignatureVerifier;->zzb(Landroid/content/pm/PackageInfo;Z)Z
move-result v0
goto :goto_0
:cond_2
invoke-direct {p0, p2, v0}, Lcom/google/android/gms/common/GoogleSignatureVerifier;->zzb(Landroid/content/pm/PackageInfo;Z)Z
move-result v0
if-nez v0, :cond_0
invoke-direct {p0, p2, v2}, Lcom/google/android/gms/common/GoogleSignatureVerifier;->zzb(Landroid/content/pm/PackageInfo;Z)Z
move-result v1
if-eqz v1, :cond_0
const-string/jumbo v1, "GoogleSignatureVerifier"
const-string/jumbo v2, "Test-keys aren\'t accepted on this build."
invoke-static {v1, v2}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
goto :goto_0
.end method
.method public isPackageGoogleSigned(Landroid/content/pm/PackageManager;Ljava/lang/String;)Z
.locals 3
.param p1, "packageManager" # Landroid/content/pm/PackageManager;
.param p2, "callingPackage" # Ljava/lang/String;
.prologue
const/16 v0, 0x40
:try_start_0
invoke-virtual {p1, p2, v0}, Landroid/content/pm/PackageManager;->getPackageInfo(Ljava/lang/String;I)Landroid/content/pm/PackageInfo;
:try_end_0
.catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_0 .. :try_end_0} :catch_0
move-result-object v0
invoke-virtual {p0, p1, v0}, Lcom/google/android/gms/common/GoogleSignatureVerifier;->isPackageGoogleSigned(Landroid/content/pm/PackageManager;Landroid/content/pm/PackageInfo;)Z
move-result v0
:goto_0
return v0
:catch_0
move-exception v0
const-string/jumbo v0, "GoogleSignatureVerifier"
const/4 v1, 0x3
invoke-static {v0, v1}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
move-result v0
if-eqz v0, :cond_0
const-string/jumbo v0, "GoogleSignatureVerifier"
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string/jumbo v2, "Package manager can\'t find package "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
const-string/jumbo v2, ", defaulting to false"
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
:cond_0
const/4 v0, 0x0
goto :goto_0
.end method
.method public isUidGoogleSigned(Landroid/content/pm/PackageManager;I)Z
.locals 5
.param p1, "packageManager" # Landroid/content/pm/PackageManager;
.param p2, "uid" # I
.prologue
const/4 v0, 0x0
invoke-virtual {p1, p2}, Landroid/content/pm/PackageManager;->getPackagesForUid(I)[Ljava/lang/String;
move-result-object v2
if-eqz v2, :cond_0
array-length v1, v2
if-nez v1, :cond_1
:cond_0
:goto_0
return v0
:cond_1
array-length v3, v2
move v1, v0
:goto_1
if-ge v1, v3, :cond_0
aget-object v4, v2, v1
invoke-virtual {p0, p1, v4}, Lcom/google/android/gms/common/GoogleSignatureVerifier;->isPackageGoogleSigned(Landroid/content/pm/PackageManager;Ljava/lang/String;)Z
move-result v4
if-eqz v4, :cond_2
const/4 v0, 0x1
goto :goto_0
:cond_2
add-int/lit8 v1, v1, 0x1
goto :goto_1
.end method
.method public verifyPackageIsGoogleSigned(Landroid/content/pm/PackageManager;Ljava/lang/String;)V
.locals 3
.param p1, "packageManager" # Landroid/content/pm/PackageManager;
.param p2, "callingPackage" # Ljava/lang/String;
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/SecurityException;
}
.end annotation
.prologue
invoke-virtual {p0, p1, p2}, Lcom/google/android/gms/common/GoogleSignatureVerifier;->isPackageGoogleSigned(Landroid/content/pm/PackageManager;Ljava/lang/String;)Z
move-result v0
if-nez v0, :cond_0
new-instance v0, Ljava/lang/SecurityException;
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string/jumbo v2, "Signature check failed for "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-direct {v0, v1}, Ljava/lang/SecurityException;-><init>(Ljava/lang/String;)V
throw v0
:cond_0
return-void
.end method
.method public verifyUidIsGoogleSigned(Landroid/content/pm/PackageManager;I)V
.locals 2
.param p1, "packageManager" # Landroid/content/pm/PackageManager;
.param p2, "uid" # I
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/SecurityException;
}
.end annotation
.prologue
if-nez p1, :cond_0
new-instance v0, Ljava/lang/SecurityException;
const-string/jumbo v1, "Unknown error: invalid Package Manager"
invoke-direct {v0, v1}, Ljava/lang/SecurityException;-><init>(Ljava/lang/String;)V
throw v0
:cond_0
invoke-virtual {p0, p1, p2}, Lcom/google/android/gms/common/GoogleSignatureVerifier;->isUidGoogleSigned(Landroid/content/pm/PackageManager;I)Z
move-result v0
if-nez v0, :cond_1
new-instance v0, Ljava/lang/SecurityException;
const-string/jumbo v1, "Uid is not Google Signed"
invoke-direct {v0, v1}, Ljava/lang/SecurityException;-><init>(Ljava/lang/String;)V
throw v0
:cond_1
return-void
.end method
.method varargs zza(Landroid/content/pm/PackageInfo;[Lcom/google/android/gms/common/zzc$zza;)Lcom/google/android/gms/common/zzc$zza;
.locals 6
const/4 v2, 0x0
const/4 v1, 0x0
iget-object v0, p1, Landroid/content/pm/PackageInfo;->signatures:[Landroid/content/pm/Signature;
array-length v0, v0
const/4 v3, 0x1
if-eq v0, v3, :cond_0
const-string/jumbo v0, "GoogleSignatureVerifier"
const-string/jumbo v1, "Package has more than one signature."
invoke-static {v0, v1}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
move-object v0, v2
:goto_0
return-object v0
:cond_0
new-instance v3, Lcom/google/android/gms/common/zzc$zzb;
iget-object v0, p1, Landroid/content/pm/PackageInfo;->signatures:[Landroid/content/pm/Signature;
aget-object v0, v0, v1
invoke-virtual {v0}, Landroid/content/pm/Signature;->toByteArray()[B
move-result-object v0
invoke-direct {v3, v0}, Lcom/google/android/gms/common/zzc$zzb;-><init>([B)V
move v0, v1
:goto_1
array-length v4, p2
if-ge v0, v4, :cond_2
aget-object v4, p2, v0
invoke-virtual {v4, v3}, Lcom/google/android/gms/common/zzc$zza;->equals(Ljava/lang/Object;)Z
move-result v4
if-eqz v4, :cond_1
aget-object v0, p2, v0
goto :goto_0
:cond_1
add-int/lit8 v0, v0, 0x1
goto :goto_1
:cond_2
const-string/jumbo v0, "GoogleSignatureVerifier"
const/4 v4, 0x2
invoke-static {v0, v4}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
move-result v0
if-eqz v0, :cond_3
const-string/jumbo v0, "GoogleSignatureVerifier"
new-instance v4, Ljava/lang/StringBuilder;
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V
const-string/jumbo v5, "Signature not valid. Found: \n"
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v4
invoke-virtual {v3}, Lcom/google/android/gms/common/zzc$zza;->getBytes()[B
move-result-object v3
invoke-static {v3, v1}, Landroid/util/Base64;->encodeToString([BI)Ljava/lang/String;
move-result-object v1
invoke-virtual {v4, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v0, v1}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I
:cond_3
move-object v0, v2
goto :goto_0
.end method
.method public zza(Landroid/content/pm/PackageInfo;Z)Z
.locals 4
const/4 v0, 0x1
const/4 v1, 0x0
if-eqz p1, :cond_1
iget-object v2, p1, Landroid/content/pm/PackageInfo;->signatures:[Landroid/content/pm/Signature;
if-eqz v2, :cond_1
if-eqz p2, :cond_0
sget-object v2, Lcom/google/android/gms/common/zzc$zzcm;->zzapV:[Lcom/google/android/gms/common/zzc$zza;
invoke-virtual {p0, p1, v2}, Lcom/google/android/gms/common/GoogleSignatureVerifier;->zza(Landroid/content/pm/PackageInfo;[Lcom/google/android/gms/common/zzc$zza;)Lcom/google/android/gms/common/zzc$zza;
move-result-object v2
:goto_0
if-eqz v2, :cond_1
:goto_1
return v0
:cond_0
new-array v2, v0, [Lcom/google/android/gms/common/zzc$zza;
sget-object v3, Lcom/google/android/gms/common/zzc$zzcm;->zzapV:[Lcom/google/android/gms/common/zzc$zza;
aget-object v3, v3, v1
aput-object v3, v2, v1
invoke-virtual {p0, p1, v2}, Lcom/google/android/gms/common/GoogleSignatureVerifier;->zza(Landroid/content/pm/PackageInfo;[Lcom/google/android/gms/common/zzc$zza;)Lcom/google/android/gms/common/zzc$zza;
move-result-object v2
goto :goto_0
:cond_1
move v0, v1
goto :goto_1
.end method
.method public zza(Landroid/content/pm/PackageManager;Landroid/content/pm/PackageInfo;)Z
.locals 3
const/4 v2, 0x1
const/4 v0, 0x0
if-nez p2, :cond_1
:cond_0
:goto_0
return v0
:cond_1
invoke-static {p1}, Lcom/google/android/gms/common/GooglePlayServicesUtilLight;->honorsDebugCertificates(Landroid/content/pm/PackageManager;)Z
move-result v1
if-eqz v1, :cond_2
invoke-virtual {p0, p2, v2}, Lcom/google/android/gms/common/GoogleSignatureVerifier;->zza(Landroid/content/pm/PackageInfo;Z)Z
move-result v0
goto :goto_0
:cond_2
invoke-virtual {p0, p2, v0}, Lcom/google/android/gms/common/GoogleSignatureVerifier;->zza(Landroid/content/pm/PackageInfo;Z)Z
move-result v0
if-nez v0, :cond_0
invoke-virtual {p0, p2, v2}, Lcom/google/android/gms/common/GoogleSignatureVerifier;->zza(Landroid/content/pm/PackageInfo;Z)Z
move-result v1
if-eqz v1, :cond_0
const-string/jumbo v1, "GoogleSignatureVerifier"
const-string/jumbo v2, "Test-keys aren\'t accepted on this build."
invoke-static {v1, v2}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
goto :goto_0
.end method

Those features are left out purposely because its illegal to include in certain areas. And so we don't need it discussed on XDA.
Thread closed.
Darth
Forum Moderator

Related

[HOWTO] Bypassing confirmation dialog for 'Exit all', an in-depth look!

This tutorial is going to delve into the convoluted smali involved in handling dialogs, and ultimately bypassing them. I must warn you there will be a lot of tracing in this post, so if all you want is the patch, this may not be for you. The idea is to gain an intimate understanding of dialogs from smali! (This is based on LPD base)
Decompile jobmanager.apk, then search for 'Exit all', which leads to public.xml: <public type="string" name="kill_all" id="0x7f050005" />
Searching for '7f050005' leads us to RunningAppsListActivity.smali (referred to as RALA from now on), which we can now dissect. Start by looking at some of the variables at the top of
code. Two should stand out:
Code:
.field private mKillAll:Landroid/widget/Button;
...
.field private mOnClickListenerKillAll:Landroid/view/View$OnClickListener;
These represent the button and the code that executes when it's clicked. Let's find out what that code is by searching, which leads to:
Code:
.line 308
new-instance v0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$6;
invoke-direct {v0, p0}, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$6;-><init>(Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;)V
iput-object v0, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->mOnClickListenerKillAll:Landroid/view/View$OnClickListener;
So now we know RALA$6 is our executed code:
Code:
.method public onClick(Landroid/view/View;)V
.locals 2
.parameter "v"
.prologue
.line 311
iget-object v0, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$6;->this$0:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;
const/4 v1, 0x5
invoke-virtual {v0, v1}, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->showDialog(I)V
.line 312
return-void
.end method
So what does this mean? When the button is clicked, it's calling back to RALA with a value of 0x5. Let's figure out what that means, look at '.method protected onCreateDialog'
Code:
packed-switch p1, :pswitch_data_0
(This is defined at the end of the method as)
:pswitch_data_0
.packed-switch 0x1
:pswitch_1
:pswitch_0
:pswitch_2
:pswitch_3
:pswitch_4
.end packed-switch
So our value when clicking the button is 0x5, which translates to pswitch_4
Code:
:pswitch_4
new-instance v3, Landroid/app/AlertDialog$Builder;
invoke-direct {v3, p0}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V
const v4, 0x7f050005 <<<<<<<<<<<<<<<<<<<<<<<<<< Remember this #, it's our 'Exit all' string id
...
new-instance v4, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$12;
invoke-direct {v4, p0}, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$12;-><init>(Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;)V
invoke-virtual {v3, v7, v4}, Landroid/app/AlertDialog$Builder;->setPositiveButton(ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;
This last line sets the code executed when you click 'Ok', so lets look at RALA$12, inside OnClick:
Code:
#getter for: Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->mHandler:Landroid/os/Handler;
invoke-static {v0}, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->access$300(Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;)Landroid/os/Handler;
move-result-object v0
const/4 v1, 0x6
invoke-virtual {v0, v1}, Landroid/os/Handler;->sendEmptyMessage(I)Z
So this is sending a code (0x6) to mHandler in the main RALA module, let's see what that means. mHandler is our message handler, and is defined here:
Code:
.line 331
new-instance v0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7;
invoke-direct {v0, p0}, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7;-><init>(Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;)V
iput-object v0, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->mHandler:Landroid/os/Handler;
So RALA$7 is our next target, specifically '.method public handleMessage(Landroid/os/MessageV':
Code:
iget v3, p1, Landroid/os/Message;->what:I
packed-switch v3, :pswitch_data_0
(which is)
.line 333
:pswitch_data_0
.packed-switch 0x1
:pswitch_0
:pswitch_1
:pswitch_2
:pswitch_3
:pswitch_4
:pswitch_5
:pswitch_6
:pswitch_7
.end packed-switch
(A side note, packed-switch 0x1 means the first entry starts with 0x1, so 0x6 is pswitch_5. Let's now look at that)
:pswitch_5
const-string v3, "RunningAppsListActivity"
const-string v4, "MSG_KILL_ALL"
invoke-static {v3, v4}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I
.line 410
iget-object v3, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7;->this$0:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;
new-instance v4, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7$4;
...
So finally we have reached the true code for executing KILL ALL, and it lies within RALA$7$4. If you look at '.method public run()V' in RALA$7$4, you will see the extensive code to kill all running apps. So now we that we have what we want, how do we bypass the dialog? Simple, just abort creating the dialog and execute the code instead.
Let's take a moment to review the execution entirely:
RALA assigns button -> RALA$6 which calls back RALA -> Create dlg and set OK -> RALA$12 which then calls the message handler RALA$7 with code 0x5 ->
RALA$7$4 which is the ACTUAL 'kill all' code.
So our intercept point is in RALA$6, where we can bypass the creation of the dialog and execute the code directly. Now you can't just copy/paste the code from RALA$7$4 to RALA$6, there are variables specific to each .smali. So this is the fixed code with the manual changes highlighted:
Code:
.method public onClick(Landroid/view/View;)V
.locals [COLOR="Red"]7[/COLOR]
.parameter "v"
.prologue
.line 311
iget-object v0, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$6;->this$0:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;
const/4 v1, 0x5
[COLOR="red"]#[/COLOR] invoke-virtual {v0, v1}, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->showDialog(I)V
.line 412
[COLOR="red"]#[/COLOR] iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7$4;->this$1:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7;
[COLOR="red"] iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$6;->this$0:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;[/COLOR]
#getter for: Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->mPackageInfoAdapter:Lcom/sec/android/app/controlpanel/activity/RunningAppsPackageInfoAdapter;
invoke-static {v4}, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->access$000(Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;)Lcom/sec/android/app/controlpanel/activity/RunningAppsPackageInfoAdapter;
move-result-object v4
invoke-virtual {v4}, Lcom/sec/android/app/controlpanel/activity/RunningAppsPackageInfoAdapter;->getBaseAppList()Ljava/util/List;
move-result-object v1
.line 413
.local v1, items:Ljava/util/List;,"Ljava/util/List<Lcom/sec/android/app/controlpanel/PackageInfoItem;>;"
new-instance v3, Ljava/util/HashSet;
invoke-direct {v3}, Ljava/util/HashSet;-><init>()V
.line 414
.local v3, removeTarget:Ljava/util/Set;,"Ljava/util/Set<Lcom/sec/android/app/controlpanel/PackageInfoItem;>;"
invoke-interface {v1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object v0
.local v0, i$:Ljava/util/Iterator;
:cond_0
:goto_0
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v4
if-eqz v4, :cond_1
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v2
check-cast v2, Lcom/sec/android/app/controlpanel/PackageInfoItem;
.line 415
.local v2, p:Lcom/sec/android/app/controlpanel/PackageInfoItem;
invoke-virtual {v2}, Lcom/sec/android/app/controlpanel/PackageInfoItem;->isCanKilled()Z
move-result v4
if-eqz v4, :cond_0
.line 416
const-string v4, "RunningAppsListActivity"
new-instance v5, Ljava/lang/StringBuilder;
invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V
const-string v6, "Kill runningApplication! "
invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v5
invoke-virtual {v2}, Lcom/sec/android/app/controlpanel/PackageInfoItem;->getPackageName()Ljava/lang/String;
move-result-object v6
invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v5
invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v5
invoke-static {v4, v5}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I
.line 417
[COLOR="red"]#[/COLOR] iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7$4;->this$1:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7;
[COLOR="red"] iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$6;->this$0:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;[/COLOR]
#getter for: Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->mPkgInfo:Lcom/sec/android/app/controlpanel/PackageInfo;
invoke-static {v4}, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->access$400(Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;)Lcom/sec/android/app/controlpanel/PackageInfo;
move-result-object v4
invoke-virtual {v2}, Lcom/sec/android/app/controlpanel/PackageInfoItem;->getPackageName()Ljava/lang/String;
move-result-object v5
const/4 v6, 0x1
invoke-virtual {v4, v5, v6}, Lcom/sec/android/app/controlpanel/PackageInfo;->killPackage(Ljava/lang/String;Z)V
.line 418
invoke-interface {v3, v2}, Ljava/util/Set;->add(Ljava/lang/Object;)Z
goto :goto_0
.line 421
.end local v2 #p:Lcom/sec/android/app/controlpanel/PackageInfoItem;
:cond_1
invoke-interface {v3}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
move-result-object v0
:goto_1
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v4
if-eqz v4, :cond_2
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v2
check-cast v2, Lcom/sec/android/app/controlpanel/PackageInfoItem;
.line 422
.restart local v2 #p:Lcom/sec/android/app/controlpanel/PackageInfoItem;
invoke-interface {v1, v2}, Ljava/util/List;->remove(Ljava/lang/Object;)Z
goto :goto_1
.line 424
.end local v2 #p:Lcom/sec/android/app/controlpanel/PackageInfoItem;
:cond_2
[COLOR="red"]#[/COLOR] iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7$4;->this$1:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7;
[COLOR="red"] iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$6;->this$0:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;[/COLOR]
#getter for: Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->mPackageInfoAdapter:Lcom/sec/android/app/controlpanel/activity/RunningAppsPackageInfoAdapter;
invoke-static {v4}, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->access$000(Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;)Lcom/sec/android/app/controlpanel/activity/RunningAppsPackageInfoAdapter;
move-result-object v4
invoke-virtual {v4, v1}, Lcom/sec/android/app/controlpanel/activity/RunningAppsPackageInfoAdapter;->setList(Ljava/util/List;)V
.line 425
[COLOR="red"]#[/COLOR] iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7$4;->this$1:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7;
[COLOR="red"] iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$6;->this$0:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;[/COLOR]
#getter for: Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->mPackageInfoAdapter:Lcom/sec/android/app/controlpanel/activity/RunningAppsPackageInfoAdapter;
invoke-static {v4}, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->access$000(Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;)Lcom/sec/android/app/controlpanel/activity/RunningAppsPackageInfoAdapter;
move-result-object v4
invoke-virtual {v4}, Lcom/sec/android/app/controlpanel/activity/RunningAppsPackageInfoAdapter;->notifyDataSetChanged()V
.line 428
[COLOR="red"]#[/COLOR] iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7$4;->this$1:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7;
[COLOR="red"] iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$6;->this$0:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;[/COLOR]
[COLOR="red"]#[/COLOR] iget-object v5, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7$4;->this$1:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7;
[COLOR="red"] iget-object v5, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$6;->this$0:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;[/COLOR]
const v6, 0x7f050028
invoke-virtual {v5, v6}, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->getText(I)Ljava/lang/CharSequence;
move-result-object v5
const/4 v6, 0x0
invoke-static {v4, v5, v6}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;
move-result-object v4
invoke-virtual {v4}, Landroid/widget/Toast;->show()V
.line 312
return-void
.end method
That is it, recompile JobManager.apk, u/l and test it out! Hope you enjoyed the tut =)
Why didn't I see this before, your holding out on us in chat.
LiLChris06 said:
Why didn't I see this before, your holding out on us in chat.
Click to expand...
Click to collapse
I finished this a few weeks back, but just got around to writing it up..I'm pretty sure you got a pastebin msg one night =)
PS - For those that just want the patch, just copy/paste that last code box into RALA$6 (replacing the existing onclick method).
Lovely piece of information, easily readable
thanks very much
Update for 4.0.4
The overall structure is still the same, but here's the updated patch based on 4.0.4 LPO. You paste this into RALA$6, replacing the existing onclick method:
Code:
.method public onClick(Landroid/view/View;)V
.locals 8
.prologue
const/4 v7, 0x0
.line 428
# iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7$4;->this$1:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7;
iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$6;->this$0:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;
#getter for: Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->mPackageInfoAdapter:Lcom/sec/android/app/controlpanel/activity/RunningAppsPackageInfoAdapter;
invoke-static {v4}, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->access$000(Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;)Lcom/sec/android/app/controlpanel/activity/RunningAppsPackageInfoAdapter;
move-result-object v4
invoke-virtual {v4}, Lcom/sec/android/app/controlpanel/activity/RunningAppsPackageInfoAdapter;->getBaseAppList()Ljava/util/List;
move-result-object v1
.line 429
.local v1, items:Ljava/util/List;,"Ljava/util/List<Lcom/sec/android/app/controlpanel/PackageInfoItem;>;"
new-instance v3, Ljava/util/HashSet;
invoke-direct {v3}, Ljava/util/HashSet;-><init>()V
.line 432
.local v3, removeTarget:Ljava/util/Set;,"Ljava/util/Set<Lcom/sec/android/app/controlpanel/PackageInfoItem;>;"
if-eqz v1, :cond_3
.line 433
invoke-interface {v1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object v0
.local v0, i$:Ljava/util/Iterator;
:cond_0
:goto_0
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v4
if-eqz v4, :cond_1
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v2
check-cast v2, Lcom/sec/android/app/controlpanel/PackageInfoItem;
.line 434
.local v2, p:Lcom/sec/android/app/controlpanel/PackageInfoItem;
invoke-virtual {v2}, Lcom/sec/android/app/controlpanel/PackageInfoItem;->isCanKilled()Z
move-result v4
if-eqz v4, :cond_0
.line 437
# iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7$4;->this$1:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7;
iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$6;->this$0:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;
#getter for: Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->mPkgInfo:Lcom/sec/android/app/controlpanel/PackageInfo;
invoke-static {v4}, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->access$400(Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;)Lcom/sec/android/app/controlpanel/PackageInfo;
move-result-object v4
invoke-virtual {v2}, Lcom/sec/android/app/controlpanel/PackageInfoItem;->getPackageName()Ljava/lang/String;
move-result-object v5
const/4 v6, 0x1
invoke-virtual {v4, v5, v6}, Lcom/sec/android/app/controlpanel/PackageInfo;->killPackage(Ljava/lang/String;Z)V
.line 438
invoke-interface {v3, v2}, Ljava/util/Set;->add(Ljava/lang/Object;)Z
goto :goto_0
.line 441
.end local v2 #p:Lcom/sec/android/app/controlpanel/PackageInfoItem;
:cond_1
invoke-interface {v3}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
move-result-object v0
:goto_1
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v4
if-eqz v4, :cond_2
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v2
check-cast v2, Lcom/sec/android/app/controlpanel/PackageInfoItem;
.line 442
.restart local v2 #p:Lcom/sec/android/app/controlpanel/PackageInfoItem;
invoke-interface {v1, v2}, Ljava/util/List;->remove(Ljava/lang/Object;)Z
goto :goto_1
.line 444
.end local v2 #p:Lcom/sec/android/app/controlpanel/PackageInfoItem;
:cond_2
# iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7$4;->this$1:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7;
iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$6;->this$0:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;
#getter for: Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->mPackageInfoAdapter:Lcom/sec/android/app/controlpanel/activity/RunningAppsPackageInfoAdapter;
invoke-static {v4}, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->access$000(Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;)Lcom/sec/android/app/controlpanel/activity/RunningAppsPackageInfoAdapter;
move-result-object v4
invoke-virtual {v4, v1}, Lcom/sec/android/app/controlpanel/activity/RunningAppsPackageInfoAdapter;->setList(Ljava/util/List;)V
.line 445
# iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7$4;->this$1:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7;
iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$6;->this$0:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;
#getter for: Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->mPackageInfoAdapter:Lcom/sec/android/app/controlpanel/activity/RunningAppsPackageInfoAdapter;
invoke-static {v4}, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->access$000(Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;)Lcom/sec/android/app/controlpanel/activity/RunningAppsPackageInfoAdapter;
move-result-object v4
invoke-virtual {v4}, Lcom/sec/android/app/controlpanel/activity/RunningAppsPackageInfoAdapter;->notifyDataSetChanged()V
.line 447
const/4 v4, 0x2
const/4 v5, 0x0
:try_start_0
invoke-static {v4, v5}, Lcom/sec/android/hardware/SecHardwareInterface;->setBatteryUse(IZ)V
.line 448
const/4 v4, 0x3
const/4 v5, 0x0
invoke-static {v4, v5}, Lcom/sec/android/hardware/SecHardwareInterface;->setBatteryUse(IZ)V
.line 449
const/4 v4, 0x4
const/4 v5, 0x0
invoke-static {v4, v5}, Lcom/sec/android/hardware/SecHardwareInterface;->setBatteryUse(IZ)V
.line 450
const/4 v4, 0x5
const/4 v5, 0x0
invoke-static {v4, v5}, Lcom/sec/android/hardware/SecHardwareInterface;->setBatteryUse(IZ)V
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
.line 457
:goto_2
# iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7$4;->this$1:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7;
iget-object v4, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$6;->this$0:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;
# iget-object v5, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7$4;->this$1:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$7;
iget-object v5, p0, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity$6;->this$0:Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;
const v6, 0x7f050028
invoke-virtual {v5, v6}, Lcom/sec/android/app/controlpanel/activity/RunningAppsListActivity;->getText(I)Ljava/lang/CharSequence;
move-result-object v5
invoke-static {v4, v5, v7}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;
move-result-object v4
invoke-virtual {v4}, Landroid/widget/Toast;->show()V
.line 461
.end local v0 #i$:Ljava/util/Iterator;
:cond_3
return-void
.line 451
.restart local v0 #i$:Ljava/util/Iterator;
:catch_0
move-exception v4
goto :goto_2
.end method

Need help with smali code modification to defeat root check for Virgin TV Anywhere

Hey guys,
I have modded 2-3 Android Apps for Root check and I was able to use them without problem on my rooted device. However this app is giving me a lot of issues. I believe I have found the 2 smali files that have the root check. Does anyone know what needs to be modded or how it needs to be modded on these 2 smali files to bypass the root detection or to make the app believe the device is not rooted?
AppStartMeasurement.smali
Code:
.class public Lcom/comscore/applications/AppStartMeasurement;
.super Lcom/comscore/applications/ApplicationMeasurement;
# direct methods
.method protected constructor <init>(Lcom/comscore/analytics/Core;Lcom/comscore/applications/EventType;Ljava/lang/String;Z)V
.locals 5
const/4 v4, 0x0
invoke-direct {p0, p1, p2, p3, p4}, Lcom/comscore/applications/ApplicationMeasurement;-><init>(Lcom/comscore/analytics/Core;Lcom/comscore/applications/EventType;Ljava/lang/String;Z)V
new-instance v0, Lcom/comscore/measurement/Label;
const-string v1, "ns_ap_gs"
invoke-virtual {p1}, Lcom/comscore/analytics/Core;->getFirstInstallId()J
move-result-wide v2
invoke-static {v2, v3}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;
move-result-object v2
invoke-static {v4}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
move-result-object v3
invoke-direct {v0, v1, v2, v3}, Lcom/comscore/measurement/Label;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;)V
invoke-virtual {p0, v0}, Lcom/comscore/applications/AppStartMeasurement;->setLabel(Lcom/comscore/measurement/Label;)V
new-instance v0, Lcom/comscore/measurement/Label;
const-string v1, "ns_ap_install"
invoke-virtual {p1}, Lcom/comscore/analytics/Core;->getInstallId()J
move-result-wide v2
invoke-static {v2, v3}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;
move-result-object v2
invoke-static {v4}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
move-result-object v3
invoke-direct {v0, v1, v2, v3}, Lcom/comscore/measurement/Label;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;)V
invoke-virtual {p0, v0}, Lcom/comscore/applications/AppStartMeasurement;->setLabel(Lcom/comscore/measurement/Label;)V
new-instance v0, Lcom/comscore/measurement/Label;
const-string v1, "ns_ap_runs"
invoke-virtual {p1}, Lcom/comscore/analytics/Core;->getRunsCount()I
move-result v2
invoke-static {v2}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
move-result-object v2
invoke-static {v4}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
move-result-object v3
invoke-direct {v0, v1, v2, v3}, Lcom/comscore/measurement/Label;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;)V
invoke-virtual {p0, v0}, Lcom/comscore/applications/AppStartMeasurement;->setLabel(Lcom/comscore/measurement/Label;)V
if-eqz p4, :cond_0
new-instance v0, Lcom/comscore/measurement/Label;
const-string v1, "ns_ap_csf"
const-string v2, "1"
invoke-static {v4}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
move-result-object v3
invoke-direct {v0, v1, v2, v3}, Lcom/comscore/measurement/Label;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;)V
invoke-virtual {p0, v0}, Lcom/comscore/applications/AppStartMeasurement;->setLabel(Lcom/comscore/measurement/Label;)V
:cond_0
const-string v0, "0"
invoke-static {}, Lcom/comscore/utils/RootDetector;->isDeviceRooted()Z
move-result v1
if-eqz v1, :cond_1
const-string v0, "1"
:cond_1
new-instance v1, Lcom/comscore/measurement/Label;
const-string v2, "ns_ap_jb"
invoke-static {v4}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
move-result-object v3
invoke-direct {v1, v2, v0, v3}, Lcom/comscore/measurement/Label;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;)V
invoke-virtual {p0, v1}, Lcom/comscore/applications/AppStartMeasurement;->setLabel(Lcom/comscore/measurement/Label;)V
new-instance v0, Lcom/comscore/measurement/Label;
const-string v1, "ns_ap_lastrun"
invoke-virtual {p1}, Lcom/comscore/analytics/Core;->getPreviousGenesis()J
move-result-wide v2
invoke-static {v2, v3}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;
move-result-object v2
invoke-static {v4}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
move-result-object v3
invoke-direct {v0, v1, v2, v3}, Lcom/comscore/measurement/Label;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;)V
invoke-virtual {p0, v0}, Lcom/comscore/applications/AppStartMeasurement;->setLabel(Lcom/comscore/measurement/Label;)V
invoke-virtual {p1}, Lcom/comscore/analytics/Core;->getPreviousVersion()Ljava/lang/String;
move-result-object v0
if-eqz v0, :cond_2
invoke-virtual {v0}, Ljava/lang/String;->length()I
move-result v1
if-lez v1, :cond_2
new-instance v1, Lcom/comscore/measurement/Label;
const-string v2, "ns_ap_updated"
invoke-static {v4}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
move-result-object v3
invoke-direct {v1, v2, v0, v3}, Lcom/comscore/measurement/Label;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Boolean;)V
invoke-virtual {p0, v1}, Lcom/comscore/applications/AppStartMeasurement;->setLabel(Lcom/comscore/measurement/Label;)V
:cond_2
return-void
.end method
RootDetector.smali
Code:
.class public Lcom/comscore/utils/RootDetector;
.super Ljava/lang/Object;
# direct methods
.method public constructor <init>()V
.locals 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method private static a()Z
.locals 2
sget-object v0, Landroid/os/Build;->TAGS:Ljava/lang/String;
if-eqz v0, :cond_0
const-string v1, "test-keys"
invoke-virtual {v0, v1}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-eqz v0, :cond_0
const/4 v0, 0x1
:goto_0
return v0
:cond_0
const/4 v0, 0x0
goto :goto_0
.end method
.method private static b()Z
.locals 2
:try_start_0
new-instance v0, Ljava/io/File;
const-string v1, "/system/app/Superuser.apk"
invoke-direct {v0, v1}, Ljava/io/File;-><init>(Ljava/lang/String;)V
invoke-virtual {v0}, Ljava/io/File;->exists()Z
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
move-result v0
if-eqz v0, :cond_0
const/4 v0, 0x1
:goto_0
return v0
:catch_0
move-exception v0
:cond_0
const/4 v0, 0x0
goto :goto_0
.end method
.method public static isDeviceRooted()Z
.locals 2
const/4 v0, 0x1
invoke-static {}, Lcom/comscore/utils/RootDetector;->a()Z
move-result v1
if-eqz v1, :cond_1
:cond_0
:goto_0
return v0
:cond_1
invoke-static {}, Lcom/comscore/utils/RootDetector;->b()Z
move-result v1
if-nez v1, :cond_0
const/4 v0, 0x0
goto :goto_0
.end method
just change this line:
const-string v1, "/system/app/Superuser.apk"
to this:
const-string v1, "/system/app/GTFOSTUPIDASS.apk"
saulin78 said:
Hey guys,
I have modded 2-3 Android Apps for Root check and I was able to use them without problem on my rooted device. However this app is giving me a lot of issues. I believe I have found the 2 smali files that have the root check. Does anyone know what needs to be modded or how it needs to be modded on these 2 smali files to bypass the root detection or to make the app believe the device is not rooted?
.end method
[/CODE]
Click to expand...
Click to collapse
I'm in the same boat. Narrowed it down to those two files. I've tried several methods but this app keeps detecting root. I'm still trying so I'll let you know if I have any success, did you ever find a solution?

tmobile unlock app hack?

hi anyone has found a hack to crack open the tmobile unlock app?i search everywhere and no answer to that question
we have access to the unlock app is there anyone able to look at the inner working of the app to see what it does.we have root an unlocked bootloader maybe someone with the right skills could find a way to access the modem that by the way is read only i try everything already.
anyone?
i guess i might be asking to the wrong people.
Not possible. The unlock app gets its unlock code from the TMobile server. The IMEI also must be in TMobile's server in order for the unlock app to work. The V10 is not the first phone to use the unlock app. This goes back to LG G4. They couldn't unlock the G4 without the unlock app so I doubt the V10 is any different. Make sure the T-Mobile IMEI checker is able to find your phones IMEI before it is possible to unlock with the app. If the IMEI is not in the data base then the phone is not purchased from a T-Mobile store. It's most likely purchased from an LG partner program. If that's the case then you're SOL. You'll have to though the FCC to get it to unlock. It may take weeks or months to get it unlocked. Good luck with that.
If the commands used by the app could be logged then they could be emulated by an app, box or software that prompts for the code. It would be a matter of buying an unlock code so the app or software can insert it in the proper string and send it to the phone. Just an idea I've seen similar procedures done in other types of "scenes".
Apexseal said:
If the commands used by the app could be logged then they could be emulated by an app, box or software that prompts for the code. It would be a matter of buying an unlock code so the app or software can insert it in the proper string and send it to the phone. Just an idea I've seen similar procedures done in other types of "scenes".
Click to expand...
Click to collapse
yes i'm sure it can be emulated, the app doesnt do the unlocking , it only sends the unlock execution COMMAND , it sends the command to a file called "tsdeamon" in system/bin, which actually executes the unlock and is only found on tmo variant devices.The app just accesses the tmo server , confirms eligibility and actually gets the unlock code for your devices imei, you just dont see it.you could also port the default unlock menu from say at&t variant but the simunlockapp refuses to open and just fc's
Can the app be tricked into believing it is talking to the server so we can inject the unlock code to it? Can the server/app comms be logged?
Apexseal said:
Can the app be tricked into believing it is talking to the server so we can inject the unlock code to it? Can the server/app comms be logged?
Click to expand...
Click to collapse
exactly what i was thinking lol.i know i decompiled the app before and there was something about server address in it.i don't know how to log it though
Found this... Seems interesting, If what I posted is against the rules please delete.
Code:
.class public Lcom/tmobile/simlock/TrustletProtocol;
.super Ljava/lang/Object;
# interfaces
.implements Lcom/tmobile/simlock/w;
# static fields
.field private static final END_TIME_SIZE_BYTES:I = 0x4
.field private static final EXPIRY_TIME_OFFSET_BYTES:I = 0x14c
.field private static final HMAC_SIZE_BYTES:I = 0x20
.field private static final IMEI_SIZE_BYTES:I = 0x10
.field private static final MAC_SIZE_BYTES:I = 0x20
.field private static final MILLS_PER_SECOND:I = 0x3e8
.field private static final RESPONSE_MESSAGE_LENGTH_OFFSET:I = 0x2
.field private static final SERVER_ERROR_MESSAGE_LENGTH_OFFSET:I = 0xc
.field private static final SERVER_ERROR_MESSAGE_OFFSET:I = 0x10
.field public static final SERVER_URL:Ljava/lang/String; = "https://unlock.t-mobile.com/unlock/unlock"
.field private static final SIGNATURE_SIZE_BYTES:I = 0x100
.field private static final SIMLOCK_SETTINGS_LENGTH_BYTES:I = 0x4
.field private static final SIMLOCK_SETTINGS_VERSION_MAJOR_OFFSET:I = 0x0
.field private static final SIMLOCK_SETTINGS_VERSION_MINOR_OFFSET:I = 0x2
.field private static final START_TIME_SIZE_BYTES:I = 0x8
.field private static final TAG:Ljava/lang/String; = null
.field private static final UNLOCK_REQUEST_FIXME:I = 0x4
.field private static final UNLOCK_REQUEST_PARTIAL:I = 0x3
.field private static final UNLOCK_REQUEST_PERMANENT:I = 0x2
.field private static final UNLOCK_REQUEST_RESERVED:I = 0x0
.field private static final UNLOCK_REQUEST_TEMPORARY:I = 0x1
.field private static final UNLOCK_SERVER_RESPONSE_TYPE:B = 0x28t
.field private static mSimLockJniLoaded:Z
# instance fields
.field private mHttp:Lcom/tmobile/simlock/n;
.field private mLockedUntil:J
.field private mRebootRequired:Z
.field private mUseAttestation:Z
.field private serverMessage:Ljava/lang/String;
# direct methods
.method static constructor <clinit>()V
.locals 2
const-class v0, Lcom/tmobile/simlock/TrustletProtocol;
invoke-virtual {v0}, Ljava/lang/Class;->getName()Ljava/lang/String;
move-result-object v0
sput-object v0, Lcom/tmobile/simlock/TrustletProtocol;->TAG:Ljava/lang/String;
const/4 v0, 0x0
sput-boolean v0, Lcom/tmobile/simlock/TrustletProtocol;->mSimLockJniLoaded:Z
:try_start_0
const-string v0, "simlockjni"
invoke-static {v0}, Ljava/lang/System;->loadLibrary(Ljava/lang/String;)V
const/4 v0, 0x1
sput-boolean v0, Lcom/tmobile/simlock/TrustletProtocol;->mSimLockJniLoaded:Z
:try_end_0
.catch Ljava/lang/UnsatisfiedLinkError; {:try_start_0 .. :try_end_0} :catch_0
:goto_0
return-void
:catch_0
move-exception v0
sget-object v0, Lcom/tmobile/simlock/TrustletProtocol;->TAG:Ljava/lang/String;
const-string v1, "Cannot load simlockjni library!"
invoke-static {v0, v1}, Lcom/tmobile/simlock/s;->a(Ljava/lang/String;Ljava/lang/String;)V
goto :goto_0
.end method
.method public constructor <init>(Lcom/tmobile/simlock/n;Landroid/content/SharedPreferences;)V
.locals 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
const/4 v0, 0x0
iput-boolean v0, p0, Lcom/tmobile/simlock/TrustletProtocol;->mRebootRequired:Z
const/4 v0, 0x1
iput-boolean v0, p0, Lcom/tmobile/simlock/TrustletProtocol;->mUseAttestation:Z
iput-object p1, p0, Lcom/tmobile/simlock/TrustletProtocol;->mHttp:Lcom/tmobile/simlock/n;
sget-boolean v0, Lcom/tmobile/simlock/TrustletProtocol;->mSimLockJniLoaded:Z
if-nez v0, :cond_0
new-instance v0, Ljava/lang/ExceptionInInitializerError;
invoke-direct {v0}, Ljava/lang/ExceptionInInitializerError;-><init>()V
throw v0
:cond_0
return-void
.end method
.method private static native createAttestationRequest([B)[B
.end method
.method private static native createRegisterKeyRequest([B)[B
.end method
.method private static native createUnlockRequest([BI)[B
.end method
.method private static native processResponse([B[B)[B
.end method
.method private static native requestSLBReset()V
.end method
.method private runProtocol([B)V
.locals 12
const/4 v11, 0x1
const/4 v10, 0x0
new-array v1, v11, [B
aput-byte v10, v1, v10
:goto_0
if-eqz p1, :cond_5
iget-object v0, p0, Lcom/tmobile/simlock/TrustletProtocol;->mHttp:Lcom/tmobile/simlock/n;
invoke-virtual {v0, p1}, Lcom/tmobile/simlock/n;->a([B)[B
move-result-object v2
aget-byte v0, v2, v10
const/16 v3, 0x28
if-ne v0, v3, :cond_0
invoke-static {v2}, Ljava/nio/ByteBuffer;->wrap([B)Ljava/nio/ByteBuffer;
move-result-object v0
sget-object v3, Ljava/nio/ByteOrder;->BIG_ENDIAN:Ljava/nio/ByteOrder;
invoke-virtual {v0, v3}, Ljava/nio/ByteBuffer;->order(Ljava/nio/ByteOrder;)Ljava/nio/ByteBuffer;
const/4 v3, 0x2
invoke-virtual {v0, v3}, Ljava/nio/ByteBuffer;->getShort(I)S
move-result v3
sget-object v4, Lcom/tmobile/simlock/TrustletProtocol;->TAG:Ljava/lang/String;
new-instance v5, Ljava/lang/StringBuilder;
invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V
const-string v6, "lenOfMessage: "
invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v5
invoke-virtual {v5, v3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v5
invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v5
invoke-static {v4, v5}, Lcom/tmobile/simlock/s;->a(Ljava/lang/String;Ljava/lang/String;)V
const/16 v4, 0xc
invoke-virtual {v0, v4}, Ljava/nio/ByteBuffer;->getInt(I)I
move-result v4
sget-object v5, Lcom/tmobile/simlock/TrustletProtocol;->TAG:Ljava/lang/String;
new-instance v6, Ljava/lang/StringBuilder;
invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V
const-string v7, "lenOfServerError: "
invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v6
invoke-virtual {v6, v4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v6
invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v6
invoke-static {v5, v6}, Lcom/tmobile/simlock/s;->a(Ljava/lang/String;Ljava/lang/String;)V
add-int/lit8 v4, v4, 0x10
add-int/lit8 v4, v4, 0x4
add-int/lit8 v4, v4, 0x2
invoke-virtual {v0, v4}, Ljava/nio/ByteBuffer;->getShort(I)S
move-result v4
sget-object v5, Lcom/tmobile/simlock/TrustletProtocol;->TAG:Ljava/lang/String;
new-instance v6, Ljava/lang/StringBuilder;
invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V
const-string v7, "minVersion: "
invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v6
invoke-virtual {v6, v4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v6
invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v6
invoke-static {v5, v6}, Lcom/tmobile/simlock/s;->a(Ljava/lang/String;Ljava/lang/String;)V
if-nez v4, :cond_4
add-int/lit16 v3, v3, -0x14c
invoke-virtual {v0, v3}, Ljava/nio/ByteBuffer;->position(I)Ljava/nio/Buffer;
:goto_1
invoke-virtual {v0}, Ljava/nio/ByteBuffer;->getLong()J
move-result-wide v4
invoke-virtual {v0}, Ljava/nio/ByteBuffer;->getInt()I
move-result v0
int-to-long v6, v0
sget-object v0, Lcom/tmobile/simlock/TrustletProtocol;->TAG:Ljava/lang/String;
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
const-string v8, "Extracted unlock ending time (milliseconds): "
invoke-virtual {v3, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v3
invoke-virtual {v3, v4, v5}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
move-result-object v3
const-string v8, " + "
invoke-virtual {v3, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v3
invoke-virtual {v3, v6, v7}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
move-result-object v3
const-string v8, " seconds"
invoke-virtual {v3, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v3
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v3
invoke-static {v0, v3}, Lcom/tmobile/simlock/s;->a(Ljava/lang/String;Ljava/lang/String;)V
const-wide/16 v8, 0x3e8
mul-long/2addr v6, v8
add-long/2addr v4, v6
iput-wide v4, p0, Lcom/tmobile/simlock/TrustletProtocol;->mLockedUntil:J
:cond_0
sget-object v0, Lcom/tmobile/simlock/TrustletProtocol;->TAG:Ljava/lang/String;
const-string v3, "runProtocol: processing the response..."
invoke-static {v0, v3}, Lcom/tmobile/simlock/s;->a(Ljava/lang/String;Ljava/lang/String;)V
invoke-static {v2, v1}, Lcom/tmobile/simlock/TrustletProtocol;->processResponse([B[B)[B
move-result-object v0
if-nez v0, :cond_1
sget-object v3, Lcom/tmobile/simlock/TrustletProtocol;->TAG:Ljava/lang/String;
const-string v4, "runProtocol: processResponse returned null!"
invoke-static {v3, v4}, Lcom/tmobile/simlock/s;->b(Ljava/lang/String;Ljava/lang/String;)V
:cond_1
aget-byte v2, v2, v10
const/16 v3, 0x3c
if-ne v2, v3, :cond_2
if-eqz v0, :cond_2
new-instance v2, Ljava/lang/String;
const-string v3, "UTF-8"
invoke-static {v3}, Ljava/nio/charset/Charset;->forName(Ljava/lang/String;)Ljava/nio/charset/Charset;
move-result-object v3
invoke-direct {v2, v0, v3}, Ljava/lang/String;-><init>([BLjava/nio/charset/Charset;)V
iput-object v2, p0, Lcom/tmobile/simlock/TrustletProtocol;->serverMessage:Ljava/lang/String;
const/4 v0, 0x0
:cond_2
sget-object v2, Lcom/tmobile/simlock/TrustletProtocol;->TAG:Ljava/lang/String;
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
const-string v4, "Server message: "
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v3
iget-object v4, p0, Lcom/tmobile/simlock/TrustletProtocol;->serverMessage:Ljava/lang/String;
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v3
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v3
invoke-static {v2, v3}, Lcom/tmobile/simlock/s;->a(Ljava/lang/String;Ljava/lang/String;)V
aget-byte v2, v1, v10
if-eqz v2, :cond_3
iput-boolean v11, p0, Lcom/tmobile/simlock/TrustletProtocol;->mRebootRequired:Z
:cond_3
sget-object v2, Lcom/tmobile/simlock/TrustletProtocol;->TAG:Ljava/lang/String;
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
const-string v4, "Need to reboot? "
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v3
iget-boolean v4, p0, Lcom/tmobile/simlock/TrustletProtocol;->mRebootRequired:Z
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;
move-result-object v3
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v3
invoke-static {v2, v3}, Lcom/tmobile/simlock/s;->a(Ljava/lang/String;Ljava/lang/String;)V
move-object p1, v0
goto/16 :goto_0
:cond_4
add-int/lit16 v3, v3, -0x14c
add-int/lit8 v3, v3, -0x10
invoke-virtual {v0, v3}, Ljava/nio/ByteBuffer;->position(I)Ljava/nio/Buffer;
goto/16 :goto_1
:cond_5
return-void
.end method
.method private unlock(ILjava/lang/String;)V
.locals 3
sget-object v0, Lcom/tmobile/simlock/TrustletProtocol;->TAG:Ljava/lang/String;
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "onUnlock called, with unlock type of "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v0, v1}, Lcom/tmobile/simlock/s;->a(Ljava/lang/String;Ljava/lang/String;)V
sget-object v0, Lcom/tmobile/simlock/TrustletProtocol;->TAG:Ljava/lang/String;
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "Using IMSI: "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v0, v1}, Lcom/tmobile/simlock/s;->a(Ljava/lang/String;Ljava/lang/String;)V
if-eqz p2, :cond_0
invoke-virtual {p2}, Ljava/lang/String;->getBytes()[B
move-result-object v0
:goto_0
invoke-static {v0, p1}, Lcom/tmobile/simlock/TrustletProtocol;->createUnlockRequest([BI)[B
move-result-object v0
invoke-direct {p0, v0}, Lcom/tmobile/simlock/TrustletProtocol;->runProtocol([B)V
sget-object v0, Lcom/tmobile/simlock/TrustletProtocol;->TAG:Ljava/lang/String;
const-string v1, "Succesfully ran the unlock protocol"
invoke-static {v0, v1}, Lcom/tmobile/simlock/s;->a(Ljava/lang/String;Ljava/lang/String;)V
return-void
:cond_0
const/4 v0, 0x0
goto :goto_0
.end method
# virtual methods
.method public getServerMessage()Ljava/lang/String;
.locals 1
iget-object v0, p0, Lcom/tmobile/simlock/TrustletProtocol;->serverMessage:Ljava/lang/String;
return-object v0
.end method
.method public isRebootRequired()Z
.locals 1
iget-boolean v0, p0, Lcom/tmobile/simlock/TrustletProtocol;->mRebootRequired:Z
return v0
.end method
.method public partialUnlock(Ljava/lang/String;)V
.locals 1
const/4 v0, 0x3
invoke-direct {p0, v0, p1}, Lcom/tmobile/simlock/TrustletProtocol;->unlock(ILjava/lang/String;)V
return-void
.end method
.method public permanentUnlock(Ljava/lang/String;)V
.locals 1
const/4 v0, 0x2
invoke-direct {p0, v0, p1}, Lcom/tmobile/simlock/TrustletProtocol;->unlock(ILjava/lang/String;)V
return-void
.end method
.method public registerKey(Ljava/lang/String;)V
.locals 3
sget-object v0, Lcom/tmobile/simlock/TrustletProtocol;->TAG:Ljava/lang/String;
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "Using IMEI: "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v0, v1}, Lcom/tmobile/simlock/s;->a(Ljava/lang/String;Ljava/lang/String;)V
iget-boolean v0, p0, Lcom/tmobile/simlock/TrustletProtocol;->mUseAttestation:Z
if-eqz v0, :cond_0
if-eqz p1, :cond_1
invoke-virtual {p1}, Ljava/lang/String;->getBytes()[B
move-result-object v0
:goto_0
invoke-static {v0}, Lcom/tmobile/simlock/TrustletProtocol;->createAttestationRequest([B)[B
move-result-object v0
invoke-direct {p0, v0}, Lcom/tmobile/simlock/TrustletProtocol;->runProtocol([B)V
:cond_0
sget-object v0, Lcom/tmobile/simlock/TrustletProtocol;->TAG:Ljava/lang/String;
const-string v1, "Succesfully registered the key"
invoke-static {v0, v1}, Lcom/tmobile/simlock/s;->a(Ljava/lang/String;Ljava/lang/String;)V
return-void
:cond_1
const/4 v0, 0x0
goto :goto_0
.end method
.method public resetSLB()V
.locals 2
sget-object v0, Lcom/tmobile/simlock/TrustletProtocol;->TAG:Ljava/lang/String;
const-string v1, "SLB reset not available"
invoke-static {v0, v1}, Lcom/tmobile/simlock/s;->a(Ljava/lang/String;Ljava/lang/String;)V
return-void
.end method
.method public temporaryUnlock(Ljava/lang/String;)J
.locals 4
const-wide/16 v0, 0x0
iput-wide v0, p0, Lcom/tmobile/simlock/TrustletProtocol;->mLockedUntil:J
const/4 v0, 0x1
invoke-direct {p0, v0, p1}, Lcom/tmobile/simlock/TrustletProtocol;->unlock(ILjava/lang/String;)V
sget-object v0, Lcom/tmobile/simlock/TrustletProtocol;->TAG:Ljava/lang/String;
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "temporaryUnlock: until: "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
iget-wide v2, p0, Lcom/tmobile/simlock/TrustletProtocol;->mLockedUntil:J
invoke-virtual {v1, v2, v3}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v0, v1}, Lcom/tmobile/simlock/s;->a(Ljava/lang/String;Ljava/lang/String;)V
iget-wide v0, p0, Lcom/tmobile/simlock/TrustletProtocol;->mLockedUntil:J
return-wide v0
.end method
Apexseal said:
Found this... Seems interesting, If what I posted is against the rules please delete.
Code:
.class public Lcom/tmobile/simlock/TrustletProtocol;
.super Ljava/lang/Object;
# interfaces
.implements Lcom/tmobile/simlock/w;
# static fields
.field private static final END_TIME_SIZE_BYTES:I = 0x4
.field private static final EXPIRY_TIME_OFFSET_BYTES:I = 0x14c
.field private static final HMAC_SIZE_BYTES:I = 0x20
.field private static final IMEI_SIZE_BYTES:I = 0x10
.field private static final MAC_SIZE_BYTES:I = 0x20
.field private static final MILLS_PER_SECOND:I = 0x3e8
.field private static final RESPONSE_MESSAGE_LENGTH_OFFSET:I = 0x2
.field private static final SERVER_ERROR_MESSAGE_LENGTH_OFFSET:I = 0xc
.field private static final SERVER_ERROR_MESSAGE_OFFSET:I = 0x10
.field public static final SERVER_URL:Ljava/lang/String; = "https://unlock.t-mobile.com/unlock/unlock"
.field private static final SIGNATURE_SIZE_BYTES:I = 0x100
.field private static final SIMLOCK_SETTINGS_LENGTH_BYTES:I = 0x4
.field private static final SIMLOCK_SETTINGS_VERSION_MAJOR_OFFSET:I = 0x0
.field private static final SIMLOCK_SETTINGS_VERSION_MINOR_OFFSET:I = 0x2
.field private static final START_TIME_SIZE_BYTES:I = 0x8
.field private static final TAG:Ljava/lang/String; = null
.field private static final UNLOCK_REQUEST_FIXME:I = 0x4
.field private static final UNLOCK_REQUEST_PARTIAL:I = 0x3
.field private static final UNLOCK_REQUEST_PERMANENT:I = 0x2
.field private static final UNLOCK_REQUEST_RESERVED:I = 0x0
.field private static final UNLOCK_REQUEST_TEMPORARY:I = 0x1
.field private static final UNLOCK_SERVER_RESPONSE_TYPE:B = 0x28t
.field private static mSimLockJniLoaded:Z
# instance fields
.field private mHttp:Lcom/tmobile/simlock/n;
.field private mLockedUntil:J
.field private mRebootRequired:Z
.field private mUseAttestation:Z
.field private serverMessage:Ljava/lang/String;
# direct methods
.method static constructor <clinit>()V
.locals 2
const-class v0, Lcom/tmobile/simlock/TrustletProtocol;
invoke-virtual {v0}, Ljava/lang/Class;->getName()Ljava/lang/String;
move-result-object v0
sput-object v0, Lcom/tmobile/simlock/TrustletProtocol;->TAG:Ljava/lang/String;
const/4 v0, 0x0
sput-boolean v0, Lcom/tmobile/simlock/TrustletProtocol;->mSimLockJniLoaded:Z
:try_start_0
const-string v0, "simlockjni"
invoke-static {v0}, Ljava/lang/System;->loadLibrary(Ljava/lang/String;)V
const/4 v0, 0x1
sput-boolean v0, Lcom/tmobile/simlock/TrustletProtocol;->mSimLockJniLoaded:Z
:try_end_0
.catch Ljava/lang/UnsatisfiedLinkError; {:try_start_0 .. :try_end_0} :catch_0
:goto_0
return-void
:catch_0
move-exception v0
sget-object v0, Lcom/tmobile/simlock/TrustletProtocol;->TAG:Ljava/lang/String;
const-string v1, "Cannot load simlockjni library!"
invoke-static {v0, v1}, Lcom/tmobile/simlock/s;->a(Ljava/lang/String;Ljava/lang/String;)V
goto :goto_0
.end method
.method public constructor <init>(Lcom/tmobile/simlock/n;Landroid/content/SharedPreferences;)V
.locals 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
const/4 v0, 0x0
iput-boolean v0, p0, Lcom/tmobile/simlock/TrustletProtocol;->mRebootRequired:Z
const/4 v0, 0x1
iput-boolean v0, p0, Lcom/tmobile/simlock/TrustletProtocol;->mUseAttestation:Z
iput-object p1, p0, Lcom/tmobile/simlock/TrustletProtocol;->mHttp:Lcom/tmobile/simlock/n;
sget-boolean v0, Lcom/tmobile/simlock/TrustletProtocol;->mSimLockJniLoaded:Z
if-nez v0, :cond_0
new-instance v0, Ljava/lang/ExceptionInInitializerError;
invoke-direct {v0}, Ljava/lang/ExceptionInInitializerError;-><init>()V
throw v0
:cond_0
return-void
.end method
.method private static native createAttestationRequest([B)[B
.end method
.method private static native createRegisterKeyRequest([B)[B
.end method
.method private static native createUnlockRequest([BI)[B
.end method
.method private static native processResponse([B[B)[B
.end method
.method private static native requestSLBReset()V
.end method
.method private runProtocol([B)V
.locals 12
const/4 v11, 0x1
const/4 v10, 0x0
new-array v1, v11, [B
aput-byte v10, v1, v10
:goto_0
if-eqz p1, :cond_5
iget-object v0, p0, Lcom/tmobile/simlock/TrustletProtocol;->mHttp:Lcom/tmobile/simlock/n;
invoke-virtual {v0, p1}, Lcom/tmobile/simlock/n;->a([B)[B
move-result-object v2
aget-byte v0, v2, v10
const/16 v3, 0x28
if-ne v0, v3, :cond_0
invoke-static {v2}, Ljava/nio/ByteBuffer;->wrap([B)Ljava/nio/ByteBuffer;
move-result-object v0
sget-object v3, Ljava/nio/ByteOrder;->BIG_ENDIAN:Ljava/nio/ByteOrder;
invoke-virtual {v0, v3}, Ljava/nio/ByteBuffer;->order(Ljava/nio/ByteOrder;)Ljava/nio/ByteBuffer;
const/4 v3, 0x2
invoke-virtual {v0, v3}, Ljava/nio/ByteBuffer;->getShort(I)S
move-result v3
sget-object v4, Lcom/tmobile/simlock/TrustletProtocol;->TAG:Ljava/lang/String;
new-instance v5, Ljava/lang/StringBuilder;
invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V
const-string v6, "lenOfMessage: "
invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v5
invoke-virtual {v5, v3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v5
invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v5
invoke-static {v4, v5}, Lcom/tmobile/simlock/s;->a(Ljava/lang/String;Ljava/lang/String;)V
const/16 v4, 0xc
invoke-virtual {v0, v4}, Ljava/nio/ByteBuffer;->getInt(I)I
move-result v4
sget-object v5, Lcom/tmobile/simlock/TrustletProtocol;->TAG:Ljava/lang/String;
new-instance v6, Ljava/lang/StringBuilder;
invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V
const-string v7, "lenOfServerError: "
invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v6
invoke-virtual {v6, v4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v6
invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v6
invoke-static {v5, v6}, Lcom/tmobile/simlock/s;->a(Ljava/lang/String;Ljava/lang/String;)V
add-int/lit8 v4, v4, 0x10
add-int/lit8 v4, v4, 0x4
add-int/lit8 v4, v4, 0x2
invoke-virtual {v0, v4}, Ljava/nio/ByteBuffer;->getShort(I)S
move-result v4
sget-object v5, Lcom/tmobile/simlock/TrustletProtocol;->TAG:Ljava/lang/String;
new-instance v6, Ljava/lang/StringBuilder;
invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V
const-string v7, "minVersion: "
invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v6
invoke-virtual {v6, v4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v6
invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v6
invoke-static {v5, v6}, Lcom/tmobile/simlock/s;->a(Ljava/lang/String;Ljava/lang/String;)V
if-nez v4, :cond_4
add-int/lit16 v3, v3, -0x14c
invoke-virtual {v0, v3}, Ljava/nio/ByteBuffer;->position(I)Ljava/nio/Buffer;
:goto_1
invoke-virtual {v0}, Ljava/nio/ByteBuffer;->getLong()J
move-result-wide v4
invoke-virtual {v0}, Ljava/nio/ByteBuffer;->getInt()I
move-result v0
int-to-long v6, v0
sget-object v0, Lcom/tmobile/simlock/TrustletProtocol;->TAG:Ljava/lang/String;
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
const-string v8, "Extracted unlock ending time (milliseconds): "
invoke-virtual {v3, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v3
invoke-virtual {v3, v4, v5}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
move-result-object v3
const-string v8, " + "
invoke-virtual {v3, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v3
invoke-virtual {v3, v6, v7}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
move-result-object v3
const-string v8, " seconds"
invoke-virtual {v3, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v3
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v3
invoke-static {v0, v3}, Lcom/tmobile/simlock/s;->a(Ljava/lang/String;Ljava/lang/String;)V
const-wide/16 v8, 0x3e8
mul-long/2addr v6, v8
add-long/2addr v4, v6
iput-wide v4, p0, Lcom/tmobile/simlock/TrustletProtocol;->mLockedUntil:J
:cond_0
sget-object v0, Lcom/tmobile/simlock/TrustletProtocol;->TAG:Ljava/lang/String;
const-string v3, "runProtocol: processing the response..."
invoke-static {v0, v3}, Lcom/tmobile/simlock/s;->a(Ljava/lang/String;Ljava/lang/String;)V
invoke-static {v2, v1}, Lcom/tmobile/simlock/TrustletProtocol;->processResponse([B[B)[B
move-result-object v0
if-nez v0, :cond_1
sget-object v3, Lcom/tmobile/simlock/TrustletProtocol;->TAG:Ljava/lang/String;
const-string v4, "runProtocol: processResponse returned null!"
invoke-static {v3, v4}, Lcom/tmobile/simlock/s;->b(Ljava/lang/String;Ljava/lang/String;)V
:cond_1
aget-byte v2, v2, v10
const/16 v3, 0x3c
if-ne v2, v3, :cond_2
if-eqz v0, :cond_2
new-instance v2, Ljava/lang/String;
const-string v3, "UTF-8"
invoke-static {v3}, Ljava/nio/charset/Charset;->forName(Ljava/lang/String;)Ljava/nio/charset/Charset;
move-result-object v3
invoke-direct {v2, v0, v3}, Ljava/lang/String;-><init>([BLjava/nio/charset/Charset;)V
iput-object v2, p0, Lcom/tmobile/simlock/TrustletProtocol;->serverMessage:Ljava/lang/String;
const/4 v0, 0x0
:cond_2
sget-object v2, Lcom/tmobile/simlock/TrustletProtocol;->TAG:Ljava/lang/String;
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
const-string v4, "Server message: "
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v3
iget-object v4, p0, Lcom/tmobile/simlock/TrustletProtocol;->serverMessage:Ljava/lang/String;
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v3
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v3
invoke-static {v2, v3}, Lcom/tmobile/simlock/s;->a(Ljava/lang/String;Ljava/lang/String;)V
aget-byte v2, v1, v10
if-eqz v2, :cond_3
iput-boolean v11, p0, Lcom/tmobile/simlock/TrustletProtocol;->mRebootRequired:Z
:cond_3
sget-object v2, Lcom/tmobile/simlock/TrustletProtocol;->TAG:Ljava/lang/String;
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
const-string v4, "Need to reboot? "
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v3
iget-boolean v4, p0, Lcom/tmobile/simlock/TrustletProtocol;->mRebootRequired:Z
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;
move-result-object v3
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v3
invoke-static {v2, v3}, Lcom/tmobile/simlock/s;->a(Ljava/lang/String;Ljava/lang/String;)V
move-object p1, v0
goto/16 :goto_0
:cond_4
add-int/lit16 v3, v3, -0x14c
add-int/lit8 v3, v3, -0x10
invoke-virtual {v0, v3}, Ljava/nio/ByteBuffer;->position(I)Ljava/nio/Buffer;
goto/16 :goto_1
:cond_5
return-void
.end method
.method private unlock(ILjava/lang/String;)V
.locals 3
sget-object v0, Lcom/tmobile/simlock/TrustletProtocol;->TAG:Ljava/lang/String;
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "onUnlock called, with unlock type of "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v0, v1}, Lcom/tmobile/simlock/s;->a(Ljava/lang/String;Ljava/lang/String;)V
sget-object v0, Lcom/tmobile/simlock/TrustletProtocol;->TAG:Ljava/lang/String;
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "Using IMSI: "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v0, v1}, Lcom/tmobile/simlock/s;->a(Ljava/lang/String;Ljava/lang/String;)V
if-eqz p2, :cond_0
invoke-virtual {p2}, Ljava/lang/String;->getBytes()[B
move-result-object v0
:goto_0
invoke-static {v0, p1}, Lcom/tmobile/simlock/TrustletProtocol;->createUnlockRequest([BI)[B
move-result-object v0
invoke-direct {p0, v0}, Lcom/tmobile/simlock/TrustletProtocol;->runProtocol([B)V
sget-object v0, Lcom/tmobile/simlock/TrustletProtocol;->TAG:Ljava/lang/String;
const-string v1, "Succesfully ran the unlock protocol"
invoke-static {v0, v1}, Lcom/tmobile/simlock/s;->a(Ljava/lang/String;Ljava/lang/String;)V
return-void
:cond_0
const/4 v0, 0x0
goto :goto_0
.end method
# virtual methods
.method public getServerMessage()Ljava/lang/String;
.locals 1
iget-object v0, p0, Lcom/tmobile/simlock/TrustletProtocol;->serverMessage:Ljava/lang/String;
return-object v0
.end method
.method public isRebootRequired()Z
.locals 1
iget-boolean v0, p0, Lcom/tmobile/simlock/TrustletProtocol;->mRebootRequired:Z
return v0
.end method
.method public partialUnlock(Ljava/lang/String;)V
.locals 1
const/4 v0, 0x3
invoke-direct {p0, v0, p1}, Lcom/tmobile/simlock/TrustletProtocol;->unlock(ILjava/lang/String;)V
return-void
.end method
.method public permanentUnlock(Ljava/lang/String;)V
.locals 1
const/4 v0, 0x2
invoke-direct {p0, v0, p1}, Lcom/tmobile/simlock/TrustletProtocol;->unlock(ILjava/lang/String;)V
return-void
.end method
.method public registerKey(Ljava/lang/String;)V
.locals 3
sget-object v0, Lcom/tmobile/simlock/TrustletProtocol;->TAG:Ljava/lang/String;
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "Using IMEI: "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v0, v1}, Lcom/tmobile/simlock/s;->a(Ljava/lang/String;Ljava/lang/String;)V
iget-boolean v0, p0, Lcom/tmobile/simlock/TrustletProtocol;->mUseAttestation:Z
if-eqz v0, :cond_0
if-eqz p1, :cond_1
invoke-virtual {p1}, Ljava/lang/String;->getBytes()[B
move-result-object v0
:goto_0
invoke-static {v0}, Lcom/tmobile/simlock/TrustletProtocol;->createAttestationRequest([B)[B
move-result-object v0
invoke-direct {p0, v0}, Lcom/tmobile/simlock/TrustletProtocol;->runProtocol([B)V
:cond_0
sget-object v0, Lcom/tmobile/simlock/TrustletProtocol;->TAG:Ljava/lang/String;
const-string v1, "Succesfully registered the key"
invoke-static {v0, v1}, Lcom/tmobile/simlock/s;->a(Ljava/lang/String;Ljava/lang/String;)V
return-void
:cond_1
const/4 v0, 0x0
goto :goto_0
.end method
.method public resetSLB()V
.locals 2
sget-object v0, Lcom/tmobile/simlock/TrustletProtocol;->TAG:Ljava/lang/String;
const-string v1, "SLB reset not available"
invoke-static {v0, v1}, Lcom/tmobile/simlock/s;->a(Ljava/lang/String;Ljava/lang/String;)V
return-void
.end method
.method public temporaryUnlock(Ljava/lang/String;)J
.locals 4
const-wide/16 v0, 0x0
iput-wide v0, p0, Lcom/tmobile/simlock/TrustletProtocol;->mLockedUntil:J
const/4 v0, 0x1
invoke-direct {p0, v0, p1}, Lcom/tmobile/simlock/TrustletProtocol;->unlock(ILjava/lang/String;)V
sget-object v0, Lcom/tmobile/simlock/TrustletProtocol;->TAG:Ljava/lang/String;
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "temporaryUnlock: until: "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
iget-wide v2, p0, Lcom/tmobile/simlock/TrustletProtocol;->mLockedUntil:J
invoke-virtual {v1, v2, v3}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v0, v1}, Lcom/tmobile/simlock/s;->a(Ljava/lang/String;Ljava/lang/String;)V
iget-wide v0, p0, Lcom/tmobile/simlock/TrustletProtocol;->mLockedUntil:J
return-wide v0
.end method
Click to expand...
Click to collapse
where is this from?
jass65 said:
exactly what i was thinking lol.i know i decompiled the app before and there was something about server address in it.i don't know how to log it though
Click to expand...
Click to collapse
Wireshark or you can make your own cell tower for like $200 because SS7 sucks balls.
---------- Post added at 11:20 PM ---------- Previous post was at 11:15 PM ----------
jass65 said:
where is this from?
Click to expand...
Click to collapse
One of the files in the disassembly of the app. Check out this post https://forum.xda-developers.com/sho...d.php?t=643800 Instead of extracting "classes.dex" from the apk just disassemble the whole apk, it did error out but most of it shows up, don't know if it is of any good. The file is called "Trusted protocol.smali" inside "smali\com\tmobile\simlock folder". Maybe the apk can be modded?
Well seems it has been cracked, imeigurus is offering remote usb unlock service for tmobile app unlock phones. Let's see how long before it becomes public or copied by box makers.
i asked them about the v10 and they said its not supported .it seems they are using usb to to it and its only for the S7 series. i may have an idea of how . since they require you to be completely stock with no knox i dont think they are messing with the main partition table cause they can't. They might be writing the imei unlock code directly to the modem since you can communicate with the modem on its own.i tried this with the v10's modem idk i could never get it to write, maybe it was the formatting.you can do a lot through the modem.
Makes sense after all modem is the one parts that controls all of this...
It would be interesting just to find out how to do it on any phone. After all our V10's are just cpu killing machines due to heat... LOL...
jass65 said:
...
Click to expand...
Click to collapse
Apexseal said:
...
Click to expand...
Click to collapse
Look at this thread: t-mobile-metro-pcs-unlock-app-mod
Specifically there's a guy who showed up in that thread and is asking for t-mobile apps to analyze. I'd post mine but I don't have an account there.
He said he's got S7 figured out, and want's other examples of unlock apps from different phones.
Edit: On closer look at the thread, it seems he already got the V10 app. Let's hope he posts some good stuff there soon.
Anyone know if there is a similar device unlock for the LG G5 H830 on tmobile??
Here is the device unlock app for the LG G5 H830 on tmobile, maybe someone could work on it.
https://mega.nz/#!8gpm1BLI!zEA3hx-taq0dikdRqtVza4p3Z7GpJGhgKRJF3fwSg3g
Code is attached.
Unlock t-mobile LG v10
Did anyone figure out how to get this unlocked? I am in the same situation and would love to collaborate with anyone on getting this unlocked.
Im in the same situation, I want my phone to get unlock, Im using a Note 5 (that I wouldnt buy if I could use my V10 internationally)

how to solve verifier rejected on miui 8 (based on patchrom)

hello recently my device have a custom rom miui 8 based on stockrom aosp android 6.0.1 (mmb29m) but have some issue, when im trying to copypaste or insert a text on application like facebook,instagram, or anyother socialmedia apps, its become force close im trying to compare with other miui8 based on cyanogenmod but still no luck.
here is a logcat
Code:
6-07 08:34:22.987 E/AndroidRuntime(27228): FATAL EXCEPTION: main
06-07 08:34:22.987 E/AndroidRuntime(27228): Process: com.miui.notes, PID: 27228
06-07 08:34:22.987 E/AndroidRuntime(27228): java.lang.VerifyError: Verifier rejected class android.widget.Editor$InsertionHandleView due to bad method void android.widget.Editor$InsertionHandleView.createAnimations() (declaration of 'android.widget.Editor$InsertionHandleView' appears in /system/framework/framework.jar:classes3.dex)
06-07 08:34:22.987 E/AndroidRuntime(27228): at android.widget.Editor$InsertionPointCursorController.getHandle(Editor.java:4623)
06-07 08:34:22.987 E/AndroidRuntime(27228): at android.widget.Editor$InsertionPointCursorController.show(Editor.java:4598)
06-07 08:34:22.987 E/AndroidRuntime(27228): at android.widget.Editor.onTouchUpEvent(Editor.java:1947)
06-07 08:34:22.987 E/AndroidRuntime(27228): at android.widget.TextView.onTouchEvent(TextView.java:8356)
06-07 08:34:22.987 E/AndroidRuntime(27228): at com.miui.notes.editor.RichEditView.onTouchEvent(RichEditView.java:1026)
06-07 08:34:22.987 E/AndroidRuntime(27228): at android.view.View.dispatchTouchEvent(View.java:9402)
06-07 08:34:22.987 E/AndroidRuntime(27228): at com.miui.notes.editor.RichEditView.dispatchTouchEvent(RichEditView.java:1018)
thats logcat when im trying to copy paste or insert text on notepad apps (miui apps)
and this is smali (maybe) thats cause forceclose
Code:
.method private createAnimations()V
.registers 10
.prologue
const/4 v8, 0x1
const/4 v7, 0x0
const/4 v6, 0x2
.line 4877
new-instance v2, Landroid/animation/AnimatorSet;
invoke-direct {v2}, Landroid/animation/AnimatorSet;-><init>()V
iput-object v2, p0, Landroid/widget/Editor$InsertionHandleView;->mAnimationFadeIn:Landroid/animation/AnimatorSet;
.line 4878
sget-object v2, Landroid/view/View;->SCALE_X:Landroid/util/Property;
new-array v3, v6, [F
fill-array-data v3, :array_7e
invoke-static {p0, v2, v3}, Landroid/animation/ObjectAnimator;->ofFloat(Ljava/lang/Object;Landroid/util/Property;[F)Landroid/animation/ObjectAnimator;
move-result-object v0
.line 4879
.local v0, "scaleAnimatorX":Landroid/animation/ObjectAnimator;
sget-object v2, Landroid/view/View;->SCALE_Y:Landroid/util/Property;
new-array v3, v6, [F
fill-array-data v3, :array_86
invoke-static {p0, v2, v3}, Landroid/animation/ObjectAnimator;->ofFloat(Ljava/lang/Object;Landroid/util/Property;[F)Landroid/animation/ObjectAnimator;
move-result-object v1
.line 4880
.local v1, "scaleAnimatorY":Landroid/animation/ObjectAnimator;
iget-object v2, p0, Landroid/widget/Editor$InsertionHandleView;->mAnimationFadeIn:Landroid/animation/AnimatorSet;
new-instance v3, Lmiui/view/animation/BackEaseOutInterpolator;
invoke-direct {v3}, Lmiui/view/animation/BackEaseOutInterpolator;-><init>()V
invoke-virtual {v2, v3}, Landroid/animation/AnimatorSet;->setInterpolator(Landroid/animation/TimeInterpolator;)V
.line 4881
iget-object v2, p0, Landroid/widget/Editor$InsertionHandleView;->mAnimationFadeIn:Landroid/animation/AnimatorSet;
const-wide/16 v4, 0x12c
invoke-virtual {v2, v4, v5}, Landroid/animation/AnimatorSet;->setDuration(J)Landroid/animation/AnimatorSet;
.line 4882
iget-object v2, p0, Landroid/widget/Editor$InsertionHandleView;->mAnimationFadeIn:Landroid/animation/AnimatorSet;
new-array v3, v6, [Landroid/animation/Animator;
aput-object v0, v3, v7
aput-object v1, v3, v8
invoke-virtual {v2, v3}, Landroid/animation/AnimatorSet;->playTogether([Landroid/animation/Animator;)V
.line 4884
new-instance v2, Landroid/animation/AnimatorSet;
invoke-direct {v2}, Landroid/animation/AnimatorSet;-><init>()V
iput-object v2, p0, Landroid/widget/Editor$InsertionHandleView;->mAnimationFadeOut:Landroid/animation/AnimatorSet;
.line 4885
sget-object v2, Landroid/view/View;->SCALE_X:Landroid/util/Property;
new-array v3, v6, [F
fill-array-data v3, :array_8e
invoke-static {p0, v2, v3}, Landroid/animation/ObjectAnimator;->ofFloat(Ljava/lang/Object;Landroid/util/Property;[F)Landroid/animation/ObjectAnimator;
move-result-object v0
.line 4886
sget-object v2, Landroid/view/View;->SCALE_Y:Landroid/util/Property;
new-array v3, v6, [F
fill-array-data v3, :array_96
invoke-static {p0, v2, v3}, Landroid/animation/ObjectAnimator;->ofFloat(Ljava/lang/Object;Landroid/util/Property;[F)Landroid/animation/ObjectAnimator;
move-result-object v1
.line 4887
iget-object v2, p0, Landroid/widget/Editor$InsertionHandleView;->mAnimationFadeOut:Landroid/animation/AnimatorSet;
new-instance v3, Lmiui/view/animation/CubicEaseOutInterpolator;
invoke-direct {v3}, Lmiui/view/animation/CubicEaseOutInterpolator;-><init>()V
invoke-virtual {v2, v3}, Landroid/animation/AnimatorSet;->setInterpolator(Landroid/animation/TimeInterpolator;)V
.line 4888
iget-object v2, p0, Landroid/widget/Editor$InsertionHandleView;->mAnimationFadeOut:Landroid/animation/AnimatorSet;
const-wide/16 v4, 0x96
invoke-virtual {v2, v4, v5}, Landroid/animation/AnimatorSet;->setDuration(J)Landroid/animation/AnimatorSet;
.line 4889
iget-object v2, p0, Landroid/widget/Editor$InsertionHandleView;->mAnimationFadeOut:Landroid/animation/AnimatorSet;
new-array v3, v6, [Landroid/animation/Animator;
aput-object v0, v3, v7
aput-object v1, v3, v8
invoke-virtual {v2, v3}, Landroid/animation/AnimatorSet;->playTogether([Landroid/animation/Animator;)V
.line 4891
new-instance v2, Landroid/widget/Editor$InsertionHandleView$2;
invoke-direct {v2, p0}, Landroid/widget/Editor$InsertionHandleView$2;-><init>(Landroid/widget/Editor$InsertionHandleView;)V
iput-object v2, p0, Landroid/widget/Editor$InsertionHandleView;->mAnimationFadeOutListener:Landroid/animation/AnimatorListenerAdapter;
.line 4897
return-void
.line 4878
nop
:array_7e
.array-data 4
0x0
0x3f800000 # 1.0f
.end array-data
.line 4879
:array_86
.array-data 4
0x0
0x3f800000 # 1.0f
.end array-data
.line 4885
:array_8e
.array-data 4
0x3f800000 # 1.0f
0x0
.end array-data
.line 4886
:array_96
.array-data 4
0x3f800000 # 1.0f
0x0
.end array-data
.end method
thank you before

Help changing default language in apk

Hi I am trying to change the default language from english to spanish. There are 10 languages in the apk that you can change in settings (radio buttons). This smali file is where I think the change needs to be made. My problem is I can't make a change that will let the apk recompile. Can someone give me a tip? Thanks!
Code:
.class public final Lcom/xtreampro/xtreamproiptv/utils/l;
.super Ljava/lang/Object;
.source ""
# direct methods
.method public static final a(Ljava/lang/String;)Ljava/lang/String;
.locals 2
.param p0 # Ljava/lang/String;
.annotation build Lorg/jetbrains/annotations/NotNull;
.end annotation
.end param
.annotation build Lorg/jetbrains/annotations/NotNull;
.end annotation
const-string v0, "code"
invoke-static {p0, v0}, Li/y/c/h;->c(Ljava/lang/Object;Ljava/lang/String;)V
invoke-virtual {p0}, Ljava/lang/String;->hashCode()I
move-result v0
const/16 v1, 0xc31
if-eq v0, v1, :cond_8
const/16 v1, 0xc81
if-eq v0, v1, :cond_7
const/16 v1, 0xcae
if-eq v0, v1, :cond_6
const/16 v1, 0xccc
if-eq v0, v1, :cond_5
const/16 v1, 0xd01
if-eq v0, v1, :cond_4
const/16 v1, 0xd2b
if-eq v0, v1, :cond_3
const/16 v1, 0xe04
if-eq v0, v1, :cond_2
const/16 v1, 0xe3d
if-eq v0, v1, :cond_1
const/16 v1, 0xe7e
if-eq v0, v1, :cond_0
goto/16 :goto_0
:cond_0
const-string v0, "tr"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result p0
if-eqz p0, :cond_9
const-string p0, "Turkish"
goto :goto_1
:cond_1
const-string v0, "ro"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result p0
if-eqz p0, :cond_9
const-string p0, "Romanian"
goto :goto_1
:cond_2
const-string v0, "pt"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result p0
if-eqz p0, :cond_9
const-string p0, "Portuguese"
goto :goto_1
:cond_3
const-string v0, "it"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result p0
if-eqz p0, :cond_9
const-string p0, "Italian"
goto :goto_1
:cond_4
const-string v0, "hi"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result p0
if-eqz p0, :cond_9
const-string p0, "Hindi"
goto :goto_1
:cond_5
const-string v0, "fr"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result p0
if-eqz p0, :cond_9
const-string p0, "French"
goto :goto_1
:cond_6
const-string v0, "es"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result p0
if-eqz p0, :cond_9
const-string p0, "Spanish"
goto :goto_1
:cond_7
const-string v0, "de"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result p0
if-eqz p0, :cond_9
const-string p0, "German"
goto :goto_1
:cond_8
const-string v0, "ar"
invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result p0
if-eqz p0, :cond_9
const-string p0, "Arabic"
goto :goto_1
:cond_9
:goto_0
const-string p0, "English"
:goto_1
return-object p0
.end method
.method public static final b()[Ljava/lang/String;
.locals 10
.annotation build Lorg/jetbrains/annotations/NotNull;
.end annotation
const-string v0, "en"
const-string v1, "ar"
const-string v2, "fr"
const-string v3, "de"
const-string v4, "hi"
const-string v5, "it"
const-string v6, "pt"
const-string v7, "ro"
const-string v8, "es"
const-string v9, "tr"
filled-new-array/range {v0 .. v9}, [Ljava/lang/String;
move-result-object v0
return-object v0
.end method
.method public static final c(Landroid/content/Context;)V
.locals 5
.param p0 # Landroid/content/Context;
.annotation build Lorg/jetbrains/annotations/Nullable;
.end annotation
.end param
sget-object v0, Le/f/a/d/g;->c:Le/f/a/d/g;
invoke-virtual {v0}, Le/f/a/d/g;->w()Ljava/lang/String;
move-result-object v0
if-eqz p0, :cond_0
invoke-virtual {p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v1
invoke-virtual {p0}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;
move-result-object v2
const-string v3, "context.applicationContext"
invoke-static {v2, v3}, Li/y/c/h;->b(Ljava/lang/Object;Ljava/lang/String;)V
invoke-virtual {v2}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v2
new-instance v3, Ljava/util/Locale;
invoke-direct {v3, v0}, Ljava/util/Locale;-><init>(Ljava/lang/String;)V
invoke-static {v3}, Ljava/util/Locale;->setDefault(Ljava/util/Locale;)V
new-instance v0, Landroid/content/res/Configuration;
invoke-direct {v0}, Landroid/content/res/Configuration;-><init>()V
iput-object v3, v0, Landroid/content/res/Configuration;->locale:Ljava/util/Locale;
const-string v4, "resources"
invoke-static {v1, v4}, Li/y/c/h;->b(Ljava/lang/Object;Ljava/lang/String;)V
invoke-virtual {v1}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;
move-result-object v4
invoke-virtual {v1, v0, v4}, Landroid/content/res/Resources;->updateConfiguration(Landroid/content/res/Configuration;Landroid/util/DisplayMetrics;)V
invoke-virtual {v1}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;
move-result-object v4
invoke-virtual {v2, v0, v4}, Landroid/content/res/Resources;->updateConfiguration(Landroid/content/res/Configuration;Landroid/util/DisplayMetrics;)V
invoke-virtual {v1}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration;
move-result-object v0
invoke-virtual {v0, v3}, Landroid/content/res/Configuration;->setLocale(Ljava/util/Locale;)V
invoke-virtual {p0}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;
move-result-object v1
invoke-virtual {v1, v0}, Landroid/content/Context;->createConfigurationContext(Landroid/content/res/Configuration;)Landroid/content/Context;
invoke-virtual {p0, v0}, Landroid/content/Context;->createConfigurationContext(Landroid/content/res/Configuration;)Landroid/content/Context;
:cond_0
return-void
.end method

Categories

Resources