depot/third_party/nixpkgs/pkgs/tools/networking/gnirehtet/paths.patch

49 lines
2.2 KiB
Diff
Raw Normal View History

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) => {