[not quite a guide] Run Cuberite natively on Android - Printable Version +- Cuberite Forum (https://forum.cuberite.org) +-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html) +--- Forum: Discussion (https://forum.cuberite.org/forum-5.html) +--- Thread: [not quite a guide] Run Cuberite natively on Android (/thread-2362.html) |
[not quite a guide] Run Cuberite natively on Android - Barracuda72 - 02-08-2016 This is introduction. You can skip it if you like. Quote:Some time ago I was having a thought about running Minecraft server on Android devices. Why? Because it's seems to be simple and available for anyone who has Android device. Not to mention that nowadays Android can be found on big range of devices, from small phones to powerful 8-core devices. You don't need to find and by it somethere, it's already in your pocket. It seems that there is no official build of Cuberite available for Android devices yet. And I can't figure out how to build it. I never liked cmake and git, especially it's "module" feature. I already forgot how to deal with complex projects in Android NDK (And I hate that too). So I've chosen simple way: run already existing binaries. "But there isn't any binaries available for Android, didn't you mention that?" - can you ask. Yes, there isn't. But there is a everyday binary build for Raspberry Pi available. It's not Android? Who cares? This is powered by Linux kernel, and that is powered by Linux kernel. Both are ARM (ARMv7 with hard-float support, to be precise). And that's all that matters. So, that do you need to run Cuberite natively on Android device?
So, that's all you need to run Cuberite natively on Android device. So many words but it's really very simple =) P.S.: I though that it will be boring to go through this WALL of text just to figure out that you don't want to try this, so there is some screenshots for fun! P.P.S: It seems that I can't upload files larger than 1024k to forum, so I put archive here. It's only slightly larger than 1Mb, maybe 1.5Mb or so. RE: [not quite a guide] Run Cuberite natively on Android - LogicParrot - 02-08-2016 This is amazing! Thank you very much for sharing. RE: [not quite a guide] Run Cuberite natively on Android - tonibm19 - 02-08-2016 Didnt tigerw have an apk? RE: [not quite a guide] Run Cuberite natively on Android - bearbin - 02-09-2016 He did, and I had it on my phone until saturday. I don't know what happened to the project. Anyway, @Barracuda72 Great work, and I hope we can get an official android app out soon. RE: [not quite a guide] Run Cuberite natively on Android - Barracuda72 - 02-09-2016 @bearbin, if I got Cuberite running just by providing required libraries to it, usual static build for ARM with high probability should run on most ARM-powered Android devices just fine. Only thing need to be done is some kind of Java-based launcher/updater within APK package. RE: [not quite a guide] Run Cuberite natively on Android - Schwertspize - 02-20-2016 Thanks for your guide. Schwertspize Wrote:Although I couldnt use it, I took a look at your script and used it in @bearbin s vps (like downloading packages, modifying binaries) I thought about it again. We actually have 3 parts. 1. A one time download of the Server directory (or, if something changes like the crafting, we have to think about it). A nearly onetime download of the libraries needed. Only if they are updated (and used on the build server) through repositories they get updated. A many-time download of only the cuberite binary initiated by the user I will keep you informed Checklist: [99%] getting it to run via command line [95%] getting it to run via an app [10%] implement a Downloader into the app [00%] write a script which patches binary and copies libraries. i found out that there is no need of patching the binary [---%] extend the script so It uses apt. Not gonna do [40%] provide a shiny app [00%] setup build server & homepage RE: [not quite a guide] Run Cuberite natively on Android - Schwertspize - 02-21-2016 i promised to keep you posted. Basically i can run it now via an app, but i got the porblem that i get a Segfault instead of the app starting. i suppose it has something to do with the libraries, but the pathes are set up the right way. anyone (or @Barracuda72) has any idea? obviously there is no log, etc, but i got a core dump uncompressed fascinating 172KB. I hope someone can look into it. Thanks in advance ps: executable is in the archive, too EDIT: hmmm i wanted to attach the file, but didnt work. however https://qraut.alkaid.uberspace.de/android-core.tar.gz 3MB RE: [not quite a guide] Run Cuberite natively on Android - Schwertspize - 02-22-2016 sup. fixed that issue, it was somehow unrelated to cuberite. running from console works fine as root, from app works not fine. i can run the command i assume is cuberite, i can kill it but i cant connect to it (on console i had to use root in order to bind to the port) and something worse, i cant get any output nor log. everything is resolvable RE: [not quite a guide] Run Cuberite natively on Android - Barracuda72 - 02-22-2016 (02-20-2016, 05:45 PM)Schwertspize Wrote: IMHO the build server should take the Raspberry PI builds and modify them until they are usable in android.If you have an access to build server, most easiest solution will be just to relink object files (*.o) compiled for RPi into static execitable. I believe just slight modification of CMake scripts is required; however, I'm not familiar with CMake and have no interest in learning it. Binary patching isn't good example of how things should be done; I just demonstrate that they _can_ be done, nothing more. Clean compilation is always preferred way. BTW, script should be 100% working on Linux PC; I've developed it on host machine before trying to run on device. All you need to do is just set ON_DEVICE=0, change interpreter to /bin/bash (or busybox, if you prefer that), change "./busybox" to "busybox" at line 46 and make sure that busybox is available in your system. Of course, you can use Debian's APT and DPKG in script. I just have Gentoo on my machine and don't want to install Deb utils. At last but not least: good luck in you work! And please keep us informed =) RE: [not quite a guide] Run Cuberite natively on Android - Barracuda72 - 02-22-2016 (02-22-2016, 02:04 AM)Schwertspize Wrote: on console i had to use root in order to bind to the portDo you use port from range 0-1023? They are privileged and can be only opened with root permissions (or another tricks). Use ports 1024+, they can be listened from user applications freely. |