Add Android Support [$50] #94

subtleGradient opened this Issue Oct 17, 2012 · 97 comments


None yet


There is a $50 open bounty on this issue. Add to the bounty at Bountysource.

zcbenz commented Oct 18, 2012

It's possible to provide an Android port of node-webkit, but I don't have plan for that in near future, supporting all three major desktop platforms has already taken all of my time.


In case Chrome need V8 Android bridge, it should be done there.

at least three things to do:

  1. porting Chrome's V8 to node.js.
  2. cross compile node.js with Android NDK
  3. poring what else in content-shell to Android

If it's technically possible that would be awesome. Could game developers even use WebGL on Android with this way?

zcbenz commented Oct 22, 2012

Not sure, I'm not familiar with Chrome on Android.


Hmm... nope. The current version of Android for Chrome doesn't support WebGL :(


@donaldpipowitch , I'm sure it will get better :)


@subtleGradient, why not use Phonegap?


PhoneGap neither uses V8 nor Node. It just uses the native WebView and adds some API bridges.


Great news. The recent Chrome for Android Beta features WebGL hidden behind a flag:

It would be just so sweet to get node-webkit running on an OUYA :)

kevsmt commented Jan 11, 2013

This is epic if possible :)


Even if it's technically possible to enable node APIs on Andorid, will Google allow such an application being installed? Basically it can access all the resources in the device and user will have no way to control it.


I think you would have to use the regular Android way and declare a AndroidManifest.xml to set permissions.

Mithgol commented Jun 18, 2013

Meanwhile, the nodejs/node-v0.x-archive#5514 patch has been merged into the core of Node.js.



what s up with node-webkit on android ?



FYI, here is an attempt to provide a pure javascript development environment for native Apps,
by using V8 on Android and spider-monkey on iOS.

albi90 commented Aug 26, 2013

Any progress on this?

tarwin commented Sep 27, 2013

If it would be possible to get it working, I may be interested in paying someone (a grand or two?) to get this going. Requirements would be that it has WebGL available (ie latest Chrome).


FYI: With the new JS-to-ObjC-Bridge in iOS7 it should be possible to polyfill Node on iOS, so generally it should be possible to do node-webkit on iOS7, too?

albi90 commented Oct 1, 2013

its definitely possible, i have just converted one of my projects from node-webkit to android using the chromium content shell for android from doesent have nodejs but the JS bridge works so i was able to recreate the required nodejs functions in java and pass the information back over the bridge.

jmorvan commented Jan 17, 2014

It would probably need a native app shell and then define a JNI to map webview's js calls to node. (in theory!)

albi90 commented Jan 17, 2014

You could probably modify webinos, to emulate node-webkit from what I have read its the chromium content shell smashed together with anode.




leemke commented Mar 12, 2014

Very interested in html5 nodejs (node-webkit) for my new android tablet


If what you care about is a full-performance Chromium fullscreen window on Android showing your web app, well then I suggest that you look into using Crosswalk (

If you really depend on the node.js support, well then you can stop reading here, at least for now :-)

There is even an APK generator here:

So what is Crosswalk and does it make sense for you? (some extracts from my upcoming article for

Crosswalk brings the full performance of Blink/Chromium to web applications on all Android devices from version 4.0 onwards, as well as some additional standards-based web features requested by app developers, such as orientation lock, raw sockets, WebRTC and WebAudio and even WebGL :-)

I guess some readers know that the latest Android (4.4, KitKat) now brings a WebView based on Chrome and Blink, so why not just use that?

Well, the new WebView is only available to people running the latest major version of Android and furthermore, the performance characteristics and features differ somewhat from Chrome, depending on the Android API level used by the embedding application.

This is because the new WebView in KitKat has to match the behavior of the previous WebView to avoid breaking existing applications, which means supporting legacy features, workarounds etc. In some cases this negatively affects layout and performance. In particular canvas performance seems to be hurt and features such as WebGL are left out for now.

As Crosswalk doesn't need this compatibility, it can follow a design very similar to that of the Chrome browser, and it is in fact built on top of Chromium components such as the content module and the Blink engine which makes it blazingly fast and very standards compliant.

leemke commented Mar 13, 2014

What I would like to do is: Do all my development of Android app's on the tablet (Android OS).
For me this has two advantages:

  1. I don't have to carry around a 4lb laptop.
  2. I don't have to run an android simulator and then reconfirm its
    actual operation in the Android environment.
    Then there is the added time of keeping the simulator in sync
    with the Android OS. And the publishing and transfer between
    the two platforms. Do I really need all of this complication?
