yashsingh1/xdaforums huggingface dataset:
[Android Head-Units] looxonline:
My solution will work for you. Anything FYT based will work. For other chipset types I'd need to buy one of those units to find the methods to hook but that is unlikely since I can't afford it.

FYI I got it working two nights ago but I'm not happy with the lag. About 1s between button press and response. I know where the delay is coming from and I'm working to remove it but it'll take a while longer as I need to write a new module in C.
[Android Head-Units] tommylotto:
Thanks! Keep up the good work, because I do not think a solution will be coming from Joying. I inquired with them if they were going to fix the SWC for ZLink and this was their response: "Sorry, it still doesn't work, and it can't be solved, because it's not authorized. Please kindly understand us, thanks."
[Android Head-Units] looxonline:
In a way they are correct. They have designed their hardware in such an absurd manner that the Android system will not allow them to inject keypresses into the OS. You need root to do it. Hoping to finish the module tonight. Will provide feedback later.
[Android Head-Units] bassembrace:
Really looking forward to your solution [MENTION=9217263]looxonline[/MENTION] I am very happy with my hardware so far, however I want the volume keys to work over HID on my SWC.

Sooo your solution will still come very handy in order for me to use the same SWC controller for the volume too, as I still have 2 free buttons left :fingers-crossed:
[Android Head-Units] looxonline:
Well I have good news and bad news.

Good news. I worked on it on Wednesday and Friday night and have a fully functional proof of concept. Getting an xposed module to recognize an external, native library was nowhere near as simple as I thought. After a heap of work I managed to get it working but at a small cost. The very first button press after a reboot currently has to be used as a trigger to load the external library and to create a fake keyboard. Because of this the method to handle the button press takes longer than usual which results in the calling method timing out and entering into a retry. The net effect of this is that the very first button press after a reboot is recognized twice but thereafter the presses work just fine with no delay at all. Android 8 was also a challenge to work with because it hides the external library in a folder that is dynamically named when you install the APK. This meant that I could not hard code the folder path into the module and instead have to run a search for it when the library is being loaded. This contributed to the delay that is experienced on the first button press after a boot up. Summary of where I am so far: Full proof of concept is working. After installing the module the user will experience a double press the first time they press a SWC button and then they will see a keyboard icon appear in the status bar. After that they will be able to program their SWC buttons into Zlink as if they were standard HID buttons.

Bad news. I meant to finish the module off on Saturday and Sunday but completely ran out of time with family responsibilities and other projects I need to wrap up. What remains is to hook more button press functions so that the module will work on as many head units as possible. Right now I have only focused on the buttons that are used on my head unit. I also want to investigate if I can find another way to load the library that will not result in a double button press after reboot. Best case scenario is I'll be done with a beta by Wednesday. Realistic scenario is a release on Sunday.
[Android Head-Units] looxonline:
It works. Just finished hooking all the functions on my unit and it works REALLY well with zlink. Also works with Apple music app and Spotify app. I would assume that it will work with any other app that plays music too. First release tomorrow but be warned....it's highly customized to the methods on my unit and may not work on yours for all buttons. Try it anyways and give me feedback. I'll try to hook more functions to broaden compatibility.
[Android Head-Units] looxonline:
Spike Zlink SWC V0.01

So here it is. The first release.

Some notes:

- Install the app using whatever method suits you. I use adb.

- Activate the module via the pop up that appears after installation or via the Xposed installer.

- The first time you boot up and press a compatible SWC button the module will create a virtual keyboard that the system detects as a physical USB keyboard. This will cause your on-screen virtual keyboard to disappear. Simply go into the keyboard settings in the settings menu and turn on the toggle to display the virtual keyboard even when a physical keyboard is plugged in and the unit will remember this setting from that point on.

- This release will override the mute option if you have one on the SWC. I figured that mute is largely pointless if you have a pause/play button. Instead of mute I am using mine as a siri trigger.

