[TUTORIAL] How to modify .swf file from Android flash games

11
04/13/15
18
Thread Author
Image Link Dead


Hi guys

So today i will teach you how to mod .swf file for CSI Hidden Crimesfor 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

Code:
public function getgreenCash() : 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 installJPEXS Free Flash Decompiler

You can download other softwares if you want

Link is Broken

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 backupCSI Hidden CrimesAPK file on your SDcard and transfer it to your computer

Or you can download the .APK file here:Download APK file

I used X-plore to copy APK file to my computer on Bluestacks

6d41e24922de753266acba057d16cd4941d93ac6.webp



Open .APK file using Winrar and take out the .SWF file

You can download .SWF file and skip this step:Download .SWF file
Right click on the APK file, Click on "Properties"



b0d189b6242eb71cade749bbe9fa8857975326c0.webp


You will see this window. Click on "Change..."

1aea23177ea834eaad1850c202570ef9919c003d.webp


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"

52b96b3c5b3dadf3e257e76129554d47177f8071.webp

Go to the path where Winrar is installed and click "Open". Default location isLocal Disk (C:)->Program Files->Winrar

3fcaecc515c3a92882c641133812f3ecdb14ddbe.webp


After that, click "OK"

Open the .APK file -> Open "assets" folder and copy the "HiddenCrimesANdroidProd.swf"file to your computer

aee87bd2a9ec436ff0f872914db9319c342c72dc.webp


Modding .SWF file

Open the "HiddenCrimesANdroidProd.swf"file and the program will start. Note, i'm usingJPEXS Free Flash Decompilerso i hope this tutorial is also useful for other SWF decompiler softwares. click on "Tools" -> "Text Search"

af07f20019d51a5db75234748a620d5f8b44feab.webp


Search the text "get energyCount", "get coins" or "get greenCash" and click OK.

e235ca7029d615d08d92e4864de8ae45585f8d0d.webp


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"

91db1fec23a82b373babbd23b0d7844cf1156641.webp


Now you will see the codes. Find the functions named "energyCount", "coins" and "greenCash" and the code should look like this

Code:
public function getgreenCash() : int
{
  returngetAllCurrencyType("GreenCash").value;
}

public function getcoins() : Number
{
returnearnedCoins + boughtCoins;
}

public functionget energyCount() : int
{
return_energyCount;
}

Click on "Edit" button below.

ff74df2f629d25c539bd907126aaa0e9a736f367.webp


If you don't have PlayerGlobal library installed in your computer, you will see this message.

9165842f6446ebf3f8ed01b22760724dd1719378.webp



d56321ce856a63d7cb353622fe14052d95d326b9.webp


Click "OK" to download PlayerGlobal library from adobe website or you can download it here:DOWNLOAD PLAYERGLOBAL .swc. After you download it, put the.swcfile into "C:\Users\<your name>\AppData\Roaming\JPEXS\FFDec\flashlib\"

ccda8f5a443d6f982b231c89f9c97be307687e07.webp


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.

Code:
public function getgreenCash() : int
{
return 999999;
}
public function getcoins() : Number
{
return 999999;
}
public function get energyCount() : int
{
return 999999;
}

2c88d42fb041271da2fdab79b197d68e1abc34a2.webp


Save the .SWF file

After you modified the code, click on "Save" button below and the code will be saved.

ee02f82a10b76c76e74cc4add8c4d7fb98056e34.webp


Now click on "File" -> "Save" and it will save modified codes in .SWF file.

313c6e5cc7b9c155942a4790c4018820ae2f6105.webp


Replace the modded .SWF file inside the .APK file

Open the.APKfile with Winrar, open "assets" folder and replace modded.SWFfile inside.

69dc0bd7375ae534cf37db4d93c4827dd4604e7d.webp


Sign the APK file using any APK tools

Now you have to sign the.APKfile using any APK tools, otherwise the APK won't install on your device.

I'm using APK-Multi-Tool to sign an.APKfile

83b2d4a06bdf6b430b763926f363fb6269be34c6.webp


Result and proof

So here is the result. Energy, coins and cash are 999,999

1421595304bc71a8fc6f3d8995bffec06d5ea555.webp


Download modded APK

You can download the modded APK here



Credits:
iAndroHackerDK
 
Nice tutorial bro I was going to make some tuts but I just haven't had time with work. Very well done
 
Thank you so much! I tried it and it works. Could you name any other games that have .swf files? If so, how can I tell if they do without having to download the apk and finding it?
 
Image Link Dead


Hi guys

So today i will teach you how to mod .swf file for CSI Hidden Crimesfor 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

Code:
public function getgreenCash() : 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 installJPEXS Free Flash Decompiler

You can download other softwares if you want

Link is Broken

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 backupCSI Hidden CrimesAPK file on your SDcard and transfer it to your computer

Or you can download the .APK file here:Download APK file

