Software: apktool
Enter official website, https://ibotpeaches.github.io/Apktool/,, and click https://ibotpeaches.github.io/Apktool/install/ on the homepage of official website to enter the installation guide, which contains the installation methods of Windows, Linux and Mac. Different operating systems can follow different steps.
At the terminal input: apktool d xxx.apk, I made the following error when decompiling:
According to the prompt, you can't write to this directory /Users/XXX/Library/apk tool/framework (XXX is the user name of the computer), so create a new apktool folder under/users/XXX/library and a new framework folder under the apktool folder. Then, for security reasons, set the permission to create a new folder, and enter: chmod-R777/users/XXX/library/apktool at the terminal.
Then re-execute the decompile command, and the decompiled folder will appear in the same directory as xxx.apk.
Enter the compilation command at the terminal: apktool b xxx (xxx is the folder that has just been decompiled), and after success, a packaged apk file will be generated in the dist folder under the xxx folder.
The packaged apk is unsigned, so it cannot be installed. Now sign the apk.
20000 is time, so this setting is longer. -keystore followed by the signature file storage path. Entering a command and pressing Enter will make you enter your password and other information. Please follow the prompts. Don't forget the password, use it when signing.
2. Then enter:
-keystore is the path of the signed file, -signedjar is the storage path of the signed apk, the path behind this is the path of the pak that needs to be signed, and finally android.keystore is the alias of the certificate. If you don't know the alias, you can enter: keytool-list-v-keystore/users/XXX/desktop/Android. Keystore checks the specific information in the terminal, and there are aliases in it.
Please note that the signature file and the apk to be signed should be in the same directory.