node library + command line tool to perform basic web app development stuff
- Installing app
- Taking screenshots
- Logcat
- Reset b2g process
- Close App
- Launch App
- Uninstall
Based on @fabricedesr amazing work on b2gremote and digitalrald for his work on make-fxos-install
Enable remote debugging in the device and of course run
npm install
In the examples
folder you could find some code that shows the use of this library, also find below some code examples.
var ffos_cli = require('./index.js');
ffos_cli.installPackagedApp('boilerplate', './application.zip', function onInstall(err, done) {
if (err) {
console.error('Error updating app: ' + err);
} else {
console.log('Successfuly installed');
}
process.exit(0);
});
var ffos_cli = require('./index.js');
ffos_cli.closeApp('boilerplate', function onClose(err, done) {
if (err) {
console.error('Error closing app: ' + err);
} else {
console.log('Application closed');
}
process.exit(0);
});
var ffos_cli = require('./index.js');
ffos_cli.launchApp('boilerplate', function onLaunch(err, done) {
if (err) {
console.error('Error launching app: ' + err);
} else {
console.log('Application launched');
}
process.exit(0);
});
var ffos_cli = require('./index.js');
ffos_cli.resetB2G(function onReset() {
console.log('B2G process reseted');
process.exit(0);
});
var ffos_cli = require('./index.js');
ffos_cli.logcat(); //Output logcat from device continously