[T-Mobile LG V10 Q&A, Help & Troubleshooting] Apexseal:
Found this... Seems interesting, If what I posted is against the rules please delete.

.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