Brian Lovelace | Los Angeles & Santa Barbara Wedding Photographer | Blog
What Brian Lovelace has been up to.
Blog, Photography, Lifestyle, Story, Timeline, Work,
536
page-template,page-template-blog-large-image-whole-post,page-template-blog-large-image-whole-post-php,page,page-id-536,qode-quick-links-1.0,ajax_fade,page_not_loaded,,qode_grid_1300,wpb-js-composer js-comp-ver-5.2.1,vc_responsive
 

Journal

Hi everyone!

So my latest venture has been into the land of drones! I’ve gotten to the point that I’m really comfortable flying by hand, and I wanted to venture into automated flight. Unfortunately, the drone that I’m using, the Phantom 4 Pro Plus is really restricted in what you can do digitally with it. Just as I’m not a fan of Apple restricting what you can do with its devices, I’m not fond of what DJI does to lock down its software, preventing 3rd party apps from being installed on their device.

After researching, I found a gentleman by the name of “Michael W” on YouTube that managed to unlock and root his Phantom 4 Pro Plus controller to accept 3rd Party apps. With his setup being based on a Mac, translating his actions to Windows was a bit more difficult than I expected due to the Windows Linux Shell in Command not accepting connection to USB Devices. It took me way too long and way too many Google searches to figure that out for myself, so hopefully, that step alone helps you solve a lot of the mystery.

Here’s a breakdown of what I did to do this on a Windows PC. Keep in mind that this is not for the faint of heart and involves MANY steps and procedures, including work in the Linux Terminal. If you are not comfortable in this environment, turn back now. I am not responsible for any of the mistakes you may make in the process of doing this procedure. Do this at your own risk.

What You Need:
  1. DJI Phantom 4 Pro Plus Controller (GL300E)
  2. Standard Micro USB Cable (USB-A to Micro USB)
  3. Time
  4. Patience
  5. Linux Skills
  6. A basic understanding of Android Debug Bridge
STEP 0 – SUPER IMPORTANT — Enable Developer Options on Your Controller

Go into the DJI Controller, enter the settings (where you change WiFi, etc)… scroll down to the bottom, press “About Device.” To enable Developer Options, scroll to the bottom and tap “System Version” 10 times in a row quickly. You’re a developer! Yay!

Go back, you’ll see Developer Options right next to “Date & Time” in the settings. Tap into it. Scroll down and turn on USB Debugging. Woo! Are you ready for some 3rd Party Apps? Well, you have a long way to go from here, so keep on trucking through this tutorial!

Step 1 – Install Oracle VirtualBox

Do yourself a favor and forget about trying to enable the Linux Shell in Windows and using bash from there. The easiest way to do the entire process is to download VirtualBox software onto your PC and installing it. Oracle’s free VirtualBox Software is great. See their site, here. To go straight to downloading the Windows version of VirtualMachine, click here. Install it, then proceed to the next step.

Step 2 – Install a Debian version of Linux

This is the version of Debian that I used to install onto my VirtualMachine (direct download links)

For Intel Systems: Debian i386

For 64-bit AMD Systems: Debian AMD64

Once you’re finished downloading, proceed to the next step.

Step 3 – Install Debian onto your VirtualBox Software

This step is technically multiple steps… it isn’t the easiest to setup, but luckily there are a ton of guides on the internet for this! But why let them be your guide when I can!?

Step 3.1

So first thing’s first, make sure you have at least 20GB-ish of hard drive space available on your boot drive (the one that has your windows installation in it).

Step 3.2

Click the baby blue “New” button in the top left corner. 

Step 3.3

A window like this will pop up. Type in the name spot, “Debian.”  If you are on a 32-bit machine, ensure that the “Version” is set to Debian (32-bit). If you are on a 64-bit machine, ensure that the “Version” is set to Debian (64-bit). Click “Next.”

Step 3.4

Set your memory allocation size for the VirtualBox to use. I was generous and gave 8GB, you can give more or less… up to you! Click next!

Step 3.5

Set up a hard disk. Select the second option “create a virtual hard disk now.” Click “Create”

