Open MZD Connect Wiki
(Disable Auto-Reboot, chmod files)
Tags: Visual edit apiedit
mNo edit summary
Tags: Visual edit apiedit
Line 1: Line 1:
  +
'''Warning: Attempt this modification at your own risk. This is for educational and research purposes only, and you must at all times follow the laws of your local jurisdiction. None of the editors, owners, or hosts of this site can be responsible for any action you may take with this information or any event that may occur as a result of such action.'''
  +
 
== Getting Access ==
 
== Getting Access ==
 
Nearly all modifications require you to have [[SSH]] access to the Linux system used in the MZD Connect. To establish a SSH Connection, you need to have a Network connection between your Computer (or your Mobile) and your Infotainment System. There are two ways to create a network connection to your car:
 
Nearly all modifications require you to have [[SSH]] access to the Linux system used in the MZD Connect. To establish a SSH Connection, you need to have a Network connection between your Computer (or your Mobile) and your Infotainment System. There are two ways to create a network connection to your car:

Revision as of 12:46, 25 March 2015

Warning: Attempt this modification at your own risk. This is for educational and research purposes only, and you must at all times follow the laws of your local jurisdiction. None of the editors, owners, or hosts of this site can be responsible for any action you may take with this information or any event that may occur as a result of such action.

Getting Access

Nearly all modifications require you to have SSH access to the Linux system used in the MZD Connect. To establish a SSH Connection, you need to have a Network connection between your Computer (or your Mobile) and your Infotainment System. There are two ways to create a network connection to your car:

Ethernet

The car supports some USB-To-Ethernet adapters. Using these, you can connect your car by a standard network patchcable to either your router or directly to your computer (this may require a cross-over cable, if your components cannot Autosense).

WLAN

The MZD Connect is also equipped with a Wireless LAN connection. To use this, connect to your Home WLAN or a portable Hotspot using the Devices menu in the Settings dialog. If you are in North America or Japan, the WLAN adapter may be disabled (due to Mazda discontinuing the Connected Car features in these regions). If that is the case with your car, you can either

  • downgrade your OS-Version to a Version where WLAN was still enabled, disable the Update validation and install a modified Update with WLAN still enabled
  • use Ethernet (either constantly or only to enable the WLAN features)

WARNING: You should only connect to Networks you trust (e.g. not to public WLANs), since everyone in that network could possibly brick (=make unusable) your device!

IP

Once you have created a network link, the car will try to fetch an IP-Address via DHCP. If it fails to get a valid IP 10 times, it will use 192.168.42.1/24 [1]. Depending on your setup, you have different ways of finding out what IP the car uses:

  • You can see active leases in your DHCP-Server (e.g. your home router's Webinterface shows you)
  • You use a network scan to find the car
  • You have no reachable DHCP and the car uses the static IP

SSH

Once you know your car's ip and are in the same network, you can connect using SSH. The login information is

User: root Password: jci

Remount filesystem as read/write

By default, the file system is in read-only mode, which prevents you from making changes. To remount it as writable, run the following command via SSH:

mount -o rw,remount /

This will allow you to change files on the system until the next reboot (you will have to reissue the command after rebooting if you want to continue changing files).

The changes you have made will stay across reboots.

Note: Some files have their permissions additionally set to be read-only. If you get permission errors when changing a file, change its permissions to be read, write, execute (7) for root and read, execute for everybody else (55):

chmod 755 /jci/path/to/file.ext

Disable Auto-Reboot

The original firmware is configured to reboot on any error (hoping that that will fix it). This makes it very hard to repair anything, since you won't have time to revert your changes via SSH before the System reboots.

Note: This has still to be confirmed to really stop your device from rebooting on error, but it looks very promising.

Since both methods require changes to the jci scripts, you need to remount the filesystem and set permissions on the js-Files first (see directions above).

By enabling developer mode

Note: This also enables other dev features.

To enable the built-in debug features, you must set debugMode to true in /jci/gui/common/js/GuiConfig.js. To do so, you may edit it using vi, using SCP, or issue the following command via SSH:

 sed -i 's/debugMode = false/debugMode = true/' /jci/gui/common/js/GuiConfig.js

[2]

By removing the reboot on error code

Note: There may be other locations in code causing the system to reboot.

To only keep the MZD Connect from rebooting on errors in the JavaScript-portion of the system, you need to edit /jci/gui/framework/js/GuiFramework.js. Your options are editing on the device using vi or offline using SCP. Search the following lines (in FW 33, you can find it at line 2412+):

if (this.debugMode)
{
log.error("Framework has timed out while in debug mode. Attempting to return to IDLE state.");

// Go to IDLE state and hope for the best
this._frameworkState = this._FWK_STATE_IDLE;
}
else
{
// Reload the page in order to restart the GUI
log.error("Framework has timed out while not in debug mode. Attempting to restart GUI.");

// Wait briefly so the error message shows
setTimeout(function() {
this._restartCMU("State Timeout");
}.bind(this), 1000);
}

And replace the first line with

if(true)

[3]

Correctly creating backups

When you modify files on your device, you should always create backups of the original file, ideally both on the device and your computer or an USB-Stick. To create a backup on the device, simply copy it using the cp instruction:

cp /jci/gui/apps/syssettings/js/syssettingsApp.js /jci/gui/apps/syssettings/js/syssettingsApp.js.bak

Replace the file with the one you want to modify (note that the second time, a .bak is added to the filename to denote the backup copy)

To create a offline backup of the file, download it using SCP or cp it to a USB-Stick.