ws-scrcpy
ws-scrcpy copied to clipboard
drag and drop - adb install .apk
possible to add functionality for drag-n-drop an apk file to install automatically.
or
upload an apk to install to device
import Bluebird from 'bluebird';
import Adb from '@devicefarmer/adbkit';
const client = Adb.createClient();
const apk = 'vendor/app.apk';
const test = async () => {
try {
const devices = await client.listDevices();
await Bluebird.map(devices, (device) => client.install(device.id, apk));
console.log(`Installed ${apk} on all connected devices`);
} catch (err) {
console.error('Something went wrong:', err.stack);
}
};
Hi.
You can upload apk-file to device by drag-n-dropping it into "video" while streaming (but only the *.apk)
File push
Drag & drop an APK file to push it to the
/data/local/tmpdirectory. You can install it manually from the included [xtermjs/xterm.js][xterm.js] terminal emulator (see below). You can install it manually from the included xtermjs/xterm.js terminal emulator.
In master branch I added file listing feature, you can upload any files anywhere (if you have permissions).
I don't like the idea of automaticall installation, but in theory you can add it here: https://github.com/NetrisTV/ws-scrcpy/blob/4247f2ae7a47a97d262f7456ad552053692914e4/src/server/goog-device/mw/FileListing.ts#L80-L82
If drag and drop is not good idea to install apk, Can you add file upload option in tool bar which can install apk when user uploads