Skip to content

Commit

Permalink
Adding b2g reset functionallity
Browse files Browse the repository at this point in the history
  • Loading branch information
arcturus committed Jun 7, 2013
1 parent f5acd49 commit bfcdf7c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
19 changes: 18 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,29 @@ var FFOS_Cli = function FFOS_Cli() {
});
};

// Resets the B2G process as the name says
var resetB2G = function resetB2G(callback) {
adb.traceDevice(function onDevices(devices) {
for (var i = 0; i < devices.length; i++) {
var device = devices[i];
device.shellCmd('stop', ['b2g'], function onCmd(data) {
device.shellCmd('start', ['b2g'], function onCmd(data) {
if (callback) {
callback();
}
});
});
}
});
};

return {
'config': config,
'logcat': logcat,
'screenshot': screenshot,
'installHostedApp': installHostedApp,
'installPackagedApp': installPackagedApp
'installPackagedApp': installPackagedApp,
'resetB2G': resetB2G
};

}();
Expand Down
2 changes: 1 addition & 1 deletion remote_debugger/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ var RemoteDebugger = function RemoteDebugger() {
onError(e + ' ::: ' + data);
}

console.log(JSON.stringify(currentObject));
//console.log(JSON.stringify(currentObject));

if (!this.tabList && 'tabs' in currentObject) {
// Wait till one data object contains the
Expand Down

0 comments on commit bfcdf7c

Please sign in to comment.