Giter Site home page Giter Site logo

mobi-nex / adborc Goto Github PK

View Code? Open in Web Editor NEW
88.0 6.0 3.0 334 KB

Create a network of android devices for remote debugging

Home Page: https://mobinex.io

License: Apache License 2.0

Rust 100.00%
adb android distributed-networking remote-access rust

adborc's People

Contributors

mobi-nex avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

adborc's Issues

Add a sub-command for stopping scrcpy mirroring

Currently, there is no command to stop scrcpy mirroring once it is started. This is not a problem usually because the mirroring window has a close button that can be clicked to stop scrcpy. But in some cases, like with the scrcpy option --window-borderless there are no border decorations for the window and hence no close button. The only way to stop mirroring in such cases is to release the device or stop the consumer altogether. Both are not ideal. Also, regardless, there should be a cli command to stop mirroring as that might be needed for automation use cases.

Add/update logging

Two kinds of logging update are needed:

  1. Remove/Change lot of log levels. For example: many of the logs currently have the error level. When they can be easily relegated to warning or even debug prints. This creates a lot of clutter and useless information on the console. Also, some of the debug prints need to be upgraded to info.
  2. There are a lot of places where logging needs improvement or addition at the moment.

This is an excellent first issue as the changes can be easily implemented and they provide a very good opportunity to understand the design and implementation of the project.

`stop-scrcpy` doesn't work if Consumer and Supplier are same

#12 Added ability to stop device screen mirroring. It stops the mirroring by closing the tunnels established for scrcpy. This doesn't work if both the Consumer and Supplier are on the same machine as no scrcpy tunnels are established if they are on the same machine. Need another way to stop the screen mirroring.

Refactor large files?

As highlighted by @fjborquez in #6 there are a lot of large files in the project currently that can be more easily manageable/readable/navigable if they were smaller. Also, unit testing would be easier. Maybe a refactor of some of these files into smaller files should be considered. This issue is created to track discussions related to above referenced refactor.

Add version checking between client and server

Currently, version checking is implemented between two nodes, i.e. if a supplier or consumer of v0.1.0 is trying to connect to a marketmaker of v0.2.0, it will result in a connection failure, and vice-versa. But if the local AdbOrc client is different from the localhost AdbOrc server, no descriptive error is returned. Commands may fail if there is an API change between client and server. eg:

# Start AdbOrc server with version say: 0.2.0
$ ./target/release/adborc init

# Use a different AdbOrc client to communicate with the server, version say: 0.1.0
# This command will not result in an error, as no API change between 0.1.0 and 0.2.0
$ adborc consumer start localhost

# This command will result in a cryptic and unfriendly error because of API change
$ adborc consumer scrcpy <device_id>

Introduce an API change such that AdbOrc client advertises its version to the server and
server checks this version before trying to execute the client command.

Include Mac and Linux binaries in releases?

Explore addition of Mac and Linux executables along with adb and scrcpy dependencies in the next release.

It is easily possible to ship the AdbOrc executable for mac and linux as it is a single executable with statically linked libraries. But the external dependencies adb and scrcpy have certain requirements (listed below) that need to be considered before bundling them in a release. Currently for windows releases, these dependencies are directly downloaded from the scrcpy releases page and bundled as-is.

  1. ADB: Platform-tools can be downloaded from the official android site, but the license requirement is that the user should accept the terms.
  2. scrcpy: It is a bit complicated to bundle scrcpy as it depends on dynamically linked libs (ffmpeg libs, sdl2, libusb). Some of the dependencies(ffmpeg) are licensed under GPL v3 which needs to be considered before bundling them.

Take the `cli` module out of library crate

Currently, cli is a public module of the adborc library. This is completely unnecessary as anyone using AdbOrc as a library will either want to develop their on cli or slap a GUI on top of it, or have some other internal or external api access it. We should take the cli module out of the library and have it only as a part of the binary.

Tests need improvement and addition

Current state of tests is pretty bad. Only limited number of unit tests exist and even they aren't very good. Not to mention, no integration tests exist at the moment. This leads to a lot of wasted time before being confident about merging changes. Tests -- both unit test and integration test, need drastic improvement.

Enable running the system listener in windows as a background service

For both linux and macos, the system listener is run as a daemon currently. This is not available for windows. This means that the adborc init window needs to be kept open for the duration the server is running. This is not ideal, and running as a background service should be considered for windows.

scrcpy failed to start from adborc

Tried to execute command adborc consumer scrcpy deviceId. However got an error:

Screen mirroring failed: Could not start scrcpy: Scrcpy server failed to start: 2023-03-03 17:12:20.255 scrcpy[28358:144649] ERROR: Command not found: [adb], [start-server]

Tried several fixes:

  1. added adb to $PATH variable. Now it accessible as a command from console
  2. tried to run just scrcpy command and Wow it works and sees my device connected remotely, however won't start the screen mirroring too. That means that my scrcpy installed can execute adb commands.

Can someone explain, what could it be please?

ENV
adborc version: v0.1.0
scrcpy version 1.25

Android Debug Bridge version 1.0.41
Version 34.0.0-9570255

consumer/marketmaker - macos m1
supplier - windows 10
device Android 7.1.1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.