How to install aab locally
install jdk
How to install JDK is not the focus of this article, please see:
https://cloud.tencent.com/developer/article/1698454
preparation tools
- bundletool-all-1.9.1.jar
- adb
- myTest.jks (signature file for testing)
Tool Summary: Click here to download
After downloading and decompressing, decompress platform-tools.zip, and add the platform-tools directory to the environment variable, cmd input adb has output, indicating that the configuration is successful
aab becomes apks
// 把 aabpath 替换为你 aab 文件所在路径,例如:D:\\temp\\test.aab
// 把 apkspath 替换为你要保存 apks 文件路径,例如:D:\\temp\\test.apks
java -jar E:\\tool\\bundletool-all-1.9.1.jar build-apks --bundle=D:\\temp\\release.aab --output=D:\\temp\\release.apks --ks=E:\work\keystore\myTest.jks --ks-pass=pass:programer2022 --ks-key-alias=programer --key-pass=pass:programer2022
Example:
java -jar E:\\tool\\bundletool-all-1.9.1.jar build-apks --bundle=D:\\temp\\release.aab --output=D:\\temp\\release.apks --ks=E:\work\keystore\myTest.jks --ks-pass=pass:programer2022 --ks-key-alias=programer --key-pass=pass:programer2022
install apks
There are two ways:
- adb way to install
- direct decompression
Method 1: adb method (recommended)
First: Make sure your device is in developer mode and enable USB debugging
// 输入如下命令可以看到有设备连接
adb devices
install apks
// 把 apkspath 替换为你 apks 文件所在路径,例如:D:\\temp\\release.apks
java -jar bundletool-all-1.9.1.jar install-apks --apks=apkspath
Example:
java -jar E:\\tool\\bundletool-all-1.9.1.jar install-apks --apks=D:\\temp\\release.apks
Method 2: Decompress apks
1) Using this method, when converting aab to apks, the command line needs to add additional --mode=universal
options
Example:
java -jar E:\\tool\\bundletool-all-1.9.1.jar build-apks --mode=universal --bundle=D:\\temp\\release.aab --output=D:\\temp\\release.apks --ks=E:\work\keystore\myTest.jks --ks-pass=pass:programer2022 --ks-key-alias=programer --key-pass=pass:programer2022
2) Rename the .apks file just generated to .zip, as mine is:release.zip
3) Open it release.zip
, get in the compressed package universal.apk
and install it directly.