How to modify .swf file in Android flash games
Hi guys
So today i will teach you how to mod .swf file for CSI Hidden Crimes for Android. The
flash games was build with Adobe flash professional and the programming
language is C++. You don't need to learn C++. You don't need any programming
experience. you just need some basic knowledge to know on how to return a value
to 999,999 or any values you want to input. example
public function get greenCash() : int
{
return 999999;
}
this code means it return green cash to 999,999 and it
never change or reduce.
Install SWF decompiler
There are many SWF decompiler softwares on the
internet. if you don't know which one, just download and install JPEXS Free
Flash Decompiler
You can download other softwares if you want
Take out the .APK file from your device
Download any back APK apps from Playstore that can
backup installed APK file on your device. Just backup CSI Hidden Crimes APK file on your SDcard and transfer it to your
computer
Or you can download the APK from http://apkpure.com
Open .APK file using Winrar and take out the .SWF file
Right click on the APK file, Click on "Properties"
![[IMG]](https://images-blogger-opensocial.googleusercontent.com/gadgets/proxy?url=http%3A%2F%2Fi.imgur.com%2Fee24tzH.png&container=blogger&gadget=a&rewriteMime=image%2F*)
You will see this window. Click on "Change..."

You will see the window "How
do you want to open this type of file (.apk)?". Click on "More options" and click on "Look for another app on this PC"
![[IMG]](https://images-blogger-opensocial.googleusercontent.com/gadgets/proxy?url=http%3A%2F%2Fi.imgur.com%2FuawH8iw.png&container=blogger&gadget=a&rewriteMime=image%2F*)
Go to the path where Winrar is installed and click
"Open". Default location is Local Disk (C:) -> Program
Files -> Winrar
![[IMG]](https://images-blogger-opensocial.googleusercontent.com/gadgets/proxy?url=http%3A%2F%2Fi.imgur.com%2FdIzqJtA.png&container=blogger&gadget=a&rewriteMime=image%2F*)
After that, click "OK"
Open the .APK file -> Open "assets" folder and copy the "HiddenCrimesANdroidProd.swf" file to your computer
![[IMG]](https://images-blogger-opensocial.googleusercontent.com/gadgets/proxy?url=http%3A%2F%2Fi.imgur.com%2FP8NUwGA.png&container=blogger&gadget=a&rewriteMime=image%2F*)
Modding .SWF file
Open the "HiddenCrimesANdroidProd.swf" file and the program will start. Note, i'm using JPEXS Free
Flash Decompiler so i hope this tutorial is also useful for other SWF
decompiler softwares. click on "Tools"
-> "Text Search"
![[IMG]](https://images-blogger-opensocial.googleusercontent.com/gadgets/proxy?url=http%3A%2F%2Fi.imgur.com%2FzrFxHmy.png&container=blogger&gadget=a&rewriteMime=image%2F*)
Search the text "get
energyCount", "get coins"
or "get greenCash" and click OK.
![[IMG]](https://images-blogger-opensocial.googleusercontent.com/gadgets/proxy?url=http%3A%2F%2Fi.imgur.com%2F0TxXOS9.png&container=blogger&gadget=a&rewriteMime=image%2F*)
Let the program decompiling the .SWF file and it should take 15 seconds to
finish decompiling (depending on your computer CPU speed). After decompile, you
will see this window. Double click on "com.hiddenobject.story.vo.GameProfileVO"
![[IMG]](https://images-blogger-opensocial.googleusercontent.com/gadgets/proxy?url=http%3A%2F%2Fi.imgur.com%2FNEPPWXD.png&container=blogger&gadget=a&rewriteMime=image%2F*)
Now you will see the codes. Find the functions named
"energyCount", "coins" and "greenCash"
and the code should look like this
public function get greenCash() : int
{
return getAllCurrencyType("GreenCash").value;
}
public function get coins() : Number
{
return
earnedCoins + boughtCoins;
}
public function get energyCount() : int
{
return _energyCount;
}
Click on "Edit"
the button below.
![[IMG]](https://images-blogger-opensocial.googleusercontent.com/gadgets/proxy?url=http%3A%2F%2Fi.imgur.com%2FxNLl3wy.png&container=blogger&gadget=a&rewriteMime=image%2F*)
If you don't have PlayerGlobal library installed in your
computer, you will see this message.
![[IMG]](https://images-blogger-opensocial.googleusercontent.com/gadgets/proxy?url=http%3A%2F%2Fi.imgur.com%2FnpR82S1.png&container=blogger&gadget=a&rewriteMime=image%2F*)
![[IMG]](https://images-blogger-opensocial.googleusercontent.com/gadgets/proxy?url=http%3A%2F%2Fi.imgur.com%2FNgf00Bf.png&container=blogger&gadget=a&rewriteMime=image%2F*)
Click "OK"
to download PlayerGlobal library from adobe website or you can download it
here: DOWNLOAD
PLAYERGLOBAL .swc. After you download it, put the .swc file into "C:\Users\<your
name>\AppData\Roaming\JPEXS\FFDec\flashlib\"
![[IMG]](https://images-blogger-opensocial.googleusercontent.com/gadgets/proxy?url=http%3A%2F%2Fi.imgur.com%2FhNd9xR8.png&container=blogger&gadget=a&rewriteMime=image%2F*)
Click on "Edit"
button below again, you will see the warning message and click "OK" and now you will be able to edit the code
Change them all to return
999999; like this. DON'T ever forget the
";" at the end of "999999", otherwise the game won't work.
public function get greenCash() : int
{
return 999999;
}
public function get coins() : Number
{
return
999999;
}
public
function get energyCount() : int
{
return 999999;
}
![[IMG]](https://images-blogger-opensocial.googleusercontent.com/gadgets/proxy?url=http%3A%2F%2Fi.imgur.com%2FEqPan84.png&container=blogger&gadget=a&rewriteMime=image%2F*)
Save the .SWF file
After you modified the code, click on "Save" button below and the code will be
![[IMG]](https://images-blogger-opensocial.googleusercontent.com/gadgets/proxy?url=http%3A%2F%2Fi.imgur.com%2FSxFKYHq.png&container=blogger&gadget=a&rewriteMime=image%2F*)
saved.
Now click on "File" -> "Save" and it will save modified codes in .SWF
file.
![[IMG]](https://images-blogger-opensocial.googleusercontent.com/gadgets/proxy?url=http%3A%2F%2Fi.imgur.com%2FmJaKGwk.png&container=blogger&gadget=a&rewriteMime=image%2F*)
Replace the modded .SWF file inside the .APK file
Open the .APK
file with Winrar, open "assets"
folder and replace modded .SWF file
inside.
![[IMG]](https://images-blogger-opensocial.googleusercontent.com/gadgets/proxy?url=http%3A%2F%2Fi.imgur.com%2FwvsUzyC.png&container=blogger&gadget=a&rewriteMime=image%2F*)
Sign the APK file using any APK tools
Now you have to sign the .APK file using any APK tools, otherwise the APK won't install on
your device.
Result and proof
So here is the result. Energy, coins and cash are
999,999
![[IMG]](https://images-blogger-opensocial.googleusercontent.com/gadgets/proxy?url=http%3A%2F%2Fi.imgur.com%2FDSqu0ON.png&container=blogger&gadget=a&rewriteMime=image%2F*)
Credit To:
iAndroHacker
Kommentarer
Tilføj en kommentar