ludwig-v / wireless-carplay-dongle-reverse-engineering

CPlay2Air / Carlinkit Wireless Apple CarPlay Dongle reverse engineering
GNU General Public License v3.0
668 stars 100 forks source link

Support for 1280x640 resolution in 'AppleLike' custom theme #106

Closed P1xellat3d closed 2 years ago

P1xellat3d commented 2 years ago

Hi there! Is it possible at all to assist with adjusting elements to suit a 1280x640 resolution display? This is to suit the 9.2" screen as found on Volkswagen Golfs.

ludwig-v commented 2 years ago

TireGuy6 has been banned from MacRumors, deleted his work and doesn't want to work on this anymore so it is up to you or someone else to edit the custom theme. Do you have a picture so we can see the issue ?

P1xellat3d commented 2 years ago

I see. I would love to have a go at editing the theme but I don't have a single clue on where I would even begin.

The issue really is just to do with alignment on the pairing screen (the settings menu seems to be fine). There is a script for 1280x720 resolution, but for some reason it could be using the alignment for 800x480 instead (?) and aligns to the top left corner.

U2W_3 U2W_1 U2W_2

th1efx commented 2 years ago

@ludwig-v is pretty accurate. I was banned without reason and when I questioned the ban by the mod, I was banned abruptly without warning. Nice. Since then I really stopped all work on this project. I appreciate Ludwig for keeping it alive and including it in the latest firmware :)

Anyways. This can be doable.

By default the UI is presented in 4 resolutions:

1) 1920 x 1080 2) 1280 x 720 3) 1024 x 480 4) 800 x 480

We can only work with what we have here. That being said. From what it seems like it happening is that your head unit is choosing the wrong (or closest) resolution to what you have - which is skewing off the elements x/y.

Since we cannot add a a new resolution for 1280x640 you would need to modify the current one that is being used by your unit and reposition each element.

To do so you would need to extract the tar, remove each resolution file one by 1 and figure out exactly which one is being used by your car. My guess is either ui_1280x.script (1280x720) or ui.script (800x600) - I think the latter.

You can use linux or Cygwin for Windows (https://cygwin.com/install.html) to untar/tar it.

Untar Command: tar -xvf ui.tar.gz

Tar Command: tar -czvf ~/ui.tar.gz * --owner=0 --group=0

Once you figure out which file is being used for your UI, you will need to work with each element and move it over. Retar and reupload it to the device, plug and test. It's tedious. However I made sense of it I think with many comments, so understanding should be easier than when I went through with just Chinese and random elements everywhere.

Once you find the 'sweet spot' x and y it should be pretty straight forward to align everything.

At worst case if you make any major mistakes you will just end up with a BLACK UI, at which point you can restore your original ui.tar.gz to revert.

Goodluck!

P1xellat3d commented 2 years ago

Thanks for this @th1efx! It seems like it is indeed using ui.script (800x480) for some reason.

Instead of changing every single element, I copied and pasted most of the alignment from ui_1280x.script instead (since the horizontal resolution is the same, it saved a bit of work). Some adjustments still had to be done, but most UI elements i left as is.

Overall not perfect, but much better than what it looked like before 👍

carplay

th1efx commented 2 years ago

Glad you got it working :-) since you were able to untar/retar you have the basic concept of what needs to be done - if you want to move elements around. When you open the config file you will see the x/y I broke down in each section and you can increase them a bit and retest to move things left and right / up and down to centre them.