Debugging Mods on Android
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:
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 "";
}