albi90 commented Mar 14, 2014

Hi Guys

If you want i have the latest chromium content shell refracted into an android studio project, i cant take any credit for it, its based on Davis Fords github project (now private), but updated.

just add a javascript bridge to communicate between your java and javascript.


CoryGH commented Apr 17, 2014

Would be great to see node-webkit support for Android and iOS, it would definitely expand node.js to everywhere (already have it running as a pseudo-operating system for embedded devices by killing the window manager on a Raspberry PI, replacing X with a single-window instance of Midori and setting node.js to run automatically, same can be done with a node-webkit application but it makes it a bit harder to update than separating the node.js and web browser instances in that case).

leemke commented Apr 17, 2014

I am with you on this. Want to develop browser based application for local
android platform. Working on it now!

On Thu, Apr 17, 2014 at 1:56 PM, CoryGH wrote:

Would be great to see node-webkit support for Android and iOS, it would
definitely expand node.js to everywhere (already have it running as a
pseudo-operating system for embedded devices by killing the window manager
on a Raspberry PI, replacing X with a single-window instance of Midori and
setting node.js to run automatically, same can be done with a node-webkit
application but it makes it a bit harder to update than separating the
node.js and web browser instances in that case).

Reply to this email directly or view it on GitHub

albi90 commented Apr 22, 2014

Hi guys

if your looking to hax up chromium to create a native web app you can use my latest build of the chromium content shell, its the latest LKGR build 265217 so it should be stable.

just download the source and open it in android studio, this is just the raw content shell which doesn't support loading url's from the assets dir so you will need to zip your project and put some code in to extract it to external storage and set the startup url to file:///extracted_dir well thats what i do if you find a better way let me know.

Have fun

oh yeah the source url is

albi90 commented Apr 24, 2014

Woops looks like i didn't re-base to the LKGR correctly the above build is a bit buggy, i will update it tonight, i will also post an example with a basic page utilizing the javascript bridge as it can be hard to work out.

albi90 commented Apr 26, 2014

Ok so i have updated the content shell to the latest LKGR 26609 source for the pure content shell is below:

if you want a basic app example, see below node-webkit build (no node.js sorry) this app will extract the node-webkit\chromium\nw\src\main\assets\www content onto the external storage dir and load index.html. the current page is just a simple app that shows the total memory available, the used memory and lists any files in its external storage dir.

it should give you a good example of how to use the JavascriptInterface on the content shell.

FYI my android development skills are not the best so i take no responsibility for any issues.

Feel free to use this code how you like, its 99% chromium source.


hadim commented May 4, 2014

Any chance to get node-webkit working on android in future ?

Mithgol commented May 4, 2014

@hadim The current situation is the following:

  • It is possible to run the Chromium parts of node-webkit on Android, as @albi90 has demonstrated above.
  • Node.js engine is somewhat portable to Android as well (especially after the nodejs/node-v0.x-archive#5514 patch has been merged into the core of Node.js).
  • The amalgamation of these two (which we know as node-webkit) would still require quite an effort and nobody volunteered to do that.
hadim commented May 4, 2014

Ok at least it's clear :-)

Thank you dude !

No9 commented May 16, 2014

This might be useful :) Node on android

albi90 commented May 19, 2014

@No9 interesting gist, if we can simply compile node for android then it shouldn't be to hard to add it to the android content shell, if @zcbenz could provide an in depth breakdown on the changes made to make node work in the content shell at the DOM level i would give it a go, i believe the content shell lib between android and linux shares alot of code.

@subtleGradient subtleGradient changed the title from Add Android Support to Add Android Support [$15] May 20, 2014
@subtleGradient subtleGradient changed the title from Add Android Support [$15] to Add Android Support [$50] May 20, 2014

@rogerwang please say something about this.. This would be the better thing that could happen to node-webkit... node.js and node-webkit are great and thanks to them, programs like PopcornTime were created!! thanks


@PedroMCostaAndrade it requires efforts and the support I get so far is not able to cope with this. Thanks


@rogerwang: When you say "the support I get so far", do you mean fellow developers helping with the code or financial support?


I second @spirodonfl's question and will try to find time to help out if you need code support 👍




I don't have the expertise to help with the code, but this would extremely useful for me and I'm willing to pitch in financially (modestly) for someone to do it. Crowdfunding?


