Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

adb find device ip

adb shell ip route > addrs.txt
#Case 1:Nexus 7
#192.168.88.0/23 dev wlan0  proto kernel  scope link  src 192.168.89.48

#Case 2: Smartsian T1,Huawei C8813
#default via 192.168.88.1 dev eth0  metric 30
#8.8.8.8 via 192.168.88.1 dev eth0  metric 30
#114.114.114.114 via 192.168.88.1 dev eth0  metric 30
#192.168.88.0/23 dev eth0  proto kernel  scope link  src 192.168.89.152 metric 30
#192.168.88.1 dev eth0  scope link  metric 30

ip_addrs=$(awk {'if( NF >=9){print $9;}'} addrs.txt)

echo "the device ip address is $ip_addrs"
Comment

PREVIOUS NEXT
Code Example
Shell :: git command to change drive 
Shell :: reset one branch onto another 
Shell :: install solana linux 
Shell :: virtualbox mac install brew 
Shell :: font manger for arch 
Shell :: kill all screens linux 
Shell :: azure ad powershell module install 
Shell :: how to git merge with specific commit 
Shell :: how to install sdkman linux command line 
Shell :: how to terminate lite server 
Shell :: update git 
Shell :: github set branch upstream 
Shell :: install gnome software 
Shell :: command wait bash 
Shell :: center dock icons ubuntu 
Shell :: ubuntu desktop sharing not working teams 
Shell :: is not in the sudoers file 
Shell :: delete files with extension recursively 
Shell :: docker delete network 
Shell :: ufw allow port range 
Shell :: express generator 
Shell :: list 
Shell :: git push pull asks for login everytime 
Shell :: ERROR: database "backend" is being accessed by other users DETAIL: There are 3 other sessions using the database. 
Shell :: How to Install Google Chrome on Centos 8 
Shell :: windows show proxy settings 
Shell :: github actions sequential jobs 
Shell :: git untracked content 
Shell :: replace all instances 
Shell :: postgres install mac 
ADD CONTENT
Topic
Content
Source link
Name
8+1 =