Jeśli nie chcesz niczego więcej w swoim system32
folderze, oto alternatywne rozwiązanie.
W [FF Profile]\extensions\[email protected]\resources\r2d2b2g\lib\adb.js
zamień _isAdbRunning
funkcję (wiersz 235) na następującą:
_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;
},