This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Adding custom json entries to manifest.json and custom zip file

Hey devs!

We'd like to add additional fields in the manifest.json when generating (or after generating) the zip file for DFU. We need these fields to make additional compatibility checks in our Android app before starting the whole DFU cycle.

What I tried:

  • unzip an already made (working) app.zip
  • added fields into manifest.json (added another field on the same level as "application")
  • zipped the new folder with (7zip and also tried the python zipfile module) again
  • tried to load it in in nRF connect app.

The app gives me an error: "Opening file failed: The ZIP file must contain an Application, a Soft Device and/or a Bootloader.

I get the same error when I unzip the original package (generated by nrfutil) and the zip it again with 7zip or python -m zipfile.

Any suggestions how I could do this? I'd like to be still compatible with the nrf android app with the json format (hoping the app will just ignore fields that it doesn't recognize) for the time being. Our Android app is not ready to perform the DFU yet (also I'm afraid that the .zip won't be recognized if we use the same code as the nrf Toolbox/Connect app.

Thanks for any tips!

Parents Reply Children
Related