- This release works with Spotify and Apple Music apps on Android but for some reason it skips and goes back two songs at a time. I don't know why yet. More investigation required.

- The next/previous methods that I am hooking are specifically for a rolling type SWC and not a button type. If you have a button type then this may not work but I plan to add more hooks for a button type in the next release.

- This will not just immediately work in the Zlink app. You will first have to program the keys in. Use the settings menu for this.

- Please provide me with feedback about what does and does not work so that I can study more methods and hopefully add more hooks to make it as generic as possible.
[Android Head-Units] givanel:
Hi.

is there a plan to include button type hooks? I can confirm that the current version do not work with buttons.
[Android Head-Units] looxonline:
Please let me know what unit model you have. Also what FW+MCU version. If you are familiar with adb please also try to pull your mainserver apk and send it to me.

Also, do you have an enter button? It normally looks like a select or OK button. This should be recognized by the current app and can be used for play/pause. I hope to add other button type hooks tomorrow.

[Edit] Please also let me know your vehicle make and model so that I can try to see if your CAN works the same. Also, please confirm what SWC buttons you have. A picture of all of the buttons on the SWC would be good.
[Android Head-Units] givanel:
Thanks, will send you all the detailed info tonight.

I have a Joying PX5 headunit, FYT, android 8, stock ROM + root. i'm not that familiar with getting the mainserver apk, but will try.

i only have 4 working buttons: VOL+, VOL-, TRACK+, TRACK-

the car is a 2009 SAAB 9-3, and the steering wheel interface is bought from incartec .co .uk / product / Saab-9-3-9-5-06--Steering-control-Interface

the steering wheel is this one: dynamicsounds .co .uk / images / CTSSA001-install.jpg (with the mention that only the above-mentioned buttons are recognized)

(sorry, can't post links yet).
[Android Head-Units] looxonline:
It looks as if your interface converts the GM LAN protocol into resistive signals that the unit picks up over one wire. This means that even though your SWC is over a data bus, your unit sees it as purely resistive. I've not hooked those buttons yet but I will try to do so tomorrow. Will release in this thread when done.
[Android Head-Units] looxonline:
First Major Release

As promised, I have worked on the code (for about 6 hours today) and managed to hook a whole lot more buttons. This release includes up, down, left, right and quite a few more. I have note tested the direction buttons as I don't have any on my SWC so I'm reliant on feedback from you all.

To install:

* If you already have a previous version installed then I recommend uninstalling it first using "adb uninstall projects.spike.labs.zlinkswcontrol". You will obviously need to find where the adb executable is that comes with the android SDK and execute the command from that directory. Also remember to prefix it with ./ if you are on linux or OSX.

* Install using whatever method suits you. I use adb. "adb install spike_zlink_swc_v1_00.apk". Of course that assumes that the apk is in the same directory as the adb executable.

* A prompt should show up asking you to activate and reboot. Do a full reboot and not a soft reboot. If you don't get the prompt then do a full reboot anyway from within the xposed installer.

Changes:

* Many more button hooks added.

* Changed the keypress that some button hooks triggered to prevent the android OS from doing anything unwanted with them.

* Changed the play/pause (enter) button press to still execute the method that is meant to be triggered. The method was originally bypassed but with zlink open there should be no need to bypass it since none of the case statements will be met. This leaves the existing "enter" functionality available if the user ever wants to use native bluetooth or some other built in music app.

* Added some CAN buttons which are possibly unique to my unit. One used to open the radio from the SWC and the other used to open the music player. I now use them to answer calls and hang up from the SCW in zlink. If others have these buttons too then they can be programmed for whatever use the user wants.

* Changed the "AUX" button on the front panel to be a shortcut key for zlink.

Planned improvements:

* Map a key that overlays the outside temperature and CPU temperature temporarily on top of a small portion of the zlink side bar and then fades these away after a few seconds.
[Android Head-Units] givanel:
Hi looxonline,

i've tested this version today and still no results on my unit.
[Android Head-Units] looxonline:
Interesting. I've got every button on my unit working like a dream but then again I can test as I code. I'll try post a video of them all working well this weekend sometime. I'm going to need your mainserver apk to tell what is going on.

Use the method mentioned in this link https://stackoverflow.com/questions/4032960/how-do-i-get-an-apk-file-from-an-android-device to pull your mainserver apk. It should be labelled something like 000000000_com.syu.ms.apk. I think that it is in the /oem/apps folder. Something like adb pull /oem/apps/000000000_com.syu.ms.apk should work after you connect via adb. Then I will be able to see if the functions in your main server are named the same as mine.

[edit]

Also be 100% sure that you have removed the old version and that the new version is installed and active. Sometimes it would install on my unit but not activate for some reason. It may not hurt to remove it using adb and then reinstall it.
[Android Head-Units] givanel:
Hope I got it right. Thanks!
[Android Head-Units] Zaagfluit:
Hi, awesome you found a solution! Ik tried to install the apk (from an USB stick in file manager) you provided but nothing happens (no notice and reboot request) and i can not open the app. Obviously i am doing something wrong. Is it necessary to root the device or install in a certain way? I am an IOS noob so i have little experience with Android. I have a witson s200 w207, similar to your device.
[Android Head-Units] looxonline:
Sorry, I never mentioned the prerequisites. So here goes:

1.) You will need to be rooted.

