It is definitely possible, just not very convenient to use. I've run a torrent/DHT node software and a minecraft server in android phones.
Real example, with instructions:
https://github.com/huin/chunkymonkey/blob/master/docs/android-server.md
Has anyone successfully run Go on Android recently (without building on Android) and care to share instructions?
I would love for a cross compile of the compiler for arm linux android devices. That way you can build android apps there. Anyone has instructions or something?
If you just need to build arm binaries for android simply cross
compile to that GOOS/GOARCH, cross compiling with go is quite trivial.
If you want to build things on your android with gc then it really
depends on your android device. I'm going to assume you are using
something that is arm based possible a tablet, In that is the case the
best thing to do is to set up Debian arm chroot, and use that to build
the compiler etc.
I have built gc on arm natively without a chroot, however due to the
limitations of andriod's bionic libc, I use a detacted eglibc, and
replicating this proces right now is not practical. basically I used
the CLFS method for this.
I have built gc on arm natively without a chroot, however due to the
limitations of andriod's bionic libc, I use a detacted eglibc, and
replicating this proces right now is not practical. basically I used
the CLFS method for this.
That works, however not all things compile statically, not without a
lot of hacking.
gcc and the go tool tool obviously will "probably" build statically.
However if you want to build anything more ie, git and python etc.
that is another story.
I guess I was not clear enough, if you make a *native* toolchain for
android and you want to build Go natively, that is fine. However if
you make a native toolchain it would stand to reason you plan on
building a lot more then Go in which case some software does not
inherently build statically (some not at all) .. so dynamically
linking ends up being more practical in this case.
Android has special permissions for mounts ie /sdcard will not allow
you to run executable's at all. try moving to /system/xbin but that
might require you to root the device.