zxc6868 发表于 2014-1-9 23:05

破解一个计算器时遇到的问题(解决,再把程序贴上)

本帖最后由 zxc6868 于 2014-1-10 23:54 编辑

软件刚好超过2M,放网盘里,分别是原软件与破解后。
http://yunpan.cn/QzHpvRv93udQq
按照低调发过的教程,再加上用这个软件时蛋疼,所以想xx掉,用apk改之理下手。
软件运行后,一些高级功能会提示这样的信息,

通过搜索:您当前剩余积分为,找到是jifenManager.smail里面的,

我把度61行    const/4 v4, 0x0    改为const v4, 0x2710
能成功编译回去,但是软件运行不了,提示“程序已停止响应”,不知道是哪里出了问题,求大神们给支支招。

我不知道怎么被源码贴上去,是不是这样?
.class public Lcom/hlinapp/drawcal/JifengManager;
.super Ljava/lang/Object;
.source "JifengManager.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
      Lcom/hlinapp/drawcal/JifengManager$DianleAd;,
      Lcom/hlinapp/drawcal/JifengManager$Item;,
      Lcom/hlinapp/drawcal/JifengManager$JifenAd;,
      Lcom/hlinapp/drawcal/JifengManager$JifenDialogListener;
    }
.end annotation


# static fields
.field public static final MAX_TEST_COUNT:I = 0x0

.field private static final TAG:Ljava/lang/String; = "JifengManager"


# instance fields
.field activity:Landroid/app/Activity;

.field hash:Ljava/util/HashMap;
    .annotation system Ldalvik/annotation/Signature;
      value = {
            "Ljava/util/HashMap",
            "<",
            "Ljava/lang/String;",
            "Lcom/hlinapp/drawcal/JifengManager$Item;",
            ">;"
      }
    .end annotation
.end field

.field private isStart:Z

.field isWaps:Z

.field mJifenAd:Lcom/hlinapp/drawcal/JifengManager$JifenAd;

.field mJifenDialogListener:Lcom/hlinapp/drawcal/JifengManager$JifenDialogListener;

.field mMsgDialog:Lcom/hlinapp/drawcal/dialog/MessageDialog;

.field sp:Landroid/content/SharedPreferences;

.field public total_score:I

.field public used_score:I


