【新手】腾讯文件4.2去广告绿化教程
本帖最后由 kingkiller 于 2018-10-9 01:01 编辑大佬请略过本教程,实际上是学习记录,只为入门启蒙贴!腾讯文件这个软件以前的3.5版本好用是好用,但是无法检测出一些隐藏文件安装包,新版的可以检测微信和QQ文件,文件也可以方便快速的加入微信收藏,但是有广告,我看了一下只有垃圾清理的时候有广告。
首先,我们来看一下广告的出现形式
可以知道广告是点击垃圾清理完成之后弹出来的
我们先来反编译一下,脱进APK Killer或者MT都行,由于是图片广告,我们先从res资源文件夹入手
发现了这个东西就是广告,还有一些其他杂七杂八没用的图片,还有QQ浏览器的图片LOGO,估计是这软件直接从QQ浏览器提取出来的。
我们通过看文件名可以知道这是文件清理时出现的广告,直接搜索关键字fileclean_ad
发现了这个,通过目录及文件名可以确定就是广告代码,我们打开文件进行查看,发现在c$1$15.smail文件里面有个onShow方法
.method public onShow(Landroid/content/DialogInterface;)V
.locals 4
.prologue
.line 147
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
move-result-wide v0
invoke-static {v0, v1}, Lcom/tencent/mtt/browser/file/Ads/c;->a(J)J
.line 148
invoke-static {}, Lcom/tencent/mtt/i/a;->a()Lcom/tencent/mtt/i/a;
move-result-object v0
const-string/jumbo v1, "fileclean_addate"
invoke-static {}, Lcom/tencent/mtt/browser/file/Ads/c;->f()J
move-result-wide v2
invoke-virtual {v0, v1, v2, v3}, Lcom/tencent/mtt/i/a;->a(Ljava/lang/String;J)V
.line 149
const-string/jumbo v0, "BMSY1353"
invoke-static {v0}, Lcom/tencent/mtt/external/beacon/f;->b(Ljava/lang/String;)V
.line 151
iget-object v0, p0, Lcom/tencent/mtt/browser/file/Ads/c$1$1$5;->a:Lcom/tencent/mtt/browser/file/Ads/c$1$1;
iget-object v0, v0, Lcom/tencent/mtt/browser/file/Ads/c$1$1;->a:Lcom/tencent/mtt/browser/file/Ads/b;
iget-object v0, v0, Lcom/tencent/mtt/browser/file/Ads/b;->g:Ljava/util/ArrayList;
if-eqz v0, :cond_0
.line 153
iget-object v0, p0, Lcom/tencent/mtt/browser/file/Ads/c$1$1$5;->a:Lcom/tencent/mtt/browser/file/Ads/c$1$1;
iget-object v0, v0, Lcom/tencent/mtt/browser/file/Ads/c$1$1;->a:Lcom/tencent/mtt/browser/file/Ads/b;
iget-object v0, v0, Lcom/tencent/mtt/browser/file/Ads/b;->g:Ljava/util/ArrayList;
invoke-virtual {v0}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;
move-result-object v1
:goto_0
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
move-result v0
if-eqz v0, :cond_0
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/lang/String;
.line 154
invoke-static {v0}, Lcom/tencent/mtt/browser/file/Ads/c;->a(Ljava/lang/String;)V
goto :goto_0
.line 157
:cond_0
return-void
.end method
我们再打开JAVA源码来看一下
可以确定就是广告代码了,接下来就是把它全部删掉,返回个return-void
还有另外一个搜到的c.smail文件里面的这个方法也是调用广告的,也给他全部删掉,返回个return-void
.method public static c()V
.locals 9
.prologue
const/4 v8, 0x5
const/4 v7, 0x2
const/4 v6, 0x1
const-wide/16 v4, 0x0
.line 60
sget-object v1, Lcom/tencent/mtt/browser/file/Ads/c;->a:Ljava/lang/Object;
monitor-enter v1
.line 61
:try_start_0
sget-object v0, Lcom/tencent/mtt/browser/file/Ads/c;->b:Lcom/tencent/mtt/browser/file/Ads/c$a;
sget-object v2, Lcom/tencent/mtt/browser/file/Ads/c$a;->b:Lcom/tencent/mtt/browser/file/Ads/c$a;
if-eq v0, v2, :cond_1
.line 62
monitor-exit v1
.line 171
:cond_0
:goto_0
return-void
.line 65
:cond_1
sget-object v0, Lcom/tencent/mtt/browser/file/Ads/c$a;->c:Lcom/tencent/mtt/browser/file/Ads/c$a;
sput-object v0, Lcom/tencent/mtt/browser/file/Ads/c;->b:Lcom/tencent/mtt/browser/file/Ads/c$a;
.line 66
monitor-exit v1
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 68
sget-wide v0, Lcom/tencent/mtt/browser/file/Ads/c;->c:J
cmp-long v0, v0, v4
if-nez v0, :cond_2
.line 70
invoke-static {}, Lcom/tencent/mtt/i/a;->a()Lcom/tencent/mtt/i/a;
move-result-object v0
const-string/jumbo v1, "fileclean_addate"
invoke-virtual {v0, v1, v4, v5}, Lcom/tencent/mtt/i/a;->b(Ljava/lang/String;J)J
move-result-wide v0
sput-wide v0, Lcom/tencent/mtt/browser/file/Ads/c;->c:J
.line 72
:cond_2
sget-wide v0, Lcom/tencent/mtt/browser/file/Ads/c;->c:J
cmp-long v0, v0, v4
if-eqz v0, :cond_3
.line 74
invoke-static {}, Ljava/util/Calendar;->getInstance()Ljava/util/Calendar;
move-result-object v0
.line 75
invoke-static {}, Ljava/util/Calendar;->getInstance()Ljava/util/Calendar;
move-result-object v1
.line 76
sget-wide v2, Lcom/tencent/mtt/browser/file/Ads/c;->c:J
invoke-virtual {v1, v2, v3}, Ljava/util/Calendar;->setTimeInMillis(J)V
.line 77
invoke-virtual {v0, v6}, Ljava/util/Calendar;->get(I)I
move-result v2
invoke-virtual {v1, v6}, Ljava/util/Calendar;->get(I)I
move-result v3
if-ne v2, v3, :cond_3
.line 78
invoke-virtual {v0, v7}, Ljava/util/Calendar;->get(I)I
move-result v2
invoke-virtual {v1, v7}, Ljava/util/Calendar;->get(I)I
move-result v3
if-ne v2, v3, :cond_3
.line 79
invoke-virtual {v0, v8}, Ljava/util/Calendar;->get(I)I
move-result v0
invoke-virtual {v1, v8}, Ljava/util/Calendar;->get(I)I
move-result v1
if-eq v0, v1, :cond_0
.line 84
:cond_3
new-instance v0, Lcom/tencent/mtt/browser/file/Ads/d;
invoke-direct {v0}, Lcom/tencent/mtt/browser/file/Ads/d;-><init>()V
new-instance v1, Lcom/tencent/mtt/browser/file/Ads/c$1;
invoke-direct {v1}, Lcom/tencent/mtt/browser/file/Ads/c$1;-><init>()V
invoke-virtual {v0, v1}, Lcom/tencent/mtt/browser/file/Ads/d;->a(Lcom/tencent/mtt/browser/file/Ads/d$a;)V
goto :goto_0
.line 66
:catchall_0
move-exception v0
:try_start_1
monitor-exit v1
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
throw v0
.end method
修改好之后点击保存,然后我们来去一下权限,只保留这些权限就行了
修改好之后点击保存回编译,我们来打开软件来实验一下,发现广告不见了,修改成功!
不过还有一个问题,就是修改之后QQ快捷登录进不去,提示此软件不是正版,估计是有签名校验。
我尝试着根据论坛Hayden.的过滤包名方法来弄,发现并不行,这个软件必须要下载QQ或TIM来登录
压根没有网页登录。
这个问题暂时还没有解决,有大佬有思路的话可以指点一下蛤
下载地址(包括原版及成品)
https://share.weiyun.com/5SoqjSe
密码:v88ujd
Jxdm 发表于 2018-10-9 07:49
每个APP有QQ登陆的,已修改100%登陆不了。因为和提交给QQ的签名不一样。然后修改QQ包名还是不行的话,就是 ...
确实是这样,如果你没下载QQ,就会叫你下载QQ,弹出这个网页
http://qzs.qq.com/open/mobile/login/qzsjump.html? 应该是出于安全考虑,目前只能在电脑使用网页登录,也可以手机使用浏览器+电脑UA标识使用网页登录,反倒会较为繁琐。所以有安装QQ就不要再考虑网页登录了。即便是改了到最后也会出事。 跟紧楼主的步伐!!学习了 进来学习学习,谢谢分享 感谢分享思路 这个现在还有?不是关闭了吗 这种操作都神了! 无广告的就是好用,很清爽 楼主辛苦你了 学习学习。 每个APP有QQ登陆的,已修改100%登陆不了。因为和提交给QQ的签名不一样。然后修改QQ包名还是不行的话,就是作者没有写网页QQ的调用了