olli991 / mib-std2-pq-zr-toolbox

Toolbox for MIB STD2 PQ/ZR Technisat/Preh units.
https://discord.gg/YU3rjatWjT
MIT License
472 stars 77 forks source link

Installtion on units with GEM 3.5 doesn't seem to work #3

Closed olli991 closed 3 years ago

olli991 commented 3 years ago

The installation script throws some errors in the gem.

photo_2021-03-15_13-11-44

Units: photo_2021-03-15_13-35-41 photo_2021-03-15_13-35-45 photo_2021-03-15_13-39-31

Video of error: https://filehorst.de/d/dBIDlgpd

mattcabb commented 3 years ago

Same here. MIB2Std, EU, ZR, H24, SW: 0245, developer mode enabled. New submenu available in GEM, but when pressing Install Toolbox I only get empty console, no logs appear. Waited few minutes, went back with .. button, pressed Install Toolbox again and got the Error in ScreenRenderer log.

IMG_2979 IMG_2978

olli991 commented 3 years ago

We could try replacing the GEM.jar with the update. But I don't know what other incompatibilities it could bring then.

mattcabb commented 3 years ago

Assuming that GEM is the issue... Maybe it's util_install.sh fault with insufficient privileges or something? It looks like the script is just not executed for some reason. Just wondering. Best if someone with this SW version and enabled terminal could check if both .esd and .sh files are copied correctly.

olli991 commented 3 years ago

If y file is not found or permissions are not granted the gem is showing an error for that, at least on my GEM version. We could try to just replace the GEM.jar with the update and import a newer one.

mattcabb commented 3 years ago

Replacing GEM.jar with newer one seems highly experimental. I can not volunteer for this with unit installed in my daily car... Any chance that someone with test bench will try it on 02xx SW?

olli991 commented 3 years ago

@yox2019 said it will not be possible it seems because it's in an extra mount. If changed unit goes into bootloop....

than there is no way to fix it i guess... only if you update the firmware.

mattcabb commented 3 years ago

So I need to perform 02xx to 04xx update, and swdl patch first. Also risky without test bench, right?

olli991 commented 3 years ago

You can patch those necessary files also with a SD card method... if all files you patch are correct there shouldn't be a problem. I have to do this myself here... not tried it myself but the descriptions aren't that complicated so should be possible. Also easy in the car as long as the files are correct.

Just to document it right, sw 03xx should also be fine because my testunit is running on it and has GEM 4.1

olli991 commented 3 years ago

We've build an experimental toolbox installer which also installs GEM 4.1 to the unit. Theoretically this should work but as i have no sw 02xx hardware here I cant test it. Please get in touch if someone is willing to test it on their units with GEM 3.5. Thanks

olli991 commented 3 years ago

Problem is fixed now with special installer package available in the current release. https://github.com/olli991/mib2std-toolbox/releases/tag/v0.51

This special installer will replace the GEM with a much newer one. and toolbox installation and usage is possible from there on.

alexspeith commented 3 years ago

Apologies for bumping a closed ticket.

However, I tried running the GEM installer on a mib2std with nav (hardware H25, software 0245). The installer runs through just fine. However, when entering the green menu after the installation, it's still GEM 3.5, and fails in the aforementioned fashion.

Are there any install logs that I can pull? Also, what's the line in the installer that actually copies over the 4.0 version of GEM?

alexspeith commented 3 years ago

if [ -f /tsd/bin/system/SOP2 ] ; then mount -o remount,rw / if [ -e /dev/sd10t12 ] ; then mount -t dos /dev/sd10t12 /media/mp777 fi if [ -e /dev/sd20t12 ] ; then mount -t dos /dev/sd20t12 /media/mp777 fi cp -f /media/mp777/GEM/GEM.jar /tsd/hmi/HMI/jar/GEM.jar cp /tsd/bin/system/SOP2 /tsd/bin/system/startup mount -o remount,ro / fi

I suppose this is the correct code snippet. One potential failure mode would be more than one SD card inserted. Hence, I've retried the installer with only one SD card/no USB etc., but no luck.

Also, during the update, the following message pops up:

Start diagnostics tester. Main unit/version comparison Accepting error code causes a restart (Cancel).

Cancelling out causes a reboot, but I suspect that parts of the installer completed successfully because there's the mib2std entry in the green menu.

mattcabb commented 3 years ago

