由于自己购买的x4412 Android开发板存在一个问题,是无法同时链接USB线,和插入无线网卡.只能使用其中一个功能
需要复现一个DRM在线下载的功能,同时需要抓起一些日志信息,此处就想到了使用 adb 的远程调试功能来解决这个问题.
手机和PC处于同一个局域网中,手机中下载 终端模拟机 ,手机需要Root.
setprop service.adb.tcp.port 5566 //指定一个端口号 stop adbd start adbd //重启一下 adbd服务 netcfg //查看手机ip地址,或者可以在wifi管理界面点击查看
PC端
adb connect 192.168.1.103:5566 //连接到手机
[email protected]:~$ adb devices List of devices attached [email protected]:~$ adb connect 192.168.1.103:5566 connected to 192.168.1.103:5566 [email protected]:~$ adb devices List of devices attached 192.168.1.103:5566 device
这个时候就可以调试手机了.
[email protected]:~$ adb shell [email protected]:/ # ll drwxr-xr-x root root 2015-06-28 13:07 acct drwxrwx--- system cache 2014-12-15 07:46 cache dr-x------ root root 2015-06-28 13:07 config lrwxrwxrwx root root 2015-06-28 13:07 d -> /sys/kernel/debug drwxrwx--x system system 2015-01-01 11:20 data -rw-r--r-- root root 149 1970-01-01 00:00 default.prop drwxr-xr-x root root 2015-06-28 13:32 dev lrwxrwxrwx root root 2015-06-28 13:07 etc -> /system/etc lrwxrwxrwx root root 2015-06-28 13:07 extsd -> /storage/sdcard1 -rw-r--r-- root root 8870 1970-01-01 00:00 file_contexts -rw-r----- root root 951 1970-01-01 00:00 fstab.x4412 -rwxr-x--- root root 179484 1970-01-01 00:00 init -rwxr-x--- root root 919 1970-01-01 00:00 init.environ.rc -rwxr-x--- root root 19674 1970-01-01 00:00 init.rc -rwxr-x--- root root 1795 1970-01-01 00:00 init.trace.rc -rwxr-x--- root root 3915 1970-01-01 00:00 init.usb.rc -rwxr-x--- root root 3379 1970-01-01 00:00 init.x4412.rc -rwxr-x--- root root 3604 1970-01-01 00:00 init.x4412.usb.rc drwxrwxr-x root system 2015-06-28 13:07 mnt dr-xr-xr-x root root 1970-01-01 00:00 proc -rw-r--r-- root root 2161 1970-01-01 00:00 property_contexts drwx------ root root 2014-11-04 02:58 root drwxr-x--- root root 1970-01-01 00:00 sbin lrwxrwxrwx root root 2015-06-28 13:07 sdcard -> /storage/sdcard0 -rw-r--r-- root root 656 1970-01-01 00:00 seapp_contexts -rw-r--r-- root root 74816 1970-01-01 00:00 sepolicy drwxr-x--x root sdcard_r 2015-06-28 13:07 storage drwxr-xr-x root root 2015-06-28 13:07 sys drwxr-xr-x root root 1970-01-01 00:00 system -rw-r--r-- root root 4024 1970-01-01 00:00 ueventd.rc -rw-r--r-- root root 2580 1970-01-01 00:00 ueventd.x4412.rc lrwxrwxrwx root root 2015-06-28 13:07 usbdisk -> /storage/usbdisk lrwxrwxrwx root root 2015-06-28 13:07 vendor -> /system/vendor [email protected]:/ #
时间: 2024-10-26 06:40:18