Code Monkey home page Code Monkey logo

android-classyshark's Introduction

ClassyShark

Introduction

alt text

ClassyShark is a standalone binary inspection tool for Android developers. It can reliably browse any Android executable and show important info such as class interfaces and members, dex counts and dependencies. ClassyShark supports multiple formats including libraries (.dex, .aar, .so), executables (.apk, .jar, .class) and all Android binary XMLs: AndroidManifest, resources, layouts etc.

Useful links

Download

To run, grab the latest JAR and run java -jar ClassyShark.jar.

Export data in text format

  • Exporter
  • API finder 🚧 work in progress

Develop

  1. Clone the repo
  2. Open in your favorite IDE/editor
  3. Build options:

Arch Linux

If you're running Arch Linux you can install the latest prebuilt jar from the AUR.

Dependencies

Support

If you've found an error, please file an issue:

https://github.com/google/android-classyshark/issues

Patches are encouraged, and may be submitted by forking this project and submitting a pull request through GitHub.

License

Copyright 2020 Google, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

android-classyshark's People

Contributors

anantshri avatar andreban avatar bootstraponline avatar borisf avatar chthai64 avatar dandv avatar dturner avatar foso avatar jonforshort avatar kangofchen avatar keyboardsurfer avatar mikeroyal avatar pedronveloso avatar readmecritic avatar rock3r avatar sierisimo avatar sschuberth avatar tiwiz avatar vanniktech avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

android-classyshark's Issues

Apk

Could you please provide an apk for download?

exception while click on a file

when i click on a file, the terminal display a npe as below:
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at javax.swing.text.GlyphView.getBreakSpot(GlyphView.java:799)
at javax.swing.text.GlyphView.getBreakWeight(GlyphView.java:724)
at javax.swing.text.FlowView$LogicalView.getPreferredSpan(FlowView.java:733)
at javax.swing.text.FlowView.calculateMinorAxisRequirements(FlowView.java:233)
at javax.swing.text.ParagraphView.calculateMinorAxisRequirements(ParagraphView.java:717)
at javax.swing.text.BoxView.checkRequests(BoxView.java:935)
at javax.swing.text.BoxView.getMinimumSpan(BoxView.java:568)
at javax.swing.text.BoxView.calculateMinorAxisRequirements(BoxView.java:903)
at javax.swing.text.BoxView.checkRequests(BoxView.java:935)
at javax.swing.text.BoxView.setSpanOnAxis(BoxView.java:343)
at javax.swing.text.BoxView.layout(BoxView.java:708)
at javax.swing.text.BoxView.setSize(BoxView.java:397)
at javax.swing.plaf.basic.BasicTextUI$RootView.setSize(BasicTextUI.java:1722)
at javax.swing.plaf.basic.BasicTextUI.getPreferredSize(BasicTextUI.java:912)
at javax.swing.JComponent.getPreferredSize(JComponent.java:1660)
at javax.swing.JEditorPane.getPreferredSize(JEditorPane.java:1332)
at javax.swing.ScrollPaneLayout.layoutContainer(ScrollPaneLayout.java:791)
at java.awt.Container.layout(Container.java:1508)
at java.awt.Container.doLayout(Container.java:1497)
at java.awt.Container.validateTree(Container.java:1693)
at java.awt.Container.validate(Container.java:1628)
at javax.swing.RepaintManager$3.run(RepaintManager.java:704)
at javax.swing.RepaintManager$3.run(RepaintManager.java:702)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at javax.swing.RepaintManager.validateInvalidComponents(RepaintManager.java:701)
at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1719)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:749)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:702)
at java.awt.EventQueue$3.run(EventQueue.java:696)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:719)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Remember directory after choosing a APK with file chooser

When I open an APK and navigate to a directory and open an APK for analysis, ClassyShark should remember this directory so that when I want to open the next APK the file chooser is opened at that directory.

Currently the file chooser is always opened in the home directory of the user and I have to navigate throught the file tree each time.

Make res/xml/searchable.xml accessible

To inspect what apps have defined as a search provider it would be helpful to see the xml/searchable.xml file of an APK. This would help to investigate issues with search providers.

A simple question

after I read Get Started.md

I don't know what's different between android-classyshark and JD-GUI

android-classyshark can work when my app run and see what's class i use in jar at the moment ?

Unable to detect instrumented code in apk files.

I instrumented some code into onCreate method of MainActivity with Transform API and ASM . The apk I got ran as I expected, and I could see the instrumented code in the apk with jar2dex and JD-gui. However, the ClassyShark was unable to detect the instrumented code. Any reply or explanation is appreciated. Thanks!

