User Tools

Site Tools

Translations of this page:

howto:toolchain

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, I have added an OSX auto installer. Contributions are encouraged to support other platforms.

Auto Install (OSX)

The command below will fetch and execute the most recent installed from Github, and install all required components automagically.

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 everything else, unless ​you want to do a manual install.

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 base components

OSX or LINUX

Install packages for python, python3, libusb, dialog, wget, git-lfs, and android-platform-tools. Below, you will see brew commands for these items. This should work for either OSX, or Linux if you followed the instructions in Step 1. You can chose to install instead with yum or apt-get, but there is no guarantee that the following steps will work if you don't use brew.

brew install python
brew install python3
brew install libusb
brew install dialog
brew install wget
brew install git-lfs
git lfs install
sudo git lfs install --system
brew cask install android-platform-tools

Windows

Windows notes are incomplete at this time. More work required.

  • Python: Windows users can get away with python 2.x for most of the items we are using. However, this won't work for some of the advanced code like comm_serial2pcap.py. Click here to install Python 2.x
  • pip: windows users can install pip using python and this script: https://bootstrap.pypa.io/get-pip.py

python get-pip.py

  • Python 3 / PIP3 is also needed for some of the advanced tools.
  • Install Android platform tools using the installer, and answer yes to all the prompts to install the adb toolchain in windows.
  • git: TBA
  • git-lfs:
    • git install git-lfs
    • git lfs install

3. Install jdk

This is only required for deejayeye-modder and exploring app.asar

Download jdk (java development kit) from here and install

4. Install python components

Below is a set of instructions to install Python components. This should work on all platforms if you successfully installed Python 3.

pip install pathlib
pip install pyusb
pip install pyserial
pip install pkcs7
pip3 install pycrypto

5. Install RUBY components

Below is a set of instructions to install ruby components. This should work on all platforms if you successfully installed ruby.

sudo gem install colorize
sudo gem install minitar
sudo gem install serialport
sudo gem install highline

6. 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

Contribute

  • Add instructions for Python 3 and PIP3 for windows users
  • [✓ cmjaolan, 2019-12-15]Reformat windows instructions to improve readability
  • Instructions for installing GIT for windows users
howto/toolchain.txt · Last modified: 2022/05/28 14:45 by milo2491