目录

如何安装ASCF运行时本地包

问题现象

ASCF运行时创建了调试版本ASCF.hsp,如何将其安装到手机端?

解决方案

首先手机连接到电脑设备,然后使用bm工具的命令编写安装脚本ascf-install.bat,与ASCF.hsp文件存放在同一目录,执行ascf-install.bat脚本进行安装。

ascf-install.bat脚本如下所示:

hdc shell bm dump-shared -a
hdc shell "bm dump -a | grep com.atomicservice | while IFS= read -r line; do grep_result=$(bm dump -n $line | grep com.huawei.hms.ascfruntime); if [ ! -z \"$grep_result\" ]; then bm uninstall -n $line; fi; done"
hdc shell bm uninstall -s -n com.huawei.hms.ascfruntime
hdc file send .\ASCF.hsp /data/local/tmp
hdc shell bm install -s data/local/tmp/ASCF.hsp
hdc shell bm dump-shared -n com.huawei.hms.ascfruntime
pause