Porting node.js to Android

After spending a couple of days dealing with Android NDK madness, some esoteric and intricate Linux implementations on this device, I finally got node js latest to run as a native app on Android.

I was planning to originally run a v8 client on Android so I started with the v8 port. That one was easy. However, when I realized how much benefits node brings to any JavaScript development, and
not only server side, it was obvious that the rest of the stack needed to be ported.

I did some research, hoping someone had gone thru the hoops already. But all I could find was a direct port done on Linux arm and running with root privilege. I couldn’t adopt this approach because my ultimate goal is to deliver JavaScript apps running on standard phones and available on Android market.

Now that I am done with the initial port, my next task is to clean up the codebase, refine some of the plug-in native bindings, fix a bunch of remaining specific issues (e.g. fs, console, ipv6, etc…) and post the result of this work on github (ldesegur/nodejs-android.)

Let me know if you have any interest. I would certainly appreciate any help on this project.

5 thoughts on “Porting node.js to Android

  1. Thanks for the reply.
    I see that hello-js.cpp does “node -e process.stdout.write(process.version)”
    How can I start a http server with this sample program? I tried “node /data/example.js” in hello-js.cpp (with /data/example.js in android device). It didn’t work.

Leave a comment