1.find高级用法
find . -name *.te | xargs grep -i "zygote_tmpfs"
find . -name *.te | xargs grep -i "_app_tmpfs"
2.audit2allow -p policy < avc_log.txt
3.fastboot oem set_selinux na
4.adb disable-verity
5.adb shell am broadcast -a android.intent.action.BOOT_COMPLETED
6.cat /proc/cpuinfo | grep "physical id" | uniq | wc -l查看机器一共几个cpu
7.binder_sample (descriptor|3),(method_num|1|5),(time|1|3),(blocking_package|3),(sample_percent|1|6)
8.切割文件:
使用split -b 900M -d --additional-suffix=.log dmesg.txt将文件分割为500M大小的文件。
9.echo 0 > /sys/class/backlight/lcd-backlight/brightness
10.android 11编译。make framework-minus-apex
11.高通kpi,查看启动阶段模块耗时cat /sys/kernel/boot_kpi/kpi_values
12.atrace -z -c -b 96000 -t 20 -o /data/local/tmp/test_trace gfx input view webview wm am sm audio video hal res dalvik rs bionic power pm ss sched freq idle mmc binder_driver binder_lock memory -a com.android.systemui
13.adb shell dumpsys gfxinfo com.* framestats
14.dumpsys gfxinfo com.* framestats reset
15.touch /data/bootchart/enabled
16.am dumpheap使用抓取hprof文件以及分析
17.kill -3 pid java dump trace如何查看使用
18.debuggred pid native dump trace查看使用
19.#include <utils/CallStack.h> CallStack stack("xxx"); native堆栈打印跟踪调用栈记录
20.android studio profiler性能工具分析systrace和hprof文件方法
21.libleaktrace使用
22.new Exception("test log").printStackTrace(); new RuntimeException().fillInStackTrace();
23.创建压缩文件快捷命令 fallocate -l 11g file.zip