I used X-plore to copy APK file to my computer on Bluestacks

[Attachment removed from Quotes]


Open .APK file using Winrar and take out the .SWF file

You can download .SWF file and skip this step:Download .SWF file
Right click on the APK file, Click on "Properties"



[Attachment removed from Quotes]

You will see this window. Click on "Change..."

[Attachment removed from Quotes]

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"

[Attachment removed from Quotes]
Go to the path where Winrar is installed and click "Open". Default location isLocal Disk (C:)->Program Files->Winrar

[Attachment removed from Quotes]

After that, click "OK"

Open the .APK file -> Open "assets" folder and copy the "HiddenCrimesANdroidProd.swf"file to your computer

[Attachment removed from Quotes]

Modding .SWF file

Open the "HiddenCrimesANdroidProd.swf"file and the program will start. Note, i'm usingJPEXS Free Flash Decompilerso i hope this tutorial is also useful for other SWF decompiler softwares. click on "Tools" -> "Text Search"

[Attachment removed from Quotes]

Search the text "get energyCount", "get coins" or "get greenCash" and click OK.

[Attachment removed from Quotes]

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"

[Attachment removed from Quotes]

Now you will see the codes. Find the functions named "energyCount", "coins" and "greenCash" and the code should look like this

Code:
public function getgreenCash() : int
{
  returngetAllCurrencyType("GreenCash").value;
}

public function getcoins() : Number
{
returnearnedCoins + boughtCoins;
}

public functionget energyCount() : int
{
return_energyCount;
}

Click on "Edit" button below.

[Attachment removed from Quotes]

If you don't have PlayerGlobal library installed in your computer, you will see this message.

[Attachment removed from Quotes]


[Attachment removed from Quotes]

Click "OK" to download PlayerGlobal library from adobe website or you can download it here:DOWNLOAD PLAYERGLOBAL .swc. After you download it, put the.swcfile into "C:\Users\<your name>\AppData\Roaming\JPEXS\FFDec\flashlib\"

[Attachment removed from Quotes]

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.

Code:
public function getgreenCash() : int
{
return 999999;
}
public function getcoins() : Number
{
return 999999;
}
public function get energyCount() : int
{
return 999999;
}

[Attachment removed from Quotes]

Save the .SWF file

After you modified the code, click on "Save" button below and the code will be saved.

[Attachment removed from Quotes]

Now click on "File" -> "Save" and it will save modified codes in .SWF file.

[Attachment removed from Quotes]

Replace the modded .SWF file inside the .APK file

Open the.APKfile with Winrar, open "assets" folder and replace modded.SWFfile inside.

[Attachment removed from Quotes]

Sign the APK file using any APK tools

Now you have to sign the.APKfile using any APK tools, otherwise the APK won't install on your device.

I'm using APK-Multi-Tool to sign an.APKfile

[Attachment removed from Quotes]

Result and proof

So here is the result. Energy, coins and cash are 999,999

[Attachment removed from Quotes]

Download modded APK

You can download the modded APK here



Credits:
iAndroHackerDK
awts this great.. hehehe im going to download only modded whahahaha i love this game, if i play this game to facebook so we are same all 999.999 or just for android only?
 
Nice tutorial :blush:
ASK
how to modify the .dat files? (not a save file)
What program should I use?
thanks :smiley:
 
Nice tutorial :blush:
ASK
how to modify the .dat files? (not a save file)
What program should I use?
thanks :smiley:
It depends on .dat files, those are all different.
If it's not encrypted then you can open it using text editor (example on pc Notepad++ etc), but if it's encrypted then even like that you can do nothing about it, except if you know how the creator of the file encrypted it and doing the reverse (no idea if it's possible without it, but i highly doubt).
That's only for the "text-based" dat files, there are other types aswell like video dat etc...
I doubt you will have any luck with dat files, they are totally different from swf.
 
1111Unasdwdasdtitled.webp The first release of this game using the .dll file, after updating everything turns .dat file :sweatsmile::sweatsmile:
1111Unasdwdasdtitled.webp

OK Thanks bro :smiley:(y)(y)
 
just so you know the *.dll-resources.dat most likely ARE encrypted, so only dissasembly/hex editing will probably work on those, but doesn't hurt to check

@OP: I typically use Sothink SWF decompiler, how does that compare to JPEXS? I'm just curious because I don't really have a commitment to Sothink and wanted to know if JPEXS has any better tools/options to make a change
 
Dear sir, what would be the possible problem that an error message pop up whatever I edit in the .swf:
"PARENT_OPEN expected but NAMESPACESUFFIX found in line 44." Sometimes different line in different file but it always popup.
 
thanks for the tutorial
i too am getting an error see attached file
"PARENT_OPEN expected but NAMESPACESUFFIX
 

Attachments

  • error.webp
    error.webp
    13.3 KB · Views: 100
Back
Top Bottom