-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add framebuffer method to USB/TCP direct devices (#69)
* feat: store local_id and remote_id in ADBMessageDevice
- Loading branch information
Showing
30 changed files
with
465 additions
and
376 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,11 @@ | ||
use std::net::SocketAddr; | ||
use std::path::PathBuf; | ||
|
||
use clap::Parser; | ||
use std::net::SocketAddr; | ||
|
||
use crate::models::RebootTypeCommand; | ||
use super::DeviceCommands; | ||
|
||
#[derive(Parser, Debug)] | ||
pub struct TcpCommand { | ||
pub address: SocketAddr, | ||
#[clap(subcommand)] | ||
pub commands: TcpCommands, | ||
} | ||
|
||
#[derive(Parser, Debug)] | ||
pub enum TcpCommands { | ||
/// Spawn an interactive shell or run a list of commands on the device | ||
Shell { commands: Vec<String> }, | ||
/// Pull a file from device | ||
Pull { source: String, destination: String }, | ||
/// Push a file on device | ||
Push { filename: String, path: String }, | ||
/// Stat a file on device | ||
Stat { path: String }, | ||
/// Run an activity on device specified by the intent | ||
Run { | ||
/// The package whose activity is to be invoked | ||
#[clap(short = 'p', long = "package")] | ||
package: String, | ||
/// The activity to be invoked itself, Usually it is MainActivity | ||
#[clap(short = 'a', long = "activity")] | ||
activity: String, | ||
}, | ||
/// Reboot the device | ||
Reboot { | ||
#[clap(subcommand)] | ||
reboot_type: RebootTypeCommand, | ||
}, | ||
/// Install an APK on device | ||
Install { | ||
/// Path to APK file. Extension must be ".apk" | ||
path: PathBuf, | ||
}, | ||
pub commands: DeviceCommands, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.