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 10:19]
czokie
howto:toolchain [2022/05/28 14:45] (current)
milo2491 ToDo unchecked: Instructions for installing GIT for windows users
Line 3: Line 3:
 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. 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. +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) ===== ===== 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.+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   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]]+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.**
  
-**NOTE: If you use this method to auto install on OSX, you can skip the rest. Its all done automatically for you.** 
  
 ===== Manual Install ===== ===== Manual Install =====
- 
-FIXME: This needs to be totally re-written... for reference only at this time. 
- 
 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 40: Line 37:
   ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install)"   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.
  
-==== 2. Install python3 (RedHerring) ====+  brew install python
   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) ==== +  * 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 
-pip3 comes with python 3. However, python 2.x that comes as part of OSX does not contain PIP. Install it using this command +  * pip: windows users can install pip using python and this script: https://bootstrap.pypa.io/get-pip.py
- +
-  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   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 92: 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 deejayeye-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.1501409979.txt.gz · Last modified: 2017/07/30 10:19 by czokie