Closed marospekarik closed 3 years ago
I can't think of any valid use case of that. To connect to a remote ADB server with native ADB binary, you can create an SSH tunnel. To access some feature of ADB in a browser, you can write a server to spawn the native ADB binary, read the output and send to web frontend with any format you like.
There is no need to use a custom ADB implementation in browser if you have native ADB.
Simon Chan
From: Maroš Pekárik @.> Sent: Thursday, May 13, 2021 8:28:07 PM To: yume-chan/ya-webadb @.> Cc: Subscribed @.***> Subject: [yume-chan/ya-webadb] Run it as a server (#329)
Hi, thanks for amazing work! I have a usecase where I need to use it as a server. Is there some easy way we could support that?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fyume-chan%2Fya-webadb%2Fissues%2F329&data=04%7C01%7C%7C9454a3214c3d424e5b9208d9160a9097%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637565056887194704%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=flDxjAZnkYuO0Zd3U0dwvNOcFrT8sM%2Bp8sqtZ2JxV5Q%3D&reserved=0, or unsubscribehttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAAKEZEIMW4UMIDEVNH6BMCTTNPAVPANCNFSM442O536A&data=04%7C01%7C%7C9454a3214c3d424e5b9208d9160a9097%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637565056887204701%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=xpIZ11xip8EYKod2KkUwjq4xyzaQNbF1smunETRL87U%3D&reserved=0.
Thanks for the hyperfast answer. I admit, my usecase is a bit odd. I'm having micro-computer connected to android device over adb and would like to have an interface for engaging with adb. I have a project where there will be a multiple people connecting to that device in order to trigger different pre-made shell scripts, file management and checking status of the device. I like the idea of using just browser for that kind of control instead of SSH.
Thanks for the suggestion. I guess I'd need to write a server for that.
All best, Maros
If you really want to use this library, I have the same suggestion as https://github.com/yume-chan/ya-webadb/issues/319#issuecomment-835404056
[...], with https://github.com/thegecko/webusb, a drop-in replacement of browser's WebUSB API, I believe it's pretty easy to implement another backend for Node.js
Duplicating https://github.com/yume-chan/ya-webadb/blob/master/packages/adb-backend-webusb/src/backend.ts, modify it to use thegecko/webusb, then pass an instance to Adb
constructor
Hi, thanks for amazing work! I have a usecase where I need to use it as a server. Is there some easy way we could support that?