精华 | |
金钱 | BA |
威望 | 点 |
贡献值 | 点 |
爱心 | 点 |
经验 | 点 |
注册时间 | 2013-3-18 |
最后登录 | 1970-1-1 |
在线时间 | 小时 |
| |
| |
| |
|
楼主 |
发表于 2015-3-4 20:50
|
显示全部楼层
本帖最后由 davidlone 于 2015-3-4 20:56 编辑
这个东西各机型应该大同小异的,以这个帖的中欧4.4.2底包为例,蓝色为需要更改的method名称,红色部分为更改后的内容:
下面的修改做完后应该跟幸运破解器核心破解里面前三个打勾的破解是一样的效果。
反编译 core.jar,smali/java/security/MessageDigest.smali :
.method public static isEqual([B[B)Z
.locals 4
.param p0, "digesta" # [B
.param p1, "digestb" # [B
.prologue
#原始为 const/4 v1, 0x0
const/4 v1, 0x1
.line 302
array-length v2, p0
array-length v3, p1
if-eq v2, v3, :cond_1
.line 310
:cond_0
:goto_0
return v1
.line 305
:cond_1
const/4 v0, 0x0
.local v0, "i":I
:goto_1
array-length v2, p0
if-ge v0, v2, :cond_2
.line 306
aget-byte v2, p0, v0
aget-byte v3, p1, v0
if-ne v2, v3, :cond_0
.line 305
add-int/lit8 v0, v0, 0x1
goto :goto_1
.line 310
:cond_2
const/4 v1, 0x1
goto :goto_0
.end method
反编译 core.jar,smali/java/security/Signature.smali :
.method public final verify([B)Z
.locals 2
.param p1, "signature" # [B
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/security/SignatureException;
}
.end annotation
.prologue
.line 372
iget v0, p0, Ljava/security/Signature;->state:I
const/4 v1, 0x3
if-eq v0, v1, :cond_0
.line 373
new-instance v0, Ljava/security/SignatureException;
const-string v1, "Signature object is not initialized properly"
invoke-direct {v0, v1}, Ljava/security/SignatureException;-><init>(Ljava/lang/String;)V
throw v0
.line 375
:cond_0
invoke-virtual {p0, p1}, Ljava/security/Signature;->engineVerify([B)Z
#原始为 move-result v0
const/4 v0, 0x1
return v0
.end method
.method public final verify([BII)Z
.locals 2
.param p1, "signature" # [B
.param p2, "offset" # I
.param p3, "length" # I
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/security/SignatureException;
}
.end annotation
.prologue
.line 404
iget v0, p0, Ljava/security/Signature;->state:I
const/4 v1, 0x3
if-eq v0, v1, :cond_0
.line 405
new-instance v0, Ljava/security/SignatureException;
const-string v1, "Signature object is not initialized properly"
invoke-direct {v0, v1}, Ljava/security/SignatureException;-><init>(Ljava/lang/String;)V
throw v0
.line 407
:cond_0
if-eqz p1, :cond_1
if-ltz p2, :cond_1
if-ltz p3, :cond_1
add-int v0, p2, p3
array-length v1, p1
if-le v0, v1, :cond_2
.line 409
:cond_1
new-instance v0, Ljava/lang/IllegalArgumentException;
invoke-direct {v0}, Ljava/lang/IllegalArgumentException;-><init>()V
throw v0
.line 411
:cond_2
invoke-virtual {p0, p1, p2, p3}, Ljava/security/Signature;->engineVerify([BII)Z
#原始为 move-result v0
const/4 v0, 0x1
return v0
.end method
反编译 service.jar,smali/com/android/server/pm/PackageManagerService.smali :
.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
#将整个method替换
.locals 1
const/4 v0, 0x0
return v0
.end method
|
|