box86 icon indicating copy to clipboard operation
box86 copied to clipboard

Box86 on Android with NDK toolchain

Open Seas0 opened this issue 3 years ago • 6 comments

After some tweaking on source codes, I've managed to compile box86 using Android NDK. Now it may comes to a challenge: to provide as more function the GNU libc have as possible using the Bionic libc Android devices utilized. First should be the entrance function: __libc_start_main, which is not found in Android, instead the __libc_init takes its place. Source code changes I've made: ref to: https://github.com/Seas0/box86/tree/android-linux-comp

Seas0 avatar Nov 02 '21 14:11 Seas0

Building on Android, using Android NDK is not supported for now. I gladly accept PR that add build compatibility with Android NDK.

ptitSeb avatar Nov 02 '21 15:11 ptitSeb

@Seas0 Box86 was able to run wine on 32-bit Termux “proot-static” before Termux disabled using 32-bit proot-static (see AnBox86 on GitHub). I think you probably weren’t wanting proot, but just wanted to let you know it used to be possible with box86

WheezyE avatar Dec 17 '21 14:12 WheezyE

@WheezyE the proot approch has its own limits though, as providing the OpenGL / Vulkan is more difficult and/or the IO performance is greatly limited to proot's user-space syscall hook and handling. So I'm currently making some "LITTLE" changes to make Box86 compile with the NDK Toolchain and what's more important, provide a x86-Linux-like glibc-ish compatible layer using Android's Bionic libc implementation at here (Pretty much WIP, now can only compile using NDK, not running even the test program due to the entrance function __libc_start_main is not found in Android, instead the __libc_init does its work)

Seas0 avatar Dec 18 '21 10:12 Seas0

I'll probably leave the scene for quite a while, as the semester is yielding an end and exams are around the corner. But any pull request on this is welcomed.

Seas0 avatar Dec 18 '21 11:12 Seas0

Good luck on exams! 🙂

WheezyE avatar Dec 18 '21 15:12 WheezyE

I have a bionic<->glibc compatibility layer here, it may be incomplete though, hope it gets you started: https://github.com/Cloudef/android2gnulinux

Cloudef avatar Feb 15 '22 09:02 Cloudef