Если вы не хотите ничего лишнего в своей system32
папке, вот альтернативное решение.
В [FF Profile]\extensions\r2d2b2g@mozilla.org\resources\r2d2b2g\lib\adb.js
, замените _isAdbRunning
функцию (строка 235) на следующую:
_isAdbRunning: function() { let deferred = Promise.defer(); let ps, args; let platform = Services.appinfo.OS; if (platform === "WINNT") { ps = "C:\\windows\\system32\\tasklist.exe"; args = []; } else { args = ["aux"]; let psCommand = "ps"; let paths = env.PATH.split(':'); let len = paths.length; for (let i = 0; i < len; i++) { let fullyQualified = file.join(paths[i], psCommand); if (file.exists(fullyQualified)) { ps = fullyQualified; break; } } } if (ps) try { let buffer = []; subprocess.call({ command: ps, arguments: args, stdout: function(data) { buffer.push(data); }, done: function() { let lines = buffer.join('').split('\n'); let regex = (platform === "WINNT") ? psRegexWin : psRegexNix; let isAdbRunning = lines.some(function(line) { return regex.test(line); }); deferred.resolve(isAdbRunning); } }); return deferred.promise; }catch(err){ if(err.name !== "NS_ERROR_FILE_NOT_FOUND") throw err; } debug("Error: a task list executable not found on filesystem"); deferred.resolve(false); // default to restart adb return deferred.promise; },