|
|
|
|
|
|
BMW Garage | BMW Meets | Register | Today's Posts | Search |
|
BMW 3-Series (E90 E92) Forum
>
I cloned my MSV70 DME
|
|
11-30-2016, 04:46 PM | #1013 |
Major General
3987
Rep 7,212
Posts |
I'm now at 8,489 parameters mapped out of ~8700.
The remaining ones will have to be done by hand - actually, some of them don't even have names, as they didn't exist in the original software version. I'm guessing few of them are of much use anyway. edit: 8,592.. probably 80 of them are DTC codes (easy to do, just takes a bit of time). I'll probably stop for a while and work on other projects. Last edited by hassmaschine; 11-30-2016 at 07:18 PM.. |
Appreciate
0
|
12-01-2016, 10:33 AM | #1014 | |
Captain
253
Rep 775
Posts |
Quote:
So assuming there isn't some sort of write protection going on, if you modify the code to clear the time counter (which I think is bszsi) instead of incrementing it, then you can change the power class with NCS Expert and flash a valid 3.0si tune - all over OBDII. In fact, it looks like the routine that stores the internal powerclass is in the program space rather than the boot like I thought, so you can theoretically modify the routine to ignore the timer. |
|
Appreciate
0
|
12-01-2016, 10:42 AM | #1015 |
Major General
3987
Rep 7,212
Posts |
yeah, it's possible to get around - but they were talking about just taking a specific WinKFP file and flashing it without issues. We know that doesn't work. If you are capable of modifying the program and moving stuff around, you probably don't even need to worry about messing with the power class or winKFP files.
|
Appreciate
0
|
12-01-2016, 10:51 AM | #1016 | |
Captain
253
Rep 775
Posts |
Quote:
|
|
Appreciate
0
|
12-01-2016, 12:32 PM | #1017 | |
Colonel
1002
Rep 2,287
Posts |
Quote:
Are you saying we could flash a custom 0PA file so long as the signature for the calibration file was still valid and you changed the pointers to look at the calibration file? Care to explain how would you change these "pointers" |
|
Appreciate
0
|
12-01-2016, 02:46 PM | #1019 |
Major
622
Rep 1,402
Posts |
You guys are all way out there. I have been reading all this and usually have no idea WTF you're talking about but you sure know what your taking about. It's like reading a whole 'nuther language. Well done.
|
Appreciate
0
|
12-01-2016, 03:39 PM | #1020 | |
Captain
253
Rep 775
Posts |
Quote:
Since the signature will be from the data section and the pointers will be pointing to the data section, the hashes will match, and the DME will validate the flash. |
|
Appreciate
0
|
12-01-2016, 03:47 PM | #1021 |
Major General
3987
Rep 7,212
Posts |
Ah, I see. You're not talking about moving the entire program or something - basically just copying the RSA section from the data to the program.
Then you could modify the program space any way you like - bypassing the variant coding check would be easy. I don't think you could flash modified parameters though - it somehow checks the RSA hash before it flashes it (for example, you can't modify the code that deletes the RSA check in the boot sector, and flash that over OBD). rjahl verified this. Unless somehow you could do the same thing with the RSA hash in the parameter space (use the one from the boot sector instead?). |
Appreciate
0
|
12-01-2016, 04:00 PM | #1022 | |
Captain
253
Rep 775
Posts |
Quote:
Can't use this same trick for the parameter space since the parameter validation routine doesn't load enough pointers to substitute one of the other signatures. Unless there's enough unused space to just stick in a complete copy of the parameter space somewhere else in the flash (there isn't enough unused space in the MS45, but maybe there is in the MS*70) What you probably could do is modify the code to edit any of the NVRAM variables to whatever you want. |
|
Appreciate
0
|
12-01-2016, 04:03 PM | #1023 |
Major General
3987
Rep 7,212
Posts |
Another option would be to use the space at the end of the program space (there's lots) to move any maps that you want to customize. It's not quite enough for an entire copy of the parameters, but it's more than enough for everything that needs tuning.
Still, for me, it's easier/cleaner to just delete the RSA check with BDM and go from there. Although, I'm thinking this could possibly work on MSV80, where BDM is not an option at all (making program mods basically impossible). |
Appreciate
0
|
12-01-2016, 04:26 PM | #1024 | |
Captain
253
Rep 775
Posts |
Quote:
Definitely worth exploring the MSV80 as well. Edit: I also noticed that the first segment that's RSA checked is 60000 -> 7FF7F (860000 - 87FF7F), which from the dumps I have seems to be empty. I recall someone (rjahl?) speculating that boot 3 is copied to that area and signature checked before it's written to its final area - there may be some merit to that. If that's the case, changing the pointers to the data section would allow you to modify boot 3 to eliminate RSA checking altogether. Would also explain why I can't actually find a signature field in boot 3 itself. Last edited by Terraphantm; 12-01-2016 at 05:02 PM.. |
|
Appreciate
0
|
12-01-2016, 05:07 PM | #1025 | ||
Colonel
1002
Rep 2,287
Posts |
Quote:
Very interested |
||
Appreciate
0
|
12-01-2016, 05:28 PM | #1026 | |
Major General
3987
Rep 7,212
Posts |
Quote:
rjahl confirmed that it does copy the boot code into the empty space during the flash process. Basically, he flashed a file he knew would fail authentication, and then did a BDM read of it afterwards. However, I think you still have a chicken and an egg problem. I think, until the RSA check authenticates and it moves it over, it's running the boot code from the original location - so even if you changed the offsets in the file you are writing, the actual code that is running is going to be looking at the original values and it will still fail. Probably worth trying, however. |
|
Appreciate
0
|
12-01-2016, 06:45 PM | #1027 | |
Captain
253
Rep 775
Posts |
Quote:
1) Boot3 from serial buffer is written to 860000 2) Program is erased and flashed 3) RSA check is done (routine executed from boot3 that's at 820000, but the check done against 860000) 4) Boot3 from 860000 is copied to 820000 So if you changed the pointers to something valid, step 3 should still pass, and then it will overwrite boot3 with your RSA-deleted boot3. And then it'll never be a problem again . |
|
Appreciate
1
rjahl1001.50 |
12-01-2016, 07:05 PM | #1028 | |
Colonel
1002
Rep 2,287
Posts |
Quote:
|
|
Appreciate
0
|
12-01-2016, 07:10 PM | #1029 |
Colonel
1002
Rep 2,287
Posts |
On another note, It took me a while to figure out why boot 3 had a different location in 0PA file vs the flash.
The answer was simple, the location specified in the Intel Hex or 0PA file is the correct place to flash that data, its simply moved afterwards. |
Appreciate
0
|
12-01-2016, 11:18 PM | #1030 | |
Captain
253
Rep 775
Posts |
Quote:
First pointer is changed from boot 3 to the parameter space and the rest are of regions that seem irrelevant to RSA. Unless your software changes the signature that's stored in the program section to match those new regions, I don't see how that would work. I would try changing the pointers to Code:
00000002 00840000 008400FF 00840240 0085EAFF 00000000 00000000 00000000 00000000 00000000 00000000 00000100 0001E8C0 00000000 00000000 00000000 |
|
Appreciate
0
|
12-01-2016, 11:32 PM | #1032 |
Captain
253
Rep 775
Posts |
Because the program rsa signature range covers the pointers themselves in segment 3. So simply changing the pointer invalidates the program signature.
Last edited by Terraphantm; 12-01-2016 at 11:39 PM.. |
Appreciate
0
|
12-02-2016, 12:09 AM | #1033 |
Major General
3987
Rep 7,212
Posts |
Right, makes sense.
I finally got around to making Winkfp functional - test flashing it right now. Now to dig out rjahl's guide on flashing arbitrary files. |
Appreciate
0
|
Bookmarks |
|
|