2004 to 2016 Mazda 3 Forum and Mazdaspeed 3 Forums banner

1 - 20 of 1430 Posts

·
Registered
Joined
·
274 Posts
Discussion Starter #1 (Edited)
Unofficial Mazda Connect Android Auto Headunit App

This is highly experimental - Use at your own risk and no warranties provided.


UPDATE - I will no longer be able to support this app as I am selling my Mazda. However, @agartner and others should be able to continue the good work that they have been doing.

Please use the chatroom for discussions/support: https://gitter.im/gartnera/headunit





Unofficial port of Android Auto Headunit App to Mazda Connect CMU. The app makes extensive use of jni functions that were originally developed by Mike Reid as part of his Android app.

If you are happy with the result, please donate to Mike Reid (mikereidis AT gmail.com).

CREDITS: Mike Reid, Konsulko, A Gartner, @Siutsch
--------------



INSTALL
----------

Only use with CMU Firmware Version >= V55 . Do not use with V31/33! I suggest that you read through the Index thread to understand what exactly are you doing and for any troubleshooting.


Download the latest zip file from Github Release page AND FOLLOW THE INSTRUCTIONS NOTED ON THE RELEASE PAGE.



VIDEO
-------
https://youtu.be/sJZKQGGUl0w

https://youtu.be/ypxSDt2I_bo



--------

Version 0.8 Change log
----------------------------------
1. Performance improvements via sequential operation and removal of mutex locks - provided by @agartner
2. Changed Video sink to mfw_isink - supposed to be faster and also now opera status (volume) bar can be overlayed if required - need some javascript expertise to make it a floating bar.


Version 0.7 Change log
----------------------------------
1. USB Audio is enabled - to actually use this, you need a separate USB thumb drive in one of the slots, as this is the only way for you to be able to select USB audio in the CMU. Please do not try to use MTP option on your android phone, as it is not going to work.. Also, you need at least one mp3 or any music file in the USB thumb drive (I used http://www.xamuel.com/blank-mp3-files/point1sec.mp3)

2. Since there was a severe case of audio stuttering once for me, I have included an option to disable USB audio and switch back to AUX. You can do this by placing a file called hu_disable_audio_out in the SD CARD (which, of course, means you now need an SD card :)). I haven't actually tested this out as USB Audio worked fine at all times except that one instance.

3. Nexus fix provided by @agartner

4. Debug version of the app - to be run from ssh only - download from here . Copy to /data_persist/dev/bin, chmod 755 and run after executing the following command:

Code:
export LD_LIBRARY_PATH=/data_persist/dev/androidauto/custlib:/jci/lib:/jci/opera/3rdpartylibs/freetype:/usr/lib/imx-mm/audio-codec:/usr/lib/imx-mm/parser:/data_persist/dev/lib:


Version 0.6 Change log
----------------------------------
1. Voice control should not cause app to quit
2. More VIDs added, including a possible fix for Nexus phones with VID 0x18D1


Version 0.5 Change log
----------------------------------
1. Voice control enabled
2. More VIDs added, including a possible fix for Nexus phones with VID 0x18D1
3. Graceful kill when reverse gear engaged - App will restart when reverse gear is disengaged. However, reverse camera is still dark (because same V4L device?) as app isn't killed fast enough.


Version 0.4 Change log
----------------------------------
1. Performance improvement to the gstreamer pipeline - testing shows no issues with Nav now. However, need some feedback to check if it is the same for everyone.
2. Removed auto switch to Bluetooth as it causes problems with the UI. Need to switch manually now.
3. Added a bunch of other Vendor id to Android USB Device VID list
4. Removed aaserver and switched to websocketd.
5. New gstreamer plugin h264parse compiled and added.
6. UI now has USB/Gstreamer debug message window


Version 0.3 Change log
----------------------------------
1. Night Mode - Simple logic for now - 6AM to 6PM is day .. Night afterwards :)
2. First attempt at making libssl/libusb calls thread safe (Voice control will crash otherwise ocassionally).
3. Increased USB send timeouts for better screen refresh.
4. Added LG's Vendor id to Android USB Device VID list


Version 0.2 Change log
----------------------------------
1. Code sync with Mikereidis/Master
2. aaserver - microhttpd server to launch and pass status back to UI - no more messy sh, watch and other hoops.
3. UI integration using Herko ter Horst's method.
4. Exit AA using on screen menu (last screen with speedo icon)
 

·
Registered
Joined
·
46 Posts
Hi, you have done a great job !!!
I'm just starting to test different tweaks and my goal is to understand how they work and make the best modding on my infotratment.

I will be really glad to prepare an USB installer and test the app.

Can you give me some more information on it ?
1. Does the androidauto.js work as i download or i need to receive the working version from you ?
2. the data_persist folder, should be copied directly in the root of the CMU ?

Thanks if you would like to answer me.

Another question :
Wich software development tool you use to prepare the tweak ?
 

·
Registered
Joined
·
58 Posts
This is highly experimental - Use at your own risk and no warranties provided.

INSTALL
------------

Written with assumption that speedometer app is already installed - i.e. watchdog is disabled, opera.ini has User JavaScript=1 and Allow File XMLHttpRequest=1

1. Download from https://github.com/spadival/headunit/blob/WIP/headunit-imx/gst/androidautoV0.10.zip (click on Raw button)

