Clash Royale .sc files decrypt

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
GaLaXy1036
Posts: 35
Joined: Tue Jan 17, 2017 6:30 pm

Re: Clash Royale .sc files decrypt

Post by GaLaXy1036 »

Nothing wrote:So, is there another way to mod csv_logic to succesful?
Or Supercell just .sc file can be mod??
Thanks for your replied..


Csv_logic can't realy be modded but u can mod some csv_client
ALIEN31ITA
Posts: 10
Joined: Thu Oct 12, 2017 5:55 pm

Re: Clash Royale .sc files decrypt

Post by ALIEN31ITA »

Hello, can you help me get "highres" .sc files? i download the apk from sites and i get "lowres" files :/
wich means, sprites are more smaller, when the "highres" files got the standard size...

i try also with bluestacks, and i got lowres sprites too... i don't know why but can you help me guys?
GaLaXy1036
Posts: 35
Joined: Tue Jan 17, 2017 6:30 pm

Re: Clash Royale .sc files decrypt

Post by GaLaXy1036 »

ALIEN31ITA wrote:Hello, can you help me get "highres" .sc files? i download the apk from sites and i get "lowres" files :/
wich means, sprites are more smaller, when the "highres" files got the standard size...

i try also with bluestacks, and i got lowres sprites too... i don't know why but can you help me guys?

Use my assets downloader to get every Highres texture: https://github.com/Galaxy1036/Sc-Assets-Downloader
ALIEN31ITA
Posts: 10
Joined: Thu Oct 12, 2017 5:55 pm

Re: Clash Royale .sc files decrypt

Post by ALIEN31ITA »

GaLaXy1036 wrote:
ALIEN31ITA wrote:Hello, can you help me get "highres" .sc files? i download the apk from sites and i get "lowres" files :/
wich means, sprites are more smaller, when the "highres" files got the standard size...

i try also with bluestacks, and i got lowres sprites too... i don't know why but can you help me guys?

Use my assets downloader to get every Highres texture: https://github.com/Galaxy1036/Sc-Assets-Downloader


I arledy see that, but the question is, how to use it? do a tutorial or something please.
also when you can, talk with me on Discord
id #2466 Name: ALIEN31ITA
or on STEAM: ALIEN31[ITA]http://steamcommunity.com/id/Polizziotto_fantasma/
Johnny
Posts: 16
Joined: Fri Oct 28, 2016 9:54 am

Re: Clash Royale .sc files decrypt

Post by Johnny »

Hello everyone
Recently with the new cards coming into Clash royale, I have been only getting low res versions of them (ex: Flying Machine, Cannon Cart, Mega Knight and even some older ones like fire spirits, bowler, baloon...)

Is anyone else having this same problem? I also realized that new clash royale apk versions are less heavier than most older ones. This could be it but I'm still unsure.
If anyone has high res versions of say the mega knight, could you upload them on this page? Thanks

Edit: in the picture, you can see the difference in storage space
GaLaXy1036
Posts: 35
Joined: Tue Jan 17, 2017 6:30 pm

Re: Clash Royale .sc files decrypt

Post by GaLaXy1036 »

Johnny wrote:Hello everyone
Recently with the new cards coming into Clash royale, I have been only getting low res versions of them (ex: Flying Machine, Cannon Cart, Mega Knight and even some older ones like fire spirits, bowler, baloon...)

Is anyone else having this same problem? I also realized that new clash royale apk versions are less heavier than most older ones. This could be it but I'm still unsure.
If anyone has high res versions of say the mega knight, could you upload them on this page? Thanks

Edit: in the picture, you can see the difference in storage space


As i say below use my assets-downloader if u wan't every highres textures :
https://github.com/Galaxy1036/Sc-Assets-Downloader
Johnny
Posts: 16
Joined: Fri Oct 28, 2016 9:54 am

Re: Clash Royale .sc files decrypt

Post by Johnny »

GaLaXy1036 wrote:
Johnny wrote:Hello everyone
Recently with the new cards coming into Clash royale, I have been only getting low res versions of them (ex: Flying Machine, Cannon Cart, Mega Knight and even some older ones like fire spirits, bowler, baloon...)

Is anyone else having this same problem? I also realized that new clash royale apk versions are less heavier than most older ones. This could be it but I'm still unsure.
If anyone has high res versions of say the mega knight, could you upload them on this page? Thanks

Edit: in the picture, you can see the difference in storage space


As i say below use my assets-downloader if u wan't every highres textures :
https://github.com/Galaxy1036/Sc-Assets-Downloader


Yes but sadly I don't really understand how it works. I want to know where do you activate python Main.py? Where do you put the sc files to convert? Which version of Python needs to be used. Thx
GaLaXy1036
Posts: 35
Joined: Tue Jan 17, 2017 6:30 pm

Re: Clash Royale .sc files decrypt

Post by GaLaXy1036 »

Johnny wrote:
GaLaXy1036 wrote:
Johnny wrote:Hello everyone
Recently with the new cards coming into Clash royale, I have been only getting low res versions of them (ex: Flying Machine, Cannon Cart, Mega Knight and even some older ones like fire spirits, bowler, baloon...)

