Hello everybody, Simply needed to share my very own learnings and discoveries utilizing the assets I had accessible to run my very own Minecraft Server on a spare telephone 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.
Assets:
-
Java Binaries (hat’s off to Pojav Launcher workforce’s glorious work in getting Java to compile with android-ndk)
-
Petal server (any server .jar ought to work okay – Mirai is probably the most optimised paper fork I can discover with no noticeable gameplay change)
-
Textual content Launcher (lowering RAM is the largest, best impression on efficiency to impact) so setting a minimal dwelling launcher helps loads
-
Terminal Emulator – some solution to run executables, be sure to chmod +x your java executables within the bin folder or use Automagic/Tasker to automate it on telephone restart and so on… Bear in mind with out root entry apps can solely run executables in their very own knowledge listing
-
etil-minecraft-flags: flags you’ll be able to run to optimise it
-
VR-25/acc: Superior Charging Controller want root however very helpful in protecting your battery at a wholesome cost stage
Any plugins requiring SQLite3 help are unlikely to work as Android misses a lib.so.6 lib it is presupposed to have. Beneath I’ve copied my begin.sh with an important 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 brought about 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 individuals and let me know if anybody would love me to share plugins I exploit! Efficiency on a 3 yr outdated price range telephone (Moto G7 Energy Snapdragon 632 4GB Ram) was acceptable efficiency for a small non-public server.
Solutions welcome!!!