npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

install-to-adb

v1.1.0

Published

Installing apps to Firefox OS devices connected via USB+ADB

Downloads

20

Readme

Install to ADB

Installing apps to Firefox OS devices connected via USB+ADB

Install with NPM

So far we've tested it with as much as 10 phones at the same time (connected via a USB hub). Of course they also work without a hub, but then you also have less devices to push to!

Warning: Both node 0.12 and io.js 1.51 give a Segmentation fault 11 error. node 0.10 works fine.

Installation

npm install install-to-adb

Or clone the repository and then run npm install on its folder, if you just want to run the demo.

Usage

var installToADB = require('install-to-adb');

installToADB(appPath) // returns a promise, results are all the apps installed on all the devices

Command line tool

You can also use this as a command line tool! So you don't need to write any code, just point it to the path of the app you want to be installed in your adb-connected devices. You can also specify if you want the app to be launched once it has been installed. This is the syntax:

/path/to/install-to-adb.js /path/to/app --launch

The path to install-to-adb will be different depending on how you installed the module.

Using locally

Suppose we installed the module in our node-based project supertest which is in ~/projects/supertest. There will be an install-to-adb folder in the node_modules folder. So you can reference the binary, from anywhere, with this:

~/projects/supertest/node_modules/install-to-adb/bin/install-to-adb

Or, if you're in the project folder:

./node_modules/install-to-adb/bin/install-to-adb ...

Installing globally

You can also install this utility globally:

npm install -g install-to-adb

And then you can install apps without having to reference the full path to the utility:

install-to-adb /path/to/app --lauch

Uninstalling globally

Cleaning up is important. This is how you would uninstall this module from your global path:

npm uninstall --g install-to-adb

Demo

The code in demo.js shows how to call this module to install a sample app in all ADB connected devices and then launch it too!

We use promises, hence the usage of then instead of a callback.

var path = require('path');
var installToADB = require('./');
var appPath = path.join(__dirname, 'node_modules', 'sample-packaged-app');

installToADB(appPath).then(function(result) {
	console.log('result', result);
	process.exit(0);
});

Making your life easier

Disable the prompt that asks for permission each time a connection is done

This will allow you to run the script even with the screen turned off--otherwise the script will be 'suspended' waiting for you to accept the incoming connection, and if the screen is turned off you will never see that!

In WebIDE Device Preferences search for devtools.debugger.prompt-connection and uncheck the checkbox.