4

I have created an Android game where I use TextureAtlas generated from the TexturePacker tool. I have paid an artist to create good quality assets. So I have these nice large png files with alpha, containing all the assets, waiting to be stolen by anybody unzipping my apk. And I would like to protect them - at least a little - from hackers and thieves.

I have searched and found nothing except the usual "you will NEVER be able to fully protect your app" or "only thing you can do is to create you own cipher and encryption system from scratch by yourself" (yes, I am exaggerating a little here). I find these answers unseless for my case because: - I know it is impossible to make an app, a piece of code or an asset 100% protected from hacking. The goal here is to protect it a little to make it hard for 95% of hackers. - I know my assets are not the most beautiful piece of art ever made but I also know they are better than those of a majority of Android apps and any game cloning developper will see that.

Is there any way to remove the transparency from the png files but keep it in the game? Is there any way to add some kind of watermark that would be automatically removed in the app?

So thanks for sharing your thoughts

Don
  • 977
  • 3
  • 10
  • 28
  • 2
    What about CTR encrypting your files, creating your key from the file/resource name and some static values within your code? It doesn't protect against anybody attacking the runtime code, but nothing does. – Maarten Bodewes Nov 15 '14 at 11:55
  • Thanks for answering. Is there any class / librairy I could start from? I am using the Libgdx framework – Don Nov 15 '14 at 13:30
  • You could look at code samples that use [`CipherInputStream`](https://docs.oracle.com/javase/7/docs/api/javax/crypto/CipherInputStream.html) – Maarten Bodewes Nov 15 '14 at 13:32
  • One last question @owlstead: I understand the process of using input & output streams. But if I am using it, how can I encrypt the actual image physical files existing in the apk package? They are the one I want to protect. – Don Nov 17 '14 at 09:56
  • Tricky in yhe sense that I don't exactly know how the APK file works. In the end you need an InputStream of the resource and then wrap it... – Maarten Bodewes Nov 17 '14 at 10:01
  • 1
    You might try to zip your assets first, using a password. Might be based on this https://gist.github.com/MobiDevelop/5514357. You'll probably need to use another 3rd party library, because standard Java cannot handle passworded zip archives. – noone Nov 18 '14 at 09:56
  • That's a simple and good idea, I should have thought about it earlier. I'll dig into it. Thanks @noone – Don Nov 18 '14 at 14:00

0 Answers0