好友
阅读权限30
听众
最后登录1970-1-1
|
小骚
发表于 2020-9-26 07:26
本帖最后由 小骚 于 2020-10-22 01:02 编辑
更新7.9.57版本
应用名:起点读书
版本:7.9.57 (500)
包名:com.qidian.QDReader
修改内容:
1.仅添加一行代码实现自动签到(再也不会忘记签到了)
测试gif:
忘记说了
未签名,需核心破解
未签名,需核心破解
未签名,需核心破解
当然自己签名也可以,出问题别找我
下载地址:https://xihan.lanzoui.com/b03z05rwd密码:xihan
2020-10-22
大概说一下怎么添加自动签到
首先找到签到按钮的点击事件(开发者助手抓布局)
然后确定在“com.qidian.QDReader.ui.view.bookshelfview.CheckInReadingTimeView”类的b方法
[Asm] 纯文本查看 复制代码 method private b(Lcom/qidian/QDReader/repository/entity/checkin/CheckInData;Z)V
.registers 10
.param p1 # Lcom/qidian/QDReader/repository/entity/checkin/CheckInData;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.prologue
const/4 v6, 0x1
.line 274
invoke-direct {p0, v6}, Lcom/qidian/QDReader/ui/view/bookshelfview/CheckInReadingTimeView;->setBtnStyle(Z)V
.line 275
iget-object v0, p0, Lcom/qidian/QDReader/ui/view/bookshelfview/CheckInReadingTimeView;->c:Landroid/widget/TextView;
const v1, 0x7f0a1029 //字符串 "已连签"
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(I)V
.line 276
iget-object v0, p0, Lcom/qidian/QDReader/ui/view/bookshelfview/CheckInReadingTimeView;->d:Landroid/widget/TextView;
invoke-virtual {p0}, Lcom/qidian/QDReader/ui/view/bookshelfview/CheckInReadingTimeView;->getContext()Landroid/content/Context;
move-result-object v1
const v2, 0x7f0a0fd3 //字符串 "%1$s天"
new-array v3, v6, [Ljava/lang/Object;
const/4 v4, 0x0
invoke-virtual {p1}, Lcom/qidian/QDReader/repository/entity/checkin/CheckInData;->getNoBrokenTime()I
move-result v5
invoke-static {v5}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
move-result-object v5
aput-object v5, v3, v4
invoke-virtual {v1, v2, v3}, Landroid/content/Context;->getString(I[Ljava/lang/Object;)Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
.line 277
iget-object v1, p0, Lcom/qidian/QDReader/ui/view/bookshelfview/CheckInReadingTimeView;->f:Landroid/widget/TextView;
invoke-virtual {p1}, Lcom/qidian/QDReader/repository/entity/checkin/CheckInData;->getButtonTxt()Ljava/lang/String;
move-result-object v0
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v0
if-eqz v0, :cond_66 //这个判断如果字符串等于"已连签xx天"就跳转到标签66 没有签到就走下面的
invoke-virtual {p0}, Lcom/qidian/QDReader/ui/view/bookshelfview/CheckInReadingTimeView;->getResources()Landroid/content/res/Resources;
move-result-object v0
const v2, 0x7f0a0a43 //字符串 "签到领奖"
invoke-virtual {v0, v2}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
move-result-object v0
从上面直接走下来就会让按钮显示签到领奖,也有可能只显示签到,不在本类里面 不管它
:goto_40
invoke-virtual {v1, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
.line 278
iget-object v0, p0, Lcom/qidian/QDReader/ui/view/bookshelfview/CheckInReadingTimeView;->e:Lcom/qd/ui/component/widget/roundwidget/QDUIRoundLinearLayout;
new-instance v1, Lcom/qidian/QDReader/ui/view/bookshelfview/n;
invoke-direct {v1, p0}, Lcom/qidian/QDReader/ui/view/bookshelfview/n;-><init>(Lcom/qidian/QDReader/ui/view/bookshelfview/CheckInReadingTimeView;)V
invoke-virtual {v0, v1}, Lcom/qd/ui/component/widget/roundwidget/QDUIRoundLinearLayout;->setOnClickListener(Landroid/view/View$OnClickListener;)V //这里就是点击事件 设置setOnClickListener
.line 279
if-eqz p2, :cond_65 //这个不用在意
.line 281
iget-object v0, p0, Lcom/qidian/QDReader/ui/view/bookshelfview/CheckInReadingTimeView;->e:Lcom/qd/ui/component/widget/roundwidget/QDUIRoundLinearLayout;
invoke-direct {p0, v0, v6}, Lcom/qidian/QDReader/ui/view/bookshelfview/CheckInReadingTimeView;->a(Landroid/view/View;I)V
.line 283
:cond_65
return-void
.line 277
//这里是获得按钮的文本 走完之后跳转到goto_40
:cond_66
invoke-virtual {p1}, Lcom/qidian/QDReader/repository/entity/checkin/CheckInData;->getButtonTxt()Ljava/lang/String;
move-result-object v0
goto :goto_40
.end method
我的做法以及是怎么插入一个Toast的
[Asm] 纯文本查看 复制代码 method private b(Lcom/qidian/QDReader/repository/entity/checkin/CheckInData;Z)V
.registers 10
.param p1 # Lcom/qidian/QDReader/repository/entity/checkin/CheckInData;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.prologue
const/4 v6, 0x1
.line 274
invoke-direct {p0, v6}, Lcom/qidian/QDReader/ui/view/bookshelfview/CheckInReadingTimeView;->setBtnStyle(Z)V
.line 275
iget-object v0, p0, Lcom/qidian/QDReader/ui/view/bookshelfview/CheckInReadingTimeView;->c:Landroid/widget/TextView;
const v1, 0x7f0a1029 //字符串 "已连签"
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(I)V
.line 276
iget-object v0, p0, Lcom/qidian/QDReader/ui/view/bookshelfview/CheckInReadingTimeView;->d:Landroid/widget/TextView;
invoke-virtual {p0}, Lcom/qidian/QDReader/ui/view/bookshelfview/CheckInReadingTimeView;->getContext()Landroid/content/Context;
move-result-object v1
const v2, 0x7f0a0fd3 //字符串 "%1$s天"
new-array v3, v6, [Ljava/lang/Object;
const/4 v4, 0x0
invoke-virtual {p1}, Lcom/qidian/QDReader/repository/entity/checkin/CheckInData;->getNoBrokenTime()I
move-result v5
invoke-static {v5}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
move-result-object v5
aput-object v5, v3, v4
invoke-virtual {v1, v2, v3}, Landroid/content/Context;->getString(I[Ljava/lang/Object;)Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
.line 277
iget-object v1, p0, Lcom/qidian/QDReader/ui/view/bookshelfview/CheckInReadingTimeView;->f:Landroid/widget/TextView;
invoke-virtual {p1}, Lcom/qidian/QDReader/repository/entity/checkin/CheckInData;->getButtonTxt()Ljava/lang/String;
move-result-object v0
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v0
if-eqz v0, :cond_66 //这个判断如果字符串等于"已连签xx天"就跳转到标签66 没有签到就走下面的
invoke-virtual {p0}, Lcom/qidian/QDReader/ui/view/bookshelfview/CheckInReadingTimeView;->getResources()Landroid/content/res/Resources;
move-result-object v0
const v2, 0x7f0a0a43 //字符串 "签到领奖"
invoke-virtual {v0, v2}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
move-result-object v0
从上面直接走下来就会让按钮显示签到领奖,也有可能只显示签到,不在本类里面 不管它
:goto_40
invoke-virtual {v1, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
.line 278
iget-object v0, p0, Lcom/qidian/QDReader/ui/view/bookshelfview/CheckInReadingTimeView;->e:Lcom/qd/ui/component/widget/roundwidget/QDUIRoundLinearLayout;
new-instance v1, Lcom/qidian/QDReader/ui/view/bookshelfview/n;
invoke-direct {v1, p0}, Lcom/qidian/QDReader/ui/view/bookshelfview/n;-><init>(Lcom/qidian/QDReader/ui/view/bookshelfview/CheckInReadingTimeView;)V
invoke-virtual {v0, v1}, Lcom/qd/ui/component/widget/roundwidget/QDUIRoundLinearLayout;->setOnClickListener(Landroid/view/View$OnClickListener;)V //这里就是点击事件 设置setOnClickListener
invoke-virtual {v0}, Landroid/view/View;->performClick()Z //这一行就是代码主动去调用控件的点击事件 跟在setOnClickListener下面
//Toast第一个参数获得上下文
invoke-virtual {p0}, Lcom/qidian/QDReader/ui/view/bookshelfview/CheckInReadingTimeView;->getContext()Landroid/content/Context;
move-result-object v0
//Toast第二个参数也就是text 显示的文本
const-string v1, "自动签到完成"
//Toast第三个参数 Toast.LENGTH_LONG 也就是提示消息的长短 1或0
const/4 v2, 0x1
invoke-static {v0, v1, v2}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;
move-result-object v0
//调用Show展示出来
invoke-virtual {v0}, Landroid/widget/Toast;->show()V
.line 279
if-eqz p2, :cond_65 //这个不用在意
.line 281
iget-object v0, p0, Lcom/qidian/QDReader/ui/view/bookshelfview/CheckInReadingTimeView;->e:Lcom/qd/ui/component/widget/roundwidget/QDUIRoundLinearLayout;
invoke-direct {p0, v0, v6}, Lcom/qidian/QDReader/ui/view/bookshelfview/CheckInReadingTimeView;->a(Landroid/view/View;I)V
.line 283
:cond_65
return-void
.line 277
//这里是获得按钮的文本 走完之后跳转到goto_40
:cond_66
invoke-virtual {p1}, Lcom/qidian/QDReader/repository/entity/checkin/CheckInData;->getButtonTxt()Ljava/lang/String;
move-result-object v0
goto :goto_40
.end method
附带一张转为java的图片更直观
然后一路保存就可以了
老是忘记录屏,第三次才录到
效果(这个gif好像慢放了一样,实际上也就一眨眼):
如有讲的不对的地方,请斧正
|
免费评分
-
查看全部评分
|