User Tools

Site Tools


howto:fc_patcher_tool

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
howto:fc_patcher_tool [2019/03/29 00:32]
digdat0 [9. Install the dummy_verify.sh script on your bird]
howto:fc_patcher_tool [2019/08/09 19:14]
digdat0 [7. Modify flight controller parameters]
Line 1: Line 1:
-====== FC Patcher TOol Overview ====== +====== FC Patcher Tool ======
-doc version .01, starting a framework. Intent is a easy guide for Windows, simplifying from github+
 orig content here: https://github.com/o-gs/DJI_FC_Patcher orig content here: https://github.com/o-gs/DJI_FC_Patcher
-credit to the og's and all+credit to the og's and all contributors
  
-This guide explains how to use the FC patcher tool for Windows. The tool / process allows you to modify flight controller parameters on the the LATEST DJI firmware for the DJI Mavic Pro and Platinum, Phantom 4/Pro/Adv, Inspire 2 and Spark. +This guide explains how to use the FC patcher tool for Windows. The tool / process allows you to modify flight controller parameters on the the LATEST DJI firmware for the DJI Mavic Pro and Platinum, Phantom 4/Pro/Adv, Inspire 2 and Spark. This does NOT work on the Mavic 2.
- +
-NOTE: THIS IS FOR PRO USERS, YOU HAVE TO KNOW WHAT YOU ARE DOING! +
  
 +Insert disclaimer here ..
 ====== Toolset ====== ====== Toolset ======
 Make sure to review this GitHub with more info: https://github.com/o-gs/dji-firmware-tools Make sure to review this GitHub with more info: https://github.com/o-gs/dji-firmware-tools
