修改之前,先进行去除签名校验,官方安装包有签名校验,不过签进不去,过签工具使用MT管理器;
[i]
打开所有DEX文件,选择常量进行关键字过滤,关键字:vip;
[i]
在结果里面找到和vip相关的信息;
[i]
在结果上点击并搜索关键字,定位到关键字所在的类;
[i]
点击搜索结果,跳转到所在的方法,可以看到当前结果在类 com.xhey.xcamera.ui.watermark.h 下的 q 方法中;
[i]
接下来使用电脑 jadx 反编译工具,打开所有dex文件,找到刚才定位到的方法,查看源码并进行分析;
[i]
看名字 PersonalVipHelper 比较可疑,点进去看看判断了什么;
[i]
看到 vipInfo.isVip() 方法应该是判断是否是会员,我们直接将所有返回值改为 true ;
[Java] 纯文本查看 复制代码.method public final b()Z
.registers 5
.line 72
sget-object v0, Lcom/xhey/xcamera/business/PersonalVipHelper;->f:Lcom/xhey/xcamera/business/model/VipInfo;
if-nez v0, :cond_7
.line 73
invoke-direct {p0}, Lcom/xhey/xcamera/business/PersonalVipHelper;->o()V
.line 75
:cond_7
invoke-direct {p0}, Lcom/xhey/xcamera/business/PersonalVipHelper;->l()Z
move-result v0
const/4 v1, 0x1
const/4 v2, 0x0
if-nez v0, :cond_39
sget-object v0, Lcom/xhey/xcamera/business/PersonalVipHelper;->f:Lcom/xhey/xcamera/business/model/VipInfo;
if-nez v0, :cond_15
:cond_13
const/4 v0, 0x0
goto :goto_1c
:cond_15
invoke-virtual {v0}, Lcom/xhey/xcamera/business/model/VipInfo;->isVip()Z
move-result v0
if-ne v0, v1, :cond_13
const/4 v0, 0x1
:goto_1c
if-eqz v0, :cond_39
invoke-static {}, Lcom/xhey/xcamera/ui/workspace/q;->a()Lcom/xhey/xcamera/ui/workspace/q;
move-result-object v0
invoke-virtual {v0}, Lcom/xhey/xcamera/ui/workspace/q;->d()Ljava/lang/String;
move-result-object v0
const-string v3, "getInstance().user_id"
invoke-static {v0, v3}, Lkotlin/jvm/internal/s;->c(Ljava/lang/Object;Ljava/lang/String;)V
check-cast v0, Ljava/lang/CharSequence;
invoke-interface {v0}, Ljava/lang/CharSequence;->length()I
move-result v0
if-lez v0, :cond_35
const/4 v0, 0x1
goto :goto_36
:cond_35
const/4 v0, 0x0
:goto_36
if-eqz v0, :cond_39
goto :goto_3a
:cond_39
const/4 v1, 0x1
:goto_3a
return v1
.end method
将代码改为 const/4 v1, 0x1 即可,返回值就是 true ;
[i]
修改代码以及重新打包签名在MT管理器操作即可,简单快捷,我们将修改好的app安装试用,看看有没有会员功能;
[i] [i] [i]
显示已开通会员,并且测试可以正常使用vip水印,感兴趣的同学可以尝试自己操作;
软件链接:
https://wwrc.lanzoub.com/b05v7vkwh
密码:1234