Step 3.6

Select a hard disk file type. Select the second option “VHD (Virtual Hard Disk). Click “Next.”

Step 3.7

Select how the storage on the physical hard disk is allocated. I like “Dynamically Allocated.” Press “Next.”

Step 3.8

Select the size of the hard disk. Just for convenience sake, I keep mine at 20GB. Click “Create.”

Step 3.9

You’ll see a page like this. Highlight your Virtual Machine and click “Start”

Step 3.10

You’ll see a popup that says something like this “Select a Startup Disk.” Click the folder and select the ISO of Debian that you downloaded in Step 2. Once you’ve selected the .iso file you downloaded earlier, press “Start”

Step 3.11

The install screen will pop up. It will look like this. Use your keyboard arrows to arrow down to “Install.” Do not choose Graphical Install.

Step 3.12

Select the country in which you a working and keyboard layout that matches the computer hardware you are using. Press enter (return) to select each option.

Step 3.13

After selecting the keyboard key map, the installer installs some components and then pauses to ask for the host name. You can choose anything you want for the host name. I chose “debian” to make things easy.

Step 3.14

It is best to leave the domain name blank, for now. We can configure it later, if we need to.

Step 3.15

Next, select the root password for the system. The root password is used when you need to make changes to the system’s critical software and configurations. It will ask you to re-type the password for redundancy and to ensure you typed it correctly the first time. This password is incredibly important. Do not lose it as it will let you enable SuperUser priveledges when we need them in the terminal.

Step 3.16

Now, you will set up the user name, user id, and user password for the account you will use when working with this virtual machine. In this example, I used my real name for the user name, then I used my first name as my User ID. You can use any username and use ID that you want. Then I chose a password. This password is important! Write it down and save it!

Step 3.17

Next, choose the time zone in which you are working from. I’m in LA, so I’ll choose Pacific.

Step 3.18

In the next screen, select the default choice, Guided – use entire disk. The LVM option is an advanced disk configuration that might be useful in a real host machine but is not needed in a virtual machine. It is OK to use the LVM option, if you’d like.

Step 3.19

All files in one partition is the simplest configuration and it is the default choice.

Step 3.20

Now, you commit the disk configuration and the Debian installer will partition and format the virtual disk image file to paper it for the installation of the new Debian Linux operating system. AKA, select YES.

3.21

The package manager application needs to be configured with information that tells it where to download additional software from, and where to find software updates in the future. the following two screens help you to choose the appropriate server. First, select the country in which the server you wish to use is located.

 

3.22

Then, select the server in the country you chose. You can probably guess from the domain names which server is the most reliable. Or you can research the institutions associated with the domain names to determine which one is likely to be the best source. Don’t worry too much about choosing the best server. Any server listed will be adequate.

3.23

Since my network does not have a proxy server, I can leave the next screen blank. Most home networks will not have a proxy server. If your network has a proxy server, enter it’s information on this screen. You may need to ask your network administrator for the proxy server information.

3.24

Now, the system will spend some time downloading and installing all the additional software it needs from the server you specified. This may take up to 20 minutes on a typical broadband connection.

The next screen will ask you what additional software you want to select. Debian Desktop Environment and Standard System utilities are selected by default. You should also select SSH Server so you can securely log into the virtual machine over the network if you need to.

3.25

Next, install the GRUB bootloader.

3.26

I suggest you install GRUB on the disk recommended by the installer. In this case, select /dev/sdafrom the menu on the screen below.

3.27

After the installation is complete, the Debian operating system boots up in the virtual machine.

3.28

Log in using the User ID and password you selected during the installation process.

Congrats! You’ve officially installed a Virtual Machine running Debian Linux on your computer! See the power button in the top right hand corner? Power off the virtual machine (do not power off your actual computer).

Once it’s powered off,  we just need to setup USB. Plug in your controller via MicroUSB into your computer. Go into the settings as seen in the screenshot below.

