快乐下载apk去次数限制思路记录

准备工作:

1、一台已root手机或模拟器;
2、MT管理器(或NP管理器);
3、开发助手;
4、快乐下载apk。

步骤:

由于apk没加固,所以可以直接MT管理器修改。

一开始是想从isvip或者getvip之类的方法名下手,但发现并没有直接的修改思路(能力有限)。
不过并非一无所获,我们通过搜索vip方法名定位到Vip这个类,进入之后,最后通过阅读代码(如下所示),决定从判断上面下手:

1.jpg

2.jpg

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 <clinit>()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;-><init>(Ljava/lang/String;)V

    sput-object v0, Lcom/one/downloadtools/ui/user/Vip;->format:Ljava/text/SimpleDateFormat;

    return-void
.end method

.method public constructor <init>()V
    .registers 1

    .line 23
    invoke-direct {p0}, Ljava/lang/Object;-><init>()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;-><init>(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;-><init>(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;-><init>(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;-><init>(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;-><init>()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;-><init>()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;-><init>(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;-><init>(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;-><init>()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;-><init>(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;-><init>(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<Integer> 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即可:

3.jpg

保存签名安装。

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 212,185评论 6 493
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 90,445评论 3 385
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 157,684评论 0 348
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 56,564评论 1 284
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 65,681评论 6 386
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 49,874评论 1 290
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 39,025评论 3 408
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 37,761评论 0 268
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 44,217评论 1 303
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 36,545评论 2 327
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 38,694评论 1 341
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 34,351评论 4 332
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 39,988评论 3 315
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 30,778评论 0 21
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 32,007评论 1 266
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 46,427评论 2 360
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 43,580评论 2 349

推荐阅读更多精彩内容