Is anyone else having this same problem? I also realized that new clash royale apk versions are less heavier than most older ones. This could be it but I'm still unsure.
If anyone has high res versions of say the mega knight, could you upload them on this page? Thanks

Edit: in the picture, you can see the difference in storage space


As i say below use my assets-downloader if u wan't every highres textures :
https://github.com/Galaxy1036/Sc-Assets-Downloader


Yes but sadly I don't really understand how it works. I want to know where do you activate python Main.py? Where do you put the sc files to convert? Which version of Python needs to be used. Thx


Download it then go in the downloaded folder, do Shift + Right Click --> open cmd here : then type python Main.py. But first be sure to have python 3.5 or 3.6 installed (with path added). Then u should get every .sc in TheCurrentDirectoryWhereUHaveTheDownloader/Download/...../sc/
Johnny
Posts: 16
Joined: Fri Oct 28, 2016 9:54 am

Re: Clash Royale .sc files decrypt

Post by Johnny »

GaLaXy1036 wrote:Download it then go in the downloaded folder, do Shift + Right Click --> open cmd here : then type python Main.py. But first be sure to have python 3.5 or 3.6 installed (with path added). Then u should get every .sc in TheCurrentDirectoryWhereUHaveTheDownloader/Download/...../sc/

:D thanks! But I did just double click on main.py and it started downloading the files - so yes it works but i can't get it to work with cmd (It keeps showing a unreadable python error message). Anyways thanks!!

Before this, I used dumpsc.py and for some reason its not installing high res images anymore.
https://github.com/123456abcdef/cr-sc-dump
Do you know why?
Thanks again
GaLaXy1036
Posts: 35
Joined: Tue Jan 17, 2017 6:30 pm

Re: Clash Royale .sc files decrypt

Post by GaLaXy1036 »

Johnny wrote:
GaLaXy1036 wrote:Download it then go in the downloaded folder, do Shift + Right Click --> open cmd here : then type python Main.py. But first be sure to have python 3.5 or 3.6 installed (with path added). Then u should get every .sc in TheCurrentDirectoryWhereUHaveTheDownloader/Download/...../sc/

:D thanks! But I did just double click on main.py and it started downloading the files - so yes it works but i can't get it to work with cmd (It keeps showing a unreadable python error message). Anyways thanks!!

Before this, I used dumpsc.py and for some reason its not installing high res images anymore.
https://github.com/123456abcdef/cr-sc-dump
Do you know why?
Thanks again


Go to dm for more information
Johnny
Posts: 16
Joined: Fri Oct 28, 2016 9:54 am

Re: Clash Royale .sc files decrypt

Post by Johnny »

Anyone knows how to get the png of the new cards of Clash Royale (Hunter,Zappies, chests)? The sc converters seem to not convert the new cards. Keep in mind this is possibly due to Supercell who have said that their files would be encrypted with different code or something like that.
Also, the update offers a new arena and that is convertible to png (Electro Valley)
GaLaXy1036
Posts: 35
Joined: Tue Jan 17, 2017 6:30 pm

Re: Clash Royale .sc files decrypt

Post by GaLaXy1036 »

Johnny wrote:Anyone knows how to get the png of the new cards of Clash Royale (Hunter,Zappies, chests)? The sc converters seem to not convert the new cards. Keep in mind this is possibly due to Supercell who have said that their files would be encrypted with different code or something like that.
Also, the update offers a new arena and that is convertible to png (Electro Valley)


Download new cards files with this: https://github.com/Galaxy1036/Sc-Assets-Downloader then dump them with this : https://github.com/Galaxy1036/Old-Sc-Dumper
Johnny
Posts: 16
Joined: Fri Oct 28, 2016 9:54 am

Re: Clash Royale .sc files decrypt

Post by Johnny »

GaLaXy1036 wrote:Download new cards files with this: https://github.com/Galaxy1036/Sc-Assets-Downloader then dump them with this : https://github.com/Galaxy1036/Old-Sc-Dumper


Ok so I did what you proposed but with the old-sc-dumper i recieve a message saying:
"[*] Only .sc are supported !"
My command might be wrong but basically I opened command prompt in the folder with main.py and the sc files and I typed
python install Main.py C:\Users\...\Old-Sc-Dumper-master\Old-Sc-Dumper-master (the folder with the sc and main.py)
(the ... is my username ofc)
I also did the same with -lzma but nothing as well.
Hope you can help and thanks
GaLaXy1036
Posts: 35
Joined: Tue Jan 17, 2017 6:30 pm

Re: Clash Royale .sc files decrypt

Post by GaLaXy1036 »

Johnny wrote:
GaLaXy1036 wrote:Download new cards files with this: https://github.com/Galaxy1036/Sc-Assets-Downloader then dump them with this : https://github.com/Galaxy1036/Old-Sc-Dumper


Ok so I did what you proposed but with the old-sc-dumper i recieve a message saying:
"[*] Only .sc are supported !"
My command might be wrong but basically I opened command prompt in the folder with main.py and the sc files and I typed
python install Main.py C:\Users\...\Old-Sc-Dumper-master\Old-Sc-Dumper-master (the folder with the sc and main.py)
(the ... is my username ofc)
I also did the same with -lzma but nothing as well.
Hope you can help and thanks


