Awesome
English | 简体中文
Android Multi-Channel Packaging Tool
This is an efficient Android multi-channel packaging tool with the following features:
- Cross-platform support: Whether you are using Windows, Mac or Linux, this tool can run perfectly.
- Command line operation: You can easily package through the command line interface, without the need for a complex graphical interface.
- Multi-channel packaging: Supports one-time packaging for multiple channels, greatly improving packaging efficiency.
- Fast packaging: On average, a package can be made every 6 seconds, allowing you to complete a large number of packaging tasks in a short time.
- Server deployment: This tool can be deployed on the server for dynamic generation of invitation packages and channel packages to meet your various needs.
This tool will be your powerful assistant in the Android development process, helping you improve work efficiency and optimize workflow.
Multiple Packaging Methods
We provide two packaging methods: the ‘assets’ packaging method and the ‘AndroidManifest’ packaging method. These methods are designed to solve the problem of 360 and other reinforcement tools that cannot be repackaged. You can choose the packaging method with the java -cp command:
java -cp apptools.jar com.tool.app.Main # AndroidManifest packaging method
java -cp apptools.jar com.tool.app.CMain # assets packaging method
java -jar apptools.jar # default assets packaging method
Environmental Requirements
- Java SDK
- Android SDK
Packaging Process
- Set the environment variable of the current process to ensure that apktool can work normally.
- Execute
apktool d --no-src -f xxxx.apk temp
to decompose the apk. - Replace the channelFlag character in AndroidManifest.xml with the character for the specified channel.
- Execute
apktool b temp unsigned.apk
to repackage the apk. - Execute
zipAlign
to generate the apk file after alignment optimization. - Execute
apksigner
to generate the apk file after signing. - Go back to step 3 and replace the new channel.
- Complete the packaging.
Project Directory Structure
Source code directory:
apptool
├── demo
└── tool
Command line directory:
pro java -jar apptools.jar
├── apptools.jar
├── linux
├── macosx
├── windows
└── map.properties
Tutorial
- Configure map.properties.
- Change the channel number character in AndroidManifest.xml of your own packaging project (you can refer to apptool/demo) to the channelFlag character specified in map.properties. After packaging, place it in the path specified in map.properties.
- Execute the command line:
java -jar apptools.jar
orjava -jar apptools.jar google,baidu,yyb
Precautions
-
For the AndroidManifest packaging method, if your computer has used the apktool tool before, please delete the old framework.jar generated by the tool.
Windows:C:\Documents and Settings\%current user%\apktool\framework\* Mac:~/Library/apktool/framework/1.apk
-
Please try to avoid spaces in the java and android environment variables.
-
The minimum version of the apksigner command build-tools is 30.0.0.