赞
踩
本例中:
QNX的IP地址配置为 666.18.1.200
adb shell连接 qnx
- adb shell
-
- $ su root
- # busybox telnet 666.18.1.200
-
- Connected to 666.18.1.200
-
- Entering character mode
- Escape character is '^]'.
-
- QNX Neutrino (localhost) (ttyp0)
账户输入 root
login: root
进入刷机
- # cd bin/
- # ./mis_send_client 0 0 2 0 2 1 4
系统会自动重启进入刷机模式。
本例中:
nfs 服务端 /usr/nfs_share/common/
nfs android 客户端目录 /data/vendor/nfs/mount/common/
QNX的IP地址配置为 666.18.1.200
- adb root
- adb shell
- #busybox telnet 666.18.1.200
账户输入 root
在QNX终端,把linux-la.config拷贝到nfs共享目录:
- #mount -uw /
- # cp vm/images/linux-la.config /usr/nfs_share/common/
- # exit
退出qnx命令行与adb shell
- adb remount
- adb pull /data/vendor/nfs/mount/common d:\pull
在该文件找到如下字符串
androidboot.selinux=enforce
改成
androidboot.selinux=permissive
删掉旧的 linux-la.config
- adb shell
- #rm /data/vendor/nfs/mount/common/linux-la.config
- #exit
把新的 linux-la.config push到nfs共享目录:
adb push D:\pull\linux-la.config /data/vendor/nfs/mount/common/
再进入QNX终端,把linux-la.config 从共享目录复制到目标目录:
- #mount -uw /
- #mount -o remount,rw /
- #cd vm/images/
- #rm linux-la.config
- #cp /usr/nfs_share/common/linux-la.config ./
之后重启机器,就能够关闭selinux了。
在QNX终端敲:
reset -f
如果调试时候,不需要全部selinux权限关闭,可以临时豁免特定应用的selinux权限。
1,自己编代码修改
userdebug_or_eng(`permissive your_hal;') #enable all permission
2,修改已有的userdebug或者eng版本
烧好版本号,把如下文件pull出来:
/vendor/etc/selinux/vendor_sepolicy.cil
找到你的HAL,加上一行 (typepermissive your_hal)
- (type your_hal)
- (roletype object_r your_hal)
- + (typepermissive your_hal)
保存,push回去
1、中控异常dtc查询表
2、android启动android原生settings app
adb shell am start -n com.android.settings/.Settings
3、touch开启关闭触点和轨迹
开启debug
adb shell settings put system show_touches 1
adb shell settings put system pointer_location 1
关闭debug
adb shell settings put system show_touches 0
adb shell settings put system pointer_location 0
4、QNX介绍网站
5、测试显示屏
gles2-gears_screen -display=2(中控) gles2-gears_screen -display=5(仪表) gles2-gears_screen -display=3或者4(hud)应该在屏端会有齿轮画面,hud需要先执行hamctrl -stop;slay nobo_whud;
6、QNX调试指令
我们常用的pidin a列出进程,slay杀掉进程,top查看cpu内存,showmem查看内存;use -i 文件查版本; ifconfig查ip,lsof查进程打开的文件,in32/out32读写CPU寄存器。
通过pidin 查看当前进程的状态:
pidin -F "%-20I %-30N %-28h %-10J %-30B %-20j %-12F %-10f %l %26K %u %v %z %R" -v
7、QNX触摸报点
slog2info -w | grep vinput可以看到触摸的报点,Event type 0x03, code 0x35, value 54是x方向的报点,Event type 0x03, code 0x36, value 901是y方向的报点
8、测试屏幕
sw-vsync是系统自带的写屏幕的程序,sw-vsync -display=2可以往主控写一个黄色的屏,有一条蓝线平移,-display改不同的数字可以控制不同的屏
9、系统进程启动时间
cat /dev/bmetrics可以查看qnx中各个进程的启动时间
10、修改slog2info缓冲区大小apps/qnx_ap/AMSS/multimedia/display/common/shim_utility/src/mdss_log_manager.c中的宏NUM_BUFFER_PAGES可以改变slog的buff大小
11、拷贝grep搜索出的文件
grep -r "xxx" | awk '{print "cp", $3, "test/"}' | sh,可以将搜索出的文件拷贝到test目录
12、 通过QNX终端操作进入QFIL烧写模式
a)通过telnet或者串口进入QNX终端
b) dd of=/dev/disk/xbl_a if=/dev/zero bs=1024k count=1
c) dd of=/dev/disk/xbl_b if=/dev/zero bs=1024k count=1
d) 重启机器,进入QFIL模式
13. Debug & USERT版本查看TEE app log
cat /dev/pdbg/qcore/tzdiag/qseecom
14、通过发送MCU命令重启
./bin/mis_send_client 0 0 2 0 2 0 0 //reset MCU;
./bin/mis_send_client 0 0 2 0 2 1 1 //reset SOC only;
./bin/mis_send_client 0 0 2 0 2 1 0 //reset SOC2MiniOS
15、屏幕自适应
cdt_api_test write 0x43 0; sync //重启后即可重新自适应中控屏
cdt_api_test write 0x41 0; sync //重启后即可重新自适应仪表
查看gpu load:
qnx 串口执行,通过slog信息查看gpu负载。
echo gpu_perf_governor 1 > /dev/kgsl-control
echo gpu_set_log_level 4 > /dev/kgsl-control
echo gpubusystats 2000 > /dev/kgsl-control
slog2info -b KGSL -w | grep percentage&
# 抓取trace分析
echo 0 > /dev/pdbg/watchdog/trace_status
tracelogger -w -b6000 -k4096 -s8 -f /usr/nfs_share/qlog/kerneltrace-abnormal.kev
主动触发获取进程core
pidin |grep 进程名
# $pid 你进程的pid
dumper -p $pid -d /usr/nfs_share/qlog/
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。