# direct methods
.method public constructor <init>(Landroid/app/Activity;)V
    .locals 5
    .param p1, "activity"    # Landroid/app/Activity;

    .prologue
    const/4 v4, 0x0

    .line 39
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 31
    iput v4, p0, Lcom/hlinapp/drawcal/JifengManager;->total_score:I

    .line 32
    iput v4, p0, Lcom/hlinapp/drawcal/JifengManager;->used_score:I

    .line 33
    new-instance v1, Ljava/util/HashMap;

    invoke-direct {v1}, Ljava/util/HashMap;-><init>()V

    iput-object v1, p0, Lcom/hlinapp/drawcal/JifengManager;->hash:Ljava/util/HashMap;

    .line 34
    iput-boolean v4, p0, Lcom/hlinapp/drawcal/JifengManager;->isWaps:Z

    .line 38
    const/4 v1, 0x1

    iput-boolean v1, p0, Lcom/hlinapp/drawcal/JifengManager;->isStart:Z

    .line 41
    iput-object p1, p0, Lcom/hlinapp/drawcal/JifengManager;->activity:Landroid/app/Activity;

    .line 42
    new-instance v1, Lcom/hlinapp/drawcal/dialog/MessageDialog;

    const-string v2, "\u514d\u8d39\u83b7\u53d6\u79ef\u5206"

    invoke-direct {v1, p1, v2}, Lcom/hlinapp/drawcal/dialog/MessageDialog;-><init>(Landroid/content/Context;Ljava/lang/String;)V

    iput-object v1, p0, Lcom/hlinapp/drawcal/JifengManager;->mMsgDialog:Lcom/hlinapp/drawcal/dialog/MessageDialog;

    .line 43
    iget-object v1, p0, Lcom/hlinapp/drawcal/JifengManager;->mMsgDialog:Lcom/hlinapp/drawcal/dialog/MessageDialog;

    const-string v2, "\u514d\u8d39\u83b7\u53d6\u79ef\u5206"

    new-instance v3, Lcom/hlinapp/drawcal/JifengManager$1;

    invoke-direct {v3, p0}, Lcom/hlinapp/drawcal/JifengManager$1;-><init>(Lcom/hlinapp/drawcal/JifengManager;)V

    invoke-virtual {v1, v2, v3}, Lcom/hlinapp/drawcal/dialog/MessageDialog;->setOkButton(Ljava/lang/String;Lcom/hlinapp/drawcal/dialog/MessageDialog$OnDialogClickListener;)V

    .line 52
    iget-object v1, p0, Lcom/hlinapp/drawcal/JifengManager;->mMsgDialog:Lcom/hlinapp/drawcal/dialog/MessageDialog;

    const-string v2, "\u53d6\u6d88"

    new-instance v3, Lcom/hlinapp/drawcal/JifengManager$2;

    invoke-direct {v3, p0}, Lcom/hlinapp/drawcal/JifengManager$2;-><init>(Lcom/hlinapp/drawcal/JifengManager;)V

    invoke-virtual {v1, v2, v3}, Lcom/hlinapp/drawcal/dialog/MessageDialog;->setCancelButton(Ljava/lang/String;Lcom/hlinapp/drawcal/dialog/MessageDialog$OnDialogClickListener;)V

    .line 66
    new-instance v0, Lcom/hlinapp/drawcal/JifengManager$DianleAd;

    invoke-direct {v0, p0}, Lcom/hlinapp/drawcal/JifengManager$DianleAd;-><init>(Lcom/hlinapp/drawcal/JifengManager;)V

    .line 68
    .local v0, "dianleAd":Lcom/hlinapp/drawcal/JifengManager$DianleAd;
    invoke-virtual {p0, v0}, Lcom/hlinapp/drawcal/JifengManager;->setAd(Lcom/hlinapp/drawcal/JifengManager$JifenAd;)V

    .line 70
    invoke-direct {p0}, Lcom/hlinapp/drawcal/JifengManager;->initOffer()V

    .line 71
    const-string v1, "score"

    invoke-virtual {p1, v1, v4}, Landroid/app/Activity;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;

    move-result-object v1

    iput-object v1, p0, Lcom/hlinapp/drawcal/JifengManager;->sp:Landroid/content/SharedPreferences;

    .line 72
    iget-object v1, p0, Lcom/hlinapp/drawcal/JifengManager;->sp:Landroid/content/SharedPreferences;

    const-string v2, "total_score"

    invoke-interface {v1, v2, v4}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I

    move-result v1

    iput v1, p0, Lcom/hlinapp/drawcal/JifengManager;->total_score:I

    .line 73
    iget-object v1, p0, Lcom/hlinapp/drawcal/JifengManager;->sp:Landroid/content/SharedPreferences;

    const-string v2, "used"

    invoke-interface {v1, v2, v4}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I

    move-result v1

    iput v1, p0, Lcom/hlinapp/drawcal/JifengManager;->used_score:I

    .line 75
    invoke-virtual {p0}, Lcom/hlinapp/drawcal/JifengManager;->getPointFormServer()V

    .line 76
    return-void
.end method
=======================================
搜索0x78,在MainActivity.smali下,找到相关的信息
.method public initJifen()V
    .locals 6

    .prologue
    .line 300
    const/16 v0, 0x3c

    .local v0, "p1":I
    const/16 v1, 0x78

    .local v1, "p2":I
    const/16 v2, 0x78

全部改为

.method public initJifen()V
    .locals 6

    .prologue
    .line 300
    const/16 v0, 0x0

    .local v0, "p1":I
    const/16 v1, 0x0

    .local v1, "p2":I
    const/16 v2, 0x0

成功XX掉,高级功能打开了。






1354669803 发表于 2014-1-9 23:16

膜拜会秒安卓的大大 看不懂...

圣华 发表于 2014-1-9 23:28

同膜拜大大,看不懂..

至尊丶 发表于 2014-1-9 23:45

膜拜大大{:17_1077:}

YUEN 发表于 2014-1-10 14:44

提示你需要120的积分才可以开启。那你直接搜索0x78。。找到它,修改成0x0试试。。。 也就是把120的积分改成0.。这样就是积分为0也可以正常运行。。

我是菜鸟,,很多还不懂。。

狂野夏洛特 发表于 2014-1-10 14:58

看一下是否有地方对此数据做校验。也许有惊喜。

xiaocezi 发表于 2014-1-10 20:22

原软件呢

xiaocezi 发表于 2014-1-10 20:30

const v4, 0x2710本身有问题吧

z1006670445 发表于 2014-1-10 20:35

zxc6868 发表于 2014-1-10 23:26

z1006670445 发表于 2014-1-10 20:35 static/image/common/back.gif
const-string v2, "total_score"

   invoke-interface {v1, v2, v4}, Landroid/content/SharedPrefere ...

按照这样修改,发现编译不通过。。。
我发现在手机/data/data/com.hlinapp.drawcal/Shared_prefs 下,有一个文件score.xml 文件,我把里面的total_score项可以改成很大,但是高级功能还是无法使用。
页: [1] 2
查看完整版本: 破解一个计算器时遇到的问题(解决,再把程序贴上)