How to test your .aab on mobile

I talked about how to package .aab before, this time I will talk about how to test the packaged .aab

Releases · google/bundletool · GitHub

The first is to go here to download the command line tools provided by google

https://developer.android.com/studio/command-line/bundletool?hl=zh-cn

Here are the instructions for using this tool, as well as command instructions, if you have any questions, you can go and see for yourself

Create a new folder and drop the downloaded bundletool-all-1.14.1.jar into it.

Then create 2 .bat files, we will call them respectively 

build_apks.bat

install_apks.bat

Of course, in theory you can call it whatever you want.

Then throw in the packaged .aab file, of course it doesn’t matter if you don’t throw it in. Here’s the main thing to save trouble, otherwise you will have to fill in the address when you write bat later.

Open build_apks.bat, you should be able to know what it is going to do by looking at the name. Yes, we are going to use it to unpack .aab into .apks file

java -jar bundletool-all-1.14.1.jar build-apks --bundle=你的程序名.aab --output=你的程序名.apks --ks=你的签名文件名.keystore --ks-pass=pass:签名仓库的密码 --ks-key-alias=签名别名 --key-pass=pass:签名别名的密码

According to the above format, just put your information in the sky, here is a complaint, this command is useful = end, and also useful: end, killing obsessive-compulsive disorder. . . . . .

Then open install_apks.bat, which is used to install on the phone

java -jar bundletool-all-1.14.1.jar install-apks --apks=你的程序名.apks

After everything is configured, first execute build_apks.bat, the command line will automatically close after success, and find an additional xxx.apks file in the directory, then make sure the phone is connected to the computer, and then execute install_apks.bat, you can put your The program is installed on the phone.

Note that there are 2 points to note:

1. You should notice that this is a .jar package, so make sure that your computer has jdk installed and environment variables are configured. You can use java -version to exhale it in cmd.

2. Since it involves connecting a mobile phone to a computer, students who are not newbies should know that there is such a thing as adb in the android sdk tool, and you must also make sure that it is available on your computer and that you can call it out. It is even better to install it before installing it. Use the adb devices command to check if your phone is recognized.

If the above 2 points are not achieved, failure is a high probability event.

Guess you like

Origin blog.csdn.net/WPAPA/article/details/130361139