From there go into the USB tab, check of “Enable USB Controller” with “USB 1.1 (OHCI) Controller” selected. Under USB Device Filters, make sure you can see your controller, labelled “DJI GL300E.” If you can’t, click the little USB Plug with a green + sign on the right hand side. Select your controller there. Once you click there it should show up under USB Device Filters. Make sure this is checked off and we can move on!

Step 4 – Setup the Android Debug Bridge on Linux

On this version of Linux, get rid of the “sudo” command for all code on the XDA Guide. Start off by typing “su” into the Terminal and entering your Root Password. This will make you a superuser and make the “sudo” command irrelevant. You can follow the steps on the XDA Forum Here although I’ll do my best to make it comprehensible with screenshots below.

4.1 – Open the Terminal

Click “Activities” in the upper left-handcorner. In the search bar that pops up, type “terminal.” Click on the terminal icon that shows up below.

4.2 – Enable SuperUser Priveledges

Type in “su” (without quotes) and press enter. Enter the “root” password you set up when installing Debian. Once you do this, the terminal will look like it does below. You’re now a SuperUser in the root!

 

4.3

Copy and paste these codes one by one into the terminal (make sure to press enter after you copy).

Code 1:

add-apt-repository ppa:nilarimogard/webupd8

There is a possibility that you might get a couple of failures on this code. Never fear, just continue doing your thing. Check out mine below to compare. For this code you’ll have to press enter in the middle of it to continue adding the code.

Code 2:
apt-get update

This line of code will literally make your computer go bonkers for a second and spew out a million lines of code. Never fear, it’s just updating some stuff. Some indexes will fail to download. Don’t worry, it’s all part of the setup process.

Code 3:

apt-get install android-tools-adb android-tools-fastboot

Type in the code and press enter. It will soon ask you if you want to continue (Y/n). Type in a Y and press Enter. It’s gonna go crazy again! Woo!

 

4.4

Now it’s time to install the 32-bit compatibility libraries for 64-bit systems:

Code 1:
apt-get install ia32-libs

Sometimes it will throw an error saying it won’t be able to locate a package. Don’t worry too much about it.

Code 2:
dpkg --add-architecture i386

Sometimes doesn’t show anything. It didn’t for me, so I’m not going to even give you a screenshot. You’ll probably be able to see in the next screenshot anyways.

Code 3:
apt-get install libncurses5:i386 libstdc++6:i386 zlib1g:i386


4.5

By now you Linux installation already has ADB and Drivers install but now you need to configure it to detect the Various different types of Hardware Vendor ID’s. So now it’s time to do the following:

Type in this code:
gedit /etc/udev/rules.d/51-android.rules

So this is a fun one. Type it in, press enter and you’ll get a notepad that pops open. Think of these codes as drivers so that your Linux can communicate with your device.

Copy and paste these rules into the notepad that opened up:
# udev rule to detect android devices
# These rules refer to http://developer.android.com/tools/device.html

