全志H618,AndroidTV12添加自定红外遥控器

1. Execute getevent -l | grep MSC_SCAN in the serial port or adb shell, then press the corresponding button on the remote control to obtain the device ID and scancode.

我们对Markdown编辑器进行了一些功能拓展与语法支持,除了标准的Markdown编辑器功能,我们增加了如下几点新功能,帮助你用它写博客:
The MSC_SCAN data is 32 bits.
Bits [31:24] represent the key press status, where 0 indicates release, and 1 indicates press.
Bits [23:8] represent the device ID. Use this ID to generate a keylayout file named customer_ir_xxxx.kl. For example, in this case, it would be customer_ir_fe01.kl.
Bits [7:0] represent the scancode.

2. Based on the results of step one, create a new file named customer_ir_xxxx.kl with the following content:

在这里插入图片描述
Map the scancodes in the second column to Android keycodes.

3.Use the adb command to push customer_ir_xxxx.kl to the system.

 $ adb root
 $ adb remount
 $ adb push customer_ir_xxxx.kl  /system/usr/keylayout/
 $ adb reboot

For source code porting, put the customer_ir_xxxx.kl to vendor/w/common/hardware/input/multi_ir/keylayout/ directory and build the source code.

详细步骤:
1.可不用添加adb工具到path:
解压adb工具到英文目录:
在这里插入图片描述
开发板上电,并打开开发者模式中的USB调试,连接电脑
adb工具目录下打开powershell,执行命令
在这里插入图片描述
图示代表连接设备成功
在这里插入图片描述
输入命令退出
2.输入命令提取开发板中的文件,到adb所在的目录
在这里插入图片描述
在这里插入图片描述
3.解析遥控器中的按键值
执行命令,并按下遥控器中的键,记录键值,改写customer_ir_4040.kl,4040要改成遥控器对应的值
在这里插入图片描述
在这里插入图片描述
4.上传customer_ir_4040.kl
在这里插入图片描述

参考

wiki.banana-pi.org

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值