Go to pm that's better for explain
amansingh805
Posts: 1
Joined: Wed Dec 27, 2017 8:26 am

clash royale re importing

Post by amansingh805 »

Sir im re importing clash royale csv file after editing with the help of reimport.bat file provided in quickbms but it isnt reimporting any files.
Can you please help me
skvgaming_youtube
Posts: 1
Joined: Tue Dec 26, 2017 4:06 am

Re: Clash Royale .sc files decrypt

Post by skvgaming_youtube »

EDIT: I figured out how to do it
HUNTER_13
Posts: 1
Joined: Wed Mar 14, 2018 5:14 am

Re: Clash Royale .sc files decrypt

Post by HUNTER_13 »

Hello
I'm having an issue getting new card images
the last 4 cards released (zappies, hunter, magic archer,ghost) are no longer stored in ui_spells_tex.sc
and I'm looking for a way of unpacking frame-less HQ card images of said cards.

I used to unpack ui_spells_tex.sc using dumpsc.py and it works as expected but the output png does not include the new cards (as shown in attachment).
after some digging around I found out that Supercell now downloads cards and store them in data\data\com.supercell.clashroyale\update\sc and since I have a rooted phone I tried copying them and using dumpsc.py on them but had no luck. the new files don't have _tex.sc ending:

    ui_spell_ghost.sc
    ui_spell_hunter.sc
    ui_spell_magic_archer.sc
    ui_spell_zappies.sc

any idea?

EDIT:
never mind, you can decrypt these files using Old-Sc-Dumper by Galaxy1036
https://github.com/Galaxy1036/Old-Sc-Dumper

thx, Galaxy1036
chinybc
Posts: 1
Joined: Mon Dec 10, 2018 1:22 am

Re: Clash Royale .sc files decrypt

Post by chinybc »

eslindsey wrote:I'm trying to use the dumpsc.py script on the latest APK for Clash of Clans (com.supercell.clashofclans_v8.709.24-844_Android-4.0.3.apk) to try and extract ui_tex.sc, and it is failing with the following message:
$ python3.5 ~/dumpsc.py ui_tex.sc
ui_tex.sc
Traceback (most recent call last):
File "/home/eric/dumpsc.py", line 129, in <module>
process_sc(baseName, data[26:], path)
File "/home/eric/dumpsc.py", line 52, in process_sc
decompressed = lzma.LZMADecompressor().decompress(data)
_lzma.LZMAError: Input format not supported by decoder

But, it does work on some of the other files (info_babydragon_tex.sc for example).

I'll attach a ZIP containing the offending file. Can anybody help me extract the assets from it and convert them to PNG? It would be a bonus if the appropriate graphics could be extracted individually (with the polygons masked out, etc.), but I'll do that work manually if I have to.

EDIT: I tried the "Magic Editor" in the previous thread (in a VM of course), and it seems to work: it offers much more functionality than dumpsc.py including the ability to parse the information (the regular .sc file that ISN'T _tex.sc) about polygons and export resources and so on. However, it fails on the above files as well.

EDIT #2: I have come to the conclusion that it is simply a decompression problem--it seems that Supercell has switched to LZHAM compression, and I've downloaded the source code from richgel999's GitHub and compiled a test application, applied the header corrections from dumpsc.py to the target file (along with changing the first four bytes to 'LZH0') and I have successfully decompressed ui_tex.sc. I will post more information as I come across it.

EDIT #3: Success WITH BOTH FILES! I chopped the first 26 bytes from the beginning of each and added 4 bytes of 0x00 at position 9 (thanks for that info, dumpsc.py), altered the first four bytes to read "LZH0" in ASCII, ran them through the LZHAM test program which I compiled on Ubuntu 17.04 to decompress them without a problem, then loaded up the uncompressed files in Barbarianland's Magic Editor. The results are extremely satisfying. I can directly export any UI asset in the game, with full polygon, masking, and alpha channel support. It makes my custom Discord emojis look dope. Here's a screenshot for the curious:
Image

Thanks to ., @barbossa42, and @Mr Hacker for helping me make this happen. If/when I publish this amateur fankit (don't want to run into Supercell's legal teams... :D), I'll post a link here.


can you help me? , I have the same issue with clash of clans ui_tex. Im using Barbarianland's Magic Editor 1.2 but it won't let me read the ui_tex file , but it works with other files like buildings_tex and characters_tex
I would appreciate your help.
Gaurav2004
Posts: 1
Joined: Sun Jun 28, 2020 1:10 pm

Re: Clash Royale .sc files decrypt

Post by Gaurav2004 »

HELLO GUYS I AM NEW HERE AND I HOPE YOU GUYS WILL HELP ME
I WANT TO DECRYPT UI.TEX FILE OF CLASH OF CLANS AND WANT TO OPEN IT ON BARBARIAN LAND MAGIC EDITOR BUT I AM GETTING ERROR WITH THE FOLLOWING MESSAGE
PLEASE HELP ME HOW TO FIX THIS PROBLEM