{"id":21957579,"url":"https://github.com/sephiroth74/radb_client","last_synced_at":"2025-07-16T21:33:52.253Z","repository":{"id":186365757,"uuid":"657660705","full_name":"sephiroth74/radb_client","owner":"sephiroth74","description":"adb client written in rust","archived":false,"fork":false,"pushed_at":"2025-07-09T09:04:54.000Z","size":6123,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-07-09T09:18:19.427Z","etag":null,"topics":["adb","android","cli","library","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sephiroth74.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-06-23T14:46:44.000Z","updated_at":"2025-07-09T09:02:32.000Z","dependencies_parsed_at":"2024-04-21T22:00:51.369Z","dependency_job_id":"5de15259-4a06-4cf3-a301-6d107ab7a833","html_url":"https://github.com/sephiroth74/radb_client","commit_stats":null,"previous_names":["sephiroth74/radb_client"],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/sephiroth74/radb_client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sephiroth74%2Fradb_client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sephiroth74%2Fradb_client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sephiroth74%2Fradb_client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sephiroth74%2Fradb_client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sephiroth74","download_url":"https://codeload.github.com/sephiroth74/radb_client/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sephiroth74%2Fradb_client/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265542221,"owners_count":23785184,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adb","android","cli","library","rust"],"created_at":"2024-11-29T08:54:40.586Z","updated_at":"2025-07-16T21:33:52.227Z","avatar_url":"https://github.com/sephiroth74.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# radb_client\n\nSimple Android **adb** client for rust.\n\n[![crates.io](https://img.shields.io/crates/v/radb_client.svg)](https://crates.io/crates/radb_client/)\n\n\n# Example\n\n```rust\n\nuse radb_client::{*};\n\npub fn main() {\n    let adb = Adb::new().unwrap();\n    let device_ip = String::from(\"192.168.1.128\");\n    let conn = ConnectionType::try_from_ip(device_ip).unwrap();\n    let client = Client::try_from(conn).unwrap();\n\n    match client.connect() {\n        Ok(()) =\u003e println!(\"Device connected\"),\n        Err(err) =\u003e println!(\"Error connecting to device: {:?}\", err),\n    }\n}\n\n```\n\nUsing the feature `scanner` is also possible to scan for all the available devices:\n\n```rust\nuse std::str::FromStr;\nuse std::time::{Duration, Instant};\n\nuse cidr_utils::cidr::Ipv4Cidr;\nuse cidr_utils::Ipv4CidrSize;\nuse crossbeam_channel::unbounded;\nuse indicatif::{MultiProgress, ProgressBar, ProgressStyle};\nuse itertools::Either;\n\nuse crate::scanner::Scanner;\nuse crate::test::test::init_log;\nuse crate::types::Adb;\n\nfn test_scan() {\n    let cidr = Ipv4Cidr::from_str(\"192.168.1.0/24\").unwrap();\n    let progress_style = ProgressStyle::with_template(\n        \"{prefix:.cyan.bold/blue.bold}: {elapsed_precise} [{bar:40.cyan/blue}] {percent:.bold}%. {msg} \",\n    )\n        .unwrap()\n        .progress_chars(\"=\u003e \");\n\n    let multi_progress = MultiProgress::new();\n    let progress = multi_progress.add(ProgressBar::new(cidr.size()));\n    progress.set_style(progress_style.clone());\n    progress.set_prefix(\"Scanning\");\n\n    let (tx, rx) = unbounded();\n    let adb = Adb::new().expect(\"failed to find adb\");\n\n    let scanner = Scanner::default()\n        .with_debug(false)\n        .with_tcp_timeout(Duration::from_millis(200))\n        .with_adb_timeout(Duration::from_millis(100));\n\n    let start = Instant::now();\n    scanner.scan(\u0026adb, cidr.iter(), tx.clone());\n\n    drop(tx);\n\n    let mut result = Vec::new();\n    for either in rx {\n        match either {\n            Either::Left(addr) =\u003e {\n                progress.inc(1);\n                progress.set_message(format!(\"{addr}...\"));\n            }\n            Either::Right(client) =\u003e {\n                if !result.contains(\u0026client) {\n                    result.push(client);\n                }\n            }\n        }\n    }\n    \n    progress.finish_with_message(format!(\"Scanned {} IPs\", cidr.size()));\n\n    let elapsed = start.elapsed();\n\n    println!(\"Time elapsed for scanning is: {:?}ms\", elapsed.as_millis());\n    println!(\"Found {:} devices\", result.len());\n\n    result.sort_by_key(|k| k.conn);\n\n    for device in result.iter() {\n        println!(\"{device}\");\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsephiroth74%2Fradb_client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsephiroth74%2Fradb_client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsephiroth74%2Fradb_client/lists"}