How to decompile apk from Play Store

This is how you can decompile an application you have installed on your phone. My phone is rooted, uses RootBox 3.5 and has BusyBox installed. You may need to have that too if you want to follow my steps completly. Let's start: 1. Install application from market 2. Download apk to computer First you need to locate the apk on the phone. Connect to the phone: adb shell Find the apk in the folder the apk are downloaded to. It is ussualy in '/data/app/' or '/system/app/'. The apk is called as the id from the Play Store, for example 'com.something.someapp.apk'. You can see this in the url from Play. Next you need to pull it to the computer. Once you have located the apk and know it's name exit adb. On your PC execute: adb pull /data/app/com.something.someapp.apk 3. Transform apk to jar I use dex2jar dex2jar-0.0.9.11/d2j-dex2jar.sh com.something.someapp.apk 4. See the code inside the jar I use Java Decompiler Just open the

Alternate way to run/debug Griffon applications from an IDE

This is a way I use to to debug my griffon apps since before ide support. I am using this with idea 8, but I think it can be used with every ide. I think Eclipse can run griffon apps like this.
I was looking at the new support from IntelliJ and Netbeans and it looks great. But I think the way I am going to describe also has benefits.

Let's begin from scratch.
So these are the steps:
1. Create an empty project in Idea.

2. Create your griffon application somewhere on the hard drive.

griffon create-app demo1

Ok, now we have an empty project and an empty app.

3. We will add the app in idea as a java module.

On the next screen we choose not to create a source directory. Click next, do not add any facets and finish.

4.Next we set up the sources folders for our project. It should look like in the picture. The blue folders are sources. The green one are test sources.



5. Let's add the griffon libraries to our module. Basically what I do here is add all the jars from the folders containing jars from %GRIFFON_HOME%. These one are the ones highlighted below
Also add the groovy facet will add the groovy libraries.

In the end it should look like this:


6. Now you should be able to compile your code. The code will be compiled somewhere on the drive, probably in the global path for that project. Find that place and copy application.properties from the module root (application folder) there. In griffon 1.x this was not necessary.

7. Now we create a run configuration
Create a Run/Debug Configuration of type application.
It should look similar to the one below


The main thing here is to set griffon.application.SwingApplication as "Main Class". In griffon 1.x this was griffon.application.SingleFrameApplication. I guess you can use that too.

You are done. Now you can run the app from the run button in Idea. Debug works also. And You can also use the wonderful hot swap to recompile your controllers or classes. I think it doesn't work for views.

If you use the basic idea behind this steps, I guess you can run/debug griffon using any IDE.

Simple, right ?

Comments

Popular posts from this blog

Ways to map and query many-to-many in GORM

Update: Intellij 12 + Android Annotations 2.7 + maven

How to decompile apk from Play Store