-
-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[REQUEST] Virtual Cockpit use CarPlay google map or apple map #159
Comments
Various people have been attempting to get carplay/AA into the virtual cockpit with little success, it's a real shame VAG don't support this. Efforts are also being made to prevent blocking built in maps on VC when AA nav is started. The enabling of Google Earth in cars that don't have it though is generally a licencing issue which is outside the scope of this project unfortunately. |
Until the version of Waze 4.66.0.1 there was a trick to make it work, which was to start a route (the virtual cockpit map was deactivated), stop the planned route (the map reappeared on the dashboard) and start a route again planned in Waze, without losing the car map on the dashboard. Version 4.66.0.1 can be downloaded from the web apkmirror.com But since version 4.66.90.900 they modified Waze and said trick stopped working :( There is an open thread on the Waze support forum about this: This trick never worked with Google Maps, at least on my Leon. It also does not work with the new Tomtom AmiGO. It would be great if with mib2-toolbox it could be possible to have both again, the map in the virtual cockpit, and an active navigation with android auto in the infotainment. |
Yes there's a long running thread here already about that: #10 That trick was technically a bug in Waze, where it didn't properly flag to Android that navigation was started. I'm not surprised that fixed it. I've found the flags in Java code in MIB already where this navigation_active status of tracked but they're in strange compiled Java code (jxe file) that's proving hard to override so far. |
Thanks @andrewleech for the URL of thread # 10, which I hadn't read ... The funny thing is that, at least in the new SEAT León Mk4, its MIB3 unit does allow to have active navigation in android auto, and simultaneously displaying the car's own navigator map on the dashboard ... I don't know what is the reason given by the VAG group for not allowing it in the MIB2 units. |
The Audi TT has CarPlay in the VC, so why stop at the maps? The display in the VC is horrible during all CarPlay functions. I'll be watching this one. I talked to a seller on Alibaba.com, he said if I purchased VC through him, he could/would enable the CarPlay in VC and program the dual RS tach's that I don't have on my RSQ8 (2021's have dueling tachs, they are awesome). |
It should be very nice!!! |
Only original is interesting, i have with android based systems not good expirience :-( |
All of the VC sellers on Aliexpress and Alibaba say that the VC's lock after 100km, so if its possible to enable CarPlay in VC (like TT and R8) then it has to be done on a new VC. I'm tempted to spend the $600 Euro and find out, but I realize that won't buy me happiness. That only comes from within. |
Unfortunately I don't think it'll be so easy to just swap out a TT VC into a different car, as I believe the ability to show full maps / carplay / androidauto in them is based on a separate LVDS connection, eg it acts like a separate monitor, not just a MOST connection like other VC's. These cars don't have a screen in the dash, so they use the VC as the main / only screen. Eg. TT VC (https://it.aliexpress.com/item/1005002826165506.html) Compared to Passat VC (https://it.aliexpress.com/item/1005001369470372.html) |
Thanks for the photos of the VC. In my RSQ8, there's night vision. I'm trying to bereft, but I think that means LVDS. |
Interesting that your Skoda MIB3 functions that way, my Audi MIB3 does not. |
andrewleech consider, that all MLBevo VC (and even MQB for Audi A3 for example) have LVDS connector as well TT, because maps with 3D view are showed only by LVDS (generated in MIB), so maybe it would be even possible to clone Carplay/AA view and redirect to it. Also that can be the difference in the software, because map view stream is on different interface. |
Sure, maybe. I don't have one of these cars so can't look into it myself. What I have seen though is it's currently quite hard to access / clone the view as it's implemented as a h264 steam directly from the phone. This stream is hardware decoded by the Tegra chip direct to display. The command line tools to take screenshots work fine on normal screens, but only get a black frame when AA/CP is on screen - much like computers 10 years ago when movies needed to be hardware decoded direct to screen. The raw h264 steam can be sent to a file of disk as well on screen, but I never found any other way to decode / frame grab from that on unit. |
But somehow it is send from unit to VC to visualize the maps in 3D, and it is rendered in unit not VC, then transferred by LVDS/HSD. OFC it's just theoretical talk, newer dived in the unit code... |
Yeah, when it's LVDS, they acts just like a computer monitor and the hardware decoding sends it straight to that monitor. If you mean the internal navigation engine running in 3d / Google Earth mode then that's generated internally and could be screenshot / copied easily enough. It's the display of AA/CP that's a stream needing hardware (graphics) decoding on the MIB2 / 2.5 platform. There's certainly some more hardware capabilities in newer platforms, but I haven't seen any of them personally: https://forums.macrumors.com/threads/review-2021-volkswagen-tiguan-adds-wireless-carplay-with-multi-screen-support-for-apple-maps-directions.2295243/ |
I know how LVDS looks like, but I just wonder if ti can be redirected/copied from display view to signal from unit to VC. |
Yeah as I tried to describe earlier, I've tried to do exactly this - to screenshot / capture / clone / redirect the AA/CP video stream onto VC. I have been able to send PNG images to VC, in theory I could do this one after another to simulate video.
But I have not been able to get decoded video in any way. Possibly with a C program and intimate knowledge of the Tegra processor it might be possible to read frames back out of the graphics engine frame buffers, but I couldn't find any info about doing this. |
This is actually very promising what about sending screenshot of what is visible on mib2 display to vc this way? To obtain screenshot I believe there are some functions already on mib2 which can be used |
Yes that's what I was attempting, but unfortunately screenshots of AndroidAuto / Carplay come up blank / black as the tegra cpu hw acceleration is used to directly decode the h264 AA/CP streams to screen. I've been unable to find a way to grab / screenshot frames from this. |
@andrewleech , This is pretty awesome. Maybe we can make it in such a way that the Virtual Cockpit is called as a specific display manager context number. |
By memory the VC is already a context, well the small map for it is available as a context that can be switched to on the main screen... but as far as I can tell the Tegra decoder is pointing straight to the display interface, whereas the VC isn't a standard display / framebuffer. |
Hmm good point. I tried switching the AA context to VC and vice versa, but was never succesful there. An other idea would maybe to have the VC handle the info from Android Auto, like the navigation directions, and media metainfo. The VC is able to handle it, I've seen people installing a Golf8/Leonmk4 MIB3 into the Golf7/Leonmk3, and suddenly got this data displayed on their virtual cockpits. |
The AA settings have an option to dump the h264 steam to disk too, I had thought of trying to send that to a named pipe into a sw decoder, but not sure where to find a decoder I could realistically compile for arm/qnx |
I did think of trying to render the nav/media meets 6 to send yeah, but couldn't find any such meta in the Java code handing AA at all :-(. The main AA interface is via a binary application, I don't know that it receives / shares this information at all? |
I'll check. |
Interesting, those details all being in DSI functions should mean they're shared to other apps, my understanding is DSI is the system-wide messaging system. Perhaps there's a way to access them from some command line system, or even if the main Java so doesn't have handlers for then currently they could possibly be added! I did have a play with those gal.json settings previously but saw no change at all... I don't know if I exhaustively tried everything but remember it not appearing to do much so gave up. Maybe searching through the gal bin in ghidra would shed some more light on these settings, perhaps find some other debug / export decoded frame settings... |
These DSI functions are quite interesting.... I never found a way to interface with them, but maybe I didn't look too hard ;-) |
|
Thanks @grajen3 I probably spent too mich time on this 😅 Yeah I initially had the same issues you had with modifying AndroidAutoTarget which crashed AndroidAuto. The reason was that the inlined integer consts are not always correctly decompiled. like https://github.com/adi961/mib2-android-auto-vc/blob/main/src/de/vw/mib/asl/internal/androidauto/target/AndroidAutoTarget.java#L257 or https://github.com/adi961/mib2-android-auto-vc/blob/main/src/de/vw/mib/asl/internal/androidauto/target/AndroidAutoTarget.java#L257 was crashing androidAuto. I used reflection to make these public and was able to log the actual values at runtime from outside AndroidAutoTarget (used that method also on other places where inlined consts were used. For getting more events sent to AndroidAutoTarget I had to add the attributes to DSI_ANDROIDAUTO2_ATTR. I dont quite remember where I found the missing ones but it was some switch statement somewhere in the call chain and I took a guess that this might be the ones missing... For the album cover you are correct copying the album to Are you planing to add more functionality to your version or are you just missing nav ignore? In that cas I could just make a version which includes navignore. So we can consolidate effords? |
Ah you are right, I forgot about problems with trying to patch that file, but I do remember figuring out As for further development - I am not pursing this currently and possibly I will actually remove putting android auto navigation cues into BAP for my own usage (or at least some of it) as currently I'm playing with doing my own rendering with VNC from OneB1t and doing both doesn't seem great - see photo from OneB1t/VcMOSTRenderMqb#2 (comment) - it doubles the same/similar information and I'd prefer to use variant that I can fully control to layout information as I want to and not using BAP for navigation would give a bit more "real estate" on display to work with without losing the information as it will be rendered anyway. As far as I remember I think that for my own usage - even tho I do have those navigation cues in VC for almost a year now - it alone actually doesn't help me in practice as much as I thought it would - I'd still would miss the turns if I had navigation audio disabled heh - it was very fun trying to figure how to make it work and getting something to work was satisfying so wouldn't say I wasted effort here. It's only started to be actually helpful to me in practice when I started showing route in the map in VC ( #159 (comment) ) that it was actually helpful to me in practice - this is for the most part what I rely on right now, but because of VW maps being offline and possible outdated and overall not really compatible with google maps coordinates and some roads actually missing between Here maps (what VAG uses) and Google Maps - there are cases it doesn't actually maps great sometimes so I started looking into having ~google maps in VC and this is where I put effort when I have time to tinker |
Yes i found out exactly the same think -> Only useful way to use VC is to show full map (but internal VW navigation is confusing me, google maps graphics are much better for fast understanding what is next turn and how far it is), just next turn is not enough. Mirroring phone image is working great now and i traveled few thousand kilometers with it running but if we can create pixel perfect special screen precisely for VC it will be epic. Also what will be nice for our approach is to find a way to enable navigation as soon as possible after boot because VNC client is really fast to startup up and can run in seconds but it still must wait for internal navigation to boot up and send BAP to show image 🤣 |
gotcha makes sense. One idea I had on getting the android auto map into the VC is since the gal protocol version in gal does not yet support the cluster video stream. M my idea is to build a small proxy which can run on something like a raspberry pi or ideally on the headunit itself using https://github.com/opencardev/aasdk since the gap protocol as far as I understand is just protobuffers. The proxy which connects to the phone with a current gal version and requests the cluster video feed + standard the headunit feed. And on the other side it connects to the headunit using the old gal version so it can display the main interface in the car. While sending the video for the cluster via https://github.com/OneB1t/VcMOSTRenderMqb. https://milek7.pl/.stuff/galdocs/readme.md https://milek7.pl/.stuff/galdocs/protos.proto -> MediaSinkService lets you configure a DisplayType which can be Main, cluster or auxiliary. I did not have time to try anything but just wanted to share |
Problem is that you need to "put" this h.264 800x480 video stream to specific location to make MIB2 stream it over MOST to VC. To achieve this you will probably need to somehow disable this "virtual display" over MOST setup inside MIB unit.
Can be done for sure as anything as you are able to write custom software for MIB2 unit (which is what i done with VNC client). |
yeah thats why I was thinking about first trying to do it on a raspberry pi which does the proxying from phone to headunit and then sends the video via wifi to VC via VcMOSTRenderMqb. Also to test if it is even possible to do transpilation between gal versions |
Yeah, I think the way you outlined trying to get actual Android Auto cluster/auxiliary display is the sanest approach possibly for that. I don't think it's possibly to try to do tricks on the phone (at least not without phone being rooted and/or trying to mess with android auto / gearhead android app) Given video stream stuff that we would get - this might be tricky to get fully working on head unit itself (something has to decode frames so this goes back to all the hardware acceleration here) I'll throw another things in here as well - that android auto cluster display have just few valid resolutions possible and they recommend use of margins in case aspect ratio need to be adjusted - https://developer.android.com/training/cars/testing/dhu#video-configuration - so would be good to figure out if this can be even "layouted" properly to fit in our VCs (I just learned about margins when writing this comment - I think last I checked it didn't mention margins but I did hit ~"not supported resolution" kind of problem when I was playing with emulator before so I knew this might be at least potentially relevant) |
This approach will require additional hardware which is not nice :-). There is RPI3 client already which can be probably hacked to require cluster image from phone and send AA protobuff over USB to MIB2 unit and also serve VNC server over wifi for VC. |
I think that only refers to the main AA video stream not the cluster stream. I tried the DHU and the config for the cluster stream works for any size and layout for the cluster stream https://developer.android.com/training/cars/testing/dhu?hl=en#cluster-display |
Agree I think it is easier to prototype before trying to build it directly into the MIB. And in case it cannot be integrated I think having a Pi in between phone and headunit could be still better than having to root the phone. Unless ofc there is a better way to get the cluster stream |
The way how @grajen3 is doing it is i believe better as it will allow to create any data not just map data (so also data from MIB2 exlap channel on port 25010). I been thinking that best way to approach this will be to find code/hack some chinese wireless AA dongle (as main part with USB protobuff AA is working already) and just add second display cluster there render it to VNC server and then connect VNC client to show it. |
I think you can do the same with capturing cluster display stream (with assumption that is achieved) - to use VNC you will have to decode frames from h264 stream and send those with VNC so you have a chance to inject any overlay you want there that could contain additional data from exlap The only part that feels "worse" with drawing on top of cluster display is that you have to work with stuff that google maps draw and don't have full control over where google maps overlays (like next turn information) would be drawn. But part that feels better is that it would be synced with actual google maps navigation routing - I do have to use hacks with my approach that not only it limits usability of it for non-tinkerers - it also mean I do have to share my trip with "dummy"/"service" google account on every navigation I do that I pull from later to set same destination in my custom app - that part can't even be automated apparently (because phone's google maps have very limited functionality and there is no ~google assistant command that would do this - apparently you can only do that by interacting with Android Auto UI at this point :S) |
I hope that some day in the future it will be possible to define second display dummy service for Android auto and get picture for cluster that way. |
But somebody replyed me that it already was. https://developer.android.com/training/cars/testing/dhu#cluster-display |
Its basically not possible as to force Android auto running on phone to serve second h.264 stream over USB/TCP and then be able to push it onto Virtual cockpit - it will require to recreate GAL service running on MIB2 again from scratch (as it is C/C++ project and cannot be easily decompiled as .jar files running MIB2 interface). In theory we can create "AA fake client" which will be running on android phone and forcing android auto to create 2x TCP h.264 streams (main and secondary display) and those can be read over WIFI somehow and then shown on MIB2. But this approach requires so much work that it will be full time job. Problem will be also with control as AA is not just h.264 video stream but also control messages and that must be also somehow implemented. If we can get our hands on code running inside some AA wireless box i think there is a possibility to create secondary display and get the image for it there (and maybe move the application to phone itself so there is no need for additional hardware). |
Like this? https://github.com/nisargjhaveri/WirelessAndroidAutoDongle |
This currently doesn't do ~man in the middle right now - it "just" allow wireless transport (well not "just" like it's small deal, just that it would need to do whole lot more than it does to serve purpose we need here) See nisargjhaveri/WirelessAndroidAutoDongle#41 (comment) asking for one such feature that would allow specifying different screen DPI - if DPI stuff would be possible - it would be much closer to be also able to declare cluster/auxiliary screen as well when initting connection |
At some point I tried using aasdk to decode the messages. But I didn't manage to get aasdk to compile it in the built root project since I don't have much experience with it... But I think it would be a goot shot to get something running here. I think it can be a good platform to do some research on what is possible |
I may not know what I´m saying but what if we just overlay (like google overlay) the mib2 map on the cockpit with the one that android auto is displaying ? Is this impossible ? |
@Lanye-z in Telegram already discussed and some people do this |
Are the code and solution open source? The vast majority of people in China cannot access Telegram. I came across this on Chinese social media, and it seems that some Chinese merchants are starting to act as middlemen to profit from it again. Some individuals are even claiming that they developed it themselves. |
@Lanye-z this is in progress. Guys discusses and trying to make it. Also one guy @adi961 made a AA VC fix https://github.com/adi961/mib2-android-auto-vc I hope someone also do the same for CarPlay |
Thank you . Is it the Telegram channel from this link? I’d like to try registering an account to keep an eye on the development progress. |
Sorry to be stubborn but is it really impossible to overlay the android auto google maps route on top of the cars gps map ? |
Please read some of the history here before repeating yourself. On most devices yes it is impossible to just overlay / replace the car gps display with Android Auto display. If you want to know why, read the history here. If you want to know more about the 1 or 2 devices that people are working on implementing this for, join the telegram link posted above. |
I see i messed up should have searched before posting again, sorry. I am fallowing telegram since november, but i have to say I' am a little confused, the conversations there are a bit mixed up and I' m not sure what Is of my interess. I have a Skoda Superb 3 with a mib2.5 unit and virtual cockpit 3VD920790. Can you point me please to the developers I should follow. |
join telegram channel :-) this combination should work with VNC client |
Added some stuff with Commits 5485c5e and 3fbd677
With this you can install the VNC Client on your MIB unit. |
I wonder if this idea can be implemented?
Virtual cockpit using CarPlay Output google maps or apple maps.
Or can install GOOLE EARTH in MIB2 high
Thanks for the suggestion.
The text was updated successfully, but these errors were encountered: