Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
2
Question by salvador007 · Oct 14, 2014 at 05:46 AM · androidapksecurityreverse engineering

How can I protect Apk generated by Unity ?

Hello All,

I have developed a game through Unity3D for Android and I have also uploaded it on playStore. But someone has uploaded its .apk on his website and selling it for free(On playStore its paid). So there are few questions that arises here that:

  • How can we secure apk from reverse engineering?

  • Do I really need to secure or Unity already provide support for it?

If any one can answer it would be great help.

Thanks in Advance.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

5 Replies

· Add your reply
  • Sort: 
avatar image
2

Answer by tanoshimi · Oct 14, 2014 at 06:37 AM

Unfortunately, it is impossible to truly "protect" your code from reverse-engineering. This is not a specific weakness of Unity, but is true of any client-side application. Obfuscation can slow the process down, but a determined hacker will always be able to get past it.

However, from your description it's unclear that any reverse-engineering has actually taken place - simply that the APK file has been uploaded to an unauthorised site? If your app is normally free to download from the Google Play store, it may even be that the uploader has not realised they have done anything wrong (your game is still free, and they've increased your potential circulation...).

The first thing I'd do is to contact the site owner and politely point out that you are the code author, that the application is only for distribution via the Play store, and request they remove it from their site.

If that doesn't work, you could try legal action but, frankly, it's not worth it. The best approach to counter hackers is just to continue innovating - create new games, improvements, and features, and make sure that you only push those changes to authorised sites. Sure, you can't stop them being copied again, but they'll always be one step behind you.

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image zharik86 · Oct 14, 2014 at 07:24 AM 0
Share

@tanoshimi is completely right. Generally not to turn out to defend the project. The only way of good protection is as in Diablo 3. But for this purpose you shall have the server and application shall be rather popular.

avatar image salvador007 · Oct 14, 2014 at 01:09 PM 1
Share

Thanks for your feedback Tanoshimi. Actually my game is a paid game as mentioned and site owner is selling it for free. Fortunately its not working. But my concern was whether I could give more security to my future games or not, your approach for handling hackers is helpful. Thanks once again.

avatar image sandeepsmartest · Oct 15, 2015 at 05:22 AM 0
Share

Try using Android Native plugin which has the facility called App Licensing. Hope this may help you. Nsks

avatar image
1

Answer by Cynikal · Oct 14, 2014 at 05:56 AM

Nothing is ever secure...

However, what you can do is look into obfuscation methods.

What is obfuscation?

http://en.wikipedia.org/wiki/Obfuscation_(software)

Basically... Turns "string MyServersPassword = "DonkeyLips31"; into something unreadable, then later references it elsewhere in the code...

Or changes a series of variables named.. Variable1, Variable2, Variable3 to like..

IlIlIllI IllIlIll IILILILI

Those are 3 different names... But, staring at those... can be confusing to the naked eye.

However, if someone is determined... they will steal/crack your game.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image salvador007 · Oct 14, 2014 at 01:11 PM 1
Share

Thanks for your feedback Cynikal. I will surely follow your approach.

avatar image
1

Answer by screenname_taken · Oct 14, 2014 at 07:41 AM

Well one way to mess with someone that wants to copy your game is to have a check if the app store DRM is removed. And if it is make the game unwinnable, or show some text.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image salvador007 · Oct 14, 2014 at 01:13 PM 1
Share

Thanks for help. But how can I check that DR$$anonymous$$ is removed or not?

avatar image screenname_taken · Oct 14, 2014 at 01:17 PM 0
Share

http://docs.unity3d.com/ScriptReference/Application-genuineCheckAvailable.html

avatar image
1

Answer by Olly · Jul 02, 2016 at 09:01 AM

Good obfuscation makes it really hard for hackers. For example; during normal Android development we use something called ProGuard.

Don't listen to people who say 'Obfuscation is useless'. Yes it might be true that hackers can always access front end code; that doesn't mean you should make it easy for them to copy and change your work.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Bunny83 · Jul 02, 2016 at 11:04 AM 0
Share

Your answer is pretty much off-topic. You have to distinguish between different kind of "protection". Obfuscation provides a basic "code protection". To use it effectively in Unity you have to approach your whole development in a different way. Due to the way how Unity works you can't obfuscate many things in your code.

In this case the question was about copying the whole AP$$anonymous$$ from the playstore and distribute it for free on a thrid party website. Obfuscation doesn't help against that at all. Actually nothing really helps against that ^^.

If you find your AP$$anonymous$$ hosted on a third party website the best you can do is contact the hoster and drop an abuse message stating that you are the copyright holder of the content hosted and that you might take legal actions if they don't take it down. $$anonymous$$ost people don't host their websites themselfs but use free / rented hosters. They usually take action if they receive such requests. A lot people have a very twisted view on copyright. Just because someone offers an app for free on the playstore it doesn't mean you are "automatically" allowed to redistribute it.

So under the line obfuscation is of course not useless, but won't help in this case.

avatar image
0

Answer by WTPS · Oct 14, 2014 at 08:54 AM

try to visit : http://www.softlock.net/

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image jitwtttl · Oct 15, 2015 at 01:40 AM 0
Share

this is an ads...

avatar image Bunny83 jitwtttl · Oct 15, 2015 at 02:18 AM 0
Share

Well, posting a link to a commercial software isn't forbidden as long as it solves the problem. However from what i've read the software and data protection they offer doesn't apply here or to Unity at all. So yes, it just looks like an ad but it's the only post of WTPS about that company, so it doesn't look like he's spreading ads. He probably thought it might be helpful...

avatar image jitwtttl Bunny83 · Oct 15, 2015 at 02:33 AM 0
Share

you're right. but don't understand why this answer was upvoted.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

10 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

APK size question 0 Answers

APK size 70 mb more then editor log 0 Answers

Android / Split apk / obb can't load a scene 1 Answer

Why APK freezes at start of game level? 0 Answers

Issue installing apk using old Cert 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges