2004 to 2020 Mazda 3 Forum and Mazdaspeed 3 Forums banner
1 - 20 of 1751 Posts

· Super Moderator
Joined
·
7,814 Posts
If you have any intention of using the AIO software to apply tweaks to your system, DON'T upgrade to .502. USB connectivity has been removed, so if you have tweaks and upgrade, you're stuck with them. If you upgrade before applying tweaks, you are effectively shut out of the system and AIO won't work. Stay tuned for further developments.

UPDATE------
See the how-to for the workaround starting here on this page -


 

· Treveloper
Joined
·
545 Posts
SOLUTIONS

If you have any intention of using the AIO software to apply tweaks to your system, DON'T upgrade to .502.
While this thread is still on its first page I would like to post the solutions that the awesome community of developers, but mostly the great @id7, have come up with.
First of all if you have not yet updated to 59.00.502, installing the autorun script is the most important thing you can do to regain access after the update.
THIS IS FOR ADVANCED USERS. NEED LINUX KNOWLEDGE
IF you not absolutely sure about what you do NOT TRY THIS !
IF you don't have serial access to your CMU, DON'T TRY THIS ! (for alternative access if something goes wrong)

background:
The new version of 59.502 firmware was secured. this is good for normal Mazda owners.
We don't want to someone put a usb with music to our car and silently install some troian in our cmu with access to canbus, and software upgrade capabilities to other systems.

the problem:
a) the *.up files run BUT not execute external files that we use to run scripts from usb
SO usb storage now not have "autorun" option
we can't create *.up files because we not have the private keys of signer certificate
b) SSHd was secured from an earlier version too (root password change, and disable password authorization on sshd)

Solution: to access 59.502 is possible in two way

1) if you have now access to CMU (you have an earlier version than 59.502)

attached zip file contains some scripts that use data_persist/dev/bin/autorun option to:
- run an alternative sshd server on port 24000 and open firewall on wifi+eth: "01-start-sshd-and-open-firewall"
- update /etc/ssh/sshd_config to accept password auth: "00-update-sshd-config-if-needed"
- update /etc/passwd to have access with jci/jci + user/jci where both users have root privileges: "00-update-etc-passwd-if-needed"
- create wifiAP with your ssid/pass to connect to cmu with your laptop/phone "00-start-wifiAP" (don't forget to modify the ssid/password !)
- install a script that monitor insert event of usb storage and run tweaks from that on 59.50x and above: "00-run-tweaks-from-usb". jci-dialog not work BUT scripts are executed! Need help to improve!

extract zip file to /tmp/mnt/data_persist/dev/bin/
set execute bit to /tmp/mnt/data_persist/dev/bin/autorun
after reboot if wifi AP appear everything working
Test it with connecting using wifiAP or usb-ethernet to ssh server on port 24000

I try this script and survive upgrade from 56.230->56.513
downgrade from 56.513->56.230
and upgrade from 56.230->59.502

if you not need some of this futures simply not copy (or delete) the directory (for example remove "00-start-wifiAP")
if you want to add some new functionality create somewhere a *.autorun file, preferred in separate dir

2) if you already upgraded to 59.502
over usb-ethernet you have access to ssh server on port 36000 but password auth is disabled
ONLY over serial console you can connect using user "user" and pass "jci" (without root privileges)
As not privileged "user" user you can extract/copy from an inserted usb/sd this files to /tmp/mnt/data_persist/dev/bin/
Don't forget to chmod +x /tmp/mnt/data_persist/dev/bin/autorun
After reboot, CMU run our script with root privileges and open ssh/firewall/wifi/usb storage autorun/...
You can connect only via serial console !
in 59.502 sshd not accept password authentication.
you need to modify in /etc/ssh/sshd_config
PasswordAuthentication yes
you can do it using my scripts on YOUR OWN RISK http://mazda3revolution.com/forums/...22458-aio-all-one-tweaks-399.html#post2072794
To gain serial console access you can read this
- http://mazda3revolution.com/forums/...714-infotainment-project-515.html#post1631825
- http://mazda3revolution.com/forums/...714-infotainment-project-516.html#post1633513
The console works is connected to:
User: user
Pass: jci
Which is a limited user
Then run the script and take root again
EDIT @id7's scripts are in the repository under 'Recovery Scripts': autorun repository
EDIT2: These scripts are now in AIO under 'autorun > id7_recovery.' Install before updating and the scripts will automatically regain access after the update
 

