bri3d / VW_Flash

Flashing tools for VW AG control units over UDS. Compression, encryption, RSA bypass, and checksums are supported for Simos18.1/6/10, DQ250-MQB, DQ381-MQB, and Haldex4Motion-Gen5-MQB.
Other
304 stars 77 forks source link

issue with "Full Flash Unlocked (BIN/FRF)" #57

Closed ButcherDSM closed 2 years ago

ButcherDSM commented 2 years ago

Hello

after successful unlock, on level Full Flash Unlocked (BIN/FRF) - nothing happens and in logs i see some errors Flash Stock (Re-Lock) also not work and car dont start now (

please help me, thanks!

all files in attac simos 18_1.zip h

sagishm commented 2 years ago

Your ecu is locked and immo not passed, you need to read ecu in boot and so immo off, then you need to write original frf.

ButcherDSM commented 2 years ago

so, my friend with Magic Flex make "restore to original" and car alive. i cant use your VW_Flash for my car?

sagishm commented 2 years ago

You can, follow the instructions step by step.

ButcherDSM commented 2 years ago

i follow instructions step by step and got error i do something wrong?

ButcherDSM commented 2 years ago

tell me please, what am I doing wrong?

i take file FRF that full identicaly to my ID.

then at the stage from documentation:

Flashing your new software. Pick "Open Folder..." and navigate to your Tune folder. Pick "Full Flash Unlocked (BIN/FRF)". Pick the FL_XX_XX.bin file matching your car

VW_flash starts unpacking something and stops at 80 with an error in the log window

sagishm commented 2 years ago

You selected the wrong unlock, you needs to select “Unlock ECU (FRF)” with the unlock file, then you needs to “Full flash unlocked” with your file.

bri3d commented 2 years ago

VW_flash starts unpacking something and stops at 80 with an error in the log window

Please post errors if you have them. If you don't post the error, I can't look into it...

bri3d commented 2 years ago

I do see in the logs that you posted (thank you for doing this! I didn't see them at first! I need to improve error logging for exceptions so that they show in logs too...) that something strange might be going on here.

The logs end with

2022-06-24 10:59:47 [INFO] FlashUtils: Encrypting FD_1 compressed size :697620

This suggests to me that there might be an issue with the padding being applied by lzss as this does not correctly end on a 16 byte boundary.

What version of VW_Flash are you using? Are you using a released version or a version you made yourself?

I have recently made changes to the compressor to support "exact length" control modules. These changes are not yet in a "stable" release (I try very hard to make sure stable releases are truly stable), but they are in pre-releases and Git. They should not have an effect on Simos compression, and I did test via both automation and flashing my own car to verify, but these files particularly may be producing a side effect I didn't notice. I'll take a look.

bri3d commented 2 years ago

I did a quick differential diagnosis.

This is a bug in the latest versions of VW_Flash caused by my compression changes.

Please revert to the v0.2.11 tag, either by downloading the release or git checkout . make sure that if you rebuilt lzss you do so again after checking out the older version.

For those following along, if you do have issues, reverting to the last "stable" release tag is usually a safe bet as I ensure these have been fairly extensively tested prior to promotion to stable.

I'll make a fix later today, it's a simple issue.

ButcherDSM commented 2 years ago

You selected the wrong unlock, you needs to select “Unlock ECU (FRF)” with the unlock file, then you needs to “Full flash unlocked” with your file.

i do exactly that first unlock goes fine in the second step when i choose full flash unlocked - its freezes at 80

bri3d commented 2 years ago

You did everything correctly. Thank you again also for posting logs in your first post. You found a bug in my latest code changes. https://github.com/bri3d/VW_Flash/issues/57#issuecomment-1165662216

ButcherDSM commented 2 years ago

I do see in the logs that you posted (thank you for doing this! I didn't see them at first! I need to improve error logging for exceptions so that they show in logs too...) that something strange might be going on here.

The logs end with

2022-06-24 10:59:47 [INFO] FlashUtils: Encrypting FD_1 compressed size :697620

This suggests to me that there might be an issue with the padding being applied by lzss as this does not correctly end on a 16 byte boundary.

What version of VW_Flash are you using? Are you using a released version or a version you made yourself?

I have recently made changes to the compressor to support "exact length" control modules. These changes are not yet in a "stable" release (I try very hard to make sure stable releases are truly stable), but they are in pre-releases and Git. They should not have an effect on Simos compression, and I did test via both automation and flashing my own car to verify, but these files particularly may be producing a side effect I didn't notice. I'll take a look.

exactly! in error exist srting ".... not correctly end on a 16 byte boundary." i use latest release, but not stable

i try stable version in few days and write to you thanks for your help!

bri3d commented 2 years ago

I fixed this on latest master . I also deleted the pre-releases as it seems they were causing issues. I will push another pre-release when I have some more new features ready to test.

Thank you for testing and reporting the issue!