From a4dd0344517670660324ff940910761850e2a410 Mon Sep 17 00:00:00 2001 From: Awin Huang Date: Wed, 15 Jan 2025 10:01:25 +0800 Subject: [PATCH] vault backup: 2025-01-15 10:01:25 --- 20. 專注/Android/ADB tcpip.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/20. 專注/Android/ADB tcpip.md b/20. 專注/Android/ADB tcpip.md index 404b27a..e844d72 100644 --- a/20. 專注/Android/ADB tcpip.md +++ b/20. 專注/Android/ADB tcpip.md @@ -1,10 +1,16 @@ Use `adb tcpip` to enable ADB over network. # Setup Android Device +## Connect Device via USB Connect Android device to a PC via USB, and make sure ADB recognize your device. -``` +```bash $ adb devices List of devices attached 0123456789ABCDEF device ``` +## Get IP of Device +Use below function to get IP address of device: +```bash +ifconfig eth0 | grep 'inet addr' | cut -d: -f2 | awk '{print $1}' +``` \ No newline at end of file