Android code obfuscation 1 proguard. cfg. This is the proguard script required for obfuscation. The Code is as follows: [java] view plain-optimizationpasses 5-dontusemixedcaseclassnames-dontskipnonpubliclibraryclasses-dontpreverify-verbose-optimizations! Code/simplification/arithmetic ,! Field /*,! Class/merging/*-keep
Just touch Android, not very familiar. After discovering that items that can be packaged properly before adding confusion and then packaging the signature apk, you are prompted with "Android Proguard failed to export application".Comment out the proguard.config=proguard.cfg in the program (in the Project.Properties file), and then package the discovery without confusion to properly package.Finally found the reason, originally upgraded the SDK to 20.3
Java-written code is very easy to decompile, but you can use Proguard to do your best to protect our code, Proguard specific use can refer to the official documentation (http://proguard.sourceforge.net/), Write down my configuration now (in actual use) for reference
1. Download Proguard to http://proguard.sourceforge.net/2. Ready to have the jar bag, I'm here fo
Overview of the Proguard Code obfuscation tool: code can be de-redundant compression, code optimization, code obfuscation and so on. The main application in Android is to confuse the code: the class name, method name, field name into difficult to read and understand names such as a,b,c or three-way, in order to prevent reverse engineering and be anti-compiled rea
To achieve code obfuscation, the method is as follows:
Because both my SDK and adt00000.1 are up-to-date, I have read the proguard. cfg obfuscation code method provided on the Internet,. It is said that proguard. cfg will be automatically generated under the project file, but I cannot generate it, so I cannot use this
In development environments later than Android, Google provides the proguard code obfuscation function (which can be added by yourself before) to protect the hard-to-write code.
The proguard. cfg file will be automatically added to the root directory of the newly created Project for code obfuscation. No matter which ve
Due to the proliferation of various decompilation tools, Android programmers can only manually add proguard Before Version 2.3 to achieve code obfuscation.
Proguard is a Java code obfuscation tool.
In SDK 2.3, we can see that a proguard folder is added under Android-SDK-Wind
ProGuard IntroductionProGuard is a well-known open-source project on SourceForge. Official Website: http://proguard.sourceforge.net /.
Java bytecode is generally very easy to decompile. To protect the Java source code, we often confuse compiled class files. ProGuard is mainly used for obfuscation. Of course, it can also reduce the size and optimize the bytecode,
Proguard
Introduction
ProguardIsSourceForgeOn a well-known open-source project. Official Website:Http://proguard.sourceforge.net/.
JavaThe bytecode is generally very easy to decompile. For good protectionJavaSource code, We often compileClassFile for obfuscation.ProguardThe main function is obfuscation. Of course, it can also reduce the size and optimize the bytecode, but those are secondary features f
Due to the proliferation of various decompilation tools, Android programmers can only manually add proguard Before Version 2.3 to achieve code obfuscation.
Proguard is a Java code obfuscation tool.
In SDK 2.3, we can see that a proguard folder is added under Android-SDK-Wi
inconvenient to confuse Android code by manually adding Proguard for code obfuscation. After 2.3, Google has added this tool to the SDK's toolset. Specific path: Sdk\tools\proguard. When you create a new Android project, a proguard configuration file proguard.cfg appears under the root path of the project directory. I
To achieve code obfuscation, the method is as follows:
Because both my SDK and adt00000.1 are up-to-date, I have read the proguard. cfg obfuscation code method provided on the Internet,. It is said that proguard. cfg will be automatically generated under the project file, but I cannot generate it, so I cannot use this
I. What have code obfuscation been done?1. code obfuscation is usually used to remove unnecessary Code. It is used to rename classes, attributes, and methods with obscure names to reduce the size of the Code, increase the difficulty of decompilation. (If our applications are charged or kept confidential, we need to improve the security of our code through code obfuscati
risksCode obfuscation has the advantage of confusing optimizations, but it often leads to several problems1, confusion, use to third-party library, you must tell Proguard do not check, or Proguard will error.2, run error, when code can not be confused, we must be properly configured, or the program will run an error, this situation is the most problematic.3, deb
Because Android code is mostly Java code, it is easy to decompile, fortunately, Android ADT for us to integrate the tool of confusing code, one can confuse our code, so that the program is anti-compilation after the basic understanding, but also can play the role of code optimization. Currently, it is recommended to turn on the code obfuscation feature of Android.Android ADT mainly through the Proguard tool
There are new technologies such as Hibernate, Spring, and so on, which are managed by a configuration file, and when we use the obfuscation, only the Java files are confused, and it's bound to cause Java confusion, The information in the configuration file cannot correspond to the class name and method name inside Java, so when confusing, you must point out that those files are not involved in confusion. First on the progurand
Proguard obfuscator running process (other processes are not discussed at the moment): run the proguard script in the command line and directly add parameters and call proguard. CFG, while eclipse ADT releases releaseThis process is executed during APK, and most of the work is completed. It includes parameters specified for injars, outjars, and libraryjars (the j
obfuscation optimization process. Note Look, we're going to use The Artifactid of our project isSo ${project.artifactid}-maven.pro is Struts2spring4hibernate4xml-maven.pro. Of course, it can be changed to other names, this is to prevent the project Artifactid change the name.(I understand A jar package that needs to be confused by specifying a path)The relevant configuration options for this plugin please crossing the description of the network: http
-Optimizationpasses 5
-Dontusemixedcaseclassnames: [classes of different types are not generated during obfuscation]-Dontskipnonpubliclibraryclasses [specify not to ignore non-public library classes. ]-Dontpreverify [no pre-verification]
-Verbose-Optimizations! Code/simplification/arithmetic ,! Field /*,! Class/merging/* [optimization]
-Keep public class * extends Android. App. Activity [unchanged without obfuscat
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.