I have setup the installation process found on https://github.com/MobileChromeApps/mobile-chrome-apps/blob/master/docs/Installation.md on 2 different linux environments without problem and the same could be said for my current environment until 2 days ago.
Everything on that install for a linux environment is there, was able to run cca prepare android and see my application on my android phone. I dont know what changed but no cca command returns any output.
A whereis cca outputs cca: /usr/local/bin/cca however cca commands returns no response. Any idea or log which i should tail?
Since this doesn't provide any answer, and it seems people are still coming to see this question, I will share my experience related to that problem.
In my case I am trying that on a Ubuntu system (14.04 to be precise).
on my machine I have two packages that one might confuse :
Package: node
Priority: optional
Section: universe/hamradio
Conflicts: nodejs-legacy
Description-en: Amateur Packet Radio Node program (transitional package)
The existing node package has been renamed to ax25-node. This transitional
package exists to ease the upgrade path for existing users.
and
Package: nodejs
Priority: extra
Section: universe/web
Description-en: evented I/O for V8 javascript
Node.js is a platform built on Chrome's JavaScript runtime for easily
building fast, scalable network applications. Node.js uses an
event-driven, non-blocking I/O model that makes it lightweight and
efficient, perfect for data-intensive real-time applications that run
across distributed devices.
.
Node.js is bundled with several useful libraries to handle server
tasks:
.
System, Events, Standard I/O, Modules, Timers, Child Processes, POSIX,
HTTP, Multipart Parsing, TCP, DNS, Assert, Path, URL, Query Strings.
So first make sure you don't mistake one for the other.
Secondly you will need nodejs-legacy to have the node executable ( and not nodejs ).
Once I did this, cca started working.
Related
Would you recommend the overhead of installing & configuring an Android build server for a 1 programmer project?
The alternative is to upload all sources from development computer to git, download to another computer with Android Studio & Android SDK, and build from Android Studio.
If the answer is yes, would you recommend Jenkins, or another solution?
IMHO, yes, if you have significant time to set it up and maintain it on a separate machine. (I personally would not use a shared machine: too many reasons to restart and disrupt it.)
I feel an extra level of confidence each time I check in if Jenkins builds the whole project successfully from a fresh dir (one less thing I have to do.)
If I forget to check in an important file, Jenkins complains. Or, if I code something that generates a new Lint warning, Jenkins puts a spike in the graph. In other words, on solo projects, Jenkins is like an assistant (or mentor) that helps check my work.
Jenkins can warehouse app installers for future reference. So, it also helps me stay organized.
Jenkins offers some nice communications capabilities too. You can have it automatically notify others via Slack, or put an installer on Dropbox, or, through a service like Zapier, create a custom card in Trello. So Jenkins gives me an outward-facing messenger and delivery service.
These are some plugins I have found useful with Android builds:
Android Lint
Credentials Binding
Environment Injector
Gradle
Slack Notification
ThinBackup
Version Number
Zentimestamp
Of course, this only scratches the surface.
It requires some ongoing maintenance work though. And sometimes it's confusing/challenging to configure. (e.g. some plugins are poorly documented or no longer actively maintained. The linter in Android Studio is not exactly the same as the default one run through gradle by Jenkins, etc)
When I first set my build server up, I had a couple weeks of downtime when I was able to experiment with different plugins and troubleshoot the server. I probably wouldn't have done it without that empty window of time at the start.
So I know this has been questioned quite a lot. To be exact for example in these questions:
Run NodeJs server in Android
How to run my node.js project on android?
and
NodeJS on IOS/Android
Every option presented has a problem though:
I want to run it on my normal device so I would like to avoid installing another OS on my Device
Work on JXCore was stopped last month and (maybe as a result) I couldn't get it to compile (see Can't install jxcore-cordova)
The Android Port of NodeJs Anode has not been worked on since 2014 and wasn't really maintained back then anyways
The second answer in the second thread I linked to mentioned there is an official node distribution for Android now but apart from a link to the Browse-Website of the latest dist I couldn't find any info on how to actually use it
I also saw this but it seems like the device has to be connected to a PC (or similar) to run the adb shell commands while I would like to make it as a separate App
With the time that past since these questions have been posted and as the "best option" JXCore seem to be now unusable:
Is there a way to run a node.js application (a server in my case) on an Android device?
if you're wondering why I'd want this: I made a WebApp with a Node.Js server and I now want a version you can launch locally from your phone without requiring an Internet connection. This means the server needs to run on an Android phone.
I just had a jaw-drop moment - Termux allows you to install NodeJS on an Android device!
It seems to work for a basic Websocket Speed Test I had on hand. The http served by it can be accessed both locally and on the network.
There is a medium post that explains the installation process
Basically:
1. Install termux
2. apt install nodejs
3. node it up!
One restriction I've run into - it seems the shared folders don't have the necessary permissions to install modules. It might just be a file permission thing. The private app storage works just fine.
Dory - node.js
Great New Application
No Need to root your Phone and You Can Run your js File From anywere.
node.js runtime(run ES2015/ES6, ES2016 javascript and node.js APIs in android)
API Documents and instant code run from doc
syntax highlighting code editor
npm supports
linux terminal(toybox 0.7.4). node.js REPL and npm command in shell
(add '--no-bin-links' option if you execute npm in /sdcard)
StartOnBoot / LiveReload
native node.js binary and npm are included. no need to be online.
Update instruction to node js 8 (async await)
Download node.js v8.3.0 arm zip file and unzip.
copy 'node' to android's sdcard(/sdcard or /sdcard/path/to/...)
open the shell(check it out in the app's menu)
cd /data/user/0/io.tmpage.dorynode/files/bin (or, just type cd && cd .. && cd files/bin )
rm node
cp /sdcard/node .
(chmod a+x node
(https://play.google.com/store/apps/details?id=io.tempage.dorynode&hl=en)
You can use Node.js for Mobile Apps.
It works on Android devices and simulators, with pre-built binaries for armeabi-v7a, x86, arm64-v8a, x86_64. It also works on iOS, though that's outside the scope of this question.
Like JXcore, it is used to host a Node.js engine in the same process as the app, in a dedicated thread. Unlike JXcore, it is basically pure Node.js, built as a library, with a few portability fixes to run on Android. This means that it's much easier to keep the project up to date with mainline Node.js.
Plugins for Cordova and React Native are also available. The plugins provide a communication layer between the JavaScript side of those frameworks and the Node.js side. They also simplify development by taking care of a few things automatically, like packaging modules and cross-compiling native modules at build time.
Full disclosure: I work for the company that develops Node.js for Mobile Apps.
J2V8 is best solution of your problem. It's run Nodejs application on jvm(java and android).
J2V8 is Java Bindings for V8, But Node.js integration is available in J2V8 (version 4.4.0)
Github : https://github.com/eclipsesource/J2V8
Example : http://eclipsesource.com/blogs/2016/07/20/running-node-js-on-the-jvm/
the tutorial of how to build NodeJS for Android https://github.com/dna2github/dna2oslab/tree/master/android/build
there are several versions v0.12, v4, v6, v7
It is easy to run compiled binary on Android; for example run compiled Nginx: https://github.com/dna2github/dna2mtgol/tree/master/fileShare
You just need to modify code to replace Nginx to NodeJS; it is better if using Android Service to run node js server on the backend.
Node.js Frontend for Android
releases include signed apks
Android 4.4+
open source (GPLv2)
no root
frontend for Node.js for Mobile Apps by Janea Systems
which was announced earlier in this thread by one of its developers
which is a game-changer; great work!
at a high level:
the "exec in same process" tab:
includes a list of Node.js apps that are intended to run for a short period of time while the application remains open, and may only be executed one at a time
the "fork to separate process" tab:
includes a list of Node.js apps that are each executed in a separate foreground service in a distinct process, and are intended to hold long-running daemons (ex: various types of servers)
I need to add scripting layer to my android App. So I can remotely prepare a script that my app download form a web service and execute on the user device.
I found a interesting project called Scripting Layer for Android (SL4A) here:
http://code.google.com/p/android-scripting/
I'm not sure I can execute Python script without installing the PythonForAndroid_r4.apk first. I can't force my customer to install that application!
So my question is, can the SL4A layer be integrated in my app without the need to install other apk?
I need to execute actions like update data in the DB, create/read/delete a file on the sd card... Not so complex but I see SL4A can do a lot of things like these.
Other scripting libraries?
EDIT:
Found also MVEL: http://mvel.codehaus.org/ but I think it needs to be integrated to execute complex operations like accessing a DB...
I found a project that uses SL4A:
http://code.google.com/p/android-python27/
For whom that wants to try it, if error occurs using Eclipse, here is a link that could solve the compilation issue:
http://code.google.com/p/android-python27/issues/detail?id=1
I've just compiled this project:
http://code.google.com/p/android-python27/source/browse/#hg%2Fapk
To download sources, download HG Tortoise from:
http://tortoisehg.bitbucket.io/download/
Make a local copy of the repository with the command:
hg clone https://code.google.com/p/android-python27/
Then import the APK project in Eclipse and compile it.
Just run it on my low cost China tablet and it seems to works fine. Initially the program make an installation:
boolean installNeeded = isInstallNeeded();
if(installNeeded) {
setContentView(R.layout.install);
new InstallAsyncTask().execute();
}
That make some installations on the external storage (fortunately no root privileges are needed).
I am doing a little research on how to setup Continuos delivery pipeline for Android apps. I am aware of existing approaches of using Jenkins and Ant scripts for making a build. What I'd really like to do is when I do a git push on say a development branch, I'd like Jenkins to do a build on bunch of emulators (With different resolutions) run my Robotium scripts and email me results.
I am looking for end-to-end setup preferably the server would run on Ubuntu.
Siddharth,
You may want to consider CloudMunch for this need. All you need to do is launch the emulators as part your pipeline to test various stacks and finally get an update over mail. Robotium scripts can be called over shell and reports will come to you as mail at the end of the test.
I'd like to use an ssh client in the Android terminal emulator, to connect to remote systems, when I have to.
There are a couple other ways to do this -- using separate Java apps, purchasing separate Java-based apps, etc.
Really, I just want to build and deploy a statically-linked dbclient binary that can do libnss hostname lookups. ("Woo! Tall order.")
There are a number of bits of documentation on howto build Dropbear for Android. Many focus on the non-client bins, but not all:
Running dropbear on Android...
Howto cross-compile dropbear...
Howto build/compile dropbearmulti
The dynamic linked build doesn't exec on my target, and I don't have strace or ldd to help troubleshoot.
The static linked build runs, but can't get hostnames because of missing runtime support. Fine, so patch that out -- still doesn't work. It just hangs. Again, I don't know why.
The busybox-style dropbearmulti exhibits the same behavior.
So, million dollar question: has anyone actually gotten this to work? Do you have documentation of your experience?
I'm targeting a rooted 2.3.7 Gingerbread build on a Samsung Infuse 4G (generic armeabi).
I make Android-NDK dynamic ssh-dropbear-ssh-client only. See
ftp://ftp.simtreas.ru/pub/my/dropbear/dropbear-ssh-only.tgz
sourse and ftp://ftp.simtreas.ru/pub/my/dropbear/ssh binary