User Tools

Site Tools


howto:redherring

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
howto:redherring [2017/07/16 00:31]
czokie
howto:redherring [2017/08/03 03:39] (current)
czokie [6. Start DJI assistant in test_server mode]
Line 23: Line 23:
   git pull   git pull
  
-===== 4. Find the firmware file that needs to be tweaked ===== +===== 4. Run the master script using the grep method =====
-  grep start_dji_system /Applications/Assistant.app/Contents/MacOS/Data/firm_cache/*.fw.sig -r  +
- +
-Note the path and filename that is returned. You will need it in the next step. The filename that was returned for me was\\ **/Applications/Assistant.app/Contents/MacOS/Data/firm_cache/wm331_0801_v01.01.03.89_20170519.pro.fw.sig** +
- +
-  ls -l `grep start_dji_system /Applications/Assistant.app/Contents/MacOS/Data/firm_cache/*.fw.sig -r | grep ^Binary | cut -d " " -f 3` +
-   +
-===== 5. Extract a bin file from that image ===== +
-  python3 image.py **add path and filename here** +
- +
-===== 6. Confirm a bin file was extracted ===== +
-  ls *bin +
- +
-You should see your bin filename +
- +
-===== 7. Verify the file type of your bin file ===== +
-  file *.bin +
- +
-This should return: **Java archive data (JAR)** +
- +
-===== 8. Extract the startup script from the JAR file ===== +
-  tar xvf *.bin system/bin/start_dji_system.sh +
- +
-===== 9. Patch the startup script ===== +
-  echo /system/bin/adb_en.sh >> system/bin/start_dji_system.sh +
- +
-===== 10. Run the master script ===== +
- +
-The next step will connect to your aircraft, so get it powered on and connected via USB... But this is the old one. You can PROBABLY skip this and go straight to the next step. +
- +
-  sudo ruby RedHerring.rb /system/bin/start_dji_system.sh system/bin/start_dji_system.sh +
- +
-===== 10b. Run the master script v2 =====+
  
   sudo ruby RedHerring.rb /data/.bin/grep grep   sudo ruby RedHerring.rb /data/.bin/grep grep
-===== 11. Start DJI assistant =====+===== 5. Start DJI assistant =====
 Open a new window, and start DJI assistant ... connect to your aircraft, and view the list of available firmware updates... and then close DJI assistant. This will set a login cookie that will be re-used for the next command Open a new window, and start DJI assistant ... connect to your aircraft, and view the list of available firmware updates... and then close DJI assistant. This will set a login cookie that will be re-used for the next command
   /Applications/Assistant.app/Contents/MacOS/Assistant    /Applications/Assistant.app/Contents/MacOS/Assistant 
  
-===== 12. Start DJI assistant in test_server mode =====+===== 6. Start DJI assistant in test_server mode =====
   /Applications/Assistant.app/Contents/MacOS/Assistant --test_server   /Applications/Assistant.app/Contents/MacOS/Assistant --test_server
  
-This will take a while - but it will update the NFZ database with no active NFZ'sQuite DJI assistant once its done +This sends our fireworks via the NFZ database upload, to get root access
- +===== 7. Get a list of ads devices (see if it all worked) =====
-===== 13. Get a list of ads devices (see if it all worked) =====+
   adb devices   adb devices
  
-===== 14. Connect to the adb shell =====+===== 8. Connect to the adb shell =====
   adb shell   adb shell
  
-===== Other tidbits ===== +===== 9. Make ADB persistent ===== 
-==== Confirm aircraft is connected ==== +To make it easier to get back into your aircraft via ADB next time, you can add a command to the boot init script. Beware. This command is modifying a startup script. If you get it wrong, that could be ... well ... bad. Don't do this more than once, unless you change your firmware to re-patch the startup script. 
-  /usr/sbin/system_profiler SPUSBDataType | grep DJI: -A 19+ 
 +  mount -o remount,rw /system 
 +  echo /system/bin/adb_en.sh >> /system/bin/start_dji_system.sh 
 +  reboot
  
 ===== Credits ===== ===== Credits =====
   * https://www.youtube.com/watch?v=BTQ_CTih1HM   * https://www.youtube.com/watch?v=BTQ_CTih1HM
   * with help from opcode at https://dji-rev.slack.com/   * with help from opcode at https://dji-rev.slack.com/
howto/redherring.1500165072.txt.gz · Last modified: 2017/07/16 00:31 by czokie