Attachments

· Treveloper
Joined
·
545 Posts
More info on connecting via serial connection BY id7:
*** AT YOUR OWN RISK ***

How to got serial console access to your CMU:
- if your CMU is in bootloop,
- stuck at mazda logo
- or you not have access to it via ssh


I go with my car to a service, who specialized in car alarms and gps-es (car electronics)
I said what I want (show pictures, explain,...)

1) I said "I want 1 cable with 3 wires to be installed in my car"
- get out the middle console of car
- get out the CMU fixed with one screw
If you want help to get out the CMU see this video

2) one part of cable connect to CMU TX + CMU RX + ground of car (connected to one screw of CMU)

CMU TX/RX can be reached in two ways:

2a) "the elegant way", put new pins in existing connector to 2S/2T (our service guy don't have this kind of pin)
http://mazda3revolution.com/forums/attachment.php?attachmentid=209098&d=1497973030
http://mazda3revolution.com/forums/attachment.php?attachmentid=211106&d=1499204460
in this situation you not needed to open the CMU
the whole process is described here http://mazda3revolution.com/forums/attachment.php?attachmentid=209650&d=1498149733

2b) "my way", open the CMU and solder two wires on baseboard of CMU (for service guy this is the easy way if not have compatible pins for that special connector)
http://mazda3revolution.com/forums/attachment.php?attachmentid=155793&d=1459377888
http://mazda3revolution.com/forums/attachment.php?attachmentid=155809&d=1459377899
3rd wire (ground) can be used from anywhere, I used from external box of CMU from a screw
like the orange cable in http://mazda3revolution.com/forums/attachment.php?attachmentid=209098&d=1497973030

3) other part of 3wire cable with some connector put in fuse box (not need to put in fuse box, this is my personal option. because this cable is not used only once a month)
http://mazda3revolution.com/forums/attachment.php?attachmentid=155817&d=1459377902
CONNECTOR: You need something that simply can be connected to your TTL serial converter
if you don't have any type of connector a stereo audio jack is perfect (you need to connect somehow 3 wire, Left/Right/Ground)
solder a stereo jack female to car part of cable, and solder a stereo jack male to your TTL convertor
my original post http://mazda3revolution.com/forums/...714-infotainment-project-515.html#post1631825
DON'T left USB serial TTL to be connected always to CMU !!!
left the cable free with a connector! When you need connect the cable to the converter
http://mazda3revolution.com/forums/attachment.php?attachmentid=155825&d=1459377911
and the converter to your computer/laptop directly or http://mazda3revolution.com/forums/attachment.php?attachmentid=155833&d=1459377916

4) need a serial to TTL converter
http://mazda3revolution.com/forums/attachment.php?attachmentid=155801&d=1459377894
this is a "USB->serial + serial->TTL in one"
you need TTL 3.3V signal converter (exists 5V variants - not good)
I used one "Arduino programmer" (about 2USD) search ebay for "usb serial Arduino programmer uart TTL" (many have 5V power output, no problem, the RX/TX signal need to be 3.3V ==> UART TTL)
My serial convertor have 3.3V power output, RX, TX, GND, +5V power output. we use only RX,TX,GND
if this usb converter (without any wire) is connected to your computer will be recognized as a serial port, possible that you need some driver for it
you can test for example with a raspberry pi. (RPi have serial console and you can got experience with connecting to serial console, rpi3 have a problem with serial console speed and you need to put rpi3 to a fixed CPU freq to serial console work correctly)

5) connect usb-serial-ttl to your laptop
with a terminal client you can connect to that serial port (in my ex. COM11)
http://mazda3revolution.com/forums/attachment.php?attachmentid=169154&d=1464947724
you need a serial terminal client (hyper-terminal), my favorite is securecrt
if your terminal client can transfer files via Zmodem protocol you can send/receive files via serial console between laptop and CMU
to send from CMU to laptop type on CMU "sz filename"
to send from laptop to CMU type on CMU "rz" and select files on laptop
rz command NOT OVERWRITE existing files on CMU !!!

