aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/tools/networking/gnirehtet/paths.patch
blob: e5df4b8e4fe756c820128dc9cd3f013af77815c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
Index: gnirehtet/relay-rust/src/main.rs
===================================================================
--- gnirehtet.orig/relay-rust/src/main.rs
+++ gnirehtet/relay-rust/src/main.rs
@@ -299,7 +299,7 @@ impl Command for RelayCommand {
 
 fn cmd_install(serial: Option<&String>) -> Result<(), CommandExecutionError> {
     info!(target: TAG, "Installing gnirehtet client...");
-    exec_adb(serial, vec!["install", "-r", "gnirehtet.apk"])
+    exec_adb(serial, vec!["install", "-r", "@apk@/gnirehtet.apk"])
 }
 
 fn cmd_uninstall(serial: Option<&String>) -> Result<(), CommandExecutionError> {
@@ -464,8 +464,8 @@ fn exec_adb<S: Into<String>>(
     args: Vec<S>,
 ) -> Result<(), CommandExecutionError> {
     let adb_args = create_adb_args(serial, args);
-    debug!(target: TAG, "Execute: adb {:?}", adb_args);
-    match process::Command::new("adb").args(&adb_args[..]).status() {
+    debug!(target: TAG, "Execute: @adb@ {:?}", adb_args);
+    match process::Command::new("@adb@").args(&adb_args[..]).status() {
         Ok(exit_status) => {
             if exit_status.success() {
                 Ok(())
@@ -487,8 +487,8 @@ fn must_install_client(serial: Option<&S
         serial,
         vec!["shell", "dumpsys", "package", "com.genymobile.gnirehtet"],
     );
-    debug!(target: TAG, "Execute: adb {:?}", args);
-    match process::Command::new("adb").args(&args[..]).output() {
+    debug!(target: TAG, "Execute: @adb@ {:?}", args);
+    match process::Command::new("@adb@").args(&args[..]).output() {
         Ok(output) => {
             if output.status.success() {
                 // the "regex" crate makes the binary far bigger, so just parse the versionCode
Index: gnirehtet/relay-rust/src/adb_monitor.rs
===================================================================
--- gnirehtet.orig/relay-rust/src/adb_monitor.rs
+++ gnirehtet/relay-rust/src/adb_monitor.rs
@@ -206,7 +206,7 @@ impl AdbMonitor {

     fn start_adb_daemon() -> bool {
         info!(target: TAG, "Restarting adb daemon");
-        match process::Command::new("adb")
+        match process::Command::new("@adb@")
             .args(&["start-server"])
             .status() {
             Ok(exit_status) => {