Pages

Android Reverse Engineering on Temple Run 2 in UBUNTU


<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <script> (adsbygoogle = window.adsbygoogle || []).push({ google_ad_client: "ca-pub-5219736083818079", enable_page_level_ads: true }); </script>



Firstly you have to install Android Reverse Engineering Tool in your UBUNTU.

You can download all the tools using below link:


https://drive.google.com/open?id=0B-kN2nquCee3ajA5Sk1nSVhvZ2M


  • Now create the folder named TempleRun2.
  • Extract the dex2jar-0.0.9.15.zip in TempleRun2 folder.
  • put the apktool.jar folder in TempleRun2 folder.

  • Now install the Temple Run2 game in your Android mobile.
  • Install the APK Extractor app in your Android mobile.
  • Install the ZipSigner app in you Android mobile.

Now go to APK Extractor app and extrack the APK file of Temple Run2 app.
for simplification you can rename the apk file to TempleRun.apk 

Now copy that TempleRun.apk to your TempleRun2 folder in your UBUNTU.
also copy TempleRun.apk to dex2jar-0.0.9.15 folder.

now your folder look like this : 



Extracting the java files : 

Go to dex2jar-0.0.9.15 folder and open terminal in that folder.
(open terminal and go to that folder path)
NOTE: You copied the TempleRun,apk in this folder.

Type the following command in your terminal : 

chmod +x d2j-dex2jar.sh

Now you accessed permission.

Now type the following command : 

./d2j-dex2jar.sh TempleRun.apk

Now you get the .jar files in dex2jar-0.0.9.15 folder.

Now Run the jd-gui tool.
Click on File option.
open that .jar file.

You will get all the .java files.
now you can change the java files and save it.




Extracting the Resource files(xml,manifest,assets,drawable etc.)  : 

Now open the terminal and go to path TempleRun2 folder.

Run the following command : 

java -jar apktool.jar d -s TempleRun.apk

Now you get the folder TempleRun which contain all the resources files.






Changing the name,  color, icon and splash screen image :

You got the TempleRun folder.
Go to that folder.
go to res folder.
go to values folder.
open the strings.xml file in your texteditor.
search for app_name

Change the name Temple Run 2 to Run.



For color change open the color.xml in your text editor.
Now change the color and save it.

For change the icon : 

Choose your icon with name app_icon

go to res folder then

           drawable : copy your icon in this folder(replace the previous icon)
           drawable-hdpi-v4 : copy your icon in this folder (replace the previous icon)
           drawable-ldpi-v4 : copy your icon in this folder (replace the previous icon)
           drawable-xhdpi-v4 : copy your icon in this folder (replace the previous icon)
           drawable-xxhdpi-v4  : copy your icon in this folder (replace the previous icon)
           drawable-xxxhdpi-v4 : copy your icon in this folder (replace the previous icon)

In this 6 folders you have put your new icon.
NOTE: your icon name should be app_icon. otherwise you have to change your icon name in manifest file.

Change the splash screen image : 

Go to assets folder then go to bin folder then go to Data folder.
In this folder you will find splash.png file
replace this image to your splash.png image.

I have made the image with white color of Imangi text.

Now we have done the changes.
Now its time to recompile the app.

Open the terminal and go to the path of folder TempleRun2.

Run the following command :

java -jar apktool.jar b TempleRun

Now app is recompiled.


go to TempleRun folder. You will see that there is new folder(dist) created. This folder contain your new apk file with all the changes.

copy your new apk file to your mobile.

uninstall the previously installed Temple Run 2 app.

Now open the ZipSigner app.
choose input file as your new apk.
key/mode will be platform.



click on SIGN THE FILE button.

now you will see that new signed apk is generated.
Install that apk in your device.
NOTE: check you have permission of install unknown sources in your device.





All the best.......Enjoy...............