吾爱破解 - LCG - LSG |安卓破解|病毒分析|www.52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 40211|回复: 58
收起左侧

[Android 分享] 某安卓软件免积分破解(分析全过程)

  [复制链接]
475905793 发表于 2013-5-6 07:16
本帖最后由 475905793 于 2013-5-6 07:32 编辑

咱们论坛关于安卓软件破解分析的文章特别少。就转载了一篇
转帖地址:互联网
IDA,">【文章标题】: 某安卓软件免积分破解
【文章作者】: pojiemyie
【软件名称】: 疯狂接水果
【下载地址】: 自己搜索下载
【使用工具】: ApkIDE(APK改之理)
【操作平台】: android 4.2.2
【作者声明】: 第一次玩android破解,给自己留点记号,免得忘记。高手略过,请勿拍砖!
--------------------------------------------------------------------------------
【详细过程】
  重力感应游戏,给小朋友玩锻炼平衡感。试玩一次后就出现对话框要激活。
  穷人一个,还是自力更生比较好。祭出工具ApkIDE。
  参考网上的教程,在右边的搜索框中搜索“开始(激活)”的十六进制unicode:\u靠\u59cb(\u6fc0\u6d3b),未果。
  在右边的搜索框中搜索中文“开始(激活)”   
  (备注:在资源文件中可以直接搜索中文,但在smali文件中不能直接搜索中文,要,最好两样都试试。这个问题我纠结了半天,血的教训。)
  出现搜索结果:
  mainac.xml,双击打开,发现以下信息:
      <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_centerInParent="true">
          <TextView android:textSize="30.0dip" android:textColor="#fffaebd7" android:gravity="center" android:id="@id/PointsTextView" android:visibility="visible" android:layout_width="fill_parent" android:layout_height="wrap_content" />
          <Button android:textSize="20.0dip" android:gravity="center" android:layout_gravity="center" android:id="@id/nextb" android:layout_width="190.0dip" android:layout_height="50.0dip" android:text="开始(激活)" />
          <Button android:textSize="20.0dip" android:gravity="center" android:layout_gravity="center" android:id="@id/moreb" android:layout_width="190.0dip" android:layout_height="50.0dip" android:text="更多免费游戏应用" />
          <Button android:textSize="20.0dip" android:gravity="center" android:layout_gravity="center" android:id="@id/radvb" android:layout_width="190.0dip" android:layout_height="50.0dip" android:text="免费积分" />
      </LinearLayout>
  正好是激活对话框的三个按钮,终于找到了位置!泪奔!
  猜测mainac可能就是相应调用程序的名称。继续搜索mainac,找到两处,双击打开其中一个public.xml,看到如下代码:
  <resources>
      <public type="drawable" name="backadzs" id="0x7f020001" />
      <public type="drawable" name="icon" id="0x7f020000" />
      <public type="layout" name="main" id="0x7f030000" />
      <public type="layout" name="mainac" id="0x7f030001" />    --->此处
      <public type="layout" name="upload" id="0x7f030002" />
      <public type="string" name="hello" id="0x7f040000" />
      <public type="string" name="app_name" id="0x7f040001" />
      <public type="id" name="glview" id="0x7f050000" />
      <public type="id" name="linearLayout" id="0x7f050001" />
      <public type="id" name="PointsTextView" id="0x7f050002" />
      <public type="id" name="nextb" id="0x7f050003" />
      <public type="id" name="moreb" id="0x7f050004" />
      <public type="id" name="radvb" id="0x7f050005" />
      <public type="id" name="AdLinearLayout" id="0x7f050006" />
      <public type="id" name="progressBar2" id="0x7f050007" />
  </resources>
  看到id号为0x7f030001,这个是程序调用的ID,再搜索0x7f030001,出来三个结果,双击打开MainA.smali,看到代码。
      invoke-virtual {v0, p0}, Lcom/kuguo/pushads/PushAdsManager;->receivePushMessage(Landroid/content/Context;)V
  
      .line 107
      const v0, 0x7f030001    --->此处
  
      invoke-virtual {p0, v0}, Lcom/adroidzscpc/bzyi/MainA;->setContentView(I)V
  
      .line 108
      const v0, 0x7f050006
  
      invoke-virtual {p0, v0}, Lcom/adroidzscpc/bzyi/MainA;->findViewById(I)Landroid/view/View;
  
      move-result-object v7
  
      check-cast v7, Landroid/widget/LinearLayout;
  
      .line 110
      .local v7, container:Landroid/widget/LinearLayout;
      new-instance v0, Lcom/waps/AdView;
  
      invoke-direct {v0, p0, v7}, Lcom/waps/AdView;-><init>(Landroid/content/Context;Landroid/widget/LinearLayout;)V
  
      const/16 v1, 0x1e
  
      invoke-virtual {v0, v1}, Lcom/waps/AdView;->DisplayAd(I)V
  
      .line 112
      invoke-static {p0}, Lcom/waps/AppConnect;->getInstance(Landroid/content/Context;)Lcom/waps/AppConnect;
  
      move-result-object v0
  
      invoke-virtual {v0}, Lcom/waps/AppConnect;->getPushAd()V
  
      .line 113
      const v0, 0x7f050002
  
      invoke-virtual {p0, v0}, Lcom/adroidzscpc/bzyi/MainA;->findViewById(I)Landroid/view/View;
  
      move-result-object v0
  
      check-cast v0, Landroid/widget/TextView;
  
      iput-object v0, p0, Lcom/adroidzscpc/bzyi/MainA;->pointsTextView:Landroid/widget/TextView;
  
      .line 114
      invoke-static {p0}, Lcom/waps/AppConnect;->getInstance(Landroid/content/Context;)Lcom/waps/AppConnect;
  
      move-result-object v0
  
      invoke-virtual {v0, p0}, Lcom/waps/AppConnect;->getPoints(Lcom/waps/UpdatePointsNotifier;)V
  
  看不懂android程序,但看英文也猜出这里应该是显示激活对话框、上网激活、推送广告的位置了。
  不管了,向上找到位置直接返回就行了。
  .method public onCreate(Landroid/os/Bundle;)V
      .locals 14
      .parameter "savedInstanceState"
  
      .prologue
      const/4 v5, 0x1
  
      const/4 v4, 0x0
  
      .line 61
      invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V
  
      .line 62
      const v0, 0x7f030002
  
      invoke-virtual {p0, v0}, Lcom/adroidzscpc/bzyi/MainA;->setContentView(I)V
  
      .line 63
      invoke-static {p0}, Lcom/waps/AppConnect;->getInstance(Landroid/content/Context;)Lcom/waps/AppConnect;
  
      .line 65
      invoke-static {p0}, Lcom/mobclick/android/MobclickAgent;->updateOnlineConfig(Landroid/content/Context;)V
  
      .line 66
      iget-object v0, p0, Lcom/adroidzscpc/bzyi/MainA;->PREFS_NAME:Ljava/lang/String;
  
      invoke-virtual {p0, v0, v4}, Lcom/adroidzscpc/bzyi/MainA;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;
  
      move-result-object v0
  
      iput-object v0, p0, Lcom/adroidzscpc/bzyi/MainA;->settings:Landroid/content/SharedPreferences;
  
      .line 67
      iget-object v0, p0, Lcom/adroidzscpc/bzyi/MainA;->settings:Landroid/content/SharedPreferences;
  
      const-string v1, "times"
  
      invoke-interface {v0, v1, v4}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z
  
      move-result v0
  
      iput-boolean v0, p0, Lcom/adroidzscpc/bzyi/MainA;->times:Z
  
      .line 68
      iget-object v0, p0, Lcom/adroidzscpc/bzyi/MainA;->settings:Landroid/content/SharedPreferences;
  
      const-string v1, "jump"
  
      invoke-interface {v0, v1, v4}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z
  
      move-result v0
  
      iput-boolean v0, p0, Lcom/adroidzscpc/bzyi/MainA;->removeadv:Z
  
      .line 70
      invoke-direct {p0}, Lcom/adroidzscpc/bzyi/MainA;->se()V
  
      .line 71
      iget-object v0, p0, Lcom/adroidzscpc/bzyi/MainA;->a:Ljava/lang/String;
  
      const-string v1, "752016e66a64b2e281ba326d4d21fefb"
  
      invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
  
      move-result v0
  
      if-nez v0, :cond_0  --->改此处
  
  向下看到程序结尾:
          goto/16 :goto_0
  .end method
  
  将 if-nez v0, :cond_0改成goto/16 :goto_0,保存,重编译,世界清静了。
  
