Android开发调试常用命令列表

adb命令

am

am start -n com.iflytek.autofly.account/.ui.MainActivity

am start -n com.android.settings/.Settings

am start "intent:#Intent;action=android.media.action.MEDIA_PLAY_FROM_SEARCH;\

S.android.intent.extra.focus=vnd.android.cursor.item%2Fartist;\

S.android.intent.extra.artist=Adele;end"

adb shell am start -n com.iflytek.autofly.speechclient/\

com.iflytek.autofly.settings.ui.OtherSubSettingActivity

adb shell am start -n com.iflytek.autofly.applist/.AppListMainActivity

adb shell am startservice -a com.iflytek.autofly.VoiceKey -e StartFrom HomeVoiceButton

am start "intent:#Intent;action=android.intent.action.VIEW;category=android.intent.category.BROWSABLE;launchFlags=0x10200000;component=com.retton.h5/.WebActivity;S.title=%E6%97%A5%E6%9C%9F%2F%E6%97%B6%E9%97%B4;S.url=http%3A%2F%2Fwww.pingwest.com;end"

logcat

logcat | busybox grep `ps | busybox grep "com.package.name$"\

| busybox awk -F " " '{print $2}'`

logcat | busybox grep `ps | busybox grep "com.package.name$"\

| busybox awk 'NR%2==1{T=$2;next}{print T"|"$2}'

logcat | grep -E `ps |grep account| busybox awk 'NR%2==1{T=$2;next}{printf T"|"$2}'`

adb logcat -vtime -d > ~/Desktop/dump.log

其他

网络抓包命令

tcpdump -i usb0 -s0 -w /data/local/tmp/`date "+%Y%m%d%H%M%S"`.pcap

tcpdump -i usb0 -s0 -vv tcp port 80 and host hostname

monkey命令

monkey -p com.package.name --pct-syskeys 0 100000

查看包信息

dumpsys package com.test.package.name

系统命令

#打开wifi
adb shell svc wifi enable
#打开数据流量
adb shell svc data enable
#发送HOME按键事件
adb shell input keyevent HOME
#发送返回按键事件
adb shell input keyevent BACK

in gitbash:

adb push myfile //system/app/path.apk

通用

git

  #删除对文件的跟踪,会修改commit id,只在本地使用
git filter-branch --tree-filter 'rm -f testme.txt' HEAD

  忽略merge日志
  git log --no-merges

  查看从v2.6.12开始include/scsi和drivers/scsi目录中的改动的日志
  git log v2.6.12.. include/scsi drivers/scsi

  导出两周前开始的修改记录到文件gitk,“--”是为了避免和名为gitk的分支冲突
  git log --since="2 weeks ago" -- gitk

  查看test分支有但release分支没有的提交记录,并显示提交记录修改的路径信息
  git log --name-status release..test

  查看指定文件的修改记录,包含该文件被重命名等操作前的修改记录
  git log --follow builtin/rev-list.c

  本地有而远端没有的提交记录
  git log --branches --not --remotes=origin

  本地master分支有而远端master分支没有的提交记录
  git log master --not --remotes=*/master

  git log -p -m --first-parent

  Shows the history including change diffs, but only from the “main branch” perspective, skipping commits that come from merged branches, and showing full diffs of changes introduced by the merges. This makes sense only when following a strict policy of merging   all topic branches when staying on a single integration branch.

  git log -L '/int main/',/^}/:main.c

  Shows how the function main() in the file main.c evolved over time.

其他

keytool -list -v -keystore debug.keystore

keytool -printcert -file META-INF/CERT.RSA

jarsigner -verbose -keystore [keystorePath] -signedjar\

[apkOut] [apkIn] [alias] (给空白包签名)

jarsigner -verbose -verify -certs [apk]
aapt dump badging {PATH}.apk
iptables -I OUTPUT 1 -m hashlimit --hashlimit-name testup --hashlimit-above 5/s -j DROP

iptables -I INPUT 1 -m hashlimit --hashlimit-name testdown --hashlimit-above 5/s -j DROP

iptables -I INPUT 1  -m statistic --mode random  --probability 0.8 -j DROP

iptables --list

iptables -F
busybox find [PATH] -size +10000k
find /root -size -5557c -size +5555c -exec ls -ld {} \;
sudo mount -t vboxsf share /mnt
mount.cifs -o username=username /////////////////path to ci package
kill `ps | grep processname | busybox awk '{print $2}'`
												

Android开发调试常用命令列表的更多相关文章

  1. Android源码浅析(四)——我在Android开发中常用到的adb命令,Linux命令,源码编译命令

    Android源码浅析(四)--我在Android开发中常用到的adb命令,Linux命令,源码编译命令 我自己平时开发的时候积累的一些命令,希望对你有所帮助 adb是什么?: adb的全称为Andr ...

  2. 调试多线程 & 查死锁的bug & gcore命令 & gdb对多线程的调试 & gcore & pstack & 调试常用命令

    gdb thread apply all bt 如果你发现有那么几个栈停在 pthread_wait 或者类似调用上,大致就可以得出结论:就是它们几个儿女情长,耽误了整个进程. 注意gdb的版本要高于 ...

  3. Android开发工具常用快捷键大全

    Android开发中常用的开发工具有android studio和eclipse两种,下面小编整理了一些这两种开发工具中常用的快捷键,使用这些快捷键,你的android编程将事半功倍. android ...

  4. Android开发调试无法连接到夜神模拟器的解决方法

    Android开发调试无法连接到夜神模拟器的解决方法: 一般原因是adb的版本不一致造成的!!!!!换成一样的就可以了. 在网上看到的方法,特记录下来: 1.任务管理器里看下,adb.exe以及nox ...

  5. gdb调试常用命令

    gdb 调试常用命令 gcc -g mian.c -o main.out -o (定制生成的可执行文件的名称,缺省时为a.out) -g 使gdb可调试,在编译的时候,产生调试信息 gdb main. ...

  6. Android开发调试日志工具类[支持保存到SD卡]

    直接上代码: package com.example.callstatus; import java.io.File; import java.io.FileWriter; import java.i ...

  7. Android开发中常用的库总结(持续更新)

    这篇文章用来收集Android开发中常用的库,都是实际使用过的.持续更新... 1.消息提示的小红点 微信,微博消息提示的小红点. 开源库地址:https://github.com/stefanjau ...

  8. gdb的调试常用命令

    一.gdb常用的命令 list                       l    常看源代码 break                  b    设置断点     b  10(行号)    b ...

  9. MYSQL常用命令列表

    MYSQL常用命令列表 1.系统管理 mysql -h主机地址 -u用户名 -p 连接MYSQL(在mysql/bin) exit 退出MYSQL命令 mysqladmin -u用户名 -p旧密码 p ...

随机推荐

  1. STL容器 -- Stack

    核心:后进后出, LIFO. 头文件: #include <stack> 常用的构造方法: stack<int> st1; //构造一个空的存放 int 型的栈 stack&l ...

  2. JZYZOJ1527 [haoi2012]高速公路 线段树 期望

    http://172.20.6.3/Problem_Show.asp?id=1527 日常线段树的pushdown写挂,果然每次写都想得不全面,以后要注意啊……求期望部分也不熟练,和平均数搞混也是or ...

  3. CodeForces 380C Sereja and Brackets(扫描线+树状数组)

    [题目链接] http://codeforces.com/problemset/problem/380/C [题目大意] 给出一个括号序列,求区间内左右括号匹配的个数. [题解] 我们发现对于每个右括 ...

  4. 【优先队列+贪心】POJ2431-Expedition

    解题方法详见<挑战程序设计竞赛(第二版)>P74-75.注意首先要对加油站以位置为关键字快排,不要遗忘把终点视作一个加油量为0的加油站,否则最终只能到达终点前的加油站. /*优先队列*/ ...

  5. SOCKET类型定义及应用

    读代码时看到此处,摘记下来. 流套接字(SOCK_STREAM):流套接字用于提供面向连接.可靠的数据传输服务.该服务将保证数据能够实现无差错.无重复发送,并按顺序接收.流套接字之所以能够实现可靠的数 ...

  6. JDK源码学习笔记——LinkedHashMap

    HashMap有一个问题,就是迭代HashMap的顺序并不是HashMap放置的顺序,也就是无序. LinkedHashMap保证了元素迭代的顺序.该迭代顺序可以是插入顺序或者是访问顺序.通过维护一个 ...

  7. selenium+python自动化88-批量操作循环点击报错:Element not found in the cache - perhaps the page has changed since it was looked up

    前言 selenium定位一组元素,批量操作循环点击的时候会报错:Element not found in the cache - perhaps the page has changed since ...

  8. 统计中的t检验

    1.什么情况下,应用t检验 1. 已知总体的均值m,或者我们假设了一个总体均值m: 2. 我们知道样本的个数n,样本的的方差var,样本的均值m: 3. 我们假设总体,或者样本都是服从正太分布的. 2 ...

  9. [Todo]各种语言包管理工具

    看到一篇文章不错: http://harttle.com/2015/05/29/pkg-manager.html 包管理和构建系统是现代的软件开发团队中必不可少的工具,也是Linux软件系统的常见组织 ...

  10. transparent shadow caster unity

    https://forum.unity.com/threads/semitransparent-shadows.276490/ semitransparent shadows dither 类似alp ...