# Acer
SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0666", GROUP="plugdev"
# Archos
SUBSYSTEM=="usb", ATTR{idVendor}=="0e79", MODE="0666", GROUP="plugdev"
# Asus
SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", MODE="0666", GROUP="plugdev"
# Azpen Onda
SUBSYSTEM=="usb", ATTR{idVendor}=="1f3a", MODE="0666", GROUP="plugdev"
# BQ
SUBSYSTEM=="usb", ATTR{idVendor}=="2a47", MODE="0666", GROUP="plugdev"
# Dell
SUBSYSTEM=="usb", ATTR{idVendor}=="413c", MODE="0666", GROUP="plugdev"
#DJI
SUBSYSTEM=="usb", ATTR{idVendor}=="2ca3", MODE="0666", GROUP="plugdev"
# Fairphoneca
SUBSYSTEM=="usb", ATTR{idVendor}=="2ae5", MODE="0666", GROUP="plugdev"
# Foxconn
SUBSYSTEM=="usb", ATTR{idVendor}=="0489", MODE="0666", GROUP="plugdev"
# Fujitsu Toshiba 	
SUBSYSTEM=="usb", ATTR{idVendor}=="04c5", MODE="0666", GROUP="plugdev"
# Garmin-Asus
SUBSYSTEM=="usb", ATTR{idVendor}=="091e", MODE="0666", GROUP="plugdev"
# Google
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666", GROUP="plugdev"
# Haier
SUBSYSTEM=="usb", ATTR{idVendor}=="201e", MODE="0666", GROUP="plugdev"
# Hisense
SUBSYSTEM=="usb", ATTR{idVendor}=="109b", MODE="0666", GROUP="plugdev"
# HTC, Wiko
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666", GROUP="plugdev"
# Huawei
SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0666", GROUP="plugdev"
# Intel
SUBSYSTEM=="usb", ATTR{idVendor}=="8087", MODE="0666", GROUP="plugdev"
# K-Touch
SUBSYSTEM=="usb", ATTR{idVendor}=="24e3", MODE="0666", GROUP="plugdev"
# KT Tech
SUBSYSTEM=="usb", ATTR{idVendor}=="2116", MODE="0666", GROUP="plugdev"
# Kyocera
SUBSYSTEM=="usb", ATTR{idVendor}=="0482", MODE="0666", GROUP="plugdev"
# Lab126
SUBSYSTEM=="usb", ATTR{idVendor}=="1949", MODE="0666", GROUP="plugdev"
# Lenovo
SUBSYSTEM=="usb", ATTR{idVendor}=="17ef", MODE="0666", GROUP="plugdev"
# LG
SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666", GROUP="plugdev"
# Meizu
SUBSYSTEM=="usb", ATTR{idVendor}=="2a45", MODE="0666", GROUP="plugdev"
# Micromax
SUBSYSTEM=="usb", ATTR{idVendor}=="1ebf", MODE="0666", GROUP="plugdev"
# Motorola
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", MODE="0666", GROUP="plugdev"
# MTK
SUBSYSTEM=="usb", ATTR{idVendor}=="0e8d", MODE="0666", GROUP="plugdev"
# NEC
SUBSYSTEM=="usb", ATTR{idVendor}=="0409", MODE="0666", GROUP="plugdev"
# Nook
SUBSYSTEM=="usb", ATTR{idVendor}=="2080", MODE="0666", GROUP="plugdev"
# Nvidia
SUBSYSTEM=="usb", ATTR{idVendor}=="0955", MODE="0666", GROUP="plugdev"
# OnePlus Two (unknown vendor's name)
SUBSYSTEM=="usb", ATTR{idVendor}=="2a70", MODE="0666", GROUP="plugdev"
# Oppo
SUBSYSTEM=="usb", ATTR{idVendor}=="22d9", MODE="0666", GROUP="plugdev"
# OTGV
SUBSYSTEM=="usb", ATTR{idVendor}=="2257", MODE="0666", GROUP="plugdev"
# Pantech
SUBSYSTEM=="usb", ATTR{idVendor}=="10a9", MODE="0666", GROUP="plugdev"
# Pegatron
SUBSYSTEM=="usb", ATTR{idVendor}=="1d4d", MODE="0666", GROUP="plugdev"
# Philips
SUBSYSTEM=="usb", ATTR{idVendor}=="0471", MODE="0666", GROUP="plugdev"
# PMC-Sierra
SUBSYSTEM=="usb", ATTR{idVendor}=="04da", MODE="0666", GROUP="plugdev"
# Qualcomm
SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", MODE="0666", GROUP="plugdev"
# Rockcwell Electronics
SUBSYSTEM=="usb", ATTR{idVendor}=="2207", MODE="0666", GROUP="plugdev"
# SK Telesys
SUBSYSTEM=="usb", ATTR{idVendor}=="1f53", MODE="0666", GROUP="plugdev"
# Samsung
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666", GROUP="plugdev"
# Sharp
SUBSYSTEM=="usb", ATTR{idVendor}=="04dd", MODE="0666", GROUP="plugdev"
# Sony
SUBSYSTEM=="usb", ATTR{idVendor}=="054c", MODE="0666", GROUP="plugdev"
# Sony Ericsson
SUBSYSTEM=="usb", ATTR{idVendor}=="0fce", MODE="0666", GROUP="plugdev"
# Spreadtrum
SUBSYSTEM=="usb", ATTR{idVendor}=="1782", MODE="0666", GROUP="plugdev"
# T & A Mobile Phones
SUBSYSTEM=="usb", ATTR{idVendor}=="1bbb", MODE="0666", GROUP="plugdev"
# Teleepoch
SUBSYSTEM=="usb", ATTR{idVendor}=="2340", MODE="0666", GROUP="plugdev"
# Texas Instruments UsbBoot
SUBSYSTEM=="usb", ATTR{idVendor}=="0451", MODE="0666", GROUP="plugdev"
# Toshiba
SUBSYSTEM=="usb", ATTR{idVendor}=="0930", MODE="0666", GROUP="plugdev"
# Wearners
SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", MODE="0666", GROUP="plugdev"
# Wileyfox
SUBSYSTEM=="usb", ATTR{idVendor}=="2970", MODE="0666", GROUP="plugdev"
# XiaoMi
SUBSYSTEM=="usb", ATTR{idVendor}=="2717", MODE="0666", GROUP="plugdev"
# YU
SUBSYSTEM=="usb", ATTR{idVendor}=="1ebf", MODE="0666", GROUP="plugdev"
# Zebra
SUBSYSTEM=="usb", ATTR{idVendor}=="05e0", MODE="0666", GROUP="plugdev"
# ZTE
SUBSYSTEM=="usb", ATTR{idVendor}=="19d2", MODE="0666", GROUP="plugdev"
# ZUK
SUBSYSTEM=="usb", ATTR{idVendor}=="2b4c", MODE="0666", GROUP="plugdev"

Press save and close it!

4.6

Go back into your Terminal.

Time to change some permissions!

Code:
chmod a+r /etc/udev/rules.d/51-android.rules

Reload the rules you just changed!

Code:
udevadm control –reload-rules

Add in the user group “plugdev” for the rules we just created.

Code:
addgroup –system plugdev

And add your username to this group. Replace <username> with your primary username that will use ADB without the <> around it.

Code:
sudo adduser <username> plugdev

You might not need to do any of these, but do ’em just to be safe. Here’s my screenshot of all of the actions above.


Step 5:

Finally, you’re ready for the good stuff. On your Linux VirtualBox, click activities in the top left-hand corner again. Open Firefox and download OriginalGangsterCow. This script runs a hack against the one  file DJI inserted into the device to make it so that 3rd Party Apps can’t be installed, the “installd” file. Follow the prompt to open the zip file with Archive Manager. Click extract, like you see below.


Click “Extract” again and it will extract OriginalGangsterCow into your Home Root. A window will pop up that says “Show the Files” or “Close.” Click “show the files.” Double click into the OriginalGangsterCow-Master folder. Right click inside of this folder and click on “Open in Terminal.”

From here a Terminal Window will open up. Type the code below and press enter:

./LastSkyCry.sh

Congrats! You can now install apps! It’s now time to root the device!

Step 6: Rooting with Kingo ROOT

Go download Kingo Root to your PC and install it on the Windows side. You can download Kingo Root from their website, here: http://www.kingoapp.com/android-root/download.htm

Once you install the app, open it. Make sure your controller hasn’t been turned off. If it has, you need to run ./LastSkyCry.sh again through the terminal.

Open up KingoRoot and let it detect the Device. It will come up with the device name and say “Root” when it is ready. Press Root and wait for it to go through the steps.

Once it is finished, the controller will pop up with a “Root Succeeded” message.

 

Step 7 : Installing SuperUser Apps

Since the device probably restarted during the root process, it’s important that you run the ./LastSkyCry.sh bash script again on our Linux setup.

Once you run the bash script, it’s time to install some things. Download these things onto your Linux setup.

SuperUser 2.79

App2SD APK

Chainfire FlashFire 0.73

With these APK’s downloaded, we’re going to run a really easy ADB command to install them. I renamed the files in the Linux file explorer so it would be easier for me to type into the terminal. You can do this too! Go to the download location, and right click Open in Terminal.

Here’s what we’re going to do… adb install <filename.apk>

So if you renamed the files it would look something like this:

adb install App2SD.apk

adb install SuperSU.apk

adb install euchainfireflash_073.apk

Here’s an example with my SuperUser APK Renamed to something easier:

Step 8: Applying a new Root.

Open up the SuperSU app that we installed. Ensure that you’re connected to the web via WiFi. It will say the binaries need to be updated. Press “Continue”. If it asks if you have a custom recovery like TWRP or CWM. We do not, so just click “Normal.” Here it will rebuild the root, which may take a couple of minutes. If it fails, chances are that you need to run the LastSkyCry.sh script once more. Once it’s done the controller may go black. Just turn off the controller and turn it back on.

Step 9: Freeing Up Space

The whole reason we downloaded and installed App2SD is because there is not enough room in the controller’s /system/ folder to install the Google Play Store. I don’t have screenshots of this (because I already deleted WeChat off of my device), so you’re going to have to take my word for it.

Here are the steps.

  1. Open App2SD — it will ask for Root Permission. Give it to it.
  2. Click into “Link Apps to SD Card.”
  3. Scroll down to WeChat and click into it
  4. Click the 3 vertical dots in the upper right hand corner and a dropdown menu will appear
  5. Click Uninstall — A window will pop up asking if you want to uninstall WeChat. The answer is Yes!
  6. Rejoice, you have space for the Play Store!
Step 10: Download and add the G-Suite to a MicroSD Card

OpenSource G-Suite Apps (for Google Play Store)

Download the link above. Keep it in ZIP format and put it on a microSD card. Put it in the root of the card, not in a folder, as seen below. 

From here plug the MicroSD card into the back of your Controller

Once your card is inserted, start up the app that we installed called “FlashFire.”

It will ask for root permission; give it. It will then pop up with a disclaimer. Agree with the disclaimer. Let’s get on into the steps.

  1. On the left menu, tap actions.
  2. Press the + sign in the red circle on the bottom right
  3. Select Flash ZIP or OTA
  4. Using the dropdown menu, select “Filesystem root”
  5. Scroll down until you see “mnt/” — tap into this
  6. Scroll up until you see “external_sd/” — tap into this
  7. In this area you should see the “open_gapps-arm-5.1-pico-20171214.zip” file that we placed on the SD card. Select this file.
  8. Another pop up will come up, don’t check off “Auto-mount” or “Mount /system read/write”
  9. Click the check mark in the upper right hand corner of the pop-up
  10. The pop-up will disappear. Scroll to the bottom of the page and push the button that says “FLASH”
  11. A warning will come up about the screen possibly going black for a second. Hit okay and continue with the flash.

Congrats! Restart your controller and you’ll find that you have the Google Play Store! Sign in and have a blast getting all the apps you’ve wanted on your controller for all this time!

 

 

For the last six months I have been dealing with crippling anxiety.

 

This has affected my work life, along with my relationships with friends, family, and coworkers. I feel the need to apologize profusely to all of my loved ones that I have hurt throughout this time of my life. The anxiety got to the point where I couldn’t look at my phone notifications or respond to even my closest friends, let alone work. The root of all of this anxiety was inherently my job as a staff photographer at a digital marketing agency. Handling multiple clients at a time, all the while being responsible for all internal content creation is not feasible in the amount of time allotted in a given week, especially with the time necessary to create top quality content. As of yesterday, I have made a very tough decision to leave a job that most people would consider a “dream job.” The fact is that I don’t believe that I would be fulfilled or happy doing anything other than working for myself and creating beautiful imagery for people that truly love the work that I produce. 

 

This is a breath of fresh air. Inhale. Exhale. Coming clean. A new era in life; an era of reflection, an era of growth, and an era of healing. I am looking forward to the adventures and growth I will experience over the coming months as I move on to the next chapter in my life.

 

I would like to take a moment to thank everyone who reads this for supporting my passion for photography and for understanding and helping me grow through tough times. Thank you.

 

Brian Lovelace