Also, during the update, the following message pops up:

Start diagnostics tester. Main unit/version comparison Accepting error code causes a restart (Cancel).

Cancelling out causes a reboot, but I suspect that parts of the installer completed successfully because there's the mib2std entry in the green menu.

As far as I know that's normal during installation. It's related to the B201A fault ("Checking Software Version Management") stored in the 5F module and can be fixed afterwards with a little help of this tool: http://mib-helper.com/im-so-xory/

There will also be B2000 fault stored ("Software incompatible"), but no known fix for that yet...

olli991 commented 3 years ago

Yes the SVM error is completely normal and can be fixed with diagnostic software. We can't do something against it.

The code you found for changing the GEM is also the correct one. Yes there is the possibility to fail if two SD cards are inserted. But we need to be careful. If startup takes too long the watchdog will trigger.

You can see logs if you connect UART during installation.

To be honest, I am I bit confused why it isn't running for you because we tested it on nearly the same unit and it worked. What exactly did you download and how is you SD card structured?

alexspeith commented 3 years ago

Regarding the error, would that have any impact on the installation itself, i.e. will the unit undo the changes?

I've unpacked MIB2STD-Toolbox-v0.51-GEM-update.zip (sha1 625abc2fab6bdda74dea95efe6f3655df7206c42) to the root of an empty 8GB SD card formatted as FAT32, and then started the software update from the service mode menu. The SD card was inserted in the first slot (left one). This was on a system that has separate display and main units (Golf).

Is the serial port the one that is accessible on the quadlock connector?

olli991 commented 3 years ago

The installation injects files into the system:

On the GEM update build it also replaces some files:

So you can't really undo things here. You will have stock startup after the update process/first run of modified startup. But if gem wasn't replaced within the process something went wrong or files are missing on you SD card.

UART is accesable via Quadlock, yes

alexspeith commented 3 years ago

I just tried it with the SD card in the right slot, and with removing the B201A fault (thanks @mattcabb !) - still no luck.

The unit is currently still in the car. I also have the ethernet to USB dongle that works with it. I'm wondering whether it would be possible to modify the installer such that the system also brings up telnet and adds a pass rule to pf.conf to allow access.

Otherwise, I can rip out the unit.

I do suspect that it's some stupid bug like a different device name or something like that.

Thanks, olli991 and mattcabb!

olli991 commented 3 years ago

Is your unit PQ or ZR? Can you please add a screenshot of your trainversion from the unit and also the partnumber etc?

alexspeith commented 3 years ago

It's ZR.

Installed software train version: MST2_US_VW_ZR_P0245T Part number: 3Q0035876

yox2019 commented 3 years ago

... install this update please and let us know if it helped you

MIB2STD-GEM-update.zip

... and make sure you have ONLY 1 SD Card inserted during installation (left slot)

alexspeith commented 3 years ago

confirmed working - thank you very much!

mattcabb commented 3 years ago

Today I tried the 0.61 installer with GEM update. Sadly it did not worked for me. Installation took about 3-4 minutes, during which the unit was rebooted 3 times (I think). After that I long pressed the MENU button to enter GEM and install toolbox from SD card but the GEM was still in 3.5 version. Tried despite this but the same as before - installation did not went through...

Maybe there's a way to log the update/installation process to SD card to gather data for diagnosis?

VW Discover Media MIB2, MST2_EU_ZR_P0245T, 3Q0 035 846, H25.14.78_STD2Nav_EU

yox2019 commented 3 years ago

... install above MIBSTD2-GEM-update.zip

mattcabb commented 3 years ago

... install above MIBSTD2-GEM-update.zip

...so I'm not supposed to use MIB2STD-Toolbox-v0.61-GEM-update.zip from the release? Is the MIB2STD-GEM-update.zip above any different from the released ones?

yox2019 commented 3 years ago

... you can use but it looks like in your case the GEM has not been updated during installation of toolbox. maybe it is a problem of "ZR" units, if you install the above patch (it only contains the GEM update) you will be able to complete the "toolbox" installation via the "green menu" re-installation is not required ...

olli991 commented 3 years ago

Fixed my fail for the latest release... there was still the old startup file in it. I fixed this with Release v0.6.2 now. Hopefully this case is now fixed finally.

bri3d commented 3 years ago

