Mobile Game APK Process tool
We provide the process tool as a JAR package file for Windows and Linux and Mac systems. The following are described in the Windows environment. Other system environments are similar
Instructions for use
- How to use: Command line mode (note that the first time you need to configure the config.ini file)
- Command line mode parameters:
Java -jar NHPProtect.jar -yunconfig [options] -input %inputapk%
- The parameters are as follows:
|-yunconfig||Required, indicating that the reinforcement parameters are automatically obtained from the Yidun background|
|[Options]||Optional, sign or align the reinforced APK file|
|- input||Required, the APK file path to be reinforced should follow|
- The options are as follows:
|-apksign||Signing of the reinforced APK package|
|-zipalign||Aligning the reinforced APK package|
config.ini file configuration instructions
Config.ini must be in the same directory as NHPProtect.jar. Its functions mainly include the following three points:
- configure appkey
The user needs to fill in the appkey in the configuration file as shown below. If there is no appkey, please contact customer service.
- Configure signature related information
If you need to autoly sign the apk, in addition to adding the "-apksign" parameter to the command line, you need to configure the signature related information in the config.ini file. The format and meaning are as follows.
[apksign] Keystore=D:\xxx\xx.keystore Alias=xxx Pswd=xxx Aliaspswd=xxx
Keystore: The signer's private key and certificate chain reside in the given Java-based KeyStore file.
Alias: The name of the alias that represents the signer's private key and certificate data within the KeyStore.
Pswd: The password for the KeyStore that contains the signer's private key and certificate. You must provide a password to open a KeyStore.
Aliaspswd: the password corresponding to the KeyStore alias.
- Other special configurations
Games using Unity3d or the usual cocos engine can use the above configuration. The following configuration is for special situations:
- Configure the suffix name of scripts to protect the cocos2d lua script
Currently cocos2d lua script protection supports script file of which the filename extension is lua or luac in default. If the filename extension of the script is other, it should be configured in the <config.ini>--the configuration file. The format is as follows.
Currently only one type of script is supported for encryption. In the default mode, if there are lua and luac scripts at the same time, the program will choose the script type of larger number files to upload.
- Games not using unity3d, cocos2d, neox game engine name settings
In addition to unity3d, cocos2d and neox, this tool also supports the protection of other game engines. Just configure the so name of the engine in the config.ini configuration file. The format is as follows.
- Please note that appkey is private and should not be revealed! If the appkey is wrong, an error message will be returned:
[I] check appkey failed!
Solution: If you already have appkey, please check if there is any mistake in config.ini; if you don't have appkey, please apply for trial appkey in our official website.
- If the process fails, a message will be printed:
[I] apk protect failed! For more details, please check log file
The log file is located in the Log directory in the same directory as the client of the jar package. The log file can be used to obtain the cause of the error.
Solution: Re-execute the jar package client or contact the after-sales customer service.
- If the process is successful but the download of the reinforced APK fails due to other reasons (such as the network disconnection): 3 times of repeated downloads will be tried. If it fails for 3 times, the specific error message will be printed to the log file.
Solution: Re-run the process after checking the network right and other problems based on the error information.