常用命令
*******************android***********************
adb shell am start -W tv.danmaku.bili/.ui.splash.SplashActivity
adb shell dumpsys activity activities | grep -i mResumedActivity
adb logcat | grep wakelock
adb logcat | grep -i wakelock
adb logcat | grep --color=auto -i wakelock
notepad++正则:.*delete.*\r\n
adb logcat -b all > all_log.txt
adb logcat -b crash
adb shell "sleep 5 && echo mem > /sys/power/state"
adb shell "echo mem > /sys/power/autosleep"
adb shell dmesg > share/0814_dmesg.txt && adb logcat -b all > share/0814_all_logs.txt
adb shell settings put secure user_setup_complete 1
adb shell settings put global device_provisioned 1
adb reboot
adb shell cat /sys/class/huaqin/interface/hw_info/pcba_config
adb shell setenforce 0
adb shell getenforce
adb logcat -c && adb shell dmesg -C
adb shell dmesg > 1_dmesg.txt && adb logcat -v time > 1_logcat.txt
fastboot flash partition:4 images/gpt_both4.bin
fastboot flash persist persist.img
logcat -c && logcat -b all > logcat_all.txt &
dmesg -C && dmesg > dmesg.txt &
adb shell "echo c > /proc/sysrq-trigger"
adb shell "echo 1 > /d/clk/debug_suspend"串口log
fastboot erase frp
adb root;adb shell pm disable com.huaqin.sarcontroller
***********************************高通功耗power*****************************
adb root
adb remount -R
adb shell "echo 1 > sys/module/msm_show_resume_irq/parameters/debug_mask"
adb shell cat sys/module/msm_show_resume_irq/parameters/debug_mask
adb shell "echo 1 > /sys/kernel/debug/clk/debug_suspend"
adb shell cat /sys/kernel/debug/clk/debug_suspend
adb shell cat /sys/power/system_sleep/stats > stats_000.txt
adb shell cat /sys/kernel/debug/rpm_master_stats > master_000.txt
adb shell dumpsys batterystats --enable full-wake-history
adb shell dumpsys batterystats --reset
adb logcat -c
adb shell dmesg –C
停止抓取,开始抓取
移除USB,灭屏 ,复现问题3分钟,重新插入USB,
adb shell cat /sys/power/system_sleep/stats > stats_111.txt
adb shell cat /sys/kernel/debug/rpm_master_stats > maste_111.txt
adb shell cat /sys/kernel/debug/wakeup_sources > wakeup_sources.log
*************************************高通抓取clock dump******************************
adb root
adb remount
adb shell
sleep 10 && cat /d/clk/clk_enabled_list > /data/clks.txt &
执行完后10s内断开USB
*************************************NV 453等于0底电才会下去******************************
0x00表示关闭工厂模式,关闭工厂模式之后手机才能正常驻网,正常读取IMEI号
0x01表示开启工厂模式
*************************************关闭USB充电**************************************
adb shell "echo 1 > /sys/class/power_supply/battery/input_suspend"
*************************************关闭扬声器双pa中的一个pa**************************************
adb shell "echo 0 > /sys/bus/i2c/drivers/aw87359_pa/0-0058/mode"
adb shell "echo 0 > /sys/bus/i2c/drivers/aw87519_pa/0-0059/mode"
adb shell:
top -b -H -d 5 -m 20
**************************************代码下载**********************************
repo sync --force-sync
**************************************ubuntu命令********************************
sudo add-apt-repository --remove ppa:
export ANDROID_PRODUCT_OUT=/home/day/pro/android10-41/out/target/product/taimen
***************************************刷机编译*********************************
make bootimage
fastboot flash boot
全刷:
fastboot erase cache
fastboot erase userdata
fastboot flashall -w
单刷:
cd out/target/product/taimen
fastboot flash boot_a boot.img
fastboot flash boot_b boot.img
fastboot flash system system.img
fastboot flash system_b system_other.img
fastboot flash vendor vendor.img
fastboot flash userdata userdata.img
adb shell "settings put system screen_brightness 464"
pm list packages -f | grep -iE "gms|google|vending" | cut -d "=" -f1 | cut -d ":" -f2 | xargs
python platform-tools/systrace/systrace.py freq sched idle gfx input view am wm hal app dalvik sm -b 10240 -t 5 -o trace.html
emulator -avd n10 -writable-system
dump命令
dumpsys | grep "DUMP OF SERVICE"
一般java代码中的dump函数里面有写dump命令