问题描述
- tcpdump抓取移动终端的数据包
- C:UsersTJW>adb devices
List of devices attached
5066adc2 deviceC:UsersTJW>adb shell
shell@cancro:/ $ su
root@cancro:/ # adb push e:/tcpdump /data/local
error: device not found
1|root@cancro:/ # chmod 777 /data/local
root@cancro:/ #
130|root@cancro:/ #
130|root@cancro:/ # exit
shell@cancro:/ $ exitC:UsersTJW>adb push e:/tcpdump /data/local
failed to copy 'e:/tcpdump' to '/data/local/tcpdump': Is a directory
4715 KB/s (1801155 bytes in 0.373s)C:UsersTJW>adb push e:/tcpdump /data/local/tcpdump
4197 KB/s (1801155 bytes in 0.419s)C:UsersTJW>adb shell
shell@cancro:/ $ su
root@cancro:/ # chmod 6755 /data/local/tcpdump
root@cancro:/ # /data/local/tcpdump -p -s 0 -w /sdcard/001.pcap
k_shell/2000:10411: /data/local/tcpdump: can't execute: Is a directory
126|root@cancro:/ # /data/local/tcpdump/tcpdump -p -s 0 -w /sdcard/001.pcap
k_shell/2000:10411: /data/local/tcpdump/tcpdump: can't execute: Permission denie
d
126|root@cancro:/ # chmod 6755 /data/local/tcpdump/tcpdump
root@cancro:/ # /data/local/tcpdump/tcpdump -p -s 0 -w /sdcard/001.pcap
tcpdump: no suitable device found
请问为什么找得到设备,权限也有为什么抓不到数据包,还有一些细节可以继续讨论。
解决方案
C:UsersTJW>adb devices
List of devices attached
5066adc2 device
C:UsersTJW>adb version
Android Debug Bridge version 1.0.32
Revision 09a0d98bebce-android
C:UsersTJW>adb push e:/tcpdump /data/local/tcpdump
3388 KB/s (1801155 bytes in 0.519s)
C:UsersTJW>adb shell
shell@cancro:/ $ su
root@cancro:/ # /data/local/tcpdump -p -s 0 -w /storage/001.pcap
k_shell/2000:12907: /data/local/tcpdump: can't execute: Is a directory
请问这个路径为什么出错