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. 有一种感动叫ACM(WJMZBMR在成都赛区开幕式上的讲话)

    各位选手,各位教练,大家好,我是来自清华大学交叉信息学院的陈立杰,今天很荣幸站在这里代表全体参赛选手发言.对于我来说,这是我第一次正式参加ACM的比赛.不过我跟ACM之间的缘分,大概在很早的时候就已经 ...

  2. 【记忆化搜索】codevs2823锁妖塔

    [codevs2823]锁妖塔 Description 琐妖塔会在一会儿后倒塌.大量妖魔涌出塔去,塔内的楼梯都挤满了人(哦,错了,是妖),(那他们怎么不飞下去--)要求是,景天一行一定要下塔,琐妖塔一 ...

  3. 【递归】【线段树】【堆】AtCoder Regular Contest 080 E - Young Maids

    给你一个1~n的排列p,n是偶数,每次从中任选一对相邻的数出来,插到排列q的开头,如此循环,问你所能得到的字典序最小的排列q. 我们先确定q开头的两个数q1,q2,q1一定是p的奇数位的最小的数,而q ...

  4. 广义线性模型(logistic和softmax)

    再谈广义线性模型之前,先来看一下普通线性模型: 普通线性模型的假设主要有以下几点: 1.响应变量Y和误差项ϵ正态性:响应变量Y和误差项ϵ服从正态分布,且ϵ是一个白噪声过程,因而具有零均值,同方差的特性 ...

  5. 操作系统--IO系统任务简述

    内核IO---操作系统对于IO的职责 1.对文件和设备命名空间的管理 2.文件和设备访问的控制 3.IO操作控制 4.文件系统的空间分配 5.设备分配 6.IO缓冲管理 7.IO调度方式 8.设备状态 ...

  6. 基于tiny4412的Linux内核移植 -- SD卡驱动移植(五)

    作者信息 作者: 彭东林 邮箱:pengdonglin137@163.com QQ:405728433 平台简介 开发板:tiny4412ADK + S700 + 4GB Flash 要移植的内核版本 ...

  7. ubuntu系统使用dnw下载程序

    转:http://blog.chinaunix.net/uid-22030783-id-3350840.html 获得dnw4linux.tar.bz2 源码包,可在xcembed论坛下载:http: ...

  8. mysql的存储目录

    1.MySQL的数据存储目录为data,data目录通常在C:\Documents and Settings\All Users\Application Data\MySQL\MySQL Server ...

  9. DEBUG : Eclipse Debug 时出现 Cannot connect to VM select failed错误

    Eclipse在执行Debug操作时, 出现“Eclipse Debug 时出现 "Cannot connect to VM select failed"”错误, 在网上查找该错误 ...

  10. Windows7下安装与破解IntelliJ IDEA2017(转载)

    IDEA 全称 IntelliJ IDEA,是Java语言开发的集成环境,IntelliJ在业界被公认为最好的java开发工具之一,尤其在智能代码助手.代码自动提示.重构.J2EE支持.各类版本工具( ...