工作笔记

从ffbm切回android:

  • adb root (如果前面有过这个就不用重新root了)
  • adb shell "echo normal > /dev/block/bootdevice/by-name/misc"
  • adb reboot 等待重新开机即可

MMITEST 暗码


*#*#83789#*#*

编译遇到的错误


.te 无法查找, 原因是文件名字里面有空格 -____-!

流程图

st=>start: 开始
e=>end: 结束
op=>operation: 我的操作
cond=>condition: 确认?

st->op->cond
cond(yes)->e
cond(no)->op

服务器添加新仓库后,本地使用repo如何同步更新代码

cd ~/xxx/.repo/manifest
git fetch origin
git rebase -i origin/master (hipad)

调高CPU频率 QCOM

  • Open:

    adb root
    adb shell setenforce 0
    adb remount
    adb shell "echo 1 > /sys/devices/system/cpu/cpu0/online"
    adb shell "echo 1 > /sys/devices/system/cpu/cpu1/online"
    adb shell "echo 1 > /sys/devices/system/cpu/cpu2/online"
    adb shell "echo 1 > /sys/devices/system/cpu/cpu3/online"
    adb shell "echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor"
    adb shell "echo performance > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor"
    adb shell "echo performance > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor"
    adb shell "echo performance > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor"
  • Check:

    adb shell cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
    adb shell cat /sys/devices/system/cpu/cpu1/cpufreq/cpuinfo_cur_freq
    adb shell cat /sys/devices/system/cpu/cpu2/cpufreq/cpuinfo_cur_freq
    adb shell cat /sys/devices/system/cpu/cpu3/cpufreq/cpuinfo_cur_freq

查看EMMC供应商信息:

QS5509QL:/ # cat sys/emmc_info/name
manfid:0xf4:emmc type:Biwin

IO Performance

for i in $(seq 1 100);do iotop | head -n 10;done

for i in {1..1000};do adb shell dumpsys -t 20 cpuinfo | tail -n 1;done

cut -d" " -f 1,2,42 /proc/*/stat | sort -n -k +3

sort -n -k 10 /proc/diskstats


372 (irq/77-mbhc 50

ATT mnc,mcc

<CDR-SMCD-2100>Definition of an AT&T SIM
Summary: SIM cards with one of the following IMSI’s are to be considered an AT&T
SIM card:
• 310-030
• 310 170
• 310-280
• 310-380
310 410
• 310 560
• 311 180
• 310-950 – used for AT&T Lab purposes
<CDR-SMCD-2102>Definition of a FirstNet SIM
Summary: The SIM cards with one of the following IMSI’s are to be considered as
FirstNet SIM cards:
• 313-100
• 312-670
<CKT-SMCD-2100>Definition of a Cricket SIM
Summary:
The SIM cards the following IMSI’s constitutes as a Cricket SIM card:
• 310-150

强制优化为odex

adb shell pm force-dex-opt

git 设置和取消代理

git config --global https.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080
git config --global --unset http.proxy
git config --global --unset https.proxy
git config --global http.proxy 'socks5://127.0.0.1:1080'
git config --global https.proxy 'socks5://127.0.0.1:1080'

npm config delete proxy

上一次的Kernel LOG

QS5509QL:/sys/fs/pstore # cat console-ramoops
QS5509QL:/ # cat /proc/bootmsg

代码里面获取最顶层的ACTIVITY

ActivityManager.getService().getTasks(1,0).get(0).topActivity.getClassName()

远程mount black服务器

android@NSGWD180021:/data/workspace/QS5509-QL.dint.xml_0423$ sudo mount -t cifs -o username="android",password="mobile#5" //10.1.6.32/android /mnt/10.1.6.32
android@NSGWD180021:/data/workspace/QS5509-QL.dint.xml_0423$ cd /mnt/10.1.6.32/

查看内存压力

usage=`adb shell cat /dev/memcg/memory.usage_in_bytes` && memsw=`adb shell cat /dev/memcg/memory.memsw.usage_in_bytes` && let resu=$usage*100 && let res=$resu/$memsw && echo $res

退出FFBM模式

echo 'normal' > /dev/block/platform/soc/7824900.sdhci/by-name/misc

函数调用堆栈

Slog.w(TAG,android.util.Log.getStackTraceString(new Throwable()));
android.util.Log.w(TAG,android.util.Log.getStackTraceString(new Throwable()));
android.util.Log.w("jackywei","jackywei log");

获取binder的pid uid

发送广播

adb shell am broadcast -a "com.han.enable.collapsed"
adb shell ps | grep -i systemui | awk '{print $2}' | xargs adb shell kill -9
adb root && adb remount && adb push SystemUI.apk /system/priv-app/SystemUI/

Open the MPE

When trying to open the preview (both with Ctrl+Shift+M and Ctrl+Shift+P > ‘Markdown Preview Enhanced: Open Preview’, the following error message appears.

scp命令使用

  • 把本地文件夹上传到服务器上面:
    scp -r /home/android/fotaNodeRespon/fotaservice android@10.1.152.145:/home/android/weibiao/

安装virbox的内核

切换 GCC 版本到 7.0
sudo /usr/bin/gcc_to_7.sh
编译vbox driver
sudo /sbin/vboxconfig
切换 GCC 到原来4.8版本
sudo /usr/bin/gcc_to_48.sh