Android Anti-compilation (Dex and Odex), non-brain reprint, absolutely reliable

Source: Internet
Author: User

Android anti-compilation
Decompile the Odex file (for example, Framework.odex), and if you reverse-compile Dex, step 4th directly
1Because the Odex tool in the D:\Develop tools\android Anti-compilation tool \odex, in order to execute the command conveniently in the Odex folder,Create a new folder structure for the system and put all the packages referenced in the Odex in the corresponding directorySystem-----|-------App |-------Framework
2.Java-jar baksmali-2.0.3.jar-d./system/framework-x./system/framework/framework.odex-d Specifies Bootclasspath dir-x deodex the given Odex file. This option is ignored if the input file was not an Odex file-a--api-level <api_level>,the Numeric Api-level of The file being disassembled.         If not specified, it defaults to (ICS). Many people on the Internet that the post is written by-a 12, no need
3After executing the above command, an out folder is generated in the Odex directory, which is the hierarchy structure.Note: Before executing the above command, it is possible to have an old out folder that has an out folder before it can cause the command to be executed below to throw an exception, so the older out folder is removed, the exception is as follows:
unexpected top-level EXCEPTION:
org.jf.util.ExceptionWithContext:Unsigned Short value
out of range:78281
At
Org.jf.dexlib2.writer.DexDataWriter.writeUshort (dexdatawriter.java:11
6)
At
org.jf.dexlib2.writer.InstructionWriter.write (Instructionwriter.java:
312)
At
Org.jf.dexlib2.writer.DexWriter.writeCodeItem (dexwriter.java:980)
At
Org.jf.dexlib2.writer.DexWriter.writeDebugAndCodeItems (Dexwriter.java
: 759)
At
Org.jf.dexlib2.writer.DexWriter.writeTo (dexwriter.java:214)
At
Org.jf.dexlib2.writer.DexWriter.writeTo (dexwriter.java:192)
At
Org.jf.smali.main.main (main.java:229)
The last command to convert to Classes.dex:Java-xmx512m-jar Smali-2.0.3.jar out-o classes.dex
4The final step is to say classes.dex to the jar file, with the D2j-dex2jar command:d2j-dex2jar-f Classes.dex
Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.