One additional thing about the GEM updater: your startup script tries to mount “sdXXt12” , which is a FAT32 LBA partition. But, some formatters, namely the OS X Disk Utility, will format the card with type 11, so it won’t mount correctly to copy over GEM.jar . Easy to fix with fdisk or formatting on another OS, or the script could probably be updated as well (just checking for more existence shouldn’t cause timeout issues, right?)

olli991 commented 3 years ago

I can add more checks in to the mount script. But how should they look like? Should it check for sdxxt11 or what do you mean with it? Is this even supported by the firmware of the unit 🤔

bri3d commented 3 years ago

Yes, it is supported. This is (I think) why some users are able to apply the SW Update itself but the GEM update fails.

The unit itself is able to automount the /dev/sd10t11 or /dev/sd20t11 block device to apply the update, but then the custom startup script cannot manually mount the card after the reboot in order to find GEM.jar .

Yes, I believe this would be fixed by checking for sd10t11 and sd20t11 .

The difference in the two block device names is just caused by the partition ID assigned in the MBR. The filesystem is identical and both MBR IDs are technically OK. For whatever reason older versions of Mac OS X Disk Utility chooses type 11 / 0x0B for SD cards while Windows chooses type 12/0x0C. They both work.

You can learn more about 0x0B/0x0C here, it's a legacy distinction where 0x0C was added to hide a partition from old versions of DOS that could not handle LBA addressing: https://superuser.com/questions/1517413/what-is-the-difference-between-lba-and-non-lba-ids-in-an-mbr-partition-table . And you can read about the way the partition ID from the MBR is appended to the block device name in QNX here: http://www.qnx.com/developers/docs/qnxcar2/index.jsp?topic=%2Fcom.qnx.doc.neutrino.sys_arch%2Ftopic%2Ffsys_Partitions.html .

olli991 commented 3 years ago

I didn't know that possibility. I'll add this to the script

olli991 commented 3 years ago

I pushed a pre-release with the added lines to the startup: https://github.com/olli991/mib2std-toolbox/releases/tag/v0.6.3

New lines from the startup file:

# Check for toolbox sd card and install custom GEM.jar
if [ -f /tsd/bin/system/SOP2 ]; then
  mount -o remount,rw /     
  if [ -e /dev/sd10t11 ]; then                    
    mount -v -t dos /dev/sd10t11 /media/mp777             
    if [ -d /media/mp777/GEM ]; then                
      cp -v -f /media/mp777/GEM/GEM.jar /tsd/hmi/HMI/jar/GEM.jar
      cp -v /tsd/bin/system/SOP2 /tsd/bin/system/startup
    else
      unmount -f /media/mp777                    
    fi
  fi
  if [ -e /dev/sd10t12 ]; then                    
    mount -v -t dos /dev/sd10t12 /media/mp777             
    if [ -d /media/mp777/GEM ]; then                
      cp -v -f /media/mp777/GEM/GEM.jar /tsd/hmi/HMI/jar/GEM.jar
      cp -v /tsd/bin/system/SOP2 /tsd/bin/system/startup
    else
      unmount -f /media/mp777                    
    fi
  fi
  if [ -e /dev/sd20t11 ]; then
    mount -v -t dos /dev/sd20t11 /media/mp777 
    if [ -d /media/mp777/GEM ]; then
      cp -v -f /media/mp777/GEM/GEM.jar /tsd/hmi/HMI/jar/GEM.jar
      cp -v /tsd/bin/system/SOP2 /tsd/bin/system/startup 
    else
      unmount -f /media/mp777
    fi
  fi
  if [ -e /dev/sd20t12 ]; then
    mount -v -t dos /dev/sd20t12 /media/mp777 
    if [ -d /media/mp777/GEM ]; then
      cp -v -f /media/mp777/GEM/GEM.jar /tsd/hmi/HMI/jar/GEM.jar
      cp -v /tsd/bin/system/SOP2 /tsd/bin/system/startup 
    else
      unmount -f /media/mp777
    fi
  fi
  mount -o remount,ro /
fi

@mattcabb would be cool if you can test it if it now works for you. Can you also confirm you've partitioned your SD card on Mac OS X? This would also confirm @bri3d finding.

mattcabb commented 3 years ago

At the moment I can confirm that in fact I was using macOS to format/prepare the card. Will test new release in upcoming days and let you know if it finally worked for me.

Marshy33 commented 3 years ago

Hi, so happy to finally see a toolbox for the standard!

