async function exec (adbCmd:string) { let adbPath = 'D:\\prog\\adb\\windows\\adb.exe' let cmdMsg = await new Promise((resolve, reject) => { const child = execFile(adbPath, adbCmd.split(' '), (error:any, stdout:any, stderr:any) => { if (error) { reject(error) } resolve(stdout) }) }) return cmdMsg } async function call(phone:any, deviceid:any) { let param:any = ('shell am start -a android.intent.action.CALL -d tel:'+phone) if (deviceid) { param = '-s ' + deviceid + ' ' + param } return await exec(param) }
标签:nodejs,拨号,param,let,deviceid,error,adb,any From: https://www.cnblogs.com/zyip/p/16993784.html