06-11-2019, 06:43 AM | #2223 | |
Private First Class
50
Rep 139
Posts
Drives: BMW 5 series E60, Mercedes S
Join Date: Apr 2019
Location: Amsterdam, Netherlands
|
Quote:
|
|
Appreciate
0
|
06-11-2019, 06:44 AM | #2224 |
Private First Class
50
Rep 139
Posts
Drives: BMW 5 series E60, Mercedes S
Join Date: Apr 2019
Location: Amsterdam, Netherlands
|
This is something I will be working on next. After I've cleaned up and patched al the MCU's around.
|
Appreciate
0
|
06-11-2019, 08:52 AM | #2225 |
Private First Class
50
Rep 139
Posts
Drives: BMW 5 series E60, Mercedes S
Join Date: Apr 2019
Location: Amsterdam, Netherlands
|
OK, patches are here:
https://github.com/chinesebmwheadunits/mcu In case anyone has another MCU update (different hardware string), i'd be very interested. |
Appreciate
0
|
06-11-2019, 09:35 AM | #2226 | |
Private
27
Rep 90
Posts |
Quote:
I have the MCU version on the photo (AVIN USA PX6 bought last month). If I do the MCU update you published what can I expect new from my unit? It doesn't dims anymore, is that so? Thanks, and sorry for the question! |
|
Appreciate
0
|
06-11-2019, 09:40 AM | #2227 | |
Private First Class
50
Rep 139
Posts
Drives: BMW 5 series E60, Mercedes S
Join Date: Apr 2019
Location: Amsterdam, Netherlands
|
Quote:
Let me know if it works BTW. Last edited by __fred__; 06-11-2019 at 09:47 AM.. |
|
Appreciate
2
antonius201827.00 amfgray0.00 |
06-11-2019, 09:49 AM | #2228 | |
Private
27
Rep 90
Posts |
Quote:
Thank you! I'm a little afraid I'll do something wrong, but let's see if get the courage to do it. Last edited by antonius2018; 06-11-2019 at 10:50 AM.. |
|
Appreciate
0
|
06-11-2019, 10:17 AM | #2229 | |
Private First Class
32
Rep 190
Posts |
Quote:
How you managed to install the new MCU file since it compares with that id? My unit has in the MCU field 035243bYC-CCC-HW8-180921 Can i use any of these MCU files or it will not install??? |
|
Appreciate
0
|
06-11-2019, 10:19 AM | #2230 | |
New Member
0
Rep 21
Posts |
Quote:
As I understand You are dealing with MCU of android 7 HU, will it be suitable to use with HU8? |
|
Appreciate
0
|
06-11-2019, 10:22 AM | #2231 |
Private First Class
50
Rep 139
Posts
Drives: BMW 5 series E60, Mercedes S
Join Date: Apr 2019
Location: Amsterdam, Netherlands
|
I found something in the firmware that is interesting and unusual. Almost all development of embedded microcontrollers is done in good old C. A C compiler is almost always available and in case the chip does not run a full OS, the toolchain of the microcontroller manufacturer or something similar is used. It's almost always an assembler and C toolchain.
Almost all C compilers use null terminated strings. You can recognize a function like strlen (which calculates the length of a string) in assembly from a mile away because it needs to look for a NULL character in the string to find its length. When strings are passed between functions, the stack can be used in C as well. In the firmware from these units, the compiled code uses length prefixed strings where the length of the string is stored before the first character. These are called Pascal-strings because Pascal is a major language that stores it's strings in Length-prefixed format. They are also always pointers to the heap. Never stack allocated. So I started looking for Pascal compilers that are available for STM32 microcontrollers and it turns out that there is only ONE compiler (apart from open source) available: https://www.mikroe.com/mikropascal-arm I'm pretty sure that this is the IDE + toolkit that was used to assemble our firmware. I'm planning on downloading and installing the IDE as it has more than 1200 library functions. It might be that it's easier to recognize functions based on the source code. It seemed strange to me that I could not really recognize any of the initialization code in the firmware, based on the initialization code that ST provides itself. When you compile the example code from ST to initialize the clock etc. it's really different from our MCU code). This could be a logical explanation. TBC.... |
Appreciate
1
antonius201827.00 |
06-11-2019, 10:24 AM | #2232 | |
Private First Class
50
Rep 139
Posts
Drives: BMW 5 series E60, Mercedes S
Join Date: Apr 2019
Location: Amsterdam, Netherlands
|
Quote:
To be safe, only install 2019 version in the MCU repository. These come from PX6, android 8 units. |
|
Appreciate
1
amfgray0.00 |
06-11-2019, 11:07 AM | #2233 |
New Member
0
Rep 21
Posts |
Thx, and what do You think about different manufacturers: mine is 045247bXHCN, and Your is 023042bGS. Looks completely different Your thought about interchangeability
|
Appreciate
0
|
06-11-2019, 11:59 AM | #2235 | |
Private
6
Rep 63
Posts |
Quote:
|
|
Appreciate
0
|
06-11-2019, 01:52 PM | #2237 |
Private First Class
50
Rep 139
Posts
Drives: BMW 5 series E60, Mercedes S
Join Date: Apr 2019
Location: Amsterdam, Netherlands
|
Hmmm, that is a bit sad. I don't seem to have your version string yet (012042bJLY-CIC-HW7). Any chance you've found an mcuupdate.bin somewhere from someone with the same unit? I'll search for it myself as well.
Update: I was not able to find any other MCU updates, although there are certainly a few vendor strings like "ALS", "JLY" and "XHCN". There seems to be only one option: exploiting the firmware to be able to dump them. Now I said at first glance that it isn't easily exploited and that still stands, but there are pieces of code that I've seen that look as a target for things like buffer overflows. And now that i have a test unit with debuggable firmware, I can fuzz and test a lot faster. So please continue to send me MCU updates, but I will also try and exploit the firmware so we can dump the contents of the MCU flash memory. Last edited by __fred__; 06-11-2019 at 03:49 PM.. |
Appreciate
1
amfgray0.00 |
06-11-2019, 04:56 PM | #2238 | |
Private
6
Rep 63
Posts |
Quote:
https://drive.google.com/folderview?id=1paJ2cyavcRH9KMQ_l5buQ2v-OB2cYFgE |
|
Appreciate
0
|
06-11-2019, 04:57 PM | #2239 |
Private
6
Rep 63
Posts |
|
Appreciate
0
|
06-12-2019, 12:31 AM | #2241 |
Private
6
Rep 63
Posts |
|
Appreciate
0
|
06-12-2019, 02:47 AM | #2242 |
Private First Class
50
Rep 139
Posts
Drives: BMW 5 series E60, Mercedes S
Join Date: Apr 2019
Location: Amsterdam, Netherlands
|
Yes, you sent me the correct file. It was 012042bJLY-CIC-HW7. I patched it. You can download it from here:
https://github.com/chinesebmwheaduni...ming%20patched I drove to work this morning and the difference is night and day. ;-) |
Appreciate
1
nomorebigideas6.00 |
06-12-2019, 03:50 AM | #2243 |
Private First Class
50
Rep 139
Posts
Drives: BMW 5 series E60, Mercedes S
Join Date: Apr 2019
Location: Amsterdam, Netherlands
|
So koutsouk was so kind to send me firmware 035242bYC-CCC-HW8-190525, which is the most recent firmware I have. There is something interesting with this firmware:
They have introduced a setting to control the auto dimming feature. That means it can be enabled and disabled from android. A part of the update_settings routine writes the setting: It's actually a frame that can be sent from android with hex bytes 0x70 and 0x13 and then 0x00 to enable or 0x01 to disable auto dimming. There must be a corresponding settings apk somewhere in a ROM that controls the setting. This means that the Chinese do listen to their customers ;-) I still patched the firmware for everyone who doesn't have the corresponding settings apk. They made a mistake though. If you disable the auto dimming while your lights are on, the brightness will never return to 100%. (as night_enabled is never processed anymore). So if you have a new unit with the setting in the settings app: Do not turn off auto dimming while the lights are ON. Last edited by __fred__; 06-12-2019 at 08:36 AM.. |
Appreciate
1
antonius201827.00 |
06-12-2019, 04:14 AM | #2244 | |
Private
6
Rep 63
Posts |
Quote:
Just to check filepath for correct install: Format FAT32 oem/mcupdate.bin Is that right? |
|
Appreciate
0
|
Post Reply |
Bookmarks |
|
|