解决Android 7.0系统的手机无法执行appium脚本的问题

1、 找到appium的安装目录下的adb.js文件,windows版本的目录如下:E:Appium ode_modulesappium ode_modulesappium-adblib
2、 打开adb.js,手动修改该文件下的内容:
在1035行开始这段代码后面加上:outlines.shift();
 
ADB.prototype.getPIDsByName = function (name, cb) {
logger.debug("Getting all processes with '" + name + "'");
this.shell("ps '" + name + "'", function (err, stdout) {
if (err) return cb(err);
stdout = stdout.trim();
var procs = [];
var outlines = stdout.split(" ");
outlines.shift(); //在该处添加此行代码
3、重启appium
原文地址:https://www.cnblogs.com/51QA/p/6929706.html