2.) You need to have a PX5 unit. It may work on other units with similar main server files and methods but this is completely untested.

3.) You need to have the xposed framework installed. This means that you will also have the xposed installer.

4.) Go into the xposed installer and open the "modules" tab. There you will see a list of all xposed modules that are installed. After installing my app it should appear in that list.

5.) When the xposed installer is open and you install my apk it should pop up with a notification asking if you would like to activate and reboot. Say yes to this notification. If the notification does not pop up then you can activate the module and reboot (hard not soft) from within the xposed installer.

6.) After reboot everything should work.

Give it a try and let me know.
[Android Head-Units] looxonline:
I've checked your ms file and it is identical to mine where it counts. I can see no reason why it should not work.

Please have a look at my latest directions that I just posted in this thread. Also some questions...

1.) Are you rooted?

2.) Do you have xposed installed?

3.) Do you have the xposed installer open when you install my apk?

4.) Do you see my module appear within the xposed installer?

5.) Does the activate and reboot popup notification appear?

6.) Do you activate and reboot?

If you are not doing these things then it will not work. Give it a try with the new direction and let me know what happens.
[Android Head-Units] givanel:
Hi! thanks for the reply. i confirm everything mentioned in the above 1-6 steps. the result is still the same, no response.
[Android Head-Units] looxonline:
OK. I'm working on something now that you can install on your unit and it will pop up with a toast that tells you the method that I need to hook when you press a button. This will help anyone who wants to use it to find the correct methods to hook.
[Android Head-Units] looxonline:
Quick question... with your setup can you program the function of the SWC buttons using the steering wheel app that comes on the HU? This will help me to understand whether or not the CANbus receiver is converting the signal into a resistive one for the unit.
[Android Head-Units] looxonline:
Debug Release

Fundamentally what the module does is hook button press handler methods and translate those into HID button presses that the Android OS recognises. The problem is that button press methods are distributed far and wide throughout the horrible spiderweb of code that these head units come with. Hooking all of them would be a take a lot of effort and largely be unnecessary given the limited buttons available on most steering wheel units.

But the problem remains, how do I find out what methods to hook to satisfy the majority of the SWC buttons used by people out there?

This release offers a possible solution. All button presses are read by the MCU. The MCU in turn has to communicate these with the android OS. There are only a few methods that handle this communication process and so what I have done is hooked those methods and looked for communications between the MCU and android which are related to button presses. When such a communication takes place I display a small toast message on the screen of the head unit with some information which allows me to track down which methods are used to handle that button press.

