mirror of
https://gitee.com/replugin/RePlugin.git
synced 2024-12-02 11:48:02 +08:00
Compatible with directory
This commit is contained in:
parent
32919676e9
commit
10c612abca
@ -82,8 +82,16 @@ class PluginDebugger {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//此处是在安卓机上的目录,直接"/"路径
|
||||||
|
String apkPath = "${config.phoneStorageDir}"
|
||||||
|
if (!apkPath.endsWith("/")) {
|
||||||
|
//容错处理
|
||||||
|
apkPath += "/"
|
||||||
|
}
|
||||||
|
apkPath += "${apkFile.name}"
|
||||||
|
|
||||||
//发送安装广播
|
//发送安装广播
|
||||||
String installBrCmd = "${adbFile.absolutePath} shell am broadcast -a ${config.hostApplicationId}.replugin.install -e path ${config.phoneStorageDir}${apkFile.name} -e immediately true "
|
String installBrCmd = "${adbFile.absolutePath} shell am broadcast -a ${config.hostApplicationId}.replugin.install -e path ${apkPath} -e immediately true "
|
||||||
if (0 != CmdUtil.syncExecute(installBrCmd)) {
|
if (0 != CmdUtil.syncExecute(installBrCmd)) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user