Android 有些机型不带tcpdump的解决办法
输入mount命令
引用mount
rootfs on / type rootfs (ro,relatime)
tmpfs on /dev type tmpfs (rw,relatime,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
tmpfs on /sqlite_stmt_journals type tmpfs (rw,relatime,size=4096k)
none on /dev/cpuctl type cgroup (rw,relatime,cpu)
/dev/block/mtdblock3 on /system type yaffs2 (ro,relatime)
/dev/block/mtdblock5 on /data type yaffs2 (rw,nosuid,nodev,relatime)
/dev/block/mtdblock4 on /cache type yaffs2 (rw,nosuid,nodev,relatime)
/dev/block//vold/179:1 on /sdcard type vfat (rw,dirsync,nosuid,nodev,noexec,rela
time,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,ioc
harset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
可以看到
引用/dev/block/mtdblock3 on /system type yaffs2 (ro,relatime)
重新挂载 输入命令
引用mount -o remount /dev/block/mtdblock3 /system
再次输入mount
可以看到
引用# mount
mount
rootfs on / type rootfs (ro,relatime)
tmpfs on /dev type tmpfs (rw,relatime,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
tmpfs on /sqlite_stmt_journals type tmpfs (rw,relatime,size=4096k)
none on /dev/cpuctl type cgroup (rw,relatime,cpu)
/dev/block/mtdblock3 on /system type yaffs2 (rw,relatime)
/dev/block/mtdblock5 on /data type yaffs2 (rw,nosuid,nodev,relatime)
/dev/block/mtdblock4 on /cache type yaffs2 (rw,nosuid,nodev,relatime)
/dev/block//vold/179:1 on /sdcard type vfat (rw,dirsync,nosuid,nodev,noexec,rela
time,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,ioc
harset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
可以看到/system已经可以任意删除修改
然后把tcpdump文件导入到/system/xbin/目录下
引用adb push d:/tcpdump /system/xbin/
然后运行命令
引用# cd system
cd system
# cd xbin
cd xbin
# ls
ls
tcpdump
# ./tcpdump
./tcpdump
./tcpdump: permission denied
# chmod +x tcpdump
chmod +x tcpdump
# ./tcpdump
./tcpdump
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on rmnet0, link-type EN10MB (Ethernet), capture size 96 bytes
增加权限之后 tcpdump就可以使用了