Close

Removing cruft, and cast settings

A project log for Cheapy 'rearview mirror' dashcam/Carplay/AAuto dev

Rooting, reverse engineering, and binary patching software on a closed device

mjc506mjc506 08/30/2023 at 21:120 Comments

By now, the boot chime was getting a little annoying... Removing or overwriting the .wav file in /usr/share/res/audio may have worked, but that would use up space in the overlayfs, and an easier option was removing the wires from the speaker pads. I'd like to say I carefully desoldered them, but cutting the wires was far more satisfying... I also unplugged and removed the front facing camera (partly removing bulk, partly power consumption, but also on the faint hope that the absence of a camera would convince the device to show the Android Auto stream in full screen (no such luck, of course).

Feeling better after that bit of tidying, I looked through the settings files again to see if it could be convinced...

In /data/cast_config.lua (lua?!) was a json-like settings file (unlike the more ini-style settings elsewhere) that contained x and y resolutions and 'phy_x' and 'phy_y' (physical dimensions of the screen in mm) for various streams - Carplay, mirrorlink, hicar and android auto. A couple of resolutions listed for each, presumably to allow the phone to negotiate a resolution for a nice display. Android Auto had either 840x480 or 1280x720, followed by a comment in Chinese explaining that Android Auto only accepted 840x480, 1280x720 or 1920x1080 as resolutions. This seems to be the common wisdom, although is seems that some more recent car OEMs have got ultrawidescreen displays working (I think by requesting a 1080p resolution, but also blanking off top and bottom and other weird tricks) but it seems this lylink doesn't do clever things like that. It does seem to send the requested resolution and physical display size to my phone, but no matter the resolutions and screen dimensions I set in that file (and remember, that's quite a tedious process...) the displayed frame remained stubbornly small... (although if I set the physical dimensions large enough, it'll change into the 'new' widescreen layout - probably useful for this letterbox screen)

Looking through the logs, lylink would either request a 840x480 stream (to which sdvcam would output a 'frame' of 533x320 (same aspect ratio as 840x480) - the overall screen dimensions are 1280x320, and there are GUI buttons to each side leaving 1010x320 available - the buttons take up the tapered portion of the screen, so I'm happy to leave them there) or 1280x720 (sdvcam outputs 588x320). The AAuto stream would be squashed to fit the output frame, and didn't always remain 'square' (I presume this is some interaction between the stream resolution and the apparent screen physical dimensions).

It does look like sdvcam is responsible for setting the output frame dimensions. Perhaps I can find a way of changing the frame after it's created...

Discussions