Line 21: Line 19:
   - Download [[https://github.com/jezzab/DUMLdore/releases/download/v3.20/DUMLdoreV3.zip|Dumldore v3.20 Tool]]   - Download [[https://github.com/jezzab/DUMLdore/releases/download/v3.20/DUMLdoreV3.zip|Dumldore v3.20 Tool]]
   - Download [[https://developer.android.com/studio/releases/platform-tools|Download Android SDK for Windows to allow ADB]]    - Download [[https://developer.android.com/studio/releases/platform-tools|Download Android SDK for Windows to allow ADB]] 
-  - Download an app to allow running .SH files on Windows; i used github as my app+  - Download an app to allow running .SH files on Windows; i used [[https://desktop.github.com/|github]] as my app 
 +  - Download CYGWIN to allow running .sh on Windows [[https://www.cygwin.com |Cygwin]] 
 +  - Download and install a file extraction app like [[https://www.win-rar.com/fileadmin/winrar-versions/winrar/th/winrar-x64-570.exe|winrar]] or [[https://desktop.github.com/|winzip]]
   - Download pcrypto by running this from a command line python -m pip install pycryptodome   - Download pcrypto by running this from a command line python -m pip install pycryptodome
-  - Download and install a file extraction app like winrar or winzip+   
 +  
  
-Put the files and the firmware bin file in same folder, such as C:\fcpatcher. Unzip the zipped files and put their respective folder under C:\fcpatcher+Put ALL of the files and the firmware bin file in same folder, such as C:\fcpatcher. This how to will refer to c:\fcpatcher folder. Also Unzip the zipped files and put their respective folder under C:\fcpatcher
  
-Install Python 2 and 3, reboot if required. Make sure to SET PATH for Python. If you don't know what this means, google it. +Install any/all apps you may be missing. This includes python 2 and 3, Android SDK, Github (or other app), winrar and pcrypto. Make sure to SET PATH for Python. If you don't know what this means, google it. 
  
 ====== Detailed Steps ====== ====== Detailed Steps ======
Line 39: Line 40:
   - Extract the .CFG.SIG, the 305 and 306 files to the c:\fcpatcher folder   - Extract the .CFG.SIG, the 305 and 306 files to the c:\fcpatcher folder
  
 +{{:howto:winrar.png?400|}}
 ==== 3. Extract / unsig the .cfg file ====  ==== 3. Extract / unsig the .cfg file ==== 
   * Open a command prompt and type   * Open a command prompt and type
Line 63: Line 65:
  
  
-   adb push wm220_0306_v03.02.44.07_20171116.pro.fw.sig /vendor/bin/ (replace the filename if different ac)+   adb push wm220_0306_v03.02.44.07_20171116.pro.fw.sig /vendor/bin/  
 +   ^^^ (replace the filename if different ac)
  
  
Line 71: Line 74:
    adb shell    adb shell
    cd /vendor/bin/    cd /vendor/bin/
-   /sbin/dji_verify -n 0306 -o 0306.unsig wm220_0306_v03.02.44.07_20171116.pro.fw.sig (replace the filename if different ac)+   /sbin/dji_verify -n 0306 -o 0306.unsig wm220_0306_v03.02.44.07_20171116.pro.fw.sig  
 +   ^^^ (replace the filename if different ac)
    exit    exit
        
Line 82: Line 86:
  
   * Now, some housecleaning   * Now, some housecleaning
-   + 
-  +
    adb shell    adb shell
    cd /vendor/bin/    cd /vendor/bin/
Line 92: Line 96:
    mount -o remount,ro /vendor    mount -o remount,ro /vendor
    exit    exit
- +    
-So now we have the unsig file we wanted, thats awesome.+You can now power off your aircraft.
 ==== 5. decrypt the FC ===== ==== 5. decrypt the FC =====
   * Goto a command prompt and type   * Goto a command prompt and type
Line 114: Line 118:
  
 ==== 7. Modify flight controller parameters ==== ==== 7. Modify flight controller parameters ====
-first draft of parameter list 
  
-^ Parameter Name ^ Value ^ +  * Open the flyc_param_infos file in notepad++ or similar editor. Values will look like this: 
-^ g_config.airport_limit_cfg.cfg_disable_airport_fly_limit|1| + 
-^ g_config.airport_limit_cfg.cfg_limit_data|20250910| +   { 
-^ g_config.flying_limit.driver_license_limit_enable |0+ "index" : 5, 
-^ g_config.flying_limit.viechle_license_limit_enable|0+ "typeID" : 0, 
-^ g_config.flying_limit.height_limit_enabled|2| + "size" : 1, 
-^ g_config.airport_limit_cfg.cfg_search_radius|1| + "attribute" : 43, 
-^ g_config.airport_limit_cfg.cfg_enable[FLY_LIMIT_TYPE_AIRPORT]|0+ "minValue" : 1, 
-^ g_config.airport_limit_cfg.cfg_enable[FLY_LIMIT_TYPE_SPECIAL]|0| + "maxValue" : 2, 
-^ g_config.flying_limit.limit_height_rel|10000+ "defaultValue" : 1, 
-g_config.flying_limit.limit_height_abs|10000| + "name" : "g_config.flying_limit.height_limit_enabled" 
-^ g_config.flying_limit.limit_height_abs_without_gps|10000+ "modify" : true 
-^ g_config.mode_normal_cfg.tilt_atti_range|33| + }, 
-^ g_config.mode_normal_cfg.vert_vel_up|7| + 
-^ g_config.mode_normal_cfg.vert_vel_down|-6| + 
-^ g_config.mode_normal_cfg.vert_acc_up|7| +You will be modifying the "DefaultValue" value. We will not be changing ANYTHING else. In the example above, we would replace "defaultValue" : 1 with "defaultValue" : 2 (changing 1->2, per the table below). Dont change or edit anything other than the default value.  
-^ g_config.mode_normal_cfg.vert_acc_down|-6| + 
-^ g_config.mode_sport_cfg.tilt_atti_range|50| +^ Parameter Name ^ Value ^ Description 
-^ g_config.mode_sport_cfg.vert_vel_up|8| +^ g_config.airport_limit_cfg.cfg_disable_airport_fly_limit|1|
-^ g_config.mode_sport_cfg.vert_vel_down|-8| +^ g_config.airport_limit_cfg.cfg_limit_data|20250910|
-^ g_config.mode_sport_cfg.vert_acc_up|8| +^ g_config.flying_limit.driver_license_limit_enable |2|
-^ g_config.mode_sport_cfg.vert_acc_down|-8| +^ g_config.flying_limit.viechle_license_limit_enable|2|
-^ g_config.fw_cfg.max_speed|20| +^ g_config.flying_limit.height_limit_enabled|2|
-^ g_config.avoid_cfg.avoid_atti_range|23| +^ g_config.airport_limit_cfg.cfg_search_radius|1|
-^ g_config.control.avoid_atti_range|50| +^ g_config.airport_limit_cfg.cfg_enable[FLY_LIMIT_TYPE_AIRPORT]|1|
-^ bat_level_2_action|0| +^ g_config.airport_limit_cfg.cfg_enable[FLY_LIMIT_TYPE_SPECIAL]|1|| 
-^ bat_cap_v2_prot_type|0| +fly_limit_height|10000|| 
-^ g_config.bat_config.level2_smart_battert_land|0|+^ g_config.mode_normal_cfg.tilt_atti_range|33|
 +^ g_config.mode_normal_cfg.vert_vel_up|7|
 +^ g_config.mode_normal_cfg.vert_vel_down|-6|
 +^ g_config.mode_normal_cfg.vert_acc_up|7|
 +^ g_config.mode_normal_cfg.vert_acc_down|-6|
 +^ g_config.mode_sport_cfg.tilt_atti_range|50|
 +^ g_config.mode_sport_cfg.vert_vel_up|8|
 +^ g_config.mode_sport_cfg.vert_vel_down|-8|
 +^ g_config.mode_sport_cfg.vert_acc_up|8|
 +^ g_config.mode_sport_cfg.vert_acc_down|-8|
 +^ g_config.fw_cfg.max_speed|20|
 +^ g_config.avoid_cfg.avoid_atti_range|23|
 +^ g_config.control.avoid_atti_range|50|
 +^ bat_level_2_action|0|
 +^ bat_cap_v2_prot_type|0|
 +^ g_config.bat_config.level2_smart_battert_land|0|
 + 
 +Note: This is a draft list as of 9-Aug-19 
 + 
 + 
 + - I dont believe "g_config.flying_limit.height_limit_enabled" works in FC Patcher. Instead, modify FLY_LIMIT_HEIGHT 
 + 
 + 
 + - This needs to be broken out NFZ, height, speed, battery #TODO 
 + 
 + 
 + - need to include Bret883's other parameters in this 
 + 
 + 
 + - lets create a seperate wiki page for FC Patcher params #TODO 
 + 
 ==== 8. Set path ==== ==== 8. Set path ====
   * Goto a command prompt and type   * Goto a command prompt and type
Line 156: Line 190:
  
  
-   sh FC_patch_sequence_for_dummy_verify.sh Mavic 03.02.44.08+   FC_patch_sequence_for_dummy_verify.sh Mavic 03.02.44.08
  
  
Line 177: Line 211:
    chown root:root dummy_verify.sh    chown root:root dummy_verify.sh
    chmod 755 dummy_verify.sh    chmod 755 dummy_verify.sh
-   cp /system/bin/dji_verify /vendor/bin/original_dji_verify_copy+   cp /sbin/dji_verify /vendor/bin/original_dji_verify_copy
    sync    sync
    cd /    cd /
    mount -o remount,ro /vendor    mount -o remount,ro /vendor
 +
 +Turn off the aircraft.
 +
 ==== 10. Flash the .bin file you made earlier ==== ==== 10. Flash the .bin file you made earlier ====
-  Open a command prompt and type +  * Power the aircraft back on 
-  - adb shell +  * Open a command prompt and type
-  - mount -o bind /vendor/bin/dummy_verify.sh /system/bin/dji_verify+
  
-Open dumldore v3, load firmware and flash 
  
-The displayed percentage are fucked and it will go over 100% at some point, this is not an issue. You can monitor it from adb at the same time with : busybox tail -f /data/dji/log/upgrade00.log After a few seconds (10 20 ?) you should hear the ESC beeping while the FC is being flashed (on Spark only) Then the bird will reboot (disconnecting you from adb if you were monitoring) 30-60 s after reboot you are good to turn the bird offeven if DUMLDore does not acknowledge a finished flash sequence (especially on Spark) The whole sequence is pretty short (less than 5 minutes)+   adb shell 
 +   mount -o bind /vendor/bin/dummy_verify.sh /sbin/dji_verify 
 + 
 + 
 +Open dumldore v3, load firmware and flash it. You may need to hold down either ctrl or shift when clicking 'load firmware' to allow it to see this firmware file. 
 + 
 +Few notes: 
 + 
 +  * The displayed percentage will be wacky, it will go over 100% at some points 
 +  * If you want to view the update you can type 
 + 
 + 
 +   adb shell 
 +   busybox tail -f /data/dji/log/upgrade00.log 
 +  
 +   
 +   
 +  * You can also view in assistant, use 1.1.2 
 +  * After 10-20 seconds you should see the update go as regular; on Spark the ESC may beep while being updated.  
 +  * The aircraft will reboot in about a minute or so. If you were monitoring via adbit will lose connection.
  
-For steps to get Galileo working see github+Thats it you are done. The mods you modified in the flight parameters file will be in the aircraft. To reset, you will want to reinstall the firwmare using assistant or dumldore. 
  
 +Note: This mod also allows enabling Galileo GPS but I have not included steps on doing so. Please see Github original for additional help on setting this up.
  
 +Remember, with great power comes great responsibility. Please don't use this tool set, guide or info to fly in restricted, dangerous or sensitive areas. Aka, don't be a dumbass when flying.
  
  
  
howto/fc_patcher_tool.txt · Last modified: 2020/01/25 23:09 by digdat0