@harigovind, the problem I found with not finding uiautomator is that appium is using a non-standard command line form of ps. It calls ps like this
ps “”
This is no longer supported on Android N and will always return an error whether or not the process is running. I am not proficient in writing node.js code, but I put in the following and it’s been working for me:
ADB.prototype.shell_grep = function (cmd, grep, cb) {
if (cmd.indexOf(‘"’) === -1) {
cmd = ‘"’ + cmd + ‘"’;
}
var execCmd = 'shell ’ + cmd + '| grep ’ + grep;
this.exec(execCmd, cb);
};
I then changed the code which searches for uiautomator
ADB.prototype.getPIDsByName = function (name, cb) {
logger.debug(“Getting all processes with '” + name + “'”);
this.shell_grep(“ps”, name, function (err, stdout) {
if (err) {
logger.debug(“No matching processes found”);
return cb(null, );
}
We are still using Appium 1.4.13 as we’ve had some initial problems with APpium 1.5.1. This solution is for a UNIX based system. It doesn’t assume there is grep installed on the device (a few devices have it, but most don’t), so it takes the output pipes it through grep on the test controller. This won’t work for a windows test server.
I don’t believe @harigovind’s solution solves the problem with not being able to install the two appium apks. I have a manual workaround for now in order to test Android N. I run the following command(s) before I start the appium server each time:
adb uninstall io.appium.settings; adb uninstall io.appium.unlock