User Tools

Site Tools

Translations of this page:

howto:toolchain

This is an old revision of the document!


Toolchain

Many of the wiki pages here require installation of a common set of tools to execute scripts for aircraft tweaking. I have tried to pull all of the tool instructions in one place to make this easier.

These instructions were developed by an OSX user. Others have contributed windows instructions. More recently, there is an OSX auto installer. This will be progressively modified to support Linux and perhaps windows installs.

Auto Install (OSX)

The list of tools is growing. I've added a single line installer script for OSX users. This pulls down the installer from git hub, and installs all required components automagically. The script will be updated over time to support RPM and APT package management, but its not there yet. Just paste this one command into your terminal window, and it will do the magic for you.

curl -fsSL https://raw.githubusercontent.com/czokie/dji-rev-toolchain/master/toolchain.sh | bash

There is one other component required if you want to build APK files. Download jdk (java development kit) from here and install

NOTE: If you run this auto install command on OSX, you can skip the rest. Its all done automatically for you.

Manual Install

You may have some or all of these components already… so skip anything that is not applicable. These steps are based on an OSX install.

NOTE: The main difference between linux and OSX is where you do your work. To make it easy on linux, you could just create a directory in the same place that the OSX instructions use… or change the instructions below. Whatever you prefer. Windows users need to install python from here first: https://www.python.org/downloads/release/python-2713/

NOTE: The instructions here for OSX talk about two versions of python. The instructions assume we will keep the Apple provided Python 2.x, and install 3.x via home-brew.

In the headings for each tool, I will list in brackets what the tool is used for to help understand why it is needed. If a tool is not specific for a particular os, it is needed for all.

mkdir ~/Documents

1. Install homebrew or linuxbrew

Home brew is designed to help with package management for OSX users, kind of like yum or apt-get. This guide is written with OSX in mind. You can chose to use this approach for installing some of the major components - or use equivalent commands with the regular package manager you use on your variation of Linux.

OSX

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Linux

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install)"

2. Install python3 (RedHerring)

brew install python3

windows users can get away with python 2.x - its here: https://www.python.org/downloads/release/python-2713/

3. Install pip (pyduml components)

pip3 comes with python 3. However, python 2.x that comes as part of OSX does not contain PIP. Install it using this command

curl https://bootstrap.pypa.io/get-pip.py | sudo python

windows users can install it using python and this script: https://bootstrap.pypa.io/get-pip.py

python get-pip.py

4. Install pathlib (pyduml)

sudo pip install pathlib

windows users, omit the sudo

 pip install pathlib

5. Install pyusb (pyduml)

sudo pip install pyusb

windows users omit the sudo

 pip install pyusb

6. Install pycrypto (RedHerring)

sudo pip3 install pycrypto

7. Install libusb (RedHerring)

brew install libusb

8. Install android platform tools for ADB access (RedHerring / pyduml)

brew cask install android-platform-tools

windows users can use the file from xda-developer forums:

https://forum.xda-developers.com/showthread.php?t=2588979

Download the installer, and answer yes to all the prompts to install the adb toolchain in windows.

9. Install colorise (RedHerring)

sudo gem install colorize

10. Get sign.jar and apktool.jar (deejayeye-modder)

mkdir -p ~/Documents/tools
cd ~/Documents/tools
curl -O https://github.com/appium/sign/raw/master/dist/sign.jar
curl -O https://bitbucket.org/iBotPeaches/apktool/downloads/apktool_2.2.3.jar
mv apktool_2.2.3.jar apktool.jar

11. Install dialog (deejayeye-modder)

This is only required for deejayeye-modder - Not needed for duml or Redherring

brew install dialog

12. Install jdk (deejayeye-modder)

This is only required for deejayeye-modder - Not needed for dual or Redherring

Download jdk (java development kit) from here and install

13. Install lfs (Git Firmware)

To get access to firmware, you will need git, plus lfs. Follow the directions here to install lfs. OSX specific instructions are below.

brew update
brew install git-lfs
git lfs install

14. Install pyserial (pyduml)

sudo pip install pyserial

windows users can type this command too.

Now you're all set up to flash and root your DJI product.

15. Install wget

brew install wget

16. Install pkcs7 (dji_ftpd_aes_unscramble)

sudo pip install pkcs7

17. Install minitar (DUMLrub)

sudo gem install minitar

18. Install serial port (DUMLrub)

sudo gem install serialport

19. Install highline (DUMLrub/CherryPicker)

sudo gem install highline
howto/toolchain.1501409019.txt.gz · Last modified: 2017/07/30 10:03 by czokie