Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

Clash Royale .sc files decrypt

Featured Replies

  • Author
  • Localization

Zed, posted Wed Mar 29, 2017 6:06 am (21818)


GaLaXy1036 wrote:
Hey everybody,
I've create a small utilities for help people to dump texture (with dumpsc.py) you can download it here : https://github.com/Galaxy1036/DumpScHelper


Do you know how to reencrypt png to sc?
Plz help
  • Replies 239
  • Views 8
  • Created
  • Last Reply

Top Posters In This Topic

  • Author
  • Localization

Moon Arts, posted Wed Mar 29, 2017 11:23 am (21824)


Zed wrote:
GaLaXy1036 wrote:
Hey everybody,
I've create a small utilities for help people to dump texture (with dumpsc.py) you can download it here : https://github.com/Galaxy1036/DumpScHelper


Do you know how to reencrypt png to sc?
Plz help


Yes we know, but we can't give it to you, 3 month of research :lol:
  • Author
  • Localization

YusufGK, posted Tue Apr 04, 2017 3:10 pm (21964)


Plase Tell Me How To Reencrypt I searched but I cant find anythink. I know how to encrypt _tex.sc and .sc files but i dont know how to reencrypt. PLEASE
  • Author
  • Localization

GaLaXy1036, posted Wed Apr 05, 2017 4:36 pm (21994)


YusufGK wrote:
Plase Tell Me How To Reencrypt I searched but I cant find anythink. I know how to encrypt _tex.sc and .sc files but i dont know how to reencrypt. PLEASE

You can found how to but jut search hard
  • Author
  • Localization

Zed, posted Wed Apr 05, 2017 5:14 pm (21996)


Moon Arts wrote:
Zed wrote:
GaLaXy1036 wrote:
Hey everybody,
I've create a small utilities for help people to dump texture (with dumpsc.py) you can download it here : https://github.com/Galaxy1036/DumpScHelper


Do you know how to reencrypt png to sc?
Plz help


Yes we know, but we can't give it to you, 3 month of research :lol:


Yes! I found it!!
  • Author
  • Localization

Yusuf_GK, posted Fri Apr 07, 2017 4:42 pm (22052)


Can You Tell Me ?
  • Author
  • Localization

YusufGK, posted Sat Apr 08, 2017 10:25 am (22069)


I FOUND IT AND I CHANGED TRAINING ARENA IT WORKS BUT I CAN'T LOG IN TO GOOGLE WHY CAN YOU TELL ME ?
  • Author
  • Localization

GaLaXy1036, posted Sun Apr 09, 2017 11:28 am (22085)


YusufGK wrote:
I FOUND IT AND I CHANGED TRAINING ARENA IT WORKS BUT I CAN'T LOG IN TO GOOGLE WHY CAN YOU TELL ME ?

It's because you re-sign the application so it's not signed with supercell game and you can't login with google play games accounts
What script do you use ?
  • Author
  • Localization

YusufGK, posted Mon Apr 10, 2017 3:33 pm (22111)


I am using called Xset-s'script png2sc
  • Author
  • Localization

GaLaXy1036, posted Tue Apr 11, 2017 7:59 am (22136)


YusufGK wrote:
I am using called Xset-s'script png2sc

Yeah the x-set one is really good !!!
  • Author
  • Localization

eslindsey, posted Tue Apr 25, 2017 5:14 am (22635)


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:
Quote:
$ python3.5 ~/dumpsc.py ui_tex.sc
ui_tex.sc
Traceback (most recent call last):
File "/home/eric/dumpsc.py", line 129, in
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.
  • Author
  • Localization

GaLaXy1036, posted Wed Apr 26, 2017 3:50 pm (22662)


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:
Quote:
$ python3.5 ~/dumpsc.py ui_tex.sc
ui_tex.sc
Traceback (most recent call last):
File "/home/eric/dumpsc.py", line 129, in
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.


You're problem is lzma decompression for ui_tex ( i don't really understand all) ?
  • Author
  • Localization

CookieKing24, posted Sun Apr 30, 2017 1:22 pm (22745)


Can QuickBms Encrypt the sc files?
  • Author
  • Localization

GaLaXy1036, posted Sun Apr 30, 2017 2:47 pm (22754)


CookieKing24 wrote:
Can QuickBms Encrypt the sc files?

I think No
  • Author
  • Localization

CookieKing24, posted Sun Apr 30, 2017 2:51 pm (22755)


oh ok
  • Author
  • Localization

CookieKing24, posted Sun Apr 30, 2017 2:52 pm (22756)


but do you know how to encrypt a sc file?
  • Author
  • Localization

GaLaXy1036, posted Sun Apr 30, 2017 8:08 pm (22762)


CookieKing24 wrote:
but do you know how to encrypt a sc file?

Yeah that's pretty easy for Clash Royale sc , for some COC Sc this is a little bit more difficult (LZHAM compression)
  • Author
  • Localization

GaLaXy1036, posted Sun Apr 30, 2017 8:10 pm (22764)


CookieKing24 wrote:
but do you know how to encrypt a sc file?

But do you mean re-encrypt tex.sc(Png -> Tex.sc) or just recompress with LZMA
  • Author
  • Localization

CookieKing24, posted Sun Apr 30, 2017 10:01 pm (22766)


Yes thats What i mean
  • Author
  • Localization

peacemaker_of_war, posted Fri May 12, 2017 1:09 pm (23150)


Greetings, members of the forum! I was able to convert sc to png and vice versa png to sc. Only now there was one problem: when I put the edited files in the application, it crashes when opened. How then do I replace the original with a fake?
  • Author
  • Localization

Moon Arts, posted Fri May 12, 2017 5:32 pm (23163)


Ahah so you failed, is your application crash because of the new texture or because you forgot to sign it ?
  • Author
  • Localization

peacemaker_of_war, posted Sat May 13, 2017 10:39 am (23179)


Moon Arts wrote:
Ahah so you failed, is your application crash because of the new texture or because you forgot to sign it ?

App crash because i load a new tex to apk with WinRar & with program for mobile "Apk editor".
  • Author
  • Localization

peacemaker_of_war, posted Sat May 13, 2017 10:41 am (23180)


Moon Arts wrote:
Ahah so you failed, is your application crash because of the new texture or because you forgot to sign it ?

How I can load my own texture?
  • Author
  • Localization

GaLaXy1036, posted Sat May 13, 2017 1:31 pm (23187)


peacemaker_of_war wrote:
Moon Arts wrote:
Ahah so you failed, is your application crash because of the new texture or because you forgot to sign it ?

How I can load my own texture?

After re-build your APK with modded texture have you re-sign it ?
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.