我只是分享一下我的方法,有可能大家还有更好的方法,一起讨论,本文只是去除签名验证,没有修改其他功能
重新签名安装后运行会提示下图:
首先反编译百度音乐的apk文件,然后搜索“发现百度音乐为山寨版”
然后再接着搜索“verify_failed_dialog_title”
再搜索“0x7f0b0261”
好定位到文件位置,那么开始修改吧
[JavaScript] 纯文本查看 复制代码 .method private w()V
.locals 2
sget-boolean v0, Lcom/baidu/music/logic/a/a;->c:Z #这行com/baidu/music/logic/a/a 大家可以自己去看看代码
#如果v0=0那么就跳转到cond_0,如果我们需要=0时不跳转那么就要修改if-nez,v0≠0再跳转
if-nez v0, :cond_0
:goto_0
return-void
:cond_0
invoke-static {}, Lcom/baidu/bdcvf/CertVerifier;->getInstance()Lcom/baidu/bdcvf/CertVerifier;
move-result-object v0
new-instance v1, Lcom/baidu/music/ui/av;
invoke-direct {v1, p0}, Lcom/baidu/music/ui/av;-><init>(Lcom/baidu/music/ui/UIMain;)V
invoke-virtual {v0, p0, v1}, Lcom/baidu/bdcvf/CertVerifier;->verify(Landroid/content/Context;Lcom/baidu/bdcvf/CertVerifier$ResultListener;)V
goto :goto_0
.end method
.method private x()V
.locals 7
const v0, 0x7f0b0261 #发现百度音乐为山寨版
invoke-virtual {p0, v0}, Lcom/baidu/music/ui/UIMain;->getString(I)Ljava/lang/String;
move-result-object v1
const v0, 0x7f0b0262 #为保证您的信息安全,请卸载此版本建议去百度官网下载本软件
invoke-virtual {p0, v0}, Lcom/baidu/music/ui/UIMain;->getString(I)Ljava/lang/String;
move-result-object v2
const v0, 0x7f0b0263 #下载官方版
invoke-virtual {p0, v0}, Lcom/baidu/music/ui/UIMain;->getString(I)Ljava/lang/String;
move-result-object v3
const v0, 0x7f0b0264 #退出软件
invoke-virtual {p0, v0}, Lcom/baidu/music/ui/UIMain;->getString(I)Ljava/lang/String;
move-result-object v4
new-instance v5, Lcom/baidu/music/ui/aw;
invoke-direct {v5, p0}, Lcom/baidu/music/ui/aw;-><init>(Lcom/baidu/music/ui/UIMain;)V
new-instance v6, Lcom/baidu/music/ui/ax;
invoke-direct {v6, p0}, Lcom/baidu/music/ui/ax;-><init>(Lcom/baidu/music/ui/UIMain;)V
move-object v0, p0
invoke-static/range {v0 .. v6}, Lcom/baidu/music/logic/r/d;->c(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Landroid/view/View$OnClickListener;Landroid/view/View$OnClickListener;)Landroid/app/Dialog;
move-result-object v0
iput-object v0, p0, Lcom/baidu/music/ui/UIMain;->h:Landroid/app/Dialog;
iget-object v0, p0, Lcom/baidu/music/ui/UIMain;->h:Landroid/app/Dialog;
const/4 v1, 0x0
invoke-virtual {v0, v1}, Landroid/app/Dialog;->setCancelable(Z)V
iget-object v0, p0, Lcom/baidu/music/ui/UIMain;->h:Landroid/app/Dialog;
invoke-virtual {v0}, Landroid/app/Dialog;->show()V
return-void
.end method
改完之后直接回编译打包签名安装运行,下图提示正常进入成功
|