User Tools

Site Tools

Translations of this page:

howto:android_patched_dji_go4

This is an old revision of the document!


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 click on the Android SDK tab and click Generate App ID and App Code, in the package name box type: dji.go.v4 and click generate. *NOTE* After creating your HERE account go to Premium SDKs (Offline functionality) Android SDK and click to Generate App ID and App Code… 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 APP ID, APP CODE and License Key. This is important if you have a cloned app and use that installed along with the stock DJI GO.

6. The page has now generated an APP ID, APP CODE, and a KEY LICENSE, 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

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.

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 subfolder 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).

howto/android_patched_dji_go4.1542655507.txt.gz · Last modified: 2018/11/19 19:25 by venom-code