Android adb命令

1、查看APP占用内存情况
adb shell dumpsys meminfo <package name>
2、Android机器重启
adb reboot
3、启动activity
adb shell am start -n 包名/包名+类名
4、查看log信息
adb logcat -s 标签名
5、返回到home菜单
adb shell input keyevent 3   
6、返回键
adb shell input keyevent 4   
7、卸载应用程序
adb uninstall <包名>
8、安装应用程序
adb install <应用程序>
9、logcat日志查看
adb logcat -s <日志主要信息>
10、查看应用占用率
top -m(数量) 10 -t(线程) -d(更新时间间隔) 
11、获取机器MAC地址
adb shell  cat /sys/class/net/wlan0/address
12、获取CPU序列号
adb shell cat /proc/cpuinfo
13、查看Java代码的汇编代码
javap -c -l demo.class
14、清理logcat日志在查看相关日志
adb shell logcat -c
logcat -v time | grep "要查看的日志信息"
15、查看任务栈信息
adb shell dumpsys activity
16、转换.hprof文件
hprof-conv [-z] <infile> <outfile>
17、查看OpenSSL版本号
 unzip -p xxx.apk | strings | grep "OpenSSL" 
18、查看一个包名中存在的进程信息
adb shell ps | grep <包名>


进入idle模式:
adb shell dumpsys battery unplug
adb shell dumpsys deviceidle step

进入app standby模式:
adb shell dumpsys battery unplug
adb shell am set-inactive com.mico true

Sqlite数据库操作
adb shell

打开数据库:
sqlite3 <数据库名>

显示当前数据库有哪些表:
.table

查看表结构:
pragma table_info(表名);

切换显示模式
.mode line

查询数据
select * from 表名

查询当前数据库中的所有表的建表语句
select * from sqlite_master where name="表名";

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值