Mac Android 反编译 随笔

 
 
  1. 需要 

 

以上 三个 文件 通过cp 命令可拷贝至 /usr/local/bin 目录中(拷贝至其中的原因是为了 配置全局 变量,类似于Windows java 环境的 path 配置。)

拷贝完成后 运行:apktool

若有帮助信息展示,则 说明成功。

然后  跳转到  apk所在目录,运行命令:apktool d XXXXX.apk

 

即可反编译 查看资源文件 内容。

 

apk 文件后缀名变更为 .zip 并解压  将其中的 classes.dex 拷贝至 dex2jar 文件夹中,运行命令:

sh dex2jar.sh classes.dex   即可,然后使用 JD-GUI 工具查看 源代码。

 

 

使用JD-GUI 查看 有时会出现 其他 错误:(譬如:

public void put(String paramString, byte[] paramArrayOfByte)

  {

    // Byte code:

    //   0: aload_0

    //   1: getfield 66        cn/com/hfgo/cache/ACache:mCache        Lcn/com/hfgo/cache/ACache$ACacheManager;

    //   4: aload_1

    //   5: invokestatic 132        cn/com/hfgo/cache/ACache$ACacheManager:access$100        (Lcn/com/hfgo/cache/ACache$ACacheManager;Ljava/lang/String;)Ljava/io/File;

    //   8: astore_3

    //   9: new 339        java/io/FileOutputStream

    //   12: dup

    //   13: aload_3

    //   14: invokespecial 340        java/io/FileOutputStream:<init>        (Ljava/io/File;)V

    //   17: astore 4

    //   19: aload 4

    //   21: aload_2

    //   22: invokevirtual 342        java/io/FileOutputStream:write        ([B)V

    //   25: aload 4

    //   27: ifnull +13 -> 40

    //   30: aload 4

    //   32: invokevirtual 343        java/io/FileOutputStream:flush        ()V

    //   35: aload 4

    //   37: invokevirtual 344        java/io/FileOutputStream:close        ()V

    //   40: aload_0

    //   41: getfield 66        cn/com/hfgo/cache/ACache:mCache        Lcn/com/hfgo/cache/ACache$ACacheManager;

    //   44: aload_3

    //   45: invokestatic 322        cn/com/hfgo/cache/ACache$ACacheManager:access$200        (Lcn/com/hfgo/cache/ACache$ACacheManager;Ljava/io/File;)V

    //   48: return

    //   49: astore 9

    //   51: aload 9

    //   53: invokevirtual 155        java/io/IOException:printStackTrace        ()V

    //   56: goto -16 -> 40

    //   59: astore 5

    //   61: aconst_null

    //   62: astore 4

    //   64: aload 5

    //   66: invokevirtual 181        java/lang/Exception:printStackTrace        ()V

    //   69: aload 4

    //   71: ifnull +13 -> 84

    //   74: aload 4

    //   76: invokevirtual 343        java/io/FileOutputStream:flush        ()V

    //   79: aload 4

    //   81: invokevirtual 344        java/io/FileOutputStream:close        ()V

    //   84: aload_0

    //   85: getfield 66        cn/com/hfgo/cache/ACache:mCache        Lcn/com/hfgo/cache/ACache$ACacheManager;

    //   88: aload_3

    //   89: invokestatic 322        cn/com/hfgo/cache/ACache$ACacheManager:access$200        (Lcn/com/hfgo/cache/ACache$ACacheManager;Ljava/io/File;)V

    //   92: return

    //   93: astore 8

    //   95: aload 8

    //   97: invokevirtual 155        java/io/IOException:printStackTrace        ()V

    //   100: goto -16 -> 84

    //   103: astore 6

    //   105: aconst_null

    //   106: astore 4

    //   108: aload 4

    //   110: ifnull +13 -> 123

    //   113: aload 4

    //   115: invokevirtual 343        java/io/FileOutputStream:flush        ()V

    //   118: aload 4

    //   120: invokevirtual 344        java/io/FileOutputStream:close        ()V

    //   123: aload_0

    //   124: getfield 66        cn/com/hfgo/cache/ACache:mCache        Lcn/com/hfgo/cache/ACache$ACacheManager;

    //   127: aload_3

    //   128: invokestatic 322        cn/com/hfgo/cache/ACache$ACacheManager:access$200        (Lcn/com/hfgo/cache/ACache$ACacheManager;Ljava/io/File;)V

    //   131: aload 6

    //   133: athrow

    //   134: astore 7

    //   136: aload 7

    //   138: invokevirtual 155        java/io/IOException:printStackTrace        ()V

    //   141: goto -18 -> 123

    //   144: astore 6

    //   146: goto -38 -> 108

    //   149: astore 5

    //   151: goto -87 -> 64

    //

    // Exception table:

    //   from        to        target        type

    //   30        40        49        java/io/IOException

    //   9        19        59        java/lang/Exception

    //   74        84        93        java/io/IOException

    //   9        19        103        finally

    //   113        123        134        java/io/IOException

    //   19        25        144        finally

    //   64        69        144        finally

    //   19        25        149        java/lang/Exception

  }

这时需要  使用更专业的安全破解软件,可以查看 字节码(JEB (收费))。

官网地址:https://www.pnfsoftware.com/jeb2

 

转载于:https://www.cnblogs.com/leov1/p/5796324.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值