I don't know what the exact technical details but this should be doable on the chromium side, proven by the crosswalk project and porting node to android seems to be in progress.

Mithgol commented Oct 16, 2014

@davidworkman9 It seems to me that the project is porting Node.js not only to Android, but also from JavaScript to Java, and its intention is to provide Node-like APIs for Java applications on Android. (And it is therefore useless for the goal of launching the code of node-webkit-based applications written in JavaScript.)


@Mithgol oh sorry, I guess you're right. I didn't look into it much, was in the node weekly newsletter this morning right above the notification for this in my inbox and thought it was quite the coincidence.

albi90 commented Oct 16, 2014

@Mithgol if we have the API in Java you could simply use the content shell with the js bridge, not as nice as having node tied directly into the content shell at the DOM level but would work.

Mithgol commented Oct 17, 2014

@albi90 You're right.

tommoor commented Dec 16, 2014

@rogerwang I think we should close this as scope creep, doesn't seem like it's within the bounds of the current project to support mobile.


I think it's quite interesting to have NW on Android (and on any mobile env).
It's possible to compile NodeJS for Android.
Here the result of the build, that runs on Android 5 (should work on 4.4) ARM.
Here some explanations in French and here in English (but this one does not support PIE).

I'm also investigate Crosswalk.
But there is a big issue with npm and native add-ons.

No9 commented Jan 15, 2015

Great work @dthevenin
Do you have any more details on the npm and native add-ons issues?
As part of the io-js integration there may be opportunities to submit patches to those projects that facilitate building against multiple node.js forks


@No9 Thanks :-)
There is at least one main issue (I dont know that much how npm works): native add-ons are dynamically built when the user install a npm module that uses native code. That means we need a full build toolchain installed on the Android device.
To avoid this issue, the basic idea is to change how npm works, and use a more traditional module approach (like apt-get) that detects the platform and install the right binaries, instead of compiling them.
About io.js, yes it would be nice if we are able to patches the project.
I will test if it's possible to build io.js for Android...


Why don't you run npm on the host pc/mac and then deploy the "built/npm installed" node app to the device? I think that's a lot easier and should cover most use-cases.


Why don't you run npm on the host pc/mac and then deploy the "built/npm installed" node app to the device? I think that's a lot easier and should cover most use-cases.

Because you would need to shift a binary for every possible architecture, that's the problem.
Most Android-apps are written in Java, the JIT-Compiler takes care of the different architectures there.

So if we could compile the native modules to java bytecode (actually you would need to rewrite the native modules in java), putting the native modules right in your app would actually be possible.


Hmm, I think that's not npm's business. You should be able to setup a proper build environment for your app without the need to patch anything on npm's or native modules.


Hmm, I think that's not npm's business. You should be able to setup a proper build environment for your app without the need to patch anything on npm's or native modules.

+1 for this


@zyberspace You don't have to rewrite the native module. I guest most of them are written using C/C++. We just have to use Android NDK to build them (as I've compiled NodeJS).
But for sure is quite complicate to do that on an Android device (for "normal users").

@spacepluk yes It's a npm business. As any package management system, it should be able to manage the device target. For now npm distributes only source code. A npm for mobile env should be able to manage binaries too.
But fore sure, it depends on what we want to do with Node.
If we want package a App based on Node, WebKit and modules, what you point is enough.
If we want propose a dev platform it's not enough.

I'm more interested by the second point, but this is not the purpose of NW!


There are dozens of good uses of node-webkit on Android even without native modules.

If somebody got nw compiled for Android with npm support, that would have been absolutely fine for me. Just the standard modules and require.js for stupid classical JS is already heck of a breakthrough!


get a try node-android, that benefits from both node.js with Rhino JS engine and android framework


Guys, whilst this isn't currently a solution, take a look at the JXCore roadmap, here: jxcore/jxcore#153 (comment)

This looks like it is going to be a true cross-platform nodejs, Android/iOS included. Will see if it fills the requirements, but there may be a possibility of combining JXCore with Chromium to create node-jxcore?

Just airballing ;)

Mithgol commented Mar 1, 2015

