工欲善其事,必先利其器之—Android 反编译利器-classyshark

介绍

这里写图片描述
Android-classyshark,Google出口必属精品,你值得拥有!
classyshark的优点:

  • 直接打开并反编译dex、apk、jar、arr
  • 图形化操作,方便查看各类文件信息,方法类占比情况等
  • 支持代码的增量搜索

安装

直接下载jar包,放在本地目录。我的习惯是放在如下本地目录(home/dev_tool/),并设置相关的快捷访问方式(注 意要 : chmod +x ClassyShark.jar)

# 在.bash_profile添加如下alias
alias classyshark='java -jar ${HOME}/dev_tool/jars/ClassyShark.jar'

使用

示例:使用classyshark官中窥豹Bilibili APP

帮助

先看看帮忙说明

luogw@luogw-MacBook-Pro Downloads$ classyshark -h
missing command line arguments


Usage: java -jar ClassyShark.jar [-options] <archive> [args...]
           (to execute a ClassyShark on binary archive jar/apk/dex/class)
where options include:
    -open	  open an archive with GUI
    -export	  export to file
    -methodcounts	  packages with method counts
    -inspect  experimental prints apk analysis
    -update	updates ClassyShark
where args is an optional classname

实践

打开apk

luogw@luogw-MacBook-Pro Downloads$ classyshark -open iBiliPlayer-bili.apk

这里写图片描述

这里写图片描述

这里写图片描述

这里写图片描述

这里写图片描述

导出分析文件

luogw@luogw-MacBook-Pro Downloads$ classyshark -export iBiliPlayer-bili.apk
method_counts.txt
Parsing classes.dex
Parsing classes2.dex
Parsing classes3.dex
Parsing classes4.dex

输出的文件如下

-rw-r--r--  1 luogw  staff    102710  6 15 11:06 AndroidManifest.xml_dump
-rw-r--r--  1 luogw  staff    981951  6 15 11:06 all_classes.txt
-rw-r--r--  1 luogw  staff   7284500  6 15 11:06 all_methods.txt
-rw-r--r--  1 luogw  staff   6534696  6 15 11:06 all_strings.txt
-rw-r--r--  1 luogw  staff    982666  6 15 11:06 method_counts.txt

列出方法数

luogw@luogw-MacBook-Pro temp$ classyshark -methodcounts
iBiliPlayer-bili.apk

端终上输出method_counts.txt的内容

简要的分析

输出App的dex情况和使用的主要组件

uogw@luogw-MacBook-Pro temp$ classyshark -inspect iBiliPlayer-bili.apk

                  ~ APK DASHBOARD ~

+-------------------+------------------------------------------------------------------------------------------------------------------------------------+
| Recommendation    | Description                                                                                                                        |
+-------------------+------------------------------------------------------------------------------------------------------------------------------------+
|                   |                                                                                                                                    |
| classes.dex       | 65241 methods                                                                                                                      |
| classes2.dex      | 64840 methods                                                                                                                      |
| classes3.dex      | 65053 methods                                                                                                                      |
| classes4.dex      | 37920 methods                                                                                                                      |
|                   |                                                                                                                                    |
| Java              | Duplicate image loading libraries -  picasso fresco                                                                                |
|                   |                                                                                                                                    |
| System Broadcast  | android.intent.action.DOWNLOAD_COMPLETE ==> com.bilibili.ad.adview.web.apkdownload.ApkMgr$ApkDownloadReceiver                      |
| System Broadcast  | android.intent.action.MEDIA_BUTTON ==> tv.danmaku.biliplayer.features.headset.HeadsetControlPlayAdapter$HeadsetMediaButtonReceiver |
| System Broadcast  | android.net.conn.CONNECTIVITY_CHANGE ==> com.xiaomi.push.service.receivers.NetworkStatusReceiver                                   |
|                   |                                                                                                                                    |
+-------------------+------------------------------------------------------------------------------------------------------------------------------------+
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值