准备工作:
1、一台已root手机或模拟器;
2、MT管理器(或NP管理器);
3、开发助手;
4、快乐下载apk。
步骤:
由于apk没加固,所以可以直接MT管理器修改。
一开始是想从isvip
或者getvip
之类的方法名下手,但发现并没有直接的修改思路(能力有限)。
不过并非一无所获,我们通过搜索vip
方法名定位到Vip
这个类,进入之后,最后通过阅读代码(如下所示),决定从判断上面下手:
Vip类中的内容:
# classes12.dex
.class public Lcom/one/downloadtools/ui/user/Vip;
.super Ljava/lang/Object;
# static fields
.field private static format:Ljava/text/SimpleDateFormat;
# direct methods
.method static constructor ()V
.registers 2
const/16 v0, 0x85
invoke-static {v0}, Lcom/nmmedit/protect/NativeUtil;->classes12Init0(I)V
.line 25
new-instance v0, Ljava/text/SimpleDateFormat;
const-string v1, "yyyyMMdd"
invoke-direct {v0, v1}, Ljava/text/SimpleDateFormat;->(Ljava/lang/String;)V
sput-object v0, Lcom/one/downloadtools/ui/user/Vip;->format:Ljava/text/SimpleDateFormat;
return-void
.end method
.method public constructor ()V
.registers 1
.line 23
invoke-direct {p0}, Ljava/lang/Object;->()V
return-void
.end method
.method static synthetic access$000()Ljava/lang/String;
.registers 1
.line 23
invoke-static {}, Lcom/one/downloadtools/ui/user/Vip;->getDayKey()Ljava/lang/String;
move-result-object v0
return-object v0
.end method
.method public static native can(Landroid/content/Context;Ljava/lang/String;I)Lio/reactivex/rxjava3/core/Observable;
.annotation system Ldalvik/annotation/MethodParameters;
accessFlags = {
0x0,
0x0,
0x0
}
names = {
"context",
"also",
"count"
}
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Landroid/content/Context;",
"Ljava/lang/String;",
"I)",
"Lio/reactivex/rxjava3/core/Observable<",
"Ljava/lang/Integer;",
">;"
}
.end annotation
.end method
.method public static native canAndDo(Ljava/lang/String;I)Z
.annotation system Ldalvik/annotation/MethodParameters;
accessFlags = {
0x0,
0x0
}
names = {
"also",
"count"
}
.end annotation
.end method
.method private static native getDayKey()Ljava/lang/String;
.end method
.method static synthetic lambda$can$0(Landroid/content/Context;Ljava/lang/String;ILio/reactivex/rxjava3/core/ObservableEmitter;Lcom/one/downloadtools/http/Response;)V
.registers 14
.param p0, "context" # Landroid/content/Context;
.param p1, "also" # Ljava/lang/String;
.param p2, "todayCount" # I
.param p3, "observableEmitter" # Lio/reactivex/rxjava3/core/ObservableEmitter;
.param p4, "res" # Lcom/one/downloadtools/http/Response;
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/Throwable;
}
.end annotation
.line 69
invoke-virtual {p4}, Lcom/one/downloadtools/http/Response;->getShops()Ljava/util/List;
move-result-object v0
if-nez v0, :cond_c
.line 70
const-string v0, "获取信息失败,请检查您的网络"
invoke-static {v0}, Lcom/one/hostpoll/util/ToastUtils;->toast(Ljava/lang/String;)V
.line 71
return-void
.line 73
:cond_c
new-instance v0, Lcom/lxj/xpopup/XPopup$Builder;
invoke-direct {v0, p0}, Lcom/lxj/xpopup/XPopup$Builder;->(Landroid/content/Context;)V
.line 74
const/4 v1, 0x0
invoke-static {v1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
move-result-object v2
invoke-virtual {v0, v2}, Lcom/lxj/xpopup/XPopup$Builder;->dismissOnTouchOutside(Ljava/lang/Boolean;)Lcom/lxj/xpopup/XPopup$Builder;
move-result-object v0
.line 75
invoke-static {v1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
move-result-object v1
invoke-virtual {v0, v1}, Lcom/lxj/xpopup/XPopup$Builder;->dismissOnBackPressed(Ljava/lang/Boolean;)Lcom/lxj/xpopup/XPopup$Builder;
move-result-object v0
new-instance v8, Lcom/one/downloadtools/ui/user/Vip$1;
move-object v1, v8
move-object v2, p0
move-object v3, p4
move-object v4, p1
move v5, p2
move-object v6, p3
move-object v7, p0
invoke-direct/range {v1 .. v7}, Lcom/one/downloadtools/ui/user/Vip$1;->(Landroid/content/Context;Lcom/one/downloadtools/http/Response;Ljava/lang/String;ILio/reactivex/rxjava3/core/ObservableEmitter;Landroid/content/Context;)V
.line 76
invoke-virtual {v0, v8}, Lcom/lxj/xpopup/XPopup$Builder;->asCustom(Lcom/lxj/xpopup/core/BasePopupView;)Lcom/lxj/xpopup/core/BasePopupView;
move-result-object v0
.line 107
invoke-virtual {v0}, Lcom/lxj/xpopup/core/BasePopupView;->show()Lcom/lxj/xpopup/core/BasePopupView;
.line 108
return-void
.end method
.method static synthetic lambda$can$1(Landroid/content/Context;Lcom/one/downloadtools/http/Response;)V
.registers 4
.param p0, "context" # Landroid/content/Context;
.param p1, "res" # Lcom/one/downloadtools/http/Response;
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/Throwable;
}
.end annotation
.line 115
new-instance v0, Lcom/lxj/xpopup/XPopup$Builder;
invoke-direct {v0, p0}, Lcom/lxj/xpopup/XPopup$Builder;->(Landroid/content/Context;)V
.line 116
const/4 v1, 0x0
invoke-static {v1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
move-result-object v1
invoke-virtual {v0, v1}, Lcom/lxj/xpopup/XPopup$Builder;->dismissOnTouchOutside(Ljava/lang/Boolean;)Lcom/lxj/xpopup/XPopup$Builder;
move-result-object v0
.line 117
invoke-virtual {v0, v1}, Lcom/lxj/xpopup/XPopup$Builder;->dismissOnBackPressed(Ljava/lang/Boolean;)Lcom/lxj/xpopup/XPopup$Builder;
move-result-object v0
new-instance v1, Lcom/one/downloadtools/ui/user/Vip$2;
invoke-direct {v1, p0, p1, p0}, Lcom/one/downloadtools/ui/user/Vip$2;->(Landroid/content/Context;Lcom/one/downloadtools/http/Response;Landroid/content/Context;)V
.line 118
invoke-virtual {v0, v1}, Lcom/lxj/xpopup/XPopup$Builder;->asCustom(Lcom/lxj/xpopup/core/BasePopupView;)Lcom/lxj/xpopup/core/BasePopupView;
move-result-object v0
.line 147
invoke-virtual {v0}, Lcom/lxj/xpopup/core/BasePopupView;->show()Lcom/lxj/xpopup/core/BasePopupView;
.line 148
return-void
.end method
.method static synthetic lambda$can$2(Lio/reactivex/rxjava3/core/ObservableEmitter;Ljava/lang/Throwable;)V
.registers 2
.param p0, "observableEmitter" # Lio/reactivex/rxjava3/core/ObservableEmitter;
.param p1, "e" # Ljava/lang/Throwable;
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/Throwable;
}
.end annotation
.line 149
invoke-interface {p0, p1}, Lio/reactivex/rxjava3/core/ObservableEmitter;->onError(Ljava/lang/Throwable;)V
.line 150
return-void
.end method
.method static synthetic lambda$can$3(Ljava/lang/String;ILandroid/content/Context;Lio/reactivex/rxjava3/core/ObservableEmitter;)V
.registers 10
.param p0, "also" # Ljava/lang/String;
.param p1, "count" # I
.param p2, "context" # Landroid/content/Context;
.param p3, "observableEmitter" # Lio/reactivex/rxjava3/core/ObservableEmitter;
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/Throwable;
}
.end annotation
.line 59
invoke-static {}, Lcom/one/downloadtools/ui/user/Vip;->refresh()V
.line 60
invoke-static {}, Lcom/one/downloadtools/ui/user/AppPref;->get()Lcom/one/downloadtools/ui/user/AppPref;
move-result-object v0
invoke-virtual {v0}, Lcom/one/downloadtools/ui/user/AppPref;->getUserInfo()Lcom/one/downloadtools/ui/user/m/UserInfo;
move-result-object v0
.line 61
.local v0, "info":Lcom/one/downloadtools/ui/user/m/UserInfo;
if-eqz v0, :cond_2f
invoke-virtual {v0}, Lcom/one/downloadtools/ui/user/m/UserInfo;->getVip()I
move-result v1
const/16 v2, 0x5e
if-eq v1, v2, :cond_25
invoke-virtual {v0}, Lcom/one/downloadtools/ui/user/m/UserInfo;->getVip()I
move-result v1
const/16 v2, 0x5d
if-eq v1, v2, :cond_25
invoke-virtual {v0}, Lcom/one/downloadtools/ui/user/m/UserInfo;->getVip()I
move-result v1
const/16 v2, 0x64
if-ne v1, v2, :cond_2f
.line 62
:cond_25
const/4 v1, -0x1
invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v1
invoke-interface {p3, v1}, Lio/reactivex/rxjava3/core/ObservableEmitter;->onNext(Ljava/lang/Object;)V
goto/16 :goto_d0
.line 64
:cond_2f
invoke-static {}, Lcom/one/downloadtools/config/NativeConfig;->getInstance()Lcom/one/downloadtools/config/NativeConfig;
move-result-object v1
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;->()V
invoke-static {}, Lcom/one/downloadtools/ui/user/Vip;->getDayKey()Ljava/lang/String;
move-result-object v3
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string v3, "_"
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v2, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
invoke-virtual {v1, v2}, Lcom/one/downloadtools/config/NativeConfig;->readInt(Ljava/lang/String;)I
move-result v1
.line 65
.local v1, "todayCount":I
sget-object v2, Ljava/lang/System;->out:Ljava/io/PrintStream;
new-instance v4, Ljava/lang/StringBuilder;
invoke-direct {v4}, Ljava/lang/StringBuilder;->()V
const-string v5, "今日已使用:"
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v4, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v4
invoke-virtual {v2, v4}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V
.line 66
if-ge v1, p1, :cond_b3
.line 67
if-nez v1, :cond_8a
.line 68
invoke-static {}, Lcom/one/downloadtools/http/HttpClient;->getApi()Lcom/one/downloadtools/http/Api;
move-result-object v2
invoke-interface {v2}, Lcom/one/downloadtools/http/Api;->getShops()Lio/reactivex/rxjava3/core/Observable;
move-result-object v2
invoke-static {}, Lcom/one/downloadtools/ui/user/RxPlugin;->fromNewToMainThread()Lio/reactivex/rxjava3/core/ObservableTransformer;
move-result-object v3
invoke-virtual {v2, v3}, Lio/reactivex/rxjava3/core/Observable;->compose(Lio/reactivex/rxjava3/core/ObservableTransformer;)Lio/reactivex/rxjava3/core/Observable;
move-result-object v2
new-instance v3, Lcom/one/downloadtools/ui/user/-$$Lambda$Vip$zK7SieMyZ-Sq4SwE-E0hqmeyZk4;
invoke-direct {v3, p2, p0, v1, p3}, Lcom/one/downloadtools/ui/user/-$$Lambda$Vip$zK7SieMyZ-Sq4SwE-E0hqmeyZk4;->(Landroid/content/Context;Ljava/lang/String;ILio/reactivex/rxjava3/core/ObservableEmitter;)V
.line 108
invoke-static {p3}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;
new-instance v4, Lcom/one/downloadtools/ui/user/-$$Lambda$9V4x4hT-pqcFjlu4mhGdRyjZzlw;
invoke-direct {v4, p3}, Lcom/one/downloadtools/ui/user/-$$Lambda$9V4x4hT-pqcFjlu4mhGdRyjZzlw;->(Lio/reactivex/rxjava3/core/ObservableEmitter;)V
.line 68
invoke-virtual {v2, v3, v4}, Lio/reactivex/rxjava3/core/Observable;->subscribe(Lio/reactivex/rxjava3/functions/Consumer;Lio/reactivex/rxjava3/functions/Consumer;)Lio/reactivex/rxjava3/disposables/Disposable;
goto :goto_d0
.line 110
:cond_8a
invoke-static {}, Lcom/one/downloadtools/config/NativeConfig;->getInstance()Lcom/one/downloadtools/config/NativeConfig;
move-result-object v2
new-instance v4, Ljava/lang/StringBuilder;
invoke-direct {v4}, Ljava/lang/StringBuilder;->()V
invoke-static {}, Lcom/one/downloadtools/ui/user/Vip;->getDayKey()Ljava/lang/String;
move-result-object v5
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v4, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v4, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v3
add-int/lit8 v4, v1, 0x1
invoke-virtual {v2, v3, v4}, Lcom/one/downloadtools/config/NativeConfig;->putInt(Ljava/lang/String;I)V
.line 111
add-int/lit8 v2, v1, 0x1
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v2
invoke-interface {p3, v2}, Lio/reactivex/rxjava3/core/ObservableEmitter;->onNext(Ljava/lang/Object;)V
goto :goto_d0
.line 114
:cond_b3
invoke-static {}, Lcom/one/downloadtools/http/HttpClient;->getApi()Lcom/one/downloadtools/http/Api;
move-result-object v2
invoke-interface {v2}, Lcom/one/downloadtools/http/Api;->getShops()Lio/reactivex/rxjava3/core/Observable;
move-result-object v2
invoke-static {}, Lcom/one/downloadtools/ui/user/RxPlugin;->fromNewToMainThread()Lio/reactivex/rxjava3/core/ObservableTransformer;
move-result-object v3
invoke-virtual {v2, v3}, Lio/reactivex/rxjava3/core/Observable;->compose(Lio/reactivex/rxjava3/core/ObservableTransformer;)Lio/reactivex/rxjava3/core/Observable;
move-result-object v2
new-instance v3, Lcom/one/downloadtools/ui/user/-$$Lambda$Vip$JC0r5-ftHAi3IGOWgJtQmErslSI;
invoke-direct {v3, p2}, Lcom/one/downloadtools/ui/user/-$$Lambda$Vip$JC0r5-ftHAi3IGOWgJtQmErslSI;->(Landroid/content/Context;)V
new-instance v4, Lcom/one/downloadtools/ui/user/-$$Lambda$Vip$SXjn20c6grLvbhfrrdIaMPmapr0;
invoke-direct {v4, p3}, Lcom/one/downloadtools/ui/user/-$$Lambda$Vip$SXjn20c6grLvbhfrrdIaMPmapr0;->(Lio/reactivex/rxjava3/core/ObservableEmitter;)V
invoke-virtual {v2, v3, v4}, Lio/reactivex/rxjava3/core/Observable;->subscribe(Lio/reactivex/rxjava3/functions/Consumer;Lio/reactivex/rxjava3/functions/Consumer;)Lio/reactivex/rxjava3/disposables/Disposable;
.line 153
.end local v1 # "todayCount":I
:goto_d0
return-void
.end method
.method static synthetic lambda$refresh$4(Lcom/one/downloadtools/http/Response;)V
.registers 3
.param p0, "res" # Lcom/one/downloadtools/http/Response;
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/Throwable;
}
.end annotation
.line 162
invoke-virtual {p0}, Lcom/one/downloadtools/http/Response;->getCode()I
move-result v0
const/16 v1, 0xc8
if-ne v0, v1, :cond_15
.line 163
invoke-static {}, Lcom/one/downloadtools/ui/user/AppPref;->get()Lcom/one/downloadtools/ui/user/AppPref;
move-result-object v0
invoke-virtual {p0}, Lcom/one/downloadtools/http/Response;->getData()Ljava/lang/Object;
move-result-object v1
check-cast v1, Lcom/one/downloadtools/ui/user/m/UserInfo;
invoke-virtual {v0, v1}, Lcom/one/downloadtools/ui/user/AppPref;->setUserInfo(Lcom/one/downloadtools/ui/user/m/UserInfo;)V
.line 165
:cond_15
return-void
.end method
.method static synthetic lambda$refresh$5(Ljava/lang/Throwable;)V
.registers 1
.param p0, "e" # Ljava/lang/Throwable;
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/Throwable;
}
.end annotation
.line 165
return-void
.end method
.method private static native refresh()V
.end method
.method public static native showVip(Landroid/content/Context;)V
.annotation system Ldalvik/annotation/MethodParameters;
accessFlags = {
0x1
}
names = {
"context"
}
.end annotation
.end method
.method public static native to(Landroid/content/Context;)V
.annotation system Ldalvik/annotation/MethodParameters;
accessFlags = {
0x0
}
names = {
"context"
}
.end annotation
.end method
转化为java代码查看:
//
// Decompiled by Jadx - 780ms
//
package com.one.downloadtools.ui.user;
import android.content.Context;
import com.lxj.xpopup.XPopup;
import com.nmmedit.protect.NativeUtil;
import com.one.downloadtools.config.NativeConfig;
import com.one.downloadtools.http.HttpClient;
import com.one.downloadtools.http.Response;
import com.one.downloadtools.ui.user.-$;
import com.one.downloadtools.ui.user.m.UserInfo;
import com.one.hostpoll.util.ToastUtils;
import io.reactivex.rxjava3.core.Observable;
import io.reactivex.rxjava3.core.ObservableEmitter;
import java.io.PrintStream;
import java.text.SimpleDateFormat;
import java.util.Objects;
public class Vip {
private static SimpleDateFormat format;
public static native Observable can(Context context, String also, int count);
public static native boolean canAndDo(String also, int count);
public static native String getDayKey();
private static native void refresh();
public static native void showVip(Context context);
public static native void to(Context context);
static {
NativeUtil.classes12Init0(133);
format = new SimpleDateFormat("yyyyMMdd");
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓关键片段↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
static void lambda$can$3(String also, int count, Context context, ObservableEmitter observableEmitter) throws Throwable {
refresh();
UserInfo info = AppPref.get().getUserInfo();
if (info != null && (info.getVip() == 94 || info.getVip() == 93 || info.getVip() == 100)) {
observableEmitter.onNext(-1);
return;
}
NativeConfig nativeConfig = NativeConfig.getInstance();
int todayCount = nativeConfig.readInt(getDayKey() + "_" + also);
PrintStream printStream = System.out;
printStream.println("今日已使用:" + todayCount);
if (todayCount < count) {
if (todayCount == 0) {
Observable compose = HttpClient.getApi().getShops().compose(RxPlugin.fromNewToMainThread());
-$.Lambda.Vip.zK7SieMyZ-Sq4SwE-E0hqmeyZk4 r3 = new -$.Lambda.Vip.zK7SieMyZ-Sq4SwE-E0hqmeyZk4(context, also, todayCount, observableEmitter);
Objects.requireNonNull(observableEmitter);
compose.subscribe(r3, new -$.Lambda.9V4x4hT-pqcFjlu4mhGdRyjZzlw(observableEmitter));
return;
}
NativeConfig nativeConfig2 = NativeConfig.getInstance();
nativeConfig2.putInt(getDayKey() + "_" + also, todayCount + 1);
observableEmitter.onNext(Integer.valueOf(todayCount + 1));
return;
}
HttpClient.getApi().getShops().compose(RxPlugin.fromNewToMainThread()).subscribe(new -$.Lambda.Vip.JC0r5-ftHAi3IGOWgJtQmErslSI(context), new -$.Lambda.Vip.SXjn20c6grLvbhfrrdIaMPmapr0(observableEmitter));
}
↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑关键片段↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static void lambda$can$0(Context context, String also, int todayCount, ObservableEmitter observableEmitter, Response res) throws Throwable {
if (res.getShops() == null) {
ToastUtils.toast("获取信息失败,请检查您的网络");
} else {
new XPopup.Builder(context).dismissOnTouchOutside(false).dismissOnBackPressed(false).asCustom(new Vip$1(context, res, also, todayCount, observableEmitter, context)).show();
}
}
static void lambda$refresh$4(Response res) throws Throwable {
if (res.getCode() == 200) {
AppPref.get().setUserInfo((UserInfo) res.getData());
}
}
static void lambda$refresh$5(Throwable e) throws Throwable {
}
}
其中最重要的部分就是包含判断的部分:
static void lambda$can$3(String also, int count, Context context, ObservableEmitter observableEmitter) throws Throwable {
refresh();
UserInfo info = AppPref.get().getUserInfo();
if (info != null && (info.getVip() == 94 || info.getVip() == 93 || info.getVip() == 100)) {
observableEmitter.onNext(-1);
return;
}
NativeConfig nativeConfig = NativeConfig.getInstance();
int todayCount = nativeConfig.readInt(getDayKey() + "_" + also);
PrintStream printStream = System.out;
printStream.println("今日已使用:" + todayCount);
if (todayCount < count) {
if (todayCount == 0) {
Observable compose = HttpClient.getApi().getShops().compose(RxPlugin.fromNewToMainThread());
-$.Lambda.Vip.zK7SieMyZ-Sq4SwE-E0hqmeyZk4 r3 = new -$.Lambda.Vip.zK7SieMyZ-Sq4SwE-E0hqmeyZk4(context, also, todayCount, observableEmitter);
Objects.requireNonNull(observableEmitter);
compose.subscribe(r3, new -$.Lambda.9V4x4hT-pqcFjlu4mhGdRyjZzlw(observableEmitter));
return;
}
NativeConfig nativeConfig2 = NativeConfig.getInstance();
nativeConfig2.putInt(getDayKey() + "_" + also, todayCount + 1);
observableEmitter.onNext(Integer.valueOf(todayCount + 1));
return;
}
HttpClient.getApi().getShops().compose(RxPlugin.fromNewToMainThread()).subscribe(new -$.Lambda.Vip.JC0r5-ftHAi3IGOWgJtQmErslSI(context), new -$.Lambda.Vip.SXjn20c6grLvbhfrrdIaMPmapr0(observableEmitter));
}
通过阅读可知该段代码大致意思为,判断info.Getvip()返回的值是否非空并且等于94、93、100其中一个数字,是则执行observableEmitter.onNext(-1);
,否则返回继续执行后续代码,根据实际使用可推测后续代码是非vip的情况下计算每日免费使用次数,我们并不希望执行的部分。
通过对java代码的解读,可以回去看前面的smali代码,很快定位到判断相关的代码:
.line 61
.local v0, "info":Lcom/one/downloadtools/ui/user/m/UserInfo;
if-eqz v0, :cond_2f //判断v0是否等于0,是则跳转到cond_2f
invoke-virtual {v0}, Lcom/one/downloadtools/ui/user/m/UserInfo;->getVip()I
move-result v1
const/16 v2, 0x5e // v2的值是5e,也就是十进制的94
if-eq v1, v2, :cond_25 //如果v1等于v2,则跳转到cond_25
invoke-virtual {v0}, Lcom/one/downloadtools/ui/user/m/UserInfo;->getVip()I
move-result v1
const/16 v2, 0x5d // v2的值是5d,也就是十进制的93
if-eq v1, v2, :cond_25 //如果v1等于v2,则跳转到cond_25
invoke-virtual {v0}, Lcom/one/downloadtools/ui/user/m/UserInfo;->getVip()I
move-result v1
const/16 v2, 0x64 // v2的值是64,也就是十进制的100
if-ne v1, v2, :cond_2f //如果v1不等于v2,则跳转到cond_2f
那么此时就明朗了,我们的目标就是不管v0是否为空,v1v2是否相等,我们都跳转到cond_25
而不进入原来的cond_2f
,所以我们只需要将cond_2f
都修改为cond_25
即可:
保存签名安装。