| 06-22-2020, 02:24 PM | #2730 | |
|
New Member
14
Rep 28
Posts |
Quote:
|
|
|
Appreciate
0
|
| 06-22-2020, 02:25 PM | #2731 |
|
Major
![]()
439
Rep 1,219
Posts |
|
|
Appreciate
0
|
| 06-22-2020, 03:04 PM | #2732 |
|
New Member
11
Rep 10
Posts |
I've poked around at the bin file a bit, the squashfs images are padded with zeros which need to be preserved, so for example:
Code:
9824256 0x95E800 Squashfs filesystem, little endian, version 4.0, compression:gzip (non-standard type definition), size: 4359326 bytes, 478 inodes, blocksize: 131072 bytes, created: 2020-06-05 12:41:33 14186496 0xD87800 Squashfs filesystem, little endian, version 4.0, compression:gzip (non-standard type definition), size: 50957129 bytes, 661 inodes, blocksize: 131072 bytes, created: 2020-06-05 12:41:39 65144832 0x3E20800 Squashfs filesystem, little endian, version 4.0, compression:gzip (non-standard type definition), size: 14657511 bytes, 120 inodes, blocksize: 131072 bytes, created: 2020-06-05 12:41:53 Zero out the squashfs we modified: Code:
dd if=/dev/zero of=ltbmw-v2.1.0.6.lt.b/ISPBOOOT.BIN bs=1 seek=14186496 count=50958336 conv=notrunc Code:
dd if=ltbmw-v2.1.0.6.lt.b/_ISPBOOOT.BIN.extracted/D87800.squashfs.new of=ltbmw-v2.1.0.6.lt.b/ISPBOOOT.BIN bs=1 seek=14186496 conv=notrunc |
|
Appreciate
0
|
| 06-22-2020, 03:08 PM | #2733 | |
|
First Lieutenant
![]() ![]()
65
Rep 350
Posts |
Quote:
__________________
Current - BMW 320D LCI M SPORT
Previous - BMW 320i XDrive M SPORT |
|
|
Appreciate
0
|
| 06-22-2020, 03:09 PM | #2734 | ||
|
Second Lieutenant
![]()
56
Rep 256
Posts |
Quote:
Quote:
based on their past history of promising widescreen support for the aa/carplay wired units and teasing it non stop on these forums (before all bt accounts were banned for various reasons) and then never delivering but just offering the wireless at a later time, that wasn't an assumption that could be made about software granted i dont use AA so the only thing id want from bt is the click idrive wheel to skip songs in other apps; if i used AA id probably want the updates more |
||
|
Appreciate
1
x-m4n146.50 |
| 06-22-2020, 03:10 PM | #2735 | |
|
New Member
14
Rep 28
Posts |
Quote:
Only thing that might stop the update will be the checksum for the partition I patched. |
|
|
Appreciate
0
|
| 06-22-2020, 04:34 PM | #2736 | ||||
|
Second Lieutenant
![]()
857
Rep 280
Posts |
Yes, I bricked it and only have a black screen now. Haven't had the time yet to unbrick it. Should've brought another flash drive with the original firmware, but oh well
Next time then.Quote:
Hm, so basically the partition (according to binwalk) is 50958336 bytes while the actual squashfs is only 50957129 bytes? So the additional 1207 bytes are only zeroes? If so, then theoretically we could move any subsequent partitions up by a couple of megabytes to give it a little bit more room for potential future edits. Quote:
I just checked again and while my squashfs is the exact same size on disk, binwalk reports it a bit bigger. No idea why. Quote:
Alternatively I wrote a small helper script to extract it for you: Code:
#!/bin/bash
ISP_FILE=$1;
readarray -t part <<< "$(binwalk $ISP_FILE | grep 'ISP script for ISPBOOOT.BIN' | awk '{ print $1; }')";
NAND_START=${part[0]};
NAND_SIZE=$((${part[1]} - ${part[0]}));
dd if=$ISP_FILE status=progress bs=1 skip=$NAND_START count=$NAND_SIZE of=isp_script_nand.txt
Note that there are two. The first one is for NAND flash and the second for EMMC. I would guess we have NAND, right? EMMC is for sd cards etc. But not sure, it's not really my area of expertise. The first part of each script does the actual flash while the second part is checking the md5 sums of each partition/2MB block. Unfortunately the relevant SPSDK squashfs partition is split to 25 parts, i.e. you need to check 25 checksums. I couldn't really find a better way, so I wrote a small script using dd that splits a file in equal sizes: Code:
#!/bin/bash
BINFILE="./spsdk.squashfs";
FILE_SIZE=$(wc -c < $BINFILE);
BLOCK_SIZE=2097152;
NO_FILES=$(( ($FILE_SIZE+$BLOCK_SIZE-1)/$BLOCK_SIZE ))
for i in $(seq 0 $(($NO_FILES-1))); do
echo dd if=$BINFILE of="part$(printf "%02d" $i)" status=progress bs=1 count=$BLOCK_SIZE skip=$(($BLOCK_SIZE*$i));
dd if=$BINFILE of="part$(printf "%02d" $i)" status=progress bs=1 count=$BLOCK_SIZE skip=$(($BLOCK_SIZE*$i));
echo "";
done
Code:
md5sum part* Quote:
But for my next try I was gonna remove the checksums entirely. The structure is as follow: Code:
if test "$md5sum_value" = 8e87ce6413da5cfec31aba98d7117df6 ; then
echo md5sum: OK.
else
echo md5sum: Error!
exit -1
fi
Let me know your thoughts ![]() Last edited by Firefly1337; 06-22-2020 at 04:41 PM.. Reason: typo |
||||
|
Appreciate
1
x-m4n146.50 |
| 06-22-2020, 04:39 PM | #2737 |
|
Second Lieutenant
![]()
94
Rep 289
Posts |
Same here, bricked, black screen. Was stuck at an update loop after 50%, went back to 0% and to 50% and repeated. Unbricked it by flashing original bin file. Didnt have to pull power just put USB in and reboot the MMI, it booted into the flashing procedure.
Last edited by xDHC; 06-22-2020 at 05:09 PM.. |
|
Appreciate
1
x-m4n146.50 |
| 06-22-2020, 05:27 PM | #2738 | |
|
New Member
14
Rep 28
Posts |
Quote:
|
|
|
Appreciate
0
|
| 06-22-2020, 05:56 PM | #2739 |
|
New Member
16
Rep 24
Posts |
Unfortunately I dont have the box but find it the analysis you are working on very interesting
Almost interesting enough to buy one haha (I just completed my id5 retrofit) I noticed in the extracted file that there should be a shell running on the serial port: # Start an "respawn" shell on the serial port ttyS0::respawn:-/bin/sh Firefly1337 I found an earlier post where you found the serial console port? did you ever tried to connect to these pins? Or did anyone tried to connect a keyboard to the usb to send commands? |
|
Appreciate
0
|
| 06-22-2020, 06:03 PM | #2740 | |
|
Private First Class
![]()
50
Rep 167
Posts |
Quote:
|
|
|
Appreciate
0
|
| 06-22-2020, 07:03 PM | #2741 |
|
Second Lieutenant
![]()
115
Rep 250
Posts |
Sorry for the question if it's been answered, but I couldn't find anything. It's just a basic question/concern. What change are you making to the XML? If it's too change it to 720p, then it might have a blank screen because that's a resolution that's incompatible with the OEM screens since they're 480p, just different horizontal resolution.
Again, sorry if it's a dumb question. You guys are awesome for looking into it! |
|
Appreciate
0
|
| 06-22-2020, 08:48 PM | #2742 | |
|
New Member
14
Rep 28
Posts |
Quote:
![]() |
|
|
Appreciate
1
x-m4n146.50 |
| 06-23-2020, 12:50 AM | #2743 | ||
|
First Lieutenant
![]() ![]()
126
Rep 318
Posts |
muniz_ri do you have the Andream or Carlinkit unit? I could be wrong, but I think you have the Carlinkit, just want to double check before I flash my Carlinkit with 20.06.02 from the link below.
Quote:
Quote:
|
||
|
Appreciate
0
|
| 06-23-2020, 01:20 AM | #2744 |
|
Major
![]()
439
Rep 1,219
Posts |
|
|
Appreciate
0
|
| 06-23-2020, 02:06 AM | #2745 | |
|
Second Lieutenant
![]()
94
Rep 289
Posts |
Quote:
|
|
|
Appreciate
0
|
| 06-23-2020, 02:46 AM | #2746 |
|
Second Lieutenant
![]()
94
Rep 289
Posts |
|
|
Appreciate
0
|
| 06-23-2020, 03:03 AM | #2747 |
|
New Member
16
Rep 24
Posts |
|
|
Appreciate
0
|
| 06-23-2020, 03:17 AM | #2748 | ||
|
Second Lieutenant
![]()
857
Rep 280
Posts |
Quote:
With the official SoC layout it is very easy to identify the serial pins of the chip. But on the PCB they just disappear in Via's, so it's impossible to tell where they are going. The MCU has an empty header right next to it but also there I was only able to identify basic things like VCC and GND. And then you would only have access to the MCU, not the rest of the system. The Indiwork manual has a nice layout on page 4 with I2C pins described on the main harness. Perhaps that could be used as an entry point. The other cable has some undisclosed pins. Perhaps these go to the system itself? There is an extra partition called 'runtime_cfg' that has some basic config flags e.g. which hardware ports (USB, graphical, etc) are used and in what order. There's also one that I think might enable USB OTG mode (currently it's set to '0'). But for that we need to be able to edit the .bin first... Quote:
|
||
|
Appreciate
0
|
| 06-23-2020, 04:43 AM | #2750 |
|
Private
![]() 35
Rep 93
Posts |
|
|
Appreciate
0
|
Post Reply |
| Bookmarks |
| Tags |
| andream, android, android auto, apple, carplay, mmi, retrofit |
| Thread Tools | |
|
|