vault backup: 2025-01-15 10:26:41
This commit is contained in:
@@ -9,8 +9,40 @@ List of devices attached
|
|||||||
0123456789ABCDEF device
|
0123456789ABCDEF device
|
||||||
```
|
```
|
||||||
|
|
||||||
## Get IP of Device
|
## Enable network of ADB
|
||||||
Use below function to get IP address of device:
|
Use below command to enable network of ADB:
|
||||||
```bash
|
```bash
|
||||||
ifconfig eth0 | grep 'inet addr' | cut -d: -f2 | awk '{print $1}'
|
adb tcpip 5555
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Get IP of Device
|
||||||
|
We have to get IP of Device, because another PC need this for connection.
|
||||||
|
|
||||||
|
If you connect your device to router with ethernet, pass `eth0` to below command to get IP address of device.
|
||||||
|
```bash
|
||||||
|
adb shell "ifconfig eth0 | grep 'inet addr' | cut -d: -f2 | awk '{print \$1}'"
|
||||||
|
```
|
||||||
|
|
||||||
|
If you connect your device to router with WIFI, change `eth0` to `wlan0`, like:
|
||||||
|
```bash
|
||||||
|
adb shell "ifconfig wlan0 | grep 'inet addr' | cut -d: -f2 | awk '{print \$1}'"
|
||||||
|
```
|
||||||
|
|
||||||
|
Above command will return IP address of eth0, like:
|
||||||
|
![[20250115_100240_WindowsTerminal_1305x87.png]]
|
||||||
|
|
||||||
|
**Remember your IP address.**
|
||||||
|
|
||||||
|
# Setup PC
|
||||||
|
Now we have to setup our PC that in the same network with our Android device. Please note this PC **doesn't connect to your Android device via USB**.
|
||||||
|
So we have to enable connection between PC and your Android devicem, and we need IP address of Android device, you had this at step [[ADB tcpip#Get IP of Device|Get IP of Device]].
|
||||||
|
|
||||||
|
Pass your IP of Android device to below command to enable connection of ADB:
|
||||||
|
```
|
||||||
|
adb connect 192.168.1.108:5555
|
||||||
|
```
|
||||||
|
|
||||||
|
Remember to change `192.168.1.108` to your really IP address.
|
||||||
|
|
||||||
|
Now we can use `adb devices` to check if we can recognize Android device by IP adress:
|
||||||
|
![[20250115_101133_WindowsTerminal_496x107.png|400]]
|
||||||
|
|||||||
BIN
attachments/20250115_100240_WindowsTerminal_1305x87.png
Normal file
BIN
attachments/20250115_100240_WindowsTerminal_1305x87.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.1 KiB |
BIN
attachments/20250115_101133_WindowsTerminal_496x107.png
Normal file
BIN
attachments/20250115_101133_WindowsTerminal_496x107.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.3 KiB |
Reference in New Issue
Block a user