Dex's localization is a little more troublesome than ARSC and XML. I have been exploring it for a long time ~
First of all, I would like to thank lxe @ OPDA for telling me the decompilation method.
Classes. Dex is the [program name]. Java file compiled by the program.
It contains the compiled code of all the activities of the software.
Jesusfreke wrote a Java program for decompiling Dex files and released it on Google Code. http://code.google.com/p/smali/. We can download the latest versions of smali. jar and baksmali. jar.
Dex unpack
The program requires a Java environment. To download JDK or JRE installed, skip this step.
Unpack DEX:
java -jar baksmali.jar %1 -o classes
Pack DEX:
java -jar smali.jar classes
The two jar programs and the batch processing used in the above operations are in the compressed package .. click to download (contains smali. jar and baksmali. Jar V1.1 )..
Put the classes. Dex file to be decompiled and the two jar files in the same directory, drag Dex to "unpack. Bat", and then generate the "classes" folder in the same directory.
Open the classes folder (take twigee as an example)
The path is */classes/tice/twitterwalk. There are many files suffixed with. smali.
They are decompiled programs, that is, the files we want to modify.
These files usually contain dozens or even hundreds of objects, with an astonishing number (. smali file COUNT = number of original activities of the program). Do you know where to start?
Use the simplest notepad to open it ~
Yes, they are plain text files. Is it clear?
However, for a large number of files, the window built-in notepad is absolutely not enough.
Next, it's the turn of the big killer notepad ++ ~
Notepad ++ supports batch search of text in folders, and the speed is extremely fast. This is why it is used.
Open notepad ++ press Ctrl + F and select the "file search" tab, you can search in batches
So how do I know what to modify?
First, let's analyze the large number of. smali files.
Like XML, the author clearly states the role of each activity.
Analyze the smali file like XML, and think about the resources you are looking for will appear in the activity, but it is really difficult for people who are not learning the program to do this.
Of course, there are simple methods, that is, batch search!
The order in Chinese is to first ARSC and then XML, and then search for resources in Dex.
After finishing the first two steps in the Chinese language, we 'd better test the machine first to see which resources have not been written into the Chinese language, and those resources that have not been written into the Chinese language will be hidden in Dex.
That is to say, the goal of resources in the Chinese Dex is exact. You can find and replace them one by one in the running software postscript.
Specific instance:
After the ARSC and XML of twigee are finished, some resources have not been obtained yet.
They are: "Following" "follower" "home", etc.
Search "follow" with notepad ++"
(Click to enlarge the image)
There are a lot of results ....
We are looking for the const-string VN "keyword"
Change the English version ~ But the modification is garbled...
It doesn't matter. That's the encoding problem. Select format → convert to utf8 to display it, but remember to change it back to ANSI before saving !!
Note:: 1. Only characters in the const-string VN "keyword" quotation marks can be modified
2. When multiple duplicate keywords appear at the same time, please be careful to modify, some may be the specific reference http://code.google.com/p/smali/source/browse/#svn/dalvik-docs/opcodes for defining the Function
3. Remember to save the text as ANSI
Dex Packaging
Note:: Before packaging, make sure that there are no other useless files in the classes folder, such as NotePad ++ backup files.
Drag the "classes" folder to "package. Bat", and a "Out. Dex" file will be generated in the same directory. It is the compiled classes. Dex file.
In this regard, Dex is finished in Chinese