How to avoid reverse engineering of an APK file?

后端 未结 30 2693
醉梦人生
醉梦人生 2020-11-21 22:27

I am developing a payment processing app for Android, and I want to prevent a hacker from accessing any resources, assets or source code from the APK file.<

30条回答
  •  野的像风
    2020-11-21 22:50

    Basically it's not possible. It will never be possible. However, there is hope. You can use an obfuscator to make it so some common attacks are a lot harder to carry out including things like:

    1. Renaming methods/classes (so in the decompiler you get types like a.a)
    2. Obfuscating control flow (so in the decompiler the code is very hard to read)
    3. Encrypting strings and possibly resources

    I'm sure there are others, but that's the main ones. I work for a company called PreEmptive Solutions on a .NET obfuscator. They also have a Java obfuscator that works for Android as well one called DashO.

    Obfuscation always comes with a price, though. Notably, performance is usually worse, and it requires some extra time around releases usually. However, if your intellectual property is extremely important to you, then it's usually worth it.

    Otherwise, your only choice is to make it so that your Android application just passes through to a server that hosts all of the real logic of your application. This has its own share of problems, because it means users must be connected to the Internet to use your app.

    Also, it's not just Android that has this problem. It's a problem on every app store. It's just a matter of how difficult it is to get to the package file (for example, I don't believe it's very easy on iPhones, but it's still possible).

提交回复
热议问题