Close

Success!

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:530 Comments

First problem now, assuming I hadn't mangled the binary with my amature hex editing, was getting the patched binary onto the device and overwrite the original. Copying onto the microSD was familiar habit by now, but the overlayfs was nowhere near big enough to allow overwriting of a 4.8MB binary.

Best option I can see is to leave the patched binary on the microSD, but edit the init scripts to make sure the microSD is mounted, then bind mount the patched binary on top of the original before it tries to run sdvcam. If the microSD is ever removed (or fails, although we're not writing to it, so it should be ok) in the future, the original sdvcam will run and just display a small frame.

Amazingly enough, the edited init script worked first try, and the device booted, the sdvcam executable loaded, and....

Success!!! The AAuto stream was displayed in full-width glory! The horizontal stretching was visible, but really not too bad. The AAuto 'status bar' was still displayed at the bottom (of course, as far as my phone was aware, nothing had changed) but it was working! A few tedious edits to the cast_config.lua file (increasing the phy_width) found a good value that had the status bar on the side (more vertical room for the map) and reduced the stretching slightly too (still certainly noticeable, but really not too bad - it seems that AAuto, although only allowing certain stream resolutions, will attempt to correct for screen aspect ratio depending on the display physical size reported to it).

I now have a device that fits on top of my dashboard nicely, shows a nice full-screen AAuto stream, and still allows my phone to connect to my helmet headset for audio.

Discussions