mirror of
https://github.com/EFForg/rayhunter.git
synced 2026-07-16 04:48:10 -07:00
Test: Disable adb auth
This commit is contained in:
@@ -246,7 +246,7 @@ async fn get_adb() -> Result<ADBUSBDevice> {
|
||||
const MAX_FAILURES: u32 = 10;
|
||||
let mut failures = 0;
|
||||
loop {
|
||||
match ADBUSBDevice::new(VENDOR_ID, PRODUCT_ID) {
|
||||
match ADBUSBDevice::new_no_auth(VENDOR_ID, PRODUCT_ID) {
|
||||
Ok(dev) => match adb_echo_test(dev).await {
|
||||
Ok(dev) => return Ok(dev),
|
||||
Err(e) => {
|
||||
|
||||
@@ -22,7 +22,7 @@ pub async fn install() -> Result<()> {
|
||||
echo!("Unlocking modem ... ");
|
||||
start_adb().await?;
|
||||
sleep(Duration::from_secs(3)).await;
|
||||
let mut adb = ADBUSBDevice::new(USB_VENDOR_ID, USB_PRODUCT_ID).unwrap();
|
||||
let mut adb = ADBUSBDevice::new_no_auth(USB_VENDOR_ID, USB_PRODUCT_ID).unwrap();
|
||||
println!("ok");
|
||||
|
||||
adb.run_command(&["mount", "-o", "remount,rw", "/"], "exit code 0")?;
|
||||
@@ -57,7 +57,7 @@ pub async fn install() -> Result<()> {
|
||||
echo!("Unlocking modem ... ");
|
||||
start_adb().await?;
|
||||
sleep(Duration::from_secs(3)).await;
|
||||
let mut adb = ADBUSBDevice::new(USB_VENDOR_ID, USB_PRODUCT_ID).unwrap();
|
||||
let mut adb = ADBUSBDevice::new_no_auth(USB_VENDOR_ID, USB_PRODUCT_ID).unwrap();
|
||||
println!("ok");
|
||||
|
||||
echo!("Testing rayhunter ... ");
|
||||
|
||||
@@ -94,7 +94,7 @@ async fn wait_for_adb() -> Result<ADBUSBDevice> {
|
||||
|
||||
// UZ801 USB vendor and product IDs.
|
||||
// TODO: Research if other variants use different IDs.
|
||||
match ADBUSBDevice::new(0x05c6, 0x90b6) {
|
||||
match ADBUSBDevice::new_no_auth(0x05c6, 0x90b6) {
|
||||
Ok(mut device) => {
|
||||
// Test ADB connection
|
||||
if test_adb_connection(&mut device).await.is_ok() {
|
||||
|
||||
Reference in New Issue
Block a user