2. Unzip - the content should end up under /data_persist/dev/androidauto and /data_persist/dev/bin/ on the CMU

3. Copy /data_persist/dev/androidauto/androidauto.js to /jci/opera/opera_dir/userjs/

4. Add the following lines to /jci/scripts/stage_wifi.sh

Code:
# Android Auto action watch
watch -n 1 /data_persist/dev/androidauto/huaction.sh &
5. Run the following commands

Code:
chmod 755 /jci/scripts/stage_wifi.sh
chmod 755 /data_persist/dev/bin/headunit
chmod 755 /data_persist/dev/bin/nc
chmod 755 /data_persist/dev/androidauto/huaction.sh
chmod 666 /data_persist/dev/androidauto/headunit*
Appreciate if someone can make a USB install.

OPERATIONS
-------------------

1. Install Android Auto app on your phone
2. Connect the phone to USB and pair the phone bluetooth with the CMU
3. Click on the AA icon under Applications Menu on the CMU
3. A black screen with credits should open up first and input will automatically switch over to Bluetooth Audio
4. Android Auto will then start. If it does not, pull out the USB and start over again (or check the installation.)
5. Only way to stop AA now is to disconnect the USB cable.

WHAT DOES NOT WORK / TO-DO
------------------------------------------------
1. Voice Control
2. Touch drag / multi touch
3. Google Maps night mode
4. Occasional crashes (Hopefully fixed in this version)
5. A better way to stop the app (using the AA onscreen menu item)

androidauto.js is obfuscated to prevent people ripping off and selling the app. If you PM me, I will send a clean version if you are one of the recognized developers and want to improve on it.

If you are happy, please donate to Mike Ried (mikereidis AT gmail.com)

Great job man!!!! can you share some example video?? i can help you making a usb intall script.
 

·
Registered
Joined
·
274 Posts
Discussion Starter #7
Hi, you have done a great job !!!
I'm just starting to test different tweaks and my goal is to understand how they work and make the best modding on my infotratment.

I will be really glad to prepare an USB installer and test the app.

Can you give me some more information on it ?
1. Does the androidauto.js work as i download or i need to receive the working version from you ?
2. the data_persist folder, should be copied directly in the root of the CMU ?

Thanks if you would like to answer me.

Another question :
Wich software development tool you use to prepare the tweak ?
1. Works as is.
2. Yes. The folder structure /data_persist/dev/bin is already present in the CMU. Advantage is it's already mounted read/write and included in $PATH

I use ltib .. Refer to http://mazda3revolution.com/forums/2014-2016-mazda-3-skyactiv-audio-electronics/57714-infotainment-project-432.html#post1570169 for details.
 

·
Registered
Joined
·
274 Posts
Discussion Starter #8 (Edited)
I will put it in new AIO V1.37.

If I got new Speedometer 4.0 from Diginix, I will upload new version.
Great job man!!!! can you share some example video?? i can help you making a usb intall script.
Thanks both. Appreciate it. Siutsch can create AIO and trookam, you can create a standalone version.


Why is it necessary to plugin the usb to make it work?
That's how Android Auto works.
 

·
Registered
Joined
·
93 Posts
Hi spadival

This is awesome !!
So, I installed all files on my CMU and installed AndroidAuto on my Xperia...
But Icon on CMU doesnt work...

I have one question. file of androidauto.js is right??
this is my androidauto.js file.... somwthing wrong??
var _0x781c=["\x68\x72\x65\x66","\x2F\x64\x61\x74\x61\x5F\x70\x65\x72\x73\x69\x73\x74\x2F\x64\x65\x76\x2F\x61\x6E\x64\x72\x6F\x69\x64\x61\x75\x74\x6F\x2F\x61\x6E\x64\x72\x6F\x69\x64\x61\x75\x74\x6F\x2E\x63\x73\x73","\x61\x74\x74\x72","\x3C\x6C\x69\x6E\x6B


I cant see this file about js....

and jquery.min.js same... no LF??
/*! jQuery v1.11.2 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d


hmm...

I will thank you for your reply.
 

·
Registered
Joined
·
274 Posts
Discussion Starter #16 (Edited)
Nothing wrong with the js file.. it is obfuscated to prevent people from selling the app.

Have you tried running from the ssh command line ?

Code:
LD_LIBRARY_PATH="/tmp/mnt/data_persist/dev/androidauto/custlib:/jci/lib:/jci/opera/3rdpartylibs/freetype:/usr/lib/imx-mm/audio-codec:/usr/lib/imx-mm/parser:/data_persist/dev/lib:" headunit

If that works, can you try copying the /data_persist/dev/bin/nc to /usr/bin ? I think that may be a problem with the installation.
 

·
Registered
Joined
·
93 Posts
Nothing wrong with the js file.. it is obfuscated to prevent people from selling the app.

Have you tried running from the ssh command line ?

Code:
LD_LIBRARY_PATH="/tmp/mnt/data_persist/dev/androidauto/custlib:/jci/lib:/jci/opera/3rdpartylibs/freetype:/usr/lib/imx-mm/audio-codec:/usr/lib/imx-mm/parser:/data_persist/dev/lib:" headunit

If that works, can you try copying the /data_persist/dev/bin/nc to /usr/bin ? I think that may be a problem with the installation.
Hi spadival.

I see. I understood decode file...

So, I will check again, and try command.

see later..
 
1 - 20 of 1430 Posts
Top