1. 安装 bundletool
brew install bundletool
2. 创建 aabinstall.sh
文件
#!/bin/bash
echo start install $1
rm -f xxxxx.apks
bundletool build-apks --bundle=$1 --output=xxxxx.apks
bundletool install-apks --apks=xxxxx.apks
echo install complete
rm -f xxxxx.apks
3. 将放到合适的目录并设置别名
放到 ~
目录并设置别名:
alias aabinstall="~/aabinstall.sh"
可以添加到 .bash_profile
永久生效:
vim ~/.bash_profile
4. 使用
aabinstall xxxx.aab
网友评论