Protect android application from piracy

iPhoneCoder picture iPhoneCoder · Jan 17, 2011 · Viewed 10.8k times · Source

I am creating an application in Android. I want that once my application is installed on one device, user should not be able to copy the ".apk" and run it on other device. Please help me out. Thanks in advance. :)

Answer

SplinterReality picture SplinterReality · Jan 17, 2011

The answer I'm about to give is not the answer you want to hear, but please read through, as I will justify this answer and give you an alternative model you might be able to use in your application.

In general, you should not look for a single method that will be absolutely successful in protecting your application from being pirated. A determined pirate will, at some point, be able to remove the protection, and distribute the modified application if there's enough interest in it.

Even relatively closed devices like the Apple iPhone have piracy problems with jail broken devices, and a determined attacker will, at some point, be able to open your app. I give you as a further example of the difficulty of protecting software: Microsoft Windows. If Microsoft and Apple, with all of their resources and expertise are unable to solve this problem in an effective manner, do you really think you'll be able to?

Instead, I would encourage you to program your app in such a way that you're using software features that rely on servers you control. That way, you're holding the keys to the kingdom. When people make a purchase, ask them for a login/password that ties them to the server.

For example, if you're programming a game, make a good portion of the game community features based, where you interact with other players through servers which you, as the developer/distributor, control.

A slight modification of this model allows the customer to access the application for free, but with a limited amount of functionality, then gain full functionality when they purchase. In that light, piracy ceases to be a problem, and indeed, even the motivation to pirate your app vanishes. In the end, a service based model like this is probably a better solution than relying on some technically wizardry in a vain attempt to protect your app from prying eyes.