2

I have a damaged screen and touch digitizer on an automotive head unit. I am trying to access the diagnostics menu for the unit (Honda Clarity 2018 PHEV non-touring), but the touch input keys are not (to my knowledge) among the standard Android keyevent codes. Is there some way to pull these directly from the head unit itself? I have root on the unit, and I did find some keyboard data files but the enclosed keyevent codes don't appear to all be functional, and it isn't clear from the descriptors which keys would match with the necessary inputs (Power, Menu, and Screen Brightness, the first two of which are not the standard Android ones).

EDIT: here's a picture of the keys in question. Note that these do not correspond to the Android generic equivalents, e.g., keyevent 24 & 25 will invoke the Android native UI's volume control, but not the same as these keys; same for the rest of the keys.

photo

Robert
  • 20,025
  • 6
  • 47
  • 66
Arctiic
  • 851
  • 6
  • 18
  • What touch input keys does the system provide? Just the common home, back and recent? For home there seems to be a key event code: https://android.stackexchange.com/a/160931/2241 Later you talk about power key - in Android this is usually a hardware key, is this different in your had unit? – Robert Jul 21 '23 at 15:49
  • As mentioned, keyevent not only includes keyboard keys but also physical buttons, so it's kind of expected that a keyboard data file doesn't cover every keyevent. Meanwhile, there's official documentation for KeyEvent. Still, I think this question does have merit to explore the availability of valid keyevent on each device. – Andrew T. Jul 22 '23 at 02:51
  • @Robert Updated OP to include photo of the keys in question. The power key is the Audio key. – Arctiic Jul 22 '23 at 09:56
  • @AndrewT. according to the resource page you linked, if I am understanding it correctly, every input device should have a corresponding charactermap file that acts as the interpreter/binding for the corresponding input device's event scan codes. So am I correct in concluding that finding this file should essentially lead me to a list of all possible key inputs (by input device)? Is this something I could find through adb shell then read using, say, cat <filename>? – Arctiic Jul 22 '23 at 10:12
  • @Robert To add on regarding the functionality of the power key, unlike the standard power key function, on this head unit the power key shuts off all system audio, but when long pressed it will invoke a dialogue prompt asking whether the user wants to reboot the system or not. This is unlike keyevent 26, which on this system appears to toggle the visual display on or off. I have noted that after toggling the display off and idling for long enough, the entire system seems to go into some sort of sleep mode, and requires power cycling the vehicle completely to turn back on. – Arctiic Jul 23 '23 at 20:21
  • Reconsidering your question the following approach should be helpful: The hardware touch keys you have posted the screenshot of must be processed somewhere in the ROM. And there are always users who want to change those keys. So IMHO searching for a way to modify those keys may allow you to learn where those key are configured and then read the configuration of your head unit. A quick search for android modify hardware touch keys took me e.g. to this site: https://anil-gudigar.medium.com/android-hardware-key-remapping-and-key-event-handled-in-the-phonefallbackeventhandler-f7b249ba9e17 – Robert Feb 12 '24 at 08:06
  • @Robert Thank you, I'll take a look when I get the chance! – Arctiic Feb 14 '24 at 20:08

0 Answers0