拥有.apk可以提取其源代码。安卓应用程序是否安全?[英] Having .apk can extract its source code. Does Android app is secure?

本文是小编为大家收集整理的关于拥有.apk可以提取其源代码。安卓应用程序是否安全?的处理/解决方法,可以参考本文帮助大家快速定位并解决问题,中文翻译不准确的可切换到English标签页查看源文。

问题描述

我开发了Android应用程序,一些代码非常私密和机密.我将加密算法添加到我的代码中以提高安全性.

但最近我读了,当有一个.apk文件时,他们可以用100%正确提取java源代码

不只是那个,人们也可以从Google Play商店获得.apk

这意味着有我的.apk的人可以查看我的所有源代码(Java,.xml布局,库)?如果是,我的所有努力都无法实现安全应用程序.

推荐答案

是的,希望有一种方法可以防止其他劳动力项目full source code. 为您的Android应用程序启用ProGuard. ant将调用ProGuard以使您的代码混淆. 您的代码将尽可能地缩小.Many函数和变量名称将替换为根本可以解码或理解的收缩表格:)

更多详细信息在这里: https://developer.android.com/Studio/build/shrink-code.html

Note that enabling ProGuard takes build time much more than normal build time.So better to do it before release of your app.

其他推荐答案

该过程称为 Android反向替代.由于@ Ash12表示,您可以使用ProGuard来混淆您的源代码.但是,如果您将应用程序凭据存储如API令牌,密码等,则将是一个严重的安全性 - 妥协.

也可以看看 dexguard ,这是Proguard的商业变体.它允许您加密布局文件并使清单和其他资源文件的内容(以及许多其他东西一起使用).

本文地址:https://www.itbaoku.cn/post/1937932.html

问题描述

I develop Android app and some of the codes are very private and confidential. I make encryption algorithm into my code to increase the safety.

But recently I read, when people having an .apk file, they can extract the java source code with 100% correct Source.

Not just that, people also can get .apk from Google Play Store Source

Does it means people who has my .apk can view all my source code(java, .xml layout, library)? If yes, all my hard work to have a secure app is not achieved.

推荐答案

Yes,hopefully There is a way of preventing other from getting your hard labor projects full source code . Enable ProGuard for your android application. ant will call ProGuard to obfuscate your code. Your code will be than shrinked as much as possible.Many functions and variables name will be replaced with shrinked form that nobody can decode or understand at all :)

More details are here: https://developer.android.com/studio/build/shrink-code.html

Note that enabling ProGuard takes build time much more than normal build time.So better to do it before release of your app.

其他推荐答案

The process is called Android Reverse Engeneering. As @ash12 said , you can use ProGuard to obfuscate your source code. But then it will be a serious security-compromise if u store your app credentials like api tokens ,passwords etc.. in the source.

Also You could take a look at DexGuard , which is the commercial variant of ProGuard. It allows you to also encrypt the layout files and obfuscate the content of the manifest and other resource files (together with many other things).