前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Classyshark ---Android apk Viewer

Classyshark ---Android apk Viewer

作者头像
用户9732312
发布2022-05-13 17:49:28
8060
发布2022-05-13 17:49:28
举报
文章被收录于专栏:ADAS性能优化ADAS性能优化

这是一个非常有用的Android app 信息Viewer 工具。其可以查看App 的API的调用,So库

我们可以用它来分析app的系统框架,找到app的性能瓶颈做初步的分析。

可以在这里下载。https://github.com/google/android-classyshark/releases

Classyshark User Guide

About ClassyShark

?We developed this software because we needed something lighting fast and incredibly lightweight for browsing Android APKs, so that we could check right away if everything we wanted was right inside the final executable. And this is where the story begins - be sure to checkout the blogpost Intro to ClassyShark to understand the problem it solves.

Open an archive

Before we can start browsing anything, we need to open it. And this is pretty straight forward: you can do it by clicking on the folder icon in the top bar, as in this screenshot.

Remember that ClassyShark does not stop to Android APK, but you actually see the content of .dex files, as well as .class, .jar and .aars.

Browse components

Right after ClassyShark loads your executable, you will see, in the left panel, the list of the root components of the archive. In the example, we are using the Google IO Android app, and you can notice right away that we see the AndroidManifest.xml file and the classes and res folders at the very top of the tree, as we just opened the APK file.

By clicking on the folders, we will see the tree expand and, when we reach a leaf (that would be a Java file, in this case), by clicking on it, we would see its content on the right pane, where the ClassyShark logo is. Easy!

Now, what if we find, for instance, a class that extends Activity and we want to see what's in there? Well, we are just a double click away from knowing it! In fact, by clicking twice on a type, ClassyShark will bring on the source for that type, so that you can browse the code freely. How cool is that?

Inspect package method counts (multidex)

Raise your hand if you found yourself in the situation of counting the number of methods in your APK. We found ourselves in that critical situation while we tried to reduce the size of the project we were working on and that is why we built a method counter interface inside ClassyShark.

See the method count, that your runtime sees.

You can activate the view by simply clicking on the Methods count tab on top of the navigation tree. In a blink of an eye, you will have a browsable chart of the methods used by everything in you APK, with the possibility of navigate even further by using the same mechanisms we saw in the previous paragraph.

Incremental Search

Why do I have to click all the navigation to my class? Well, you do not have to!ClassyShark ships with a handy search field, that you can use to filter the classes by writing a matching query, that will be automagically applied to the content of the archive.

You can also use the arrows on top to navigate back and forth the history of the app!

Export

The export button, that will give you a report with all the relevant information about the archive and, on its side, you will find the history one, that will help you restoring previously loaded archives (they will persist upon application closing).

本文参与?腾讯云自媒体同步曝光计划,分享自微信公众号。
原始发表:2016-07-05,如有侵权请联系?cloudcommunity@tencent.com 删除

本文分享自 Android性能优化 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与?腾讯云自媒体同步曝光计划? ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • About ClassyShark
  • Open an archive
  • Before we can start browsing anything, we need to open it. And this is pretty straight forward: you can do it by clicking on the folder icon in the top bar, as in this screenshot.
  • Browse components
  • Right after ClassyShark loads your executable, you will see, in the left panel, the list of the root components of the archive. In the example, we are using the Google IO Android app, and you can notice right away that we see the AndroidManifest.xml file and the classes and res folders at the very top of the tree, as we just opened the APK file.
  • Inspect package method counts (multidex)
  • Raise your hand if you found yourself in the situation of counting the number of methods in your APK. We found ourselves in that critical situation while we tried to reduce the size of the project we were working on and that is why we built a method counter interface inside ClassyShark.
  • Incremental Search
  • Why do I have to click all the navigation to my class? Well, you do not have to!ClassyShark ships with a handy search field, that you can use to filter the classes by writing a matching query, that will be automagically applied to the content of the archive.
  • Export
  • The export button, that will give you a report with all the relevant information about the archive and, on its side, you will find the history one, that will help you restoring previously loaded archives (they will persist upon application closing).
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档
http://www.vxiaotou.com