User Tools

Site Tools

Translations of this page:

howto:android_patched_dji_go4

1. Download the “deejayeye-modder” Patch tool from: https://github.com/Bin4ry/deejayeye-modder open it up with a utility tool like WinRar and place it on your desktop.

2. For this installation guide the 4.1.22 version of the go4 application was used, it is necessary to use a “noseceo” version, you can get it from: http://www.openpilotlegacy.org/dji.go.v4-4.1.22-3028592-noseceo.apk

3. Open the deejayeye-modder folder that we just placed on the desktop & copy the DJI go 4 app you just downloaded in PutApkHere folder and rename it to orig.apk

4. Go to Here's developer website (https://developer.here.com/) and create a free account, to register you will need a working email, in this procedure a temporary generated email was used: https://10minutemail.com/10MinuteMail/index.html

5. After registration is complete next page will open, just scroll down to the Premium SDKs - Offline functionality and enter package name: dji.go.v4 and click generate, (this name must MATCH the package name in the top line of AndroidManifest.xml), now you have the APP ID, APP CODE & License Key, this is important if you have a cloned app installed and use that along with the stock DJI GO4 app.

6. After the APP ID, APP CODE, and a KEY LICENSE are generated, if you used a temporary generated email in this installation you can save your keys to a text file or word if you want.

7. To get Google Maps working you will need a Google map API key, to get it go to: https://developers.google.com/maps/documentation/embed/get-api-key ,click on Get started and tick all 3 boxes (Maps, Routes & Places) and follow the next step, finally it will take you to payment, you can enter a valid credit/debit card to complete the authentication process (dont worry the free usage is more than sufficient for the purpose we use it for).

8. Now we have the “Here” API Code & THE API ID, Here License, and the Google API key we just generated.

9. The next stage is to prepare for decompilation, first open the deejayeye-modder folder on your desktop again and edit the RunMe.bat file with Notepad ++ and place a pause in it to halt operation automatically to edit the AndroidManifest.xml, to add pause have a look at the attached image, after that you will rename RunMe.bat file to RunMePause.bat

echo.-: Modify AndroidManifest.xml

set /P nothing=“….”

NOTE: As of 11/21 Step 9 is not necessary for RunMe.sh (Linux/Mac)!

10. In the deejayeye-modder folder double click on the download.bat to download necessary files required for the patch process, after download finishes the download.bat box will close itself.

11. Now open the RunMePause.bat file by right clicking and choose open as Administrator, choose the patches you want applied (to make Google map work choose the runtime_use_GoogleMap patch as well).

12. After you have chosen your patches type “P” and press enter, the APK will decompile, run all the selected patches and then pause before recompilation (it will ask you to press any key) DO NOT press any key at this is stage, now you can edit the AndroidManifest.xml file in the decompile_out folder to enter the keys we had generated earlier.

13. The content of the AndroidManifest.xml we want to edit is:

  <meta-data android: name = "com.here.android.maps.appid" android: value = "APP_ID" />
  <meta-data android: name = "com.here.android.maps.apptoken" android: value = "APP_CODE" />
  <meta-data android: name = "com.here.android.maps.license.key" android: value = "LICENSE_KEY" />
  <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="GOOGLE_MAP_API_KEY"/>
  
  you can use the above example in Notepad++ search box to look up the line you want to edit, example: to find the APP ID line just paste: meta-data android: name = "com.here.android.maps.appid" android: value =  in the search box to locate it.

edit and enter all the keys, save and exit from Notepad++, now we can unpause the process by pressing any key as shown in the patcher window to resume recompilation.

For Unix users:

Make sure you select HERE Maps patch, it will prompt you to enter the keys, no need to edit AndroidManifest.xml

NOTE: Keys provided work, you can say “n” to entering your custom HERE keys and it will still work for offline mode.

see images

Now the file will recompile with all the patches, keys, license and will sign the application, when operation is complete you will be prompted to press any key the window will close, you can find your modded apk in the MODDED_APK_OUT sub directory, it will be named mod.apk (with the version number of deejayeye-modder)

14. Extra step to make Google maps work: “I was slightly cautious on this step” After you install your modded DJI go4 app on your device, the first time you run the application it will unpack resource files and when its complete it will ask you if you want to Open it or choose Done, i myself avoided opening DJI go4 and instead chose Done, now inside your device go to the DJI folder and create a subfolder and name it og_settings, then we will need to place a config file inside it named useGoogleMap, to do that just create a new text file name it as mentioned and remove the .txt extension, i personally went to my pc created a new text file (as i could not remove the extension from my tablet so used the pc to create) name it useGoogleMap.txt then remove the .txt extension and place it in your device in dji/og_settings sub-folder we had created earlier “remember the config file will not have any extension or it wont work”.

(Here maps will work in offline mode but Google Maps will only function online or using the cache, when using offline maps you have to go into the menu of the go4 app and download the offline map).

Tips for windows users: Use Cygwin or a docker instance of alpine linux to get more functionality.

howto/android_patched_dji_go4.txt · Last modified: 2018/11/24 20:53 by venom-code