Remove ip_addr_reporter

It's no longer needed as IP is resolved using mDNS

Bug: 373533555
Test: start terminal
Change-Id: I3bf1eac0d209c61c1a7a370138742b5b72c11e3e
diff --git a/build/debian/build.sh b/build/debian/build.sh
index 9bb1481..3db6a40 100755
--- a/build/debian/build.sh
+++ b/build/debian/build.sh
@@ -222,7 +222,6 @@
 	build_ttyd
 	build_rust_binary_and_copy forwarder_guest
 	build_rust_binary_and_copy forwarder_guest_launcher
-	build_rust_binary_and_copy ip_addr_reporter
 	build_rust_binary_and_copy shutdown_runner
 }
 
diff --git a/build/debian/fai_config/files/etc/systemd/system/ip_addr_reporter.service/AVF b/build/debian/fai_config/files/etc/systemd/system/ip_addr_reporter.service/AVF
deleted file mode 100644
index b9f3193..0000000
--- a/build/debian/fai_config/files/etc/systemd/system/ip_addr_reporter.service/AVF
+++ /dev/null
@@ -1,14 +0,0 @@
-[Unit]
-Description=ip report service
-After=syslog.target
-After=network.target
-Requires=ttyd.service
-After=virtiofs_internal.service
-[Service]
-ExecStart=/usr/bin/bash -c '/usr/local/bin/ip_addr_reporter --grpc_port $(cat /mnt/internal/debian_service_port)'
-Type=simple
-Restart=on-failure
-User=root
-Group=root
-[Install]
-WantedBy=multi-user.target
diff --git a/build/debian/fai_config/scripts/AVF/10-systemd b/build/debian/fai_config/scripts/AVF/10-systemd
index 119bec7..998cbfd 100755
--- a/build/debian/fai_config/scripts/AVF/10-systemd
+++ b/build/debian/fai_config/scripts/AVF/10-systemd
@@ -2,11 +2,9 @@
 
 chmod +x $target/usr/local/bin/forwarder_guest
 chmod +x $target/usr/local/bin/forwarder_guest_launcher
-chmod +x $target/usr/local/bin/ip_addr_reporter
 chmod +x $target/usr/local/bin/shutdown_runner
 chmod +x $target/usr/local/bin/ttyd
 ln -s /etc/systemd/system/ttyd.service $target/etc/systemd/system/multi-user.target.wants/ttyd.service
-ln -s /etc/systemd/system/ip_addr_reporter.service $target/etc/systemd/system/multi-user.target.wants/ip_addr_reporter.service
 ln -s /etc/systemd/system/virtiofs.service $target/etc/systemd/system/multi-user.target.wants/virtiofs.service
 ln -s /etc/systemd/system/forwarder_guest_launcher.service $target/etc/systemd/system/multi-user.target.wants/forwarder_guest_launcher.service
 ln -s /etc/systemd/system/virtiofs_internal.service $target/etc/systemd/system/multi-user.target.wants/virtiofs_internal.service
diff --git a/guest/ip_addr_reporter/.gitignore b/guest/ip_addr_reporter/.gitignore
deleted file mode 100644
index ea8c4bf..0000000
--- a/guest/ip_addr_reporter/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/target
diff --git a/guest/ip_addr_reporter/Cargo.toml b/guest/ip_addr_reporter/Cargo.toml
deleted file mode 100644
index 7592e3f..0000000
--- a/guest/ip_addr_reporter/Cargo.toml
+++ /dev/null
@@ -1,15 +0,0 @@
-[package]
-name = "ip_addr_reporter"
-version = "0.1.0"
-edition = "2021"
-license = "Apache-2.0"
-
-[dependencies]
-clap = { version = "4.5.20", features = ["derive"] }
-netdev = "0.31.0"
-prost = "0.13.3"
-tokio = { version = "1.40.0", features = ["rt-multi-thread"] }
-tonic = "0.12.3"
-
-[build-dependencies]
-tonic-build = "0.12.3"
diff --git a/guest/ip_addr_reporter/build.rs b/guest/ip_addr_reporter/build.rs
deleted file mode 100644
index e3939d4..0000000
--- a/guest/ip_addr_reporter/build.rs
+++ /dev/null
@@ -1,7 +0,0 @@
-fn main() -> Result<(), Box<dyn std::error::Error>> {
-    let proto_file = "../../libs/debian_service/proto/DebianService.proto";
-
-    tonic_build::compile_protos(proto_file).unwrap();
-
-    Ok(())
-}
diff --git a/guest/ip_addr_reporter/src/main.rs b/guest/ip_addr_reporter/src/main.rs
deleted file mode 100644
index 62a7aef..0000000
--- a/guest/ip_addr_reporter/src/main.rs
+++ /dev/null
@@ -1,36 +0,0 @@
-use api::debian_service_client::DebianServiceClient;
-use api::IpAddr;
-
-use clap::Parser;
-pub mod api {
-    tonic::include_proto!("com.android.virtualization.terminal.proto");
-}
-
-#[derive(Parser)]
-/// Flags for running command
-pub struct Args {
-    /// grpc port number
-    #[arg(long)]
-    #[arg(alias = "grpc_port")]
-    grpc_port: String,
-}
-
-#[tokio::main]
-async fn main() -> Result<(), String> {
-    let args = Args::parse();
-    let gateway_ip_addr = netdev::get_default_gateway()?.ipv4[0];
-    let ip_addr = netdev::get_default_interface()?.ipv4[0].addr();
-
-    let server_addr = format!("http://{}:{}", gateway_ip_addr.to_string(), args.grpc_port);
-
-    println!("local ip addr: {}", ip_addr.to_string());
-    println!("coonect to grpc server {}", server_addr);
-
-    let mut client = DebianServiceClient::connect(server_addr).await.map_err(|e| e.to_string())?;
-
-    let request = tonic::Request::new(IpAddr { addr: ip_addr.to_string() });
-
-    let response = client.report_vm_ip_addr(request).await.map_err(|e| e.to_string())?;
-    println!("response from server: {:?}", response);
-    Ok(())
-}