ADB over TCP/IP (Ethernet port)
To debug an Android app on ODROID-XU4, you need to use the adb(Android Debug Bridge) via network because there is no USB OTG.
To debug a software via the adb, you should connect the board with an Ethernet or WiFi to network.
After connecting the board, please follow the below steps.
Device console
Get device's IP.
eth0 → adb over Ethernet.
wlan0 → adb over Wi-Fi.
- target
shell@odroidxu3:/ $ su root@odroidxu3:/ # netcfg lo UP 127.0.0.1/8 0x00000049 00:00:000 eth0 UP 192.168.30.45/24 0x00001043 fa:e2:864 sit0 DOWN 0.0.0.0/0 0x00000080 00:00:000 ip6tnl0 DOWN 0.0.0.0/0 0x00000080 00:00:000 root@odroidxu3:/ #
Host console
Check TCP connection
- host
[~]$ ping 192.168.30.45 PING 192.168.30.45 (192.168.30.45) 56(84) bytes of data. 64 bytes from 192.168.30.45: icmp_seq=1 ttl=64 time=1.56 ms 64 bytes from 192.168.30.45: icmp_seq=2 ttl=64 time=0.756 ms 64 bytes from 192.168.30.45: icmp_seq=3 ttl=64 time=0.718 ms 64 bytes from 192.168.30.45: icmp_seq=4 ttl=64 time=0.850 ms ^C --- 192.168.30.45 ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3001ms rtt min/avg/max/mdev = 0.718/0.971/1.561/0.344 ms
ADB connection
- host
[~]$ adb connect 192.168.30.45 connected to 192.168.30.45:5555
- host
[~]$ adb -s 192.168.30.45:5555 logcat --------- beginning of /dev/log/main I/installd( 2785): installd firing up I/DEBUG ( 2780): debuggerd: Jul 2 2015 14:27:22 I/Netd ( 2779): Netd 1.0 starting W/InterfaceController( 2779): Warning (dlopen failed: library "/system/lib/libnetcmdiface.so" not found) while opening the net interface command library --------- beginning of /dev/log/system I/Vold ( 2774): Vold 2.1 (the revenge) firing up E/Vold ( 2774): boot_mode = 0 E/Vold ( 2774): eMMC boot_mode D/Vold ( 2774): Volume sdcard0 state changing -1 (Initializing) -> 0 (No-Media) D/Vold ( 2774): Volume sdcard1 state changing -1 (Initializing) -> 0 (No-Media) D/Vold ( 2774): Volume usb2host state changing -1 (Initializing) -> 0 (No-Media) D/Vold ( 2774): Volume usb3host state changing -1 (Initializing) -> 0 (No-Media) D/Vold ( 2774): Volume usb3device state changing -1 (Initializing) -> 0 (No-Media) D/Vold ( 2774): Volume sdcard0 state changing 0 (No-Media) -> 1 (Idle-Unmounted) W/Vold ( 2774): Duplicate state (1) W/Vold ( 2774): Duplicate state (1)