The toast message will last for 1.5 seconds and then fade. There will be toast messages which appear that have nothing to do with button presses. These generally appear just after the unit has booted up or after the car has started and they appear because the SPI communications that triggers them is very similar to a button press and I have not had the time to filter all of it out. After about a minute these messages will disappear and then only messages relating to button presses should be displayed.

If you would like to use this module to get SWC working with your CarPlay/Spotify/Apple music (or any other music app that is not supported) but currently nothing happens when you install it then please install this debug release and follow the "how to use" guide below.

Changes:

* Added hooks to some low level SPI communication methods which should display a toast with the key code that corresponds to the button that has been pressed. This should help users to identify the key code that corresponds to the button that they are pressing.

How to use this:

* Install using the methods discussed previously in this thread (xposed installer, activate and reboot, etc...).

* When you press a button a toast should pop up with some information. Take note of the information for the buttons that you want included in the app and then submit that information on this thread. Be sure to submit the actual function of the button too. E.G. When I pressed the next button the information on the screen was: "BSPKEY HIT 5"

* Once I get feedback from users I will integrate it into a new release which covers their buttons and then post it on this thread.
[Android Head-Units] CristianJurídico:
I need help

I need help downloading firmware, model S200, xp5, ZHAN, MCU date: 16-04-2018

With these tables settings:

"CPU: ARM Cortex-A53 eight-core 2+32 GB PX5; CPU: PowerVR G6110

Build: PX5-userdebug 8.0.0 OPR5.170623.007 eng.bsp.20180528.174007 test-keys

MCU: 2018-04-16 17:04:06 ZHAN_(NOR)__90_C9RD6686_CAN(A)PX5D1804160"
[Android Head-Units] looxonline:
This is the wrong thread. Please ask this in the correct PX5 thread.

If you need the firmware then contract your supplier. That is where I got mine from.
[Android Head-Units] CristianJurídico:
Here in Brazil the support is very precarious! By the settings your firmware is the same as mine, can you help me by sharing your firmware with me?
[Android Head-Units] looxonline:
I will give you the link to my firmware on one condition: You must promise to respond to me and let me know if it works correctly on your unit. I would like feedback on whether the CAN buttons and all of the other buttons on the head unit work correctly.

The reason I ask for this is because I am interested in whether my firmware is general and has the code required to cover many different units or if it was built specifically for my unit.

If you agree to this then I will DM you the link.
[Android Head-Units] CristianJurídico:
Okay. Let's work this together.

before using your firmware I will analyze with you the information of your system. apparently from the photos I took from my they are the same.

It happens that a "support" here in Brazil sent me an old firmeware, which made everything buggy.

do you have Whatsapp?

follow my whatsapp: +5562992920202

Cristian.
[Android Head-Units] givanel:
Hi!

I’ve tried this latest version, and the result is the same. Nothing happens when i press the sw buttons.

However, upon the unit’s boot, the toast messages appear continuously, like the signals are sent without me pressing the buttons. I’ve attached a video clip for reference.

Also, the unit’s SWC works. Meaning button press are getting recognized by the unit, and can be assigned functions.

Thanks!
[Android Head-Units] looxonline:
Been out of action for a while. Will get back to this in about a week.
[Android Head-Units] ojuniour:
I love you, looxonline.
[Android Head-Units] palacios15:
does not work on joying px5 QD

I tried it on my joying px5 px but the steering wheel controls on spotify only work in the default music app
[Android Head-Units] looxonline:
I doubt that it will work with a QD unit. The modifications are specifically linked to code from the FYT main server apk.
[Android Head-Units] AppleIron:
Hey guys, do you think is possible that this app could work on an MTK8227?

I’ve a problem with the iDrive encoder and maybe it could solve my problem.

Thank you in advance!
[Android Head-Units] looxonline:
Unlikely that it will work unless your unit is running Android 8 and the SOM is made by FYT.
[Android Head-Units] AppleIron:
Thank you so much for the answer!

