1.find查找
busybox find / -size +1000k
2.busybox sh //执行busybox中的shell命令
1. top -m 4 查看占用当前cpu最高的前4个
2.查看应用程序的命令:adb shell procrank
注:
VSS - Virtual Set Size 虚拟耗用内存(包含共享库占用的内存)
RSS - Resident Set Size 实际使用物理内存(包含共享库占用的内存)
PSS - Proportional Set Size 实际使用的物理内存(比例分配共享库占用的内存)
USS - Unique Set Size 进程独自占用的物理内存(不包含共享库占用的内存)
3.查看单个应用程序内存占用量的命令:adb shell dumpsys meminfo $包名 或者 $进程号
1.启动activity am start -n com.home/com.home.HomeActivity 2.启动服务
例如:am startservice -n com.gsme/com. (这里-n表示组件)
或者 am startservice -a com.gsm.GSMService (这里-a表示动作,就是你在Androidmanifest里定义的)
3. 发送一个广播:
am broadcast -a <广播动作>
例如: am broadcast -a com.smz.mybroadcast
1.zImage带上root头
cd kernel && make bzImage CONFIG_INITRAMFS_SOURCE=../out/target/product/generic/root/ -j 2 && cd -
2.zImage+root--------->uImage
./mkimage -A arm -O linux -T kernel -C none -a 80800000 -e 80800000 -d arch/arm/boot/zImage uImage
1.命令修改mac地址:
127|root@android:/sys/class/net/eth0 # busybox vi address
32:1a:2d:3d:c1:a4
2.android抓网络包
chmod 777 /system/xbin/tcpdump
/system/xbin/tcpdump -s0 -w /eth0.cap &
3.logcat 打印
1>清除缓存打印:logcat -c2>打印加上时间:logcat -v time3>log保存到本地文件:adb logcat -v time >D:\1.log
4>android保存log到设备文件,防漏打印:logcat -v time -f /1.log
root@android:/ # logcat -h
unknown option -- hUnrecognized Option
Usage: logcat [options] [filterspecs]
options include:
-s Set default filter to silent.
Like specifying filterspec '*:s'
-f <filename> Log to file. Default to stdout
-r [<kbytes>] Rotate log every kbytes. (16 if unspecified). Requires -f
-n <count> Sets max number of rotated logs to <count>, default 4
-v <format> Sets the log print format, where <format> is one of:
brief process tag thread raw time threadtime long
-c clear (flush) the entire log and exit
-d dump the log and then exit (don't block)
-t <count> print only the most recent <count> lines (implies -d)
-g get the size of the log's ring buffer and exit
-b <buffer> Request alternate ring buffer, 'main', 'system', 'radio'
or 'events'. Multiple -b parameters are allowed and the
results are interleaved. The default is -b main -b system.
-B output the log in binary
filterspecs are a series of
<tag>[:priority]
where <tag> is a log component tag (or * for all) and priority is:
V Verbose
D Debug
I Info
W Warn
E Error
F Fatal
S Silent (supress all output)
'*' means '*:d' and <tag> by itself means <tag>:v
If not specified on the commandline, filterspec is set from ANDROID_LOG_TAGS.
If no filterspec is found, filter defaults to '*:I'
If not specified with -v, format is set from ANDROID_PRINTF_LOG
or defaults to "brief"
|