Android如何防止apk程序被反编译

让proguard.cfg起作用的做法很简单,就是在eclipse自动生成的default.properties文件中加上一句“proguard.config=proguard.cfg”就可以了

完整的default.properties文件应该如下:

[html]  view plain copy
  1. # This file is automatically generated by Android Tools.  
  2. # Do not modify this file -- YOUR CHANGES WILL BE ERASED!  
  3. #  
  4. # This file must be checked in Version Control Systems.  
  5. #  
  6. # To customize properties used by the Ant build system use,  
  7. # "build.properties", and override values to adapt the script to your  
  8. # project structure.  
  9.   
  10. # Project target.  
  11. target=android-9  
  12. proguard.config=proguard.cfg  

大功告成,正常的编译签名后就可以防止代码被反编译了。反编译经过代码混淆的apk得到的代码应该类似于下面的效果,是很难看懂的:


原文:http://blog.csdn.net/vipzjyno1/article/details/21039349/

你可能感兴趣的:(Android如何防止apk程序被反编译)