can not see method content

this tool is awesome`~but the weakness is it can see nothing content of method in every class~~so if it will support in future?

ArrayIndexOutOfBounds when opening APK

I used this command:

$ java -jar ClassyShark.jar -open <path-to-apk>

and get the following:

Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 2
    at java.util.Arrays$ArrayList.get(Arrays.java:3841)
    at com.google.classyshark.gui.GuiMode.buildAndShowClassySharkFrame(GuiMode.java:67)
    at com.google.classyshark.gui.GuiMode.access$000(GuiMode.java:30)
    at com.google.classyshark.gui.GuiMode$1.run(GuiMode.java:38)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

I'm using 5.2

Drag-and-drop APK support

It'd be nice to be able to drag and drop APKs onto ClassyShark to open them. The "Open" dialog can be cumbersome in some situations.

Support command-line decoding

It would be useful if classyshark supported command-line decoding similar to apktool d. (To make it easier to view the result in other editors.)

Add fallback when ASMdex fails

Add exception handling here:

at org.ow2.asmdex.ApplicationReader.accept(ApplicationReader.java:338)
at com.google.classyshark.silverghost.translator.apk.ApkTranslator.fillAnalysis(ApkTranslator.java:147)
at com.google.classyshark.silverghost.translator.apk.ApkTranslator.doInspect(ApkTranslator.java:203)

Dark theme needs streamlining?

Hello to the excellent people behind this great project. It sounds a bit selfish to question about such a trivial thing, but why does the left hand panel of ClassyShark turns white when I load any file using the dark theme? It is not a huge problem, but it is a bit jarring (pun intended), especially when I use it in the dark (I like working in the dark). For the life of me, I couldn't figure out what the problem is. I have all the dependencies installed. Screenshots below. I use Kali Linux 2016.1.
before opening app
after opening app

IOException when parsing some XML files

I'm getting an IOException when parsing most XML files in ClassyShark. Full stack trace below:

Error reading AndroidManifext.xml Invalid packed XML identifier. Expecting 0x00080003, found 0x6D783F3C

java.io.IOException: Invalid packed XML identifier. Expecting 0x00080003, found 0x6D783F3C

at com.google.classyshark.silverghost.translator.xml.XmlDecompressor.decompressXml(XmlDecompressor.java:134)
at com.google.classyshark.silverghost.translator.xml.XmlDecompressor.decompressXml(XmlDecompressor.java:124)
at com.google.classyshark.silverghost.translator.xml.AndroidXmlTranslator.apply(AndroidXmlTranslator.java:104)
at com.google.classyshark.silverghost.SilverGhost.translateArchiveElement(SilverGhost.java:118)
at com.google.classyshark.gui.panel.ClassySharkPanel$6.doInBackground(ClassySharkPanel.java:411)
at com.google.classyshark.gui.panel.ClassySharkPanel$6.doInBackground(ClassySharkPanel.java:402)
at javax.swing.SwingWorker$1.call(SwingWorker.java:296)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at javax.swing.SwingWorker.run(SwingWorker.java:335)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at com.google.classyshark.gui.panel.displayarea.DisplayArea.displayClass(DisplayArea.java:284)
at com.google.classyshark.gui.panel.ClassySharkPanel$6.done(ClassySharkPanel.java:431)
at javax.swing.SwingWorker$5.run(SwingWorker.java:737)
at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.run(SwingWorker.java:832)
at sun.swing.AccumulativeRunnable.run(AccumulativeRunnable.java:112)
at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.actionPerformed(SwingWorker.java:842)
at javax.swing.Timer.fireActionPerformed(Timer.java:312)
at javax.swing.Timer$DoPostEvent.run(Timer.java:244)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:312)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:745)
at java.awt.EventQueue.access$300(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:706)
at java.awt.EventQueue$3.run(EventQueue.java:704)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:715)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

Implement fallback when class loading fails

screen shot 2015-10-14 at 11 23 33

In the above screen shot the 'result' variable has all its fields null <-- data filled by the JVM

Actually the reason is that problematic class was dependent on other classes which weren't the part of the loaded jar. Thus need to design a mechanism to catch this case and still show useful data to the user.

OS X: search results disappear if command (⌘) is pressed

The search results disappear if the command key is pressed. To reproduce:

  1. Open an APK.
  2. Type Manifest such that at least one file is matched.
  3. Hit the command (⌘) key.

Actual: the search results disappear.

Expected: the search results still appear. (Minor bug, but it makes it difficult to take screenshots of the search results screen.)

Add file size information

Would be helpful to reflect file size of classes / packages to get more perspective on the class count.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.