- 浏览: 1055057 次
- 性别:
- 来自: 南昌
文章分类
- 全部博客 (276)
- 生活 (1)
- 代码之美 (22)
- Media (7)
- Android Widget (3)
- Android Intent (1)
- Android Activity (4)
- UI event handle--UI事件处理机制 (2)
- Java基础知识 (12)
- android Databases (5)
- Android 系统知识 (70)
- 平常遇到的问题与解决方法 (38)
- Android TextView/EditView (2)
- Thinking Java (1)
- android webkit (6)
- JSON (1)
- XML (4)
- HTTP (1)
- Google Weather API (1)
- android 2.3 NFC (10)
- android app (20)
- android framework (7)
- C++ (2)
- android System (5)
- Pthread (1)
- Wifi (8)
- Unix/Linux C (8)
- Android 4.0 (1)
- Mail (1)
- Smack 源码学习 (4)
- iOS (4)
- Android (1)
- git (1)
- Gallery3d (2)
- React-Natice (1)
最新评论
-
dd18349182956:
你是用的smack哪个版本?我用的smack4.1.3和sma ...
关于socket长连接的心跳包 -
xukaiyin:
全英文
getApplicationContext()与this,getBaseContext() -
裂风矢:
...
<category android:name="android.intent.category.DEFAULT" /> 惹的祸 -
xanthodont:
mark一下
XMPP——Smack -
Evilover3:
mark一下,学习了
XMPP——Smack
最近在Android device上做一个有关于UDP的应用,需要检查发送了多少个UDP packet.关于网络封包的抓取的工具在PC上有wireshark等工具,那如何抓取Android device上发送或者接收的封包呢?有没有类似wireshark这样的工具呢?通过搜索,还是找到了这样的工具:
来自于:http://jiayanjujyj.iteye.com/blog/1405868
工具:
tcpdump 抓取网络数据包,下载地址 http://www.strazzere.com/android/tcpdump
源码和文档 http://www.tcpdump.org/
wireshark 无须多说了,PC上大名鼎鼎的网络数据抓取分析工具,这里主要是用来打开和分析tcpdump抓取的网路数据包。
使用:
1.下载tcpdump到电脑上
Java代码
adb root
adb remount
adb push tcpdump /system/bin/tcpdump
adb shell chmod 6755 /system/bin/tcpdump
2. 运行tcpdump,这个需要root权限,不过上面的命令已经获取root了
Java代码
adb shell tcpdump -i any -p -s 0 -w /sdcard/capture.pcap
# "-i any": listen on any network interface
# "-p": disable promiscuous mode (doesn't work anyway)
# "-s 0": capture the entire packet
# "-w": write packets to a file (rather than printing to stdout)
... do whatever you want to capture, then ^C to stop it ...
adb pull /sdcard/capture.pcap .
sudo apt-get install wireshark # or ethereal, if you're still on dapper
wireshark capture.pcap # or ethereal
... look at your packets and be wise ...
You can run tcpdump in the background from an interactive shell or from Terminal. By default, tcpdump captures all traffic without filtering. If you prefer, add an expression like port 80 to the tcpdump command line.
Real time packet monitoring
Execute the following if you would like to watch packets go by rather than capturing them to a file (-n skips DNS lookups. -s 0 captures the entire packet rather than just the header):
adb shell tcpdump -n -s 0
Typical tcpdump options apply. For example, if you want to see HTTP traffic:
adb shell tcpdump -X -n -s 0 port 80
怎么使用wireshark进行分析就不再赘述了。
来自于:http://jiayanjujyj.iteye.com/blog/1405868
工具:
tcpdump 抓取网络数据包,下载地址 http://www.strazzere.com/android/tcpdump
源码和文档 http://www.tcpdump.org/
wireshark 无须多说了,PC上大名鼎鼎的网络数据抓取分析工具,这里主要是用来打开和分析tcpdump抓取的网路数据包。
使用:
1.下载tcpdump到电脑上
Java代码
adb root
adb remount
adb push tcpdump /system/bin/tcpdump
adb shell chmod 6755 /system/bin/tcpdump
2. 运行tcpdump,这个需要root权限,不过上面的命令已经获取root了
Java代码
adb shell tcpdump -i any -p -s 0 -w /sdcard/capture.pcap
# "-i any": listen on any network interface
# "-p": disable promiscuous mode (doesn't work anyway)
# "-s 0": capture the entire packet
# "-w": write packets to a file (rather than printing to stdout)
... do whatever you want to capture, then ^C to stop it ...
adb pull /sdcard/capture.pcap .
sudo apt-get install wireshark # or ethereal, if you're still on dapper
wireshark capture.pcap # or ethereal
... look at your packets and be wise ...
You can run tcpdump in the background from an interactive shell or from Terminal. By default, tcpdump captures all traffic without filtering. If you prefer, add an expression like port 80 to the tcpdump command line.
Real time packet monitoring
Execute the following if you would like to watch packets go by rather than capturing them to a file (-n skips DNS lookups. -s 0 captures the entire packet rather than just the header):
adb shell tcpdump -n -s 0
Typical tcpdump options apply. For example, if you want to see HTTP traffic:
adb shell tcpdump -X -n -s 0 port 80
怎么使用wireshark进行分析就不再赘述了。
发表评论
-
Android Webview加载www.youtube.com的问题
2019-04-25 10:36 951Android Webview加载www.youtube.co ... -
EditText键盘删除字符的原理
2018-10-29 19:21 1192转https://blog.csdn.net/tankai19 ... -
Background execution not allowed
2018-10-22 19:02 326211-05 10:08:18.058 673 736 ... -
failed to set system property
2018-10-17 09:21 4152在App的mk文件设置了LOCAL_CERTIFICATE : ... -
CtsDeqpTestCases fail
2018-07-27 09:44 2903Suite / Plan:VTS / cts-on-gsi ... -
在DocumentUI中的Recent(最近)列表无法显示图片的缩略图
2018-06-12 18:23 899今天客户提了一个bug说在短信添加附件,界面无法显示缩略图。接 ... -
在任务栏中清除掉播放器的进程,状态栏仍有音乐播放器状态,且音乐仍在后台播放
2018-06-05 11:28 1543在任务栏中清除掉播放器的进程,状态栏仍有音乐播放器状态,且音乐 ... -
junit.framework.AssertionFailedError: Failed to get achievable frame rates for O
2018-05-25 15:41 2243之前对于CTS测试的失败case接触不多,组长突然转了这样一个 ... -
Android 模拟各种事件的方法
2018-05-17 16:30 1484有时候没有对应的硬件设备,那我们就得通过某种方式来模拟。比如模 ... -
Android Email 新建邮件时一直显示“waiting for sync”
2018-02-28 15:48 959当用户在Setting中清除了Email的data,再返回到E ... -
javax.net.ssl.SSLHandshakeException: Unacceptable certificate: CN=GeoTrust SSL C
2018-01-30 16:48 3627最近从Android N升级到Android O,发现163的 ... -
Email中附件名称中包含中文字符显示乱码
2017-11-28 17:09 1569Email中附件名称中包含中文字符显示乱码是因为附件虽包含了中 ... -
不能再通过createPackageContext来访问另外一个应用的资源(Sharepreference)
2017-11-14 17:22 1432以前我们可以通过createPackageContext来访问 ... -
当Email未设置账户时,通过ACTION_SENDTO启动会报ActivityNotFoundException
2017-09-27 18:15 498当Email未设置账户时,通过ACTION_SENDTO启动会 ... -
java.lang.SecurityException: Permission Denial: reading...requires android.permi
2016-05-12 11:12 2290一直在忙于Gallery,最近遇到了这样的bug,在Setti ... -
android.database.sqlite.SQLiteReadOnlyDatabaseException: attempt to write a read
2015-11-27 14:50 2907android.database.sqlite.SQLiteR ... -
AsyncTask
2015-08-21 17:43 381转自http://blog.csdn.net/hitlion2 ... -
解决IllegalStateException: Can not perform this action after onSaveInstanceState
2015-08-07 18:07 1044转自http://www.cnblogs.com/zgz345 ... -
Android setTag方法的key问题
2015-08-03 19:22 1025转自http://www.cnblogs.com/whitew ... -
ActivityGroup对子Activity的管理
2013-06-27 17:41 2068转自http://eyeandroid.diandian.co ...
相关推荐
android手机抓取数据包工具 抓取tcpdump
资源分为:1,Android下运行的tcpdump可执行文件;2,Android下tcpdump抓包步骤说明。 实现:Android下用tcpdump抓取手机网络数据包,进而分析出手机app流量消耗原因,优化app流量消耗。
用tcpdump如何抓取Android平台网络数据包
利用该附件的工具可以实现抓取android手机的网络数据包
7.注意在抓包过程中不要切换网络,否则会导致切换后的网络访问无法被抓取 ADB命令示例: adb root adb remount adb pull /sdcard/tcpdump c:\\ adb push c:\\tcpdump /system/xbin/ adb shell chmod 6755 /system/...
Android平台抓包工具。抓取应用联网数据包。
7.注意在抓包过程中不要切换网络,否则会导致切换后的网络访问无法被抓取 ADB命令示例: adb root adb remount adb pull /sdcard/tcpdump c:\\ adb push c:\\tcpdump /system/xbin/ adb shell chmod 6755 /system/...
用于在android客户端上抓取数据包,对实时数据进行分析。
强大且开源的网络抓包工具,网管必备利器.配合tcpdump使用,可以抓取android手机系统与网络通信的数据包,盗链,追踪服务器,解析应用的神器
android上的抓包工具,主要是利用tcpdump这个工具,辅助apk来抓包到sd卡,可以抓wifi和3G卡上网的数据包,协议分析的利器。压缩包里面有使用说明,当然,不安装apk,直接利用tcpdump工具也行,具体参考tcpdump的使用...
第4章 TCPIP通信案例:访问Internet上的Web服务器 4.1 实例总图 4.2 部署代理服务器 4.2.1 HTTP代理服务器的工作原理 4.2.2 部署squid代理服务器 4.3 使用tcpdump抓取传输数据包 4.4 访问DNS服务器 4.5 本地...