Foreign mobile games for the Chinese, the use of this technology can even assist the replacement technology, the company has mobile phone games for technical processing, replace the game in the story introduction, company name, company logo, all the original game related to the text information.
Technical Analysis:
Chinese is divided into the following several situations, detailed description.
1. From the content,
(1) The Chinese of foreign games. The Chinese translation of foreign games is to translate the non-Chinese into Chinese.
(2) The "Chinese" of the domestic game. For the domestic game, is to change the game related information, with the use of skin replacement.
2. From the storage way to say
(1) The relevant information is stored in the. class file. Game-related information is stored in the program.
(2) The relevant information is stored in a separate resource file. If there is no encryption is not difficult, add a secret, it depends on the good luck. This is only a discussion of unencrypted situations.
Technical principle: For game information stored in a resource file. Just replace it. For the game information stored in the program, this tutorial is the focus of the discussion. The information in the program opens the *.class file with relevant tools to find all classes that contain game information.
Replace the content, just OK.
Chinese tools: Java anti-compiler, JDK, WinRAR, Uedit32.
If you have Java IDE tools better.
The process of Chinese:
1. Create a A.java that reads as follows:
public class a{
static{
String s= "一个不能少一个也不多";
System.exit (0);
}
}
The program is very simple to use later, if the IDE is compiled with the IDE.
Without the IDE, it is possible to compile with any version of the JDK (such as jdk1.3.1_16). A.class file standby.
2. Use WinRAR to find the *.class file that contains the game information. Unzip the file to any location and open it with Uedit32. You can see the 16 form of the *.class file (screenshot 1).
3. For game information is in English, you can see the string directly on the hexadecimal right. And for the game information is Chinese, can see unreadable Chinese (like garbled). We just want to modify this information. First of all speak Chinese, In the. class file, we care most about the storage format of the string, Chinese characters are stored in the. class file in three times times the length of the string, such as a string of 10 Chinese characters, which requires 30 bytes in the. class to store the string itself, while the localization is to replace the corresponding byte store, equal length or unequal string. As long as the replacement can be, not long (foreign language transfer to Chinese) you need to change the length property of the string byte region. See screenshot 1, the Shadow is the 10 characters in the byte, the length of 30 bytes. The Red box + purple box is byte length 1E converted to decimal exactly 30. The purple box here is 00, it's no use to us. Compared to English substitution and Chinese substitution is similar. However, to modify the byte length this property value (string length *3) adapts to the new size.
Note: It is important to ensure that the string byte area size equals its corresponding length property.
4. Extract the *.class class that contains game information. See screenshot 2.
5. Find the relevant Chinese character byte area. See screenshot 3 for 30 bytes shown in shadow.
6. Write the text you want to replace in the previous A.java file. After compiling, will a.class use Uedit32 to open, can see the Chinese character garbled, the corresponding pasting to the game *.class shadow position, replaces the original byte.
7. Open the game file with WinRAR, find the directory to modify the *.class file, replace it with the modified *.class file.
8. Upload the modified game to the phone. You can see the information that was modified.