Unfortunately we do not accept new members for free, Now Re-gistration cost 30€, if you are interesting Send Email to volavka@hotmail.co.uk
SWFL Extractor Tool
|
21-07-2023, 18:07 PM,
(This post was last modified: 10-06-2025, 07:11 AM by bogdantogo.)
Post: #1
|
|||
|
|||
|
SWFL Extractor Tool
Hello all,
I would like to share with you a tool I developed to parse and extract BMW SWE firmware files. It works with SWFL, BTLD, FLSL files from the Р5dZDата/swe/. Maybe some of you had a look over the swfl_0000uuuu.bin.uuu_uuu_uuu files and saw that some of them use a compression method. It can also be confirmed by checking the corresponding swfl_0000uuuu.xml.uuu_uuu_uuu that some segments are marked as <FLASH-SEGMENT COMPRESSION-STATUS="COMPRESSED"> and some are <FLASH-SEGMENT COMPRESSION-STATUS="UNCOMPRESSED">. BMW is actually using NRV algorithm for the compressed sections. I created a Python script to parse the .xml, extract binary blocks from corresponding .bin and call the unucl extractor app which is the open source implementation of the NRV compression algorithm and reassemble the final binary. I have included in the archive 2 builds of the UCL extractor, for x64 Linux and Windows. Windows CMD or Linux terminal usage example: python extract.py -i swfl_00004a5a.bin.010_006_040 -x swfl_00004a5a.xml.010_006_040 ! Python is required to be installed on your machine ! Have Fun! |
|||
| Reputation: +23 - juantg93 [+1] , luntik [+1] , BmwMerc [+1] , diagso [+1] , Jumper [+1] , TheNine90 [+1] , Mwahab [+1] , simzep [+1] , OneKillaWatt [+1] , s_s [+1] , VroomVroom [+1] , ruben_17non [+1] , Kayhan 17# [+1] , zalimhan74 [+1] , palapas1974 [+1] , Loliceman [+1] , dekota28 [+1] , ECA [+1] , benoos [+1] , Bergamyk [+1] , ir655 [+1] , jaramillo [+1] , fanrong [+1] | |||
|
21-07-2023, 18:31 PM,
Post: #2
|
|||
|
|||
|
RE: SWFL Exctractor Tool
I have tried it on a professional nbt unit, and I have not been able to get it to work. I don't know if I've done something wrong. I attach a log.
|
|||
|
21-07-2023, 19:26 PM,
Post: #3
|
|||
|
|||
|
RE: SWFL Exctractor Tool
In your case the file after '-x' parameter needs to be the xml, not the same .bin you passed on the '-i' parameter.
The required command in your case: python extract.py -i swfl_00001280.bin.003_013_001 -x swfl_00001280.xml.003_013_001 P.S '-x' and '-o' parameters are optional, only '-i' is mandatory. If you don't set them the script will automatically fill the xml file and generate swfl_00001280.bin.003_013_001.extracted Just make sure that you have the .xml in the same location where the .bin is stored |
|||
| Reputation: +1 - juantg93 [+1] | |||
|
21-07-2023, 20:07 PM,
Post: #4
|
|||
|
|||
RE: SWFL Exctractor Tool
(21-07-2023, 19:26 PM)bogdantogo Wrote: In your case the file after '-x' parameter needs to be the xml, not the same .bin you passed on the '-i' parameter. Sorry. It was a silly mi5тдke on my рдят. Now a file named ''swfl_00001280.bin.003_013_001.extracted'' has been generated. With this file how can I see what is inside? |
|||
|
21-07-2023, 23:31 PM,
Post: #5
|
|||
|
|||
RE: SWFL Exctractor Tool
(21-07-2023, 20:07 PM)juantg93 Wrote:(21-07-2023, 19:26 PM)bogdantogo Wrote: In your case the file after '-x' parameter needs to be the xml, not the same .bin you passed on the '-i' parameter. Even after extracting, it's still a binary file, you could use bin file viewer like Winhex to view it. But you can only see binary data, you can only figure out what the data meaning by your self, because no one will disclosure the data structure. BMW 5 Series and Audi Q4 e-tron user.
If my post helps, please give thx and rep , thanks! |
|||
|
21-07-2023, 23:35 PM,
Post: #6
|
|||
|
|||
|
RE: SWFL Exctractor Tool
very usefull for fїжing things when they goes wrong.
![]() |
|||
|
22-07-2023, 06:21 AM,
Post: #7
|
|||
|
|||
|
RE: SWFL Exctractor Tool
|
|||
|
22-07-2023, 13:04 PM,
Post: #8
|
|||
|
|||
|
RE: SWFL Exctractor Tool
|
|||
|
24-07-2023, 14:42 PM,
Post: #9
|
|||
|
|||
|
RE: SWFL Exctractor Tool
Unfortunately this tool is not an NBT extractor or some other task specific tool. It is generic and works on all SWE NRV compressed FW files.
It is useful for cases when BTLD or other SW component gets corrupted and is needed to correct the FW through JTAG or other Flash write method. Take care that in some cases besides the FW stored in SWE files there are also some adjustment or production data blocks so it really depends from case to case. It is also useful to reverse engineer stuff and after it was extracted with this tool to pass the binary data through analysis tools like binwalk. For example I extracted the JAVA app running on ATM2 and the root password seed & hash with binwalk after swfl_00004a54.bin and swfl_00004a55.bin were extracted using this tool. @jutantg93 the swfl_00001280.bin file is not even compressed. If you look in swfl_00001280.xml it is composed of 2 sections but both have <FLASH-SEGMENT COMPRESSION-STATUS="UNCOMPRESSED">. So in this рдятicular case swfl_00001280.bin.003_013_001 will be identical with swfl_00001280.bin.003_013_001.extracted |
|||
|
13-11-2023, 11:05 AM,
Post: #10
|
|||
|
|||
RE: SWFL Exctractor Tool
(21-07-2023, 18:07 PM)bogdantogo Wrote: Hello all, Thanks! exist a command that allows you to compress the extracted file again? Italia
- Remote coding/Programming - BMW MINI E, F, G, U - Secure Coding NCD 2.0, SFA, SecOC, ECU CBB Validation - (E,F,G) 7DCT - DKG - 8HP - 6HP - EGS7 - DKG ISN Reset - REMOTE ратсн MGU + CP remove - BMW Mini UPDATE iD4 to iD6 fїж + Carplay Activation - ратсн CIC, NBT, Evo iD4 iD5 iD6 EntryNav2 (EnavEvo) + f5с SET - EGS Alpina Flash Tune Remote (ENET) - KAFAS4 Virgin Remote (ENET) - ISN MG1/MD1 WRITE via OBD (ENET) - Remote tuning EDC17 and 8HP EGS BMW/MINI Fxx - M2/M3/M4 GXX Vmax OFF - Remote START - PACK CS/Competition - Flash M2/M3/M4 CS, CSL o GTS F8x G8x - Flash remoto Alpina EGS 8HP F e G - Downgrade bootlоаdёя BTLD-000048DB 001.036/37.001 a 001.035.005 - Disable ELV CAS3, 3+ e altro ancora… |
|||
|
« Next Oldest | Next Newest »
|
Users browsing this thread:
3 Guest(s)
3 Guest(s)
Return to TopReturn to Content



![[+]](https://cartechnology.co.uk/images/CarTechnologyTheCure/collapse_collapsed.png)
, thanks!
![[їшяgё: GIF-Bandiera-Italiana.gif]](https://i.postimg.cc/dtmdcJMn/GIF-Bandiera-Italiana.gif)