The above mentioned engine (JXcore) is now said to work on Android (jxcore/jxcore#103).

It currently requires compilation (see its, the binaries do not seem to be available at


+2 Would be nice to get nwjs fully cross platform, although there would be a alot of overhead 50mb apk. would love to see android support.


And such overhead would be way too unreasonable for a consumer app. Especially those who pay for data used. Makes more sense to port or code compatibility so your app can work with things like Phone Gap or the many other HTML5 container options out there.


@Mithgol I think the easiest way to get this started would be to use Chrome Cordova and extend it. Whats your oppinion?

mihailik commented May 4, 2015

nwjs doesn't have to be redeployed with each and every app. Instead it should naturally follow the browser model.

Nwjs is installed once, and then apps simply push an Android 'intent' into it with the respective package attached.

That's smoother servicing, minimal data and simpler copy-only apk-less installs at development stage.


That is easier done in theory than execution. I remember when I used to code in classic VB6 / .NET and I was forced to package the runtimes or framework since 50% of my end user issues where them not understanding they need to install them even when the download area stated it. Then you have the case of different versions of NW.js. You can't use the newest because some require an older version for node.js compatibility or even older for an older version of node.js compatibility. For a consumer app, that model only works if NW.js was shipped with the OS. Which I doubt will ever happen.

Montoya commented May 5, 2015

I think Cordova / Phonegap is a much better solution for Android dev, since it relies on the OS' browser instead of packaging Chromium.

Mithgol commented May 6, 2015

@RIAEvangelist @Montoya There is a project at and it indends to do just that (i.e. to integrate Node.js as JXcore into Cordova as a plugin).

v3ss0n commented Jul 9, 2015

I think Cordova / Phonegap is a much better solution for Android dev, since it relies on the OS' browser instead of packaging Chromium.

Os browser sucks. It is not updated with latest HTML5 tech.
cordova + crosswalk plugin is best setup currently. it packs Chromium into Cordova.

No9 commented Jul 10, 2015

Agree with @v3ss0n
Currently building out for node compatibility

Mithgol commented Jul 15, 2015

Newest Cordova versions already include the crosswalk solution and thus support the latest HTML5 achievements.

Also, JXcore for Cordova has also reached its goal of bringing Node.js API to Android and to iOS.

v3ss0n commented Jul 16, 2015

Crosswalk bydefault or as plugin?

On Wed, Jul 15, 2015 at 11:59 AM, Mithgol wrote:

Newest Cordova versions already include the crosswalk solution and thus
support the latest HTML5 achievements.

Also, JXcore for Cordova has also reached its goal of bringing Node.js API
to Android and to iOS.

Reply to this email directly or view it on GitHub
#94 (comment).

Mithgol commented Jul 17, 2015

By default, as far as I could tell.


Looks promising. With JXCore as the "Main" process and crosswalk, sans node, as the render process, it may be possible to create a pretty sweet Node.js based mobile app framework. The big key is how efficient the IPC layer is between JXCore and crosswalk.

v3ss0n commented Aug 7, 2015

@Mithgol are you sure? We got to install crosswalk to work.

v3ss0n commented Aug 7, 2015

@JavaScriptDude very interesting.

Mithgol commented Aug 7, 2015

@v3ss0n When I run cordova build, build steps for Android seem to involve Crosswalk somehow.

Crosswalk is also mentioned in the official announcement about Apache Cordova Android 4.0.0 (15 Apr 2015).

v3ss0n commented Aug 7, 2015

As you can see from announcement:

Major Changes

  • Support for pluggable WebViews!
  • Crosswalk can be added by installing the cordova-plugin-crosswalk-webview plugin.
Mithgol commented Aug 7, 2015

You're right, @v3ss0n. I was wrong to think that Crosswalk is internal to Cordova; in fact a plugin is required.

v3ss0n commented Aug 7, 2015

No problem , i was thinking i am wrong and testing to see if there crosswalk by default.

jumanja commented Feb 22, 2016

Hi, Just to add a summary of current (2016) situation :

I practically create an entire app on windows using Node-webkit + HTML5 + sqlite, then I use same exact folder as a base for an android project using the free Intel XDK (, which uses Cordova. Despite the fact it will not be a native application for Android, it allows me (as per intel-xdx documentation) to publish also in iOS, so practically with NWjs development you now are covering pc, mac, linux, android, iOs. Blackberry is even opening (or already opened, not sure) to publish android apps, so I think we finally have a great option for multi-platform, as you may publish with little changes same app in a web server (node.js) server and connect to a more robust BD (to replace sql) if needed.

Am I right ? or do you guys think we need to wait for more to have a real multi-platform solution ? By the wat, if you want to see app sample is free on google play (hope this will not be considered as spam) here: (in spanish)

v3ss0n commented Feb 23, 2016

Our experience with IOS , it is broken. IOS devices do not support many CSS3 features that Material Design Lite won't work. Android is fine tho.


iOS 9+ should support more modern CSS if you use a UIWebkit view controller. Doable in 8 but needs a workaround for loading local files. Also, js performance should be an order of magnitude improved. I'm leaning more hybrid app with handrolled mobile-specific normalization nowadays for apps with basic mobile OS needs. Wrapper quirks and unsupported features are as much to learn/overcome as android/iOS shenanigans in a lot of cases.


Wow you are good hero for Smartphones and Tablets!

Very interesting with Android and iOS yeah and where is FirefoxOS, Tizen and BlackArray OS and FreeBSD OS. You know I really miss sometimes node.js and nw.js for FreeBSD - If you have installed FreeBSD / OpenBSD on box than. But FreeBSD is not same Linux because FreeBSD is like so close Darwin ( very unix usable )

For unsupported platform with software-3D ( like old voodoo 3D without graphic cards )
Use only Java Runtime ( Why not )
node.js and nw.js should as *.jar and if your own nw file into jar than you can run jar.

How does sofwtare-3D work? I know it is very slow if you have big 3D project into jar. impossible???

I hope you develop hard

axinging commented Jul 15, 2016 edited

Hi, I successfully run node on crosswalk for Android(Crosswalk provides an alternative for Android WebView), including native node addon.
If any of you are interested, please refer to:


I'm trying to implement it as well, @axinging
Is that real?
Can I develop a Node.js app inside a Crosswalk Webview and deploy it to Android App Store?
Do I have to be root? Does it have everyone's to be root?


@matikbird For node js itself, no need to root.
For native addon, if you put the addon inside your apk, then no need to root.

Due to android's limitation, if you want to execute native addon at /data/local/tmp, you need to root your devices.

matikbird commented Jul 30, 2016 edited

That's amazing, I'm still trying to make it work.
Do you have an uploaded example?

I'm speachless. I trully can't believe it's possible.
I mean, if I install, like.. «npm install --save medium-editor» (which's not a native node module, it's fully written in JavaScript), I will be able to do: require('medium-editor') and it would work? (without using browserify, just plain Node.js)

If that happens, you earned yourself a new fan.
Like I said, I'm still trying to make it work, though the guideline it's not very clear.

So far, what I've done to make an hybrid app was:
Install Node.js (and NPM), and then: npm install -g cordova. Then, I added the crosswalk plugin.. but that guide it's like another whole new thing.

If I do what I've always done, I don't think Node will be avaible.
Can you elaborate how it works?
I'll thank you forever. And thanks for the quick reply!


@axinging @matikbird Hi, i'm too interested on this. But i basically not develop mobile or desktop apps, just interest. Let me know if you're done. Thanks.
For iOS (WebApp - From Safari, link to home screen) like native or via "Profile Installation"
For Android (like iOS send to homescreen), just link bar shows (not good).
For WP - IMPOSSIBLE, but via Phonegap can be done (maybe, no NODE, just HTML/CSS/JS)
For BB - Exactly like WP.


Just a side note I am using for some time now.
You can install node.js and run it on any android phone.

Install Termux from play store.
In Termux use apt install nodejs (it will download and install the arm build for nodejs and npm)
now you can use npm and nodejs

axinging commented Jul 31, 2016 edited

Will upload a workable apk soon.

I didn’t try npm’s way. I am not sure if npm works on android. Also, for native addon, they are most built for x86.
So for native addon, I bypassed npm, built native module and push it into android devices.
But for js addon, it works on rooted devices. For non-rooted devices, I will verify if it works soon.

For crosswalk cordova, node’s support was not officially support. This was just my personal’s interest.


«Yes, but I don't want to install Node.js & NPM in my device» ─ The users, everytime I ask them to install my app.

I meant if it was something like Electron, where you can work with Node.js in a development enviroment, and deploy your apps to all users. Access to LevelDB and stuff, fs filesystem (cordova has it, but whatever). I am not sure if my question was understood, I'm sorry.
Now I am more confuse about this.

axinging commented Aug 1, 2016 edited

You can download apk here:
Js addon works on non-rooted devices. One js module sample code:
Please put nodeconv.html /sdcard/, and converter.js at /sdcard/node/.

When the apk is started, type: file:///sdcard/nodeconv.html.

@matikbird matikbird referenced this issue in pouchdb/pouchdb Aug 1, 2016

PouchDB in Cordova #5514

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment