<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>how to generate update files (*.dat *.bin) without zipping them?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/58575/how-to-generate-update-files-dat-bin-without-zipping-them</link><description>Is there some way to configure nrfutil to produce the *.dat and *.bin files as such, without bundling them into a zip file? I tried going through the help and did some quick search but could not find any way to do this. 
 We are using UART DFU in our</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 03 Mar 2020 13:20:03 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/58575/how-to-generate-update-files-dat-bin-without-zipping-them" /><item><title>RE: how to generate update files (*.dat *.bin) without zipping them?</title><link>https://devzone.nordicsemi.com/thread/237765?ContentTypeID=1</link><pubDate>Tue, 03 Mar 2020 13:20:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:add4c1e0-c2af-412d-a642-b6ca43fad524</guid><dc:creator>TylerD</dc:creator><description>&lt;p&gt;Thanks!&lt;/p&gt;
&lt;p&gt;I had a look at the internal workings of the nrfutil code and it uses a temporary working directory where the *.dat / *.bin files are stored. At the end of the process, the temporary&amp;nbsp;directory is removed. on Windows, the temp folder is created in randomly named folder such as:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;C:\Users\&amp;lt;username&amp;gt;\AppData\Local\Temp\nrf_dfu_pkg__xoaa8t8&lt;/p&gt;
&lt;p&gt;I was able to hack the code so that the unpacked files are available. It&amp;#39;s not pretty but it works at least somehow and requires only one additional line of code. This is inserted in package.py, at the end of&amp;nbsp;&lt;strong&gt;generate_package&lt;/strong&gt; function:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;        # Package the work_dir to a zip file
        Package.create_zip_package(self.work_dir, filename)

        # ADDED: copy the entire content of temp directory to the working directory...
        shutil.copytree(self.work_dir, &amp;quot;./unpacked/&amp;quot;)
        
        # Delete the temporary directory
        self.rm_work_dir(preserve_work_dir)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The idea is that I simply copy the entire temp directory to the same folder where I&amp;#39;m running&amp;nbsp;nrfutil. It&amp;#39;s not a clean solution, for example if the &amp;quot;unpacked&amp;quot; directory already exists then copytree will fail. In any case, this may be helpful if someone else is&amp;nbsp;trying to get access to the unpacked files.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to generate update files (*.dat *.bin) without zipping them?</title><link>https://devzone.nordicsemi.com/thread/237747?ContentTypeID=1</link><pubDate>Tue, 03 Mar 2020 13:01:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:83e661b5-6fbb-4931-816e-41d6ad180427</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Jaakko,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Thanks for your report.&amp;nbsp;I will report this request internally.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to generate update files (*.dat *.bin) without zipping them?</title><link>https://devzone.nordicsemi.com/thread/237609?ContentTypeID=1</link><pubDate>Tue, 03 Mar 2020 07:36:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dae89a7d-314f-4112-8878-ec8f658cdece</guid><dc:creator>TylerD</dc:creator><description>&lt;p&gt;Just found out that the nrfutil is available in source code at&amp;nbsp;&lt;a href="https://github.com/NordicSemiconductor/pc-nrfutil"&gt;https://github.com/NordicSemiconductor/pc-nrfutil&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So I can tweak the tool myself and make it spit out also the&amp;nbsp;dat/bin files without zipping. Maybe it would be useful to have this as a standard feature in the tool?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>