Debugging Mods on Android

User avatar
lordfingle
Member
 
Posts: 65
Joined: Sat Apr 04, 2015 09:21
GitHub: eidy
IRC: lordfingle
In-game: lordfingle

Debugging Mods on Android

by lordfingle » Sat Oct 22, 2016 22:50

In some ways the way that minetest copies all it's mods onto the sdcard before running is annoying. Basically you have 2 (and including cache 3) copies of the same files.

Nevertheless, there is an advantage, and that is that it's easier to debug. All you need to do is use the PC based "adb" command to update mods on the sdcard directly for dev/testing and tuning.

To make this happen however, you need to change the Android code to suppress the copy operation.

I changed the "MinetestAssetCopy.java" to check for a simple marker file:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
         // Look for Dev Mode Marker File      
         File devModeMarker = new File(baseDir + "minetest/.nocopy");
         if (devModeMarker.exists())
         {
            Log.i("MinetestAssetCopy",".nocopy (Developer?) file detected.  File copy operation cancelled.");
            return "";
         }
----------------------------------------------------------------------------------------------
Team Lead on "eidy- Love learning"
I like reading, walks on the beach and building edutech experiences in lua (Find out more in this post)
"Coming together is a beginning; keeping together is progress; working together is success." - Henry Ford
 

Return to Minetest General

Who is online

Users browsing this forum: No registered users and 10 guests

cron