-
Notifications
You must be signed in to change notification settings - Fork 19
/
demo.js
29 lines (26 loc) · 847 Bytes
/
demo.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
var DebugBridge = require('./adb.js').DebugBridge;
var adb = new DebugBridge();
/*
adb.getVersion(function (version) {
console.log('Android Debug Bridge version 1.0.%d', version);
});
adb.listDevices(function (devices) {
console.log('found %d device %s', devices.length, devices);
});
*/
adb.traceDevice(function (devices) {
console.log('found %d device %s', devices.length, devices);
for (var i=0; i<devices.length; i++) {
var device = devices[i];
/*
device.takeSnapshot(function (frame) {
frame.writeImageFile('snapshot.jpg');
});
*/
device.getSyncService(function (svc) {
svc.pullFile('/system/framework/framework.odex', './framework.odex', function (size) {
console.log("pull %d bytes file", size);
});
});
}
});