Android 安全相关技巧 --正确使用ADB
来源:互联网 发布:java数组的使用 编辑:程序博客网 时间:2024/06/16 05:10
有很多事情其实都可以用adb shell来完成的,比如...
media server alloc size detect(on userdebug only):
adb shell setprop libc.debug.malloc 1restartdumpsys media.player -m
adb 查看当前Android版本的权限列表
<span style="white-space:pre"></span>adb shell pm list permissions -d -g
adb 查看当前屏幕显示的归属Activity:
<span style="white-space:pre"></span>adb dumpsys activity activities |grep -A -6 "Running activities"
adb 查看当前屏幕显示的归属组件及其次序:
<span style="white-space:pre"></span>adb shell dumpsys window w | findstr \/ | findstr name=
adb 启动某一个Fragment:
am start -n package_name/.activity_name -e android:show_fragment fragment_name
adb shell 查看手机打开的端口以及对应的进程:
<span style="white-space:pre"></span>netstat
或者
cat /proc/net/tcp//ipv4 cat /proc/net/tcp6//ipv6里面有uid,且地址端口和状态码(st)都是16进制的,而且为小端格式
<span style="white-space:pre"></span>dumpsys activity|grep uid
adb shell 查找安装路径信息:
dumpsys meminfo package_name or pid说起网络相关,有一篇关于Android转包的文章还不错
tcpdump至wireshark:
见url:http://www.freebuf.com/articles/wireless/11175.html方法四.
关于android service :
获得当前系统的service(注册在ServiceManager的)
adb shell service service list
向对应的service发送service call
adb shell service call servicename codeUsage: service [-h|-?]service listservice check SERVICEservice call SERVICE CODE [i32 N | i64 N | f N | d N | s16 STR ] ...Options:\n"i32: Write the 32-bit integer N into the send parceli64: Write the 64-bit integer N into the send parcelf: Write the 32-bit single-precision number N into the send parceld: Write the 64-bit double-precision number N into the send parcels16: Write the UTF-16 string STR into the send parcelintent: Write and Intent int the send parcel. ARGS can beaction=STR data=STR type=STR launchFlags=INT component=STR categories=STR[,STR,..]
说一个小bug,adb shell有时候与logcat不能并存:
因为使用的adb client版本不同。。。一般是因为由于adb版本不同导致的,可以使用对应AOSP编译环境中的adb 。
Android logcat过滤:
<span style="white-space:pre"></span>adb logcat|grep -i "DEBUG"
Android bugreport:
<span style="white-space:pre"></span>adb bugreport
0 0
- Android 安全相关技巧 --正确使用ADB
- Android adb logcat使用技巧
- ADB命令简单使用技巧(Android)
- Android开发之ADB命令使用技巧
- Android ListView 使用相关技巧
- android adb 相关
- android adb 相关命令
- Android adb 相关指令
- android adb技巧总结
- Android adb 常用技巧
- adb 使用相关记录
- Logcat adb 使用技巧
- adb使用技巧
- ADB命令使用技巧
- ADB命令使用技巧
- adb使用技巧
- 如何使用ADB命令查看Android手机相关信息参数
- 《Android群英传》阅读笔记——adb命令使用技巧
- Linux下/proc目录简介
- 设计模式----组合模式(C#)
- 概率质量函数(Probability Mass Function)和期望课程笔记
- 《Java 2 实用教程》读书笔记(二)
- HTML 5 的自定义 data-* 属性和jquery的data()方法的使用
- Android 安全相关技巧 --正确使用ADB
- CADisplayLink
- Element.insertAdjacentHTML(position, text)
- 小白书贪心之区间选点问题
- 使用scrapy抓取糗事百科
- Annotation(注解)的简单理解
- android 自定义进度条下载apk并更新
- 九度OJ+贪心二分+最大值最小化都是这样做的。
- 详解js中的object对象