[Android Automotive OS] Tachi91:
Some findings about the dongle hell that was done on reddit.

- Mgears Mstick3 - MG-S03 [Spec] [Store] [FCC]$286 USD

- - Runs Android 11 and presents itself as Android Auto. Instead of Android Auto UI it's a launcher. Similar to an Android After-Market Head Unit .... OR like GMs Infotainment.

- Carlink CCPA [Website] [Amazon]

- - Allows CarPlay Initialization via MFi CoProcessor / Apple, It appears to act as the authentication middleman between an iPhone and AutoKit running on an Android Device

- - Provides BT and WiFi Connection for Wireless AA and CP

- Carlink AutoKit .apk [Site]

- - Seems like its own Headhunt Interface, but together with the Carlink CCPA it acts as the software receiver for Carplay or Android Auto. It appears to have a mirroring option that's separate from either projection... As if to Cast your Smartphone screen to it?

How it was implemented on Reddit

Vehicle <-> MStick3 <-> Carlink CCPA <-> Carlink AutoKit <-> iPhone/Android

Of Note in that thread. The MStick3 appears to capture calls. So we would loose the CarPlay Call GUI and be forced to use the MStick3 and whatever Audio quality hits that might bring.

Since the GM AAOS does not allow side loading. The MStick3 conducts the Android Auto handshake and projects its Home Screen to the Vehicle. Since it's using the AA App, it is given the full-screen/Overlay Permission. Allowing it to hide the Side Panel and take advantage of the remainder of the Display. Then you would sideload AutoKit on the MStick3. With the AutoKit app receiver now active, you connect the CCPA Adapter. The iPhone will authenticate via the MFi Chip in the adapter and then beginning projecting CarPlay through the CCPA and Displayed via AutoKit.

AutoKit acts as a view screen and since the MStick is projecting to the Vehicle as if it was AA. I would assume the MStick3 would prompt the user to allow AutoKit fullscreen access. I have downloaded AutoKit before and one of the first things it prompts you for is that FullScreen/Overlay permission. Along with Access to seemingly everything it would pass to CarPlay for functions.

The last time I dug into this issue I dipped my toes into the Apple CarPlay handshake process from the AppleDev - CarPlay website. A barbaric breakdown of the process;

iPhone Connected

Feature exchange (BT Profiles, codecs etc) = iAP2

MFi Authenticates and announces vehicle CarPlay Support (Wired, Wireless)

Communication Protocol is established (Wired or Wifi Connection established)

Display and Audio information exchange (Scale for Aspect Ratio XY:XY and Resolution 1234x123)

CarPlay is Displayed

I imagine that Android Auto conducts a very similar handshake. Except the need for a MFi chip. Since there have been Raspberry Pi rigs without any additional hardware for AA projection. It would seem to be just software. With Carplay only needing the MFi IC to function.

Going off that logic someone can load Android on a Raspberry Pi, Have it mimic the Android Auto handshake, but loading a custom launcher which allows access to AutoKit. Alternatively, use a Magisk module (S2A or AASD) to edit the normal Android Auto interface and list AutoKit as an app. Still requiring Carlink CCPA, but being able to bypass the need of an expansive MStick3. Using a Pi as the replacement.

Some limitations I can possibly see happening is. Whatever resolution GM AAOS is running which might not be supported by the MStick3 or AutoKit. From the Reddit thread it appears to scale as one would expect. However, There does appear to be some distortion. That could be from the angle of the camera used or CCPA, AutoKit, or MStick3 hitting some buffer or limitation outside of GMs AAOS. Maybe some upscaling, without seeing it for myself and knowing the projected resolution vs the native AAOS Res.

How this logic could be implemented on GM's AAOS...

If we can get access to the CarPlay Projection .apk, decompile, add overlay permissions (copy from AA projection .apk?) to its manifest .xml, compile + Sign, and then side load. Hopefully if that doesn't completely crash the app. In theory it would then mimic the behavior that AA projection gets. Since the projection apk doesn't have UI elements of its own. All that would matter is the correct resolution to sent the iPhone. For proper scaling etc etc. While having access to the decompiled .apk, it shouldn't be too difficult to check through for any predefined resolution etc.

If instead AutoKit can be side loaded. Then we would just have to worry about GMs AAOS honoring the manifest permission it would already have. Prompting the user for access and then allowing it to be rendered above the side panel and at the correct scale. Thats assuming the CCPA adapter would have access to the AutoKit app and there aren't unseen security blocks in place.

If GM would just admit defeat.. All they would literally have to do push an app update for Carplay Projection and give it full-screen permissions.