360 multi-channel packaging and 360 Packaging
I. Principles
The essence of an apk file is a zip file. With the Data Structure Feature of the zip file "you can add comment (abstract)", you can write arbitrary data at the end of the file without re-extracting the zip file, we can write channel information to the abstract area.
Ii. Method
The 360 multi-channel packaging tool has been put into the test02 file of tools.
1. Put the apk to be written into the MCPTool folder.
2. Modify the MCPTool. bat batch file and change the channel and password (channel information must be encrypted for security purposes)
3. Drag the apk to MCPTool. bat and generate a channel package.
4. Modify the password in the MCPTool-check.bat and the password in MCPTool. bat is consistent
5. Drag the channel package to the MCPTool-check.bat to check whether the channel information is correct
6. Access Channel: Set MCPTool. java is added to the project or MCPTool. jar import project, call MCPTool. getChannelId (this, "12345678", "") the first parameter is context, the second parameter is password, and the third parameter is the default value.
360 multi-channel packaging tool address: http://pan.baidu.com/share/link? Consumer id = 4047990963 & uk = 4218015263
Iii. Advantages and Disadvantages
Advantages:
1. 5 MB apk, 300 in 1 second
2. When downloading the apk, the server can write some information, such as the invitation code and sharing information.
Disadvantages:
Channel information is also easy to modify. Although it can be encrypted, it only increases the threshold for modification.