Do you think is it possible convert it for Android 6?

Thank you!!!
[Android Head-Units] looxonline:
I doubt it. I don't have Android 6 on my unit so I would have no way of testing it and I don't have the time left in my schedule this year to reverse engineer another architecture from another manufacturer.
[Android Head-Units] AppleIron:
Thank you anyway!

Have a great day!
[Android Head-Units] Boss11JSQ:
Display NO SIGNAL —> So desperate....

Hello Dear Forum & BMW "User" :)

I'm writing here now, because I have a problem with the Android Display 10.25 " and i Feel kind of desperate...

When I try to get to the original menu I get a "No Signal" on the left side ,,,, and on the right side several blue lines and 8L (8 liter tank left probably, which is true).

I tried in the settings to select me almost same model (F4x half screen 6.5 ") as I have. Then comes the explained “no signal” left side ,,,, and right side blue lines + 8L. If I, however select Fx4 6.5 "fullscreen, I get a no signal in the middle of the Screen. ,,, at the right side there is nothing this time!

Have a F31, built 2016, and had the little RADIO professinal WITHOUT navigation. I do not even have an optical audio cable. Have no camera installed or other optional festures.

The PDC (at the back, because I have only factory at the back) work, but a bit slow but they work ... :)

Anyone here has a solution,

Or what could I do? I am so desperate ... please help me.....
[Android Head-Units] AppleIron:
Try to change the CanBus type in the secrecy menu.

In my head you have to ‘click’ in our case ‘touch’ 6 times on the Android version in the system settings.

Please post photos of your Android settings so we can help you!
[Android Head-Units] Boss11JSQ:
Hey I will update in 15-17 hours from now that is 5-7pm german time, because it is 2am here and my car is on another parking because i montaged the display yezterday and its not finsihed .. kind of

.... do you mean the android developer menu? And than just change the canBus type
[Android Head-Units] Hopfinger:
This is the newest Zlink.apk Version 3.1.4.

https://we.tl/t-tfTVhQaAHX
[Android Head-Units] MacConsult:
This link is no longer good or working - where can the software be found?
[Android Head-Units] Zaagfluit:
This is the file, it did not work for me, maybe because i did not deleted the previous installation.
[Android Head-Units] Zaagfluit:
This is the file, it did not work for me, maybe because i did not deleted the previous installation. I am curious to know if it works for you
[Android Head-Units] Hunter.42:
Why anybody invent a steering wheel control works by 2.4ghz usb like a keyboard ?
[Android Head-Units] takaiguchi:
I have a Tesla style head unit from Phoenix for my gx470. Steering wheel controls work but not with zlink/ CarPlay. This would be amazing.
[Android Head-Units] humbertodsa:
[MENTION=9217263]looxonline[/MENTION]

Followed your advice I installed your MOD. I tested all 3 versions and got the same result in all of them.

My unit has physical buttons, one of which has the ability to rotate to one side, rotate to the other and press.

When I rotate left, it reaches the end of the course and sends a "previous" command. When I rotate right, it reaches the end of the course and sends the "next" command (only on native players).

After installing your MOD, this button started working in Spotify, but just by pressing.

When pressed once, pauses / plays.

When I press twice, advances the songs on spotify.

This is a breakthrough for me, so far I could not get any command on spotify by physical buttons, just by tapping the application screen.

My steering wheel has 6 buttons (Mode, Mute, track+/-, Volume+/-).

With MOD running, the mute has lost its function and nothing happens when I press (but if I hold it down, the screen goes out). Volume remains normal. But the track+/- , keep working only in native apps.

I tried remapping them for the unit's play/pause function, but they still didn't work on spotify.

Have an idea how to make the track+/- steering wheel and unit work on spotify?

PS: When I intstalled the 1.02 version, screen shows many texts like "SPI KEY 1 -45 76 -96" and other values...