--------------------------------------------------------------------------------
【经验总结】
  过程中走了两个弯路,费了很多时间:
  一个是搜索问题,是搜中文还是16进制unicode,一个是修改完后没有保存就编译,结果始终不成功,总以为找错了位置。

免费评分

参与人数 1热心值 +1 收起 理由
wshq + 1 学习了~

查看全部评分

发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。

 楼主| 475905793 发表于 2013-5-6 07:32
phantom 发表于 2013-5-6 07:30
试试老外那个幸运破解器...

这个是研究分析贴 。
phantom 发表于 2013-5-6 07:30
弦外 发表于 2014-3-21 22:06
将 if-nez v0, :cond_0改成goto/16 :goto_0   为什么这样改  能说一下原因吗
abmin521 发表于 2014-7-9 06:40 来自手机
abmin521 发表于 2014-7-9 06:39
if-nez v0, :cond_0改成goto/16 :goto_0

这句话什么意思?万一应用很大,,40m,,也可以这样???
keiwen27 发表于 2013-5-6 07:33
不错 学习了
Rainy 发表于 2013-5-6 09:24
虽然不知道你说的什么,但是你肯定厉害,顶一个
头像被屏蔽
田田圏 发表于 2013-5-6 10:23
提示: 作者被禁止或删除 内容自动屏蔽
YUEN 发表于 2013-5-6 13:19
高手!
听说安卓软件很容易破解
 楼主| 475905793 发表于 2013-5-6 18:17
YUEN 发表于 2013-5-6 13:19
高手!
听说安卓软件很容易破解

的确  安卓软件很简单   毕竟系统就是开源的   
xiix 发表于 2013-5-8 08:31
好深奥。。楼主 学习这个需要什么专业知识吗

点评

java的一些基础 安卓里面 看看 逆向分析就可以了  发表于 2013-5-8 10:35
小D 发表于 2013-5-8 09:38
学习一下。再试试
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则 警告:本版块禁止灌水或回复与主题无关内容,违者重罚!

快速回复 收藏帖子 返回列表 搜索

RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - LCG - LSG ( 京ICP备16042023号 | 京公网安备 11010502030087号 )

GMT+8, 2024-5-10 01:42

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表