🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

android

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

android

various android utils & commands for node

0.0.8
latest
Source
npm
Version published
Weekly downloads
928
-38.3%
Maintainers
1
Weekly downloads
 
Created
Source

android

a node module for adb & android

Examples:

var adb = require("android");

Get attached device id

adb.firstDevice(function(deviceId){
	if(deviceId) {
		//there's a device attached, do cool stuff
	} else {
		//no device attached
	}
});

Checking to see if a package is installed (wildcards allowed)

adb.isInstalled("com.example.*", function(isInstalled) {
	if(isInstalled) {
		//do cool stuff
	}
});

Installing an APK

adb.install("/path/to/my.apk", function() {
	//do cool stuff
});

Pushing a file

adb.push("/path/to/src", "/path/to/target", function (err) {
	if(!err) {
		//do cool stuff
	}
});

Sending a broadcast

var options = {action:"com.example.ACTION_JACKSON", extras:{key:"lime", pie: "good"};

adb.sendBroadcast(options, function(response){
	console.log("response data: " + response.data);
	console.log("response message: " + response.message);
});

Keywords

android

FAQs

Package last updated on 22 May 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts