Showing posts with label Facebook for Android. Show all posts
Showing posts with label Facebook for Android. Show all posts

Monday, February 6, 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.