nixpkgs-suyu/pkgs/tools/networking/gnirehtet/paths.patch

49 lines
2.2 KiB
Diff
Raw Normal View History

2018-09-16 13:08:42 +02:00
Index: gnirehtet/relay-rust/src/main.rs
===================================================================
--- gnirehtet.orig/relay-rust/src/main.rs
+++ gnirehtet/relay-rust/src/main.rs
2018-06-22 14:57:37 +02:00
@@ -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> {
2018-09-16 13:08:42 +02:00
@@ -464,8 +464,8 @@ fn exec_adb<S: Into<String>>(
2018-06-22 14:57:37 +02:00
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(())
2018-09-16 13:08:42 +02:00
@@ -487,8 +487,8 @@ fn must_install_client(serial: Option<&S
2018-06-22 14:57:37 +02:00
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
2018-09-16 13:08:42 +02:00
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) => {