Sunday, February 5, 2012

How to hack the Facebook for Android App

Source Code
I always liked to poke around at things to see how they worked. A while ago I wanted to look inside some of my favorite apps such as the Facebook for Android app:

This is old, however we felt like making a video. So please comment and add helpful suggestions. And there are more ways than one for doing this.

Decompiling *.apks using Dex2Jar and viewing the compiled *.class files in JD-GUI
Tools:
Dex2Jar - http://code.google.com/p/dex2jar/
JD-GUI - http://java.decompiler.free.fr/?q=jdgui
ApkTool - http://code.google.com/p/android-apktool/

Need:
com.facebook.katana.apk
sh dex2jar.sh com.facebook.katana.apk
 - dumps the compiled java *.class files - creates com.facebook.katana_dex2jar.jar
./jd-gui
 - finally, run jd-gui and click on com.facebook.katana_dex2jar.jar
For the resources, use apktool
./apktool d com.facebook.katana.apk
 - this will dump the source files, the xml and images


Dex2Jar is a very powerful tool that dumps the Java compiled *.class files into a folder and then JD-GUI can easily read the compiled *.class files. From here you can read the source code and do whatever you would like.

3 comments:

  1. Ah, but you can't recompile from those .class files. To "hack" the application you'd have to read the dalvik vm opcodes and figure out what does what! You should add a section about this, and recompiling to a working app after editing it!

    ReplyDelete
  2. You can easily read the decompiled class files, as I showed in the video. Its proof of concept and easy to do. Plus, if you know Java, you can read the code and understand, taking ideas and concepts from someone else's code. And another thing, people need to use obfuscation to help fight reverse engineering apps.

    ReplyDelete
  3. Its really helpful for me specially video tutorial.I have save ur site as my favourite as you posted such valueable blogs here.I want to be a hacker and I catched this blog when I was googling for hack facebook.Is here any article for hacking facebook from iPhone????????

    ReplyDelete

Please make suggestions :)