markharrop
markharrop

Reputation: 876

How can I stop my app from being lucky patched?

Is there a way to stop my app from being lucky patched or hacked? What people are doing because the app is becoming a little more popular is using lucky patcher to remove adverts?

I have read this. What I want to know, is this code still applicable? Because this post was from 2012. Is it really as simple as if packagename changes kill the app? Can the app still be hacked using the lucky patcher? And if it is no applicable, what can I do to protect my app from these sort of hacks?

How lucky patcher works? I was looking for a copy to trail it, but I had trouble locating a real version.

Edit

So I managed to find a copy of the allusive lucky patcher, and the fact of the matter is the app is an absolute joke. It removes signing removes adverts can manipulate code, remove permissions. How can I defend against that?

I have seen while researching, that one of the best ways to protect against attacks of this kind is to use a Key/Value pair and give the user a token, as the app is installed or first run. Then send the key to my server, and every time the user opens the app, my server then asks for that key. If the key is diff or not present then close the app.

The answer here would be great, but how do I make sure this number is different for every install, except for clones or copies?

Edit

Just found this.

Upvotes: 4

Views: 3577

Answers (1)

from56
from56

Reputation: 4127

It seems that all these hacking tools modify the java machine signature verify so all the verify results are successful.

To prevent my app from running on hacked devices, I verify the signature of a random byte array with a fake signature, that always must fail on signature verify but if the result is ok then system has been modified and I close the app.

Also as Google recommends it's better to verify purchases signature in a external server : https://stackoverflow.com/a/48531877/7690376

Upvotes: 1

Related Questions