connect to CMU with over COMx with 115200,8,N,1 (baud rate,databits,parity,stop bits) without DTR/DSR, RTS/CTS, XON/XOFF
http://mazda3revolution.com/forums/attachment.php?attachmentid=169162&d=1464947729
more info at http://mazda3revolution.com/forums/...id-auto-headunit-app-beta-62.html#post1735122

6) if you press ENTER the CMU will respond with a "cmu login:"
username ENTER,
password ENTER
and you have a bash command-line
you can modify files, execute commands, transfer files via USB/SDCARD/Zmodem over serial
if your CMU is not "bricked" you will got a LOT of log messages, and you not see what you type and what respond you got
You can see an example in http://mazda3revolution.com/forums/...22458-aio-all-one-tweaks-404.html#post2075554
meanwhile I type "reboot" CMU show five lines and I see my command in different lines. BUT the command is in one logical line.
my hyper-terminal client can save to file the whole session and I can verify output of my commands in hyper-terminal own log file.
the best way is to copy/paste commands

*** AT YOUR OWN RISK ***
7) after you are connected with user/jci to cmu
prepare a usb with a directory "XX" on it
extract autorun.v2.zip in this XX dir on usb
modify / delete that you need/not need
put this usb to your CMU
wait 5 sec (to be mounted)
and copy/paste this commands in hyper-terminal for CMU
Code:
cp -r /tmp/mnt/sd?/XX/* /tmp/mnt/data_persist/dev/bin/
chmod +x /tmp/mnt/data_persist/dev/bin/autorun
after restart the scripts are running
rename attachment to 'autorun.v2.zip'
 

Attachments

· Treveloper
Joined
·
545 Posts
In this weekend I resolve the problem with jci-dialog.
Now I attach a new version of autorun library
old version see here http://mazda3revolution.com/forums/...22458-aio-all-one-tweaks-399.html#post2072794
This version works perfect with usb tweaks without any modification of old tweaks on 59.00.502

I add some security futures:
- WiFi AP not start if you not modify the default password
- executing tweaks from usb can be locked for a specific usb thumb (verified with serial number of usb)
- add a new script to execute run.sh at startup from sdcard/usb

with this autorun library installed, I generate AIO usb drive to install AA
Modify tweaks.sh to accept 59.00.502 (in function compatibility_check, after $_VER_EXT = 502, echo 0 change in echo 4)
AA 1.02 + date to statusbar installed and working fine

With last AA from apkmirror, and a specific beta version of waze for AA (4.24.0.113) already from apkmirror installed on 6.0.1 Andorid phone waze work in CMU !!!
don't forget to put your phone in developer mode, enable usb debug, set usb in audio

autorun library scripts survive CMU update and remain in working status after update !
copy AT YOUR OWN RISK "MUST" and/or "OPTIONAL" files/dirs to /tmp/mnt/data_persist/dev/bin/ BEFORE updateing to 59.00.502 or using serial console if you already are at 59.00.502

00-run-tweaks-from-usb -- MUST -- all files in this dir emulate old behavior of CMU to run tweaks from USB drives when inserted. On CMU with version older that 59.00.502 do nothing, BUT you need to install before upgrade to 59.00.502
00-start-wifiAP -- OPTIONAL -- start car wifi in AP mode with YOUR ssid / pass. Modify in "wifiAP.config" file the ssid and choose a strong pass before install !
00-update-etc-passwd-if-needed -- MUST -- update /etc/passwd file with know passwords with root privileges. This passwd file survive upgrades because don't have root user in it
user/jci and jci/jci are both have root privileges.
00-update-sshd-config-if-needed -- MUST -- update /etc/ssh/sshd_config to accept password auth. with usb-eth you can connect to ssh on port 36000
01-start-sshd-and-open-firewall -- OPTIONAL -- start a new sshd service on port 24000 and open firewall to be accesible over usb-eth/wifi
99-execute-run-sh-from-sdcard-and-usb-at-startup.autorun - OPTIONAL -- execute run.sh on sdcard and usb at startup
autorun -- MUST -- execute every *.autorun file
Rename attachment to autorun-v3.zip to unzip
 

Attachments

· Super Moderator
Joined
·
528 Posts
MMC Japan has just released a bulletin to ALL Distributors and Mazda Dealer worldwide concerning AIO Tweaks and install of version 59.00.502 Firmware.

Basically IF your Mazda is still under NCW and hardware or software issues occur during 502 update Mazda will not cover Warranty Claims as system has been hacked...

This applies to ALL Mazda Models with Mazda Connect or MZD Connect.

http://mazda3revolution.com/forums/...dwide-official-tweak-warning.html#post2085994
 

· Treveloper
Joined
·
545 Posts
MMC Japan has just released a bulletin to ALL Distributors and Mazda Dealer worldwide concerning AIO Tweaks and install of version 59.00.502 Firmware.
Basically IF your Mazda is still under NCW and hardware or software issues occur during 502 update Mazda will not cover Warranty Claims as system has been hacked...
This applies to ALL Mazda Models with Mazda Connect or MZD Connect.
http://mazda3revolution.com/forums/...dwide-official-tweak-warning.html#post2085994
Upon reading this again I have to say, it is very light. They pretty much don't want to cause any trouble so they just say everyone that fixes their system is not going to be covered under the software warranty. Well good, that is totally standard procedure just like a rooted android or jailbroken iphone its their choice to do that so I'm glad they are being adults about it. On a related note, I think they may not even disable the autorun script in future versions out of respect for those who take the extra, advanced steps to maintain/regain access to their systems (although they are more likely to eventually shut this door on us so we should all be wary of all future unknown firmware version releases).
Here is another great note on Recovery:
Hi All,
I got AIO Tweaks working on my new 2017 Mazda 3 with v59.00.502 4AN via Serial Console. Thanks you of this wonderful community.
Here is some tip after I had trouble because my USB1/USB2 from my CMU is registering as sda1/sdb1, are not the same sda/sdb from the autorun.v2.zip provided. So it did not initiate the AIO scripts on the USB when I plugged in.
1. After installed the latest AIO v2.6.6. use the "Autorun - id7_Recovery" option. Then copy to your usb.
2. Plug USB into your mazda.
3. Connect your Serial Console to your laptop and your CMU. Use TeraTerm or Putty and connect via Serial port of your TTL adaptor.
4. Once connected you see a continuous spam of logs, there no other way getting around this, you have to copy/paste commands blindly.
5. Here its just a trial and error have to copy and paste commands to the window full of spam. (you can't really see your commands/input response, because logs filling your screen window too fast.
6. Here is what you have to copy paste to the window.
a) just press ENTER keys a few times.
b) copy the name "user" with quotes, I have already commands typed up in text/wordpad document. Then go back to the log window, I used TeraTerm have the menu option to "Paste", "Paste - ENTER <CR>". I used "Paste -ENTER <CR>"
c) next copy "jci", and click on the window with the spamming logs and select "Paste - ENTER" option. If your terminal client don't have copy/paste option. You can use right-click mouse and select "Paste" then hit "ENTER" key.
d) make sure your usb connected to your Mazda CMU. Then copy/paste "cp -r /tmp/mnt/sd*1/* /tmp/mnt/data_persist/dev/bin/" hit "ENTER" or "Paste - ENTER" option
e) copy/paste "chmod +x /tmp/mnt/data_persist/dev/bin/autorun" without quotes, and hit "ENTER" or "Paste - ENTER" option.
f) copy/paste "/bin/sh /tmp/mnt/sd*1/tweak.sh" without quotes, and hit "ENTER" or "Paste - ENTER" option.
7. Now you can check if your Infotainment screen have any prompts, and when it actually works it will reboot itself.
8. Once you see the Mazda logo after it reboot, you can take out your USB from your Mazda CMU. Else it will try to run the autorun scripts again but this time from your USB instead.
9. You can now use AIO tweaks to compile all the tweaks you wanted, and then just pop the usb into the Mazda CMU unit and you will see the AIO Tweaks activating on the Mazda Connect Infotainment screen.

Hope this helps.
 

· Registered
Joined
·
2 Posts
Actually, follow the #6 , and if you have experience with linux, it is easy.
the hardest thing is remove the plastic, you can see the video in #6 .

but you will need to prepare 1. a console board with tx/rx/ground 2. t10 3. usb storage and format to fat32.
 
1 - 20 of 1751 Posts
Top