o-gs / dji-firmware-tools

Tools for handling firmwares of DJI products, with focus on quadcopters.
GNU General Public License v3.0
1.45k stars 405 forks source link

How to Repackage Phantom 3 advanced Firmware #283

Closed jh1113 closed 1 year ago

jh1113 commented 2 years ago

I want to modify the firmware and re-compress it

image

image Modifying a file (Shadow)

Finally, I want to compress the file again

Please teach me the way. Help me, please.

mefistotelis commented 2 years ago

Just make sure to mount the rootfs image and modify there instead of extracting. Besides that, there are no caveats - just use the scripts in reverse order with proper parameters to get back to one binary.

Non-signed firmwares (before Mavic) can be repackaged without additional knowledge.

Here's a simple test which does the first level: https://github.com/o-gs/dji-firmware-tools/blob/master/tests/test_dji_xv4_fwcon_rebin1.sh

For details on the modules inside - use the project wiki.