[SOLVED] Rikomagic MK22 remote stops working after reboot

I have been struggling for 2 nights now to make the remote working in CoreElec 9.01 installed on a sd card for a Rikomagic MK22 box S912 2G/16G and Gigabit Lan. The standard device tree in the image made the box freeze, so I tried using gxm_q200_2g.dtb and also gxm_q201_2g_1gbit.dtb and even gxm_q200_2g_minix_neo_u9_.dtb. They all work with this box but I am not sure if I am using the right one. Not much information available about this box.
After following the instructions I managed to produce a file in Notepad++ called mk22. I extracted the remote.conf file from the Android system on this box to complete my list. This is my mapping:
#table mk22, type: NEC
0x0e 105 KEY_LEFT
0x1a 106 KEY_RIGHT
0x02 108 KEY_DOWN
0x03 103 KEY_UP
0x07 KEY_ENTER
0x5c 158 KEY_RETURN
0x13 KEY_CONTEXT_MENU
0x48 KEY_HOME
0x58 114 KEY_VOLUME_DOWN
0x01 113 KEY_MUTE
0x0b 115 KEY_VOLUME_UP
0x14 116 KEY_POWER
I saved this file in /storage/.config/rc_keymaps/ together with the file rc_maps.cfg containing this line meson-ir * mk22.
After executing the command ir-keytable -a /storage/.config/rc_keymaps/rc_maps.cfg -s rc0 the result over SSH in putty is:
OLD keytable cleared
Wrote 12 keycode(s) to driver
Protocols changed to nec

After restarting Kodi and eventlircd over SSH my remote works fine in Kodi, but after rebooting the box the remote stops working. When I try again I do not get response anymore from the remote after executing the command ir-keytable -t. So I have to start all over again with a fresh installation.
I also tried installing CoreElec 9.00 first, make the remote work and then let it upgrade to 9.01, during update I read that device tree is being updated, aml_autoscript is updated and remote-toggle/meson-ir/ is enabled in device tree. After that remote is not working either anymore.
Something must be missing in the configuration.
But what? Wrong paths? Wrong device tree, wrong editor? Wrong aml_autoscript? I am lost.

Please upload output of
ls -la /flash/remote.conf
ls -la /storage/.config/remote.conf
fdtget -t s /flash/dtb.img /meson-remote/ status
fdtget -t s /flash/dtb.img /meson-ir/ status

`ls -la /flash/remote.conf : No such file or directory

ls -la /storage/.config/remote.conf: No such file or directory

fdtget -t s /flash/dtb.img /meson-remote/ status : disabled

fdtget -t s /flash/dtb.img /meson-ir/ status : okay

Your values looks wrong for meson-ir config because you use amremote values in it.
Correct one looks like
0x0e KEY_LEFT for this key (if code 0x0e is correct)
You can modify file with correct values or use amremote config: copy your old remote.conf in \\IP_of_box\Configfiles\ directory
(or via ssh /storage/.config/remote.conf) and reboot

As for DTB, both gxm_q200_2g.dtb and gxm_q201_2g_1gbit.dtb should work

Thank you very much for your input. You are right that these values are amremote values, but I had to add the numbers to make the buttons work.
I thought remote.conf did not work anymore in CoreElec. I have tried earlier to copy this file in /storage/.config/ but without any result. Tried again, but unfortunately no response.

Would it help if I output the values of the remote keys here, that’s not much work, only 12 buttons on the remote.

See message in pm

FYI : Issue solved with the help of “boot2k3”! He has stripped down the original remote.conf from the android box from a multi config to a single config file. After a fresh install and update to CE 9.01 I put it in /storage/.config and reboot and now remote is working!:grinning: