User Tools

Site Tools


howto:toolchain

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:toolchain [2017/07/30 05:31]
czokie
howto:toolchain [2022/05/28 14:45] (current)
milo2491 ToDo unchecked: Instructions for installing GIT for windows users
Line 1: Line 1:
 ====== Toolchain ====== ====== Toolchain ======
  
-Many of the wiki pages here require installation of a common tool chain to help execute the scripts to do various things on your aircraft. Instead of including this in multiple places, I have tried to pull all of the toolchain instructions to one page to make this easier.+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. [[http://​www.oracle.com/​technetwork/​java/​javase/​downloads/​index.html|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.  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.  These steps are based on an OSX install. 
Line 14: Line 27:
   mkdir ~/Documents   mkdir ~/Documents
  
 +==== 1. Install homebrew or linuxbrew ====
  
-===== Auto Install (OSX) ===== +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 mindYou 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.
-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 automagicallyThe 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+=== 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)"
  
-**NOTE: If you run this auto install command on OSX, you can skip the restIts all done automatically for you.**+==== 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 1You 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.
  
-===== 1. Install homebrew (OSX) ===== +  brew install python
- +
-  /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" +
- +
-===== 2. Install python3 (RedHerring) =====+
   brew install python3   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 users can get away with python 2.x - its here: https://www.python.org/downloads/release/python-2713/ +=== Windows === 
- +Windows notes are incomplete at this timeMore work required.
-===== 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: 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 [[https://www.python.org/downloads/release/python-2713/|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 get-pip.py
-===== 4. Install pathlib (pyduml) =====+  * Python 3 / PIP3 is also needed for some of the advanced tools. 
 +  * Install Android platform tools using the [[https://forum.xda-developers.com/showthread.php?t=2588979|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
  
-  sudo pip install pathlib 
  
-windows users, omit the sudo +==== 3. Install jdk  ==== 
-   pip install pathlib+This is only required for deejayeye-modder and exploring app.asar
  
 +[[http://www.oracle.com/technetwork/java/javase/downloads/index.html|Download jdk (java development kit) from here and install]]
  
-===== 5. Install pyusb (pyduml) =====+==== 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.
  
-  sudo pip install pyusb+  pip install pathlib 
 +  pip install pyusb 
 +  pip install pyserial 
 +  pip install pkcs7 
 +  pip3 install pycrypto
  
-windows users omit the sudo +==== 5. Install RUBY components ==== 
-   pip install pyusb +Below is a set of instructions to install ruby componentsThis should work on all platforms if you successfully installed ruby.
-===== 6. Install pycrypto (RedHerring) ===== +
- +
-  sudo pip3 install pycrypto +
-===== 7Install 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   sudo gem install colorize
 +  sudo gem install minitar
 +  sudo gem install serialport
 +  sudo gem install highline
  
-===== 10. Get sign.jar and apktool.jar (deejayeye-modder) =====+==== 6. Get sign.jar and apktool.jar (deejayeye-modder) ====
  
   mkdir -p ~/Documents/tools   mkdir -p ~/Documents/tools
Line 78: Line 95:
   mv apktool_2.2.3.jar apktool.jar   mv apktool_2.2.3.jar apktool.jar
  
-===== 11. Install dialog (deejayeye-modder) ===== +===== Contribute ===== 
-This is only required for deejayeye-modder Not needed for duml or Redherring+  * <todo>Add instructions for Python 3 and PIP3 for windows users </todo> 
 +  * <todo #cmjaolan:2019-12-15>Reformat windows instructions to improve readability</todo> 
 +  * <todo>Instructions for installing GIT for windows users</todo>
  
-  brew install dialog 
- 
-===== 12. Install jdk (deejayeye-modder) ===== 
-This is only required for deehayeye-modder - Not needed for dual or Redherring 
- 
-[[http://www.oracle.com/technetwork/java/javase/downloads/index.html|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 [[https://github.com/git-lfs/git-lfs/wiki/Installation|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.1501392713.txt.gz · Last modified: 2017/07/30 05:31 by czokie