Unfortunately I can't get it to install on my head unit with GEM 3.5

2: "SKODA" 3: "Car" 4: "2016" 7: "TechniSat" 8: "MIB Standard2 ZR Nav" 10: "0253"

After installing and going to the green menu, GEM still shows 3.5 and when clicking install toolbox, it shows a blank screen, with just "..." To return to the previous page.

Let me know if you need any more details. Thanks

Edit. Can confirm this is the exact issue mattcabb has shown on 16th March above.

olli991 commented 3 years ago

Did you use the GEM update installation package? The last one? 0.6.4?

Marshy33 commented 3 years ago

Did you use the GEM update installation package? The last one? 0.6.4

Yes I used the latest release with GEM update

olli991 commented 3 years ago

Please try the version linked here: https://github.com/olli991/mib2std-toolbox/issues/3#issuecomment-805032023 it should only update the gem without toolbox installation

Marshy33 commented 3 years ago

Please try the version linked here: #3 (comment) it should only update the gem without toolbox installation

That also did not work, but I can try again

olli991 commented 3 years ago

Hmm maybe your SD card is wrong formatted or file structe is bad on there. Don't know why this isn't working for you now. Should work

Marshy33 commented 3 years ago

Hmm maybe your SD card is wrong formatted or file structe is bad on there. Don't know why this isn't working for you now. Should work

Will try a different card now. Do you suggest trying 0.6.4 or the zip in comment 3?

Appreciate the help

olli991 commented 3 years ago

ZIP in the comment is only GEM... 0.6.4 is GEM and Toolbox... so do have less variables the ZIP would be better for now to troubleshoot

Marshy33 commented 3 years ago

ZIP in the comment is only GEM... 0.6.4 is GEM and Toolbox... so do have less variables the ZIP would be better for now to troubleshoot

All working now! A different SD card and worked first time using 0.6.4.

Thanks for the help.

Now to find the gal.json. need to try and tweak some things to hopefully stop wireless android auto causing reboots.

olli991 commented 3 years ago

there is no gal.json sadly... otherwise i've implemeted the patch from high toolbox already

Marshy33 commented 3 years ago

there is no gal.json sadly... otherwise i've implemeted the patch from high toolbox already

Ah no way :(.

Do you know of anything else I may be able to tweak.

Basically using a wired connection to android auto is perfect, but as soon as I use the AAwireless dongle, it will work for a while but soon enough sound will go out of sync (Spotify playing a different song to what's showing) and eventually it will crash the headunit and cause a reboot

It's like the difference in latency between cable and wireless is too much for the headunit to handle. As far as we are aware it's only happening on the technisat mib2 standards too.

lprot commented 3 years ago

Try to install this one https://github.com/olli991/mib-std2-pq-zr-toolbox/archive/refs/heads/experimental.zip There are two ways to install:

  1. from SD
  2. from the console via install.sh. Please read README. I will appreciate sysinfo.txt of your units done via Mib_info menu.
olli991 commented 3 years ago

Upgrade of GEM should now be fixed with new version 0.7 https://github.com/olli991/mib-std2-pq-zr-toolbox/releases/tag/v0.7 closing this for now.

mattcabb commented 3 years ago

At the moment I can confirm that in fact I was using macOS to format/prepare the card. Will test new release in upcoming days and let you know if it finally worked for me.

Tried to install today on a VW ZR 0245 with 3.5 GEM. It worked! 🚀

kevfal commented 1 year ago

Hi, I am looking to update the firmware and install MIB2 toolbox so that i can eventually turn on Android Auto using OBD11 on a Seat Alhambra. I have put the unit into developer mode and tried to install the toolbox but the start button is greyed out. Any ideas? My unit is a single SD slot Technisat MIB2, is it possible to do it on these units? It is running MST2_EU_SE_PQ_P0245T with GEM3.5. thanks in advance

Medmimoza commented 1 year ago

@kevfal , is it navi unit with 2 sdcard slot?

kevfal commented 1 year ago

@kevfal , is it navi unit with 2 sdcard slot?

Hi Medmimoza, no it has a single SD slot and no Nav.

Medmimoza commented 1 year ago

@kevfal , is it navi unit with 2 sdcard slot?

Hi Medmimoza, no it has a single SD slot and no Nav.

That's why its grey, this solution work only with navi unit, try to look for emmc method, need to desassemble unit, connect to emmc, then patch, need special tools