client.shell don't run callback
Cheese-Yu opened this issue · comments
CheeseYu commented
client.shell(_id, `LD_LIBRARY_PATH=/data/local/tmp /data/local/tmp/minicap -P ${phy_x}x${phy_y}@${phy_x*0.4}x${phy_y*0.4}/0`)
.then(adb.util.readAll)
.then(function(output) {
console.log('%s: %s', _id, output.toString().trim())
return client.forward(_id, 'tcp:9222', 'localabstract:minicap')
.then(function(output) {
console.log('Setup devtools on "%s"', _id)
console.log(output.toString().trim())
})
});
That isn't run console,until I unplugged phone.
The back info is:
d86e281e: PID: 23662
INFO: Using projection 1080x1920@432x768/0
INFO: (external/MY_minicap/src/minicap_26.cpp:241) Creating SurfaceComposerClient
INFO: (external/MY_minicap/src/minicap_26.cpp:244) Performing SurfaceComposerClient init check
INFO: (external/MY_minicap/src/minicap_26.cpp:255) Creating virtual display
INFO: (external/MY_minicap/src/minicap_26.cpp:261) Creating buffer queue
INFO: (external/MY_minicap/src/minicap_26.cpp:264) Setting buffer options
INFO: (external/MY_minicap/src/minicap_26.cpp:268) Creating CPU consumer
INFO: (external/MY_minicap/src/minicap_26.cpp:272) Creating frame waiter
INFO: (external/MY_minicap/src/minicap_26.cpp:276) Publishing virtual display
INFO: (jni/minicap/JpgEncoder.cpp:64) Allocating 6268932 bytes for JPG encoder
Device d86e281e was unplugged
Unhandled rejection FailError: Failure: 'device not found'
at D:\node-pro\Android-Control\node_modules\adbkit\lib\adb\parser.js:183:29
...
Thanks your reply.
Simo Kinnunen commented
Don’t use readAll if you want to see data in real time.