Hello everybody, Simply needed to share my very own learnings and discoveries utilizing the assets I had out there to run my very own Minecraft Server on a spare cellphone I’ve with out the overhead of Termux. That is with minimal overhead and most efficiency I can give you.
This is not a step-by-step information as if you wish to run your personal server some technical data is required at the least.
Sources:
-
Java Binaries (hat’s off to Pojav Launcher workforce’s wonderful work in getting Java to compile with android-ndk)
-
Petal server (any server .jar ought to work okay – Mirai is essentially the most optimised paper fork I can discover with no noticeable gameplay change)
-
Textual content Launcher (lowering RAM is the most important, best affect on efficiency to impact) so setting a minimal house launcher helps lots
-
Terminal Emulator – some strategy to run executables, be sure to chmod +x your java executables within the bin folder or use Automagic/Tasker to automate it on cellphone restart and so on… Keep in mind with out root entry apps can solely run executables in their very own knowledge listing
-
etil-minecraft-flags: flags you possibly can run to optimise it
-
VR-25/acc: Superior Charging Controller want root however very helpful in preserving your battery at a wholesome cost degree
Any plugins requiring SQLite3 help are unlikely to work as Android misses a lib.so.6 lib it is alleged to have. Beneath I’ve copied my begin.sh with a very powerful arguments I’ve discovered to account for android not having a /tmp
folder.
-Dterminal.jline=false -Dterminal.ansi=true -Dio.netty.native.workdir=/knowledge/native/tmp/ -Djava.io.tmpdir=/knowledge/native/tmp/ to permit
#!/bin/sh
export LD_LIBRARY_PATH=/knowledge/knowledge/ch.gridvision.ppam.androidautomagic/java/lib/
export JAVA_HOME=/knowledge/knowledge/ch.gridvision.ppam.androidautomagic/java/
cd /sdcard/minecraft/
$JAVA_HOME/bin/java -server -Xms2G -Xmx2G -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+UnlockDiagnosticVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -XX:-UseBiasedLocking -XX:+UseStringDeduplication -XX:+UseFastUnorderedTimeStamps -XX:+UseAES -XX:+UseAESIntrinsics -XX:+UseFMA -XX:AllocatePrefetchStyle=1 -XX:+UseLoopPredicate -XX:+RangeCheckElimination -XX:+EliminateLocks -XX:+DoEscapeAnalysis -XX:+UseCodeCacheFlushing -XX:+SegmentedCodeCache -XX:+UseFastJNIAccessors -XX:+OptimizeStringConcat -XX:+UseCompressedOops -XX:+UseThreadPriorities -XX:+OmitStackTraceInFastThrow -XX:+TrustFinalNonStaticFields -XX:ThreadPriorityPolicy=1 -XX:+UseInlineCaches -XX:+RewriteBytecodes -XX:+RewriteFrequentPairs -XX:+UseNUMA -XX:-DontCompileHugeMethods -XX:+UseFPUForSpilling -XX:+UseVectorCmov -XX:+UseXMMForArrayCopy -Dfile.encoding=UTF-8 -Xlog:async -Djava.safety.egd=file:/dev/urandom --add-modules jdk.incubator.vector -Dterminal.jline=false -Dterminal.ansi=true -DPaper.WorkerThreadCount=6 -Dio.netty.native.workdir=/knowledge/native/tmp/ -Djava.io.tmpdir=/knowledge/native/tmp/ -jar /sdcard/minecraft/p.jar --nogui
#These arguments triggered errors
#-XX:UseAVX=3
#-XX:UseSSE=4
#-XX:+UseFastStosb
#-XX:+UseNewLongLShift
#XX:+UseXmmI2D -XX:+UseXmmI2F
#-XX:+UseXmmLoadAndClearUpper
#-XX:+UseXmmRegToRegMoveAll
Hope this is available in use for folks and let me know if anybody would really like me to share plugins I take advantage of! Efficiency on a 3 12 months outdated finances cellphone (Moto G7 Energy Snapdragon 632 4GB Ram) was acceptable efficiency for a small non-public server.
Recommendations welcome!!!