fv0xrq
Last Updated: November 03, 2018
·
2.084K
· vevmesteren

Android Development on Chrome OS

So earlier this year I went down the road of so many. I decided to give Chrome OS a whirl. With my new role in the start-up, though still a developer at heart, my time spent in code has become much less frequent. As long as I have a terminal and VIM to check in every now and then all was well.

My daily routine was more spent in emails, Hangouts etc. But this post is not about this evolution of my own everyday life, so enough about that part.

I did spend Two full months exclusively working on a 2013 Chrome Book Pixel (http://www.theverge.com/2013/2/25/4023830/google-chromebook-pixel-review). Now, people can say what they want about the utility of this overpriced marvel, but remains just that, a marvel. Even when two years old, the Laptop still felt great to work on. In short Chrome OS is an awesome operating system, mostly because is crazy fast to load and when you install an App, it’s synced with your Google Account, so when you go on your office Windows, Mac or Linux PC, as long as you have Chrome 99% of the application works and gets downloaded automatically. I am digressing, this post is not about Chrome OS.

What I did want is to continue to be able to code, and work locally, when needed. My normal dev toolset revolves a lot around Vagrant/Ansible (http://jeto.io) and Python, PHP and Node.js. Having VIM and Some Sublime Text like editor around is really all I need.

Whilst I am back on my regular Ubuntu Laptop when at the office now, I have continued with Chrome OS when at home. And since a couple of weeks I wanted to see if I couldn't push this a little further.

I have been playing a bit with Android Development as of late. More specifically, using Cordova to do so.

So last night I wondered, can I do this on my Chrome OS laptop as well. And it turns out, I can. So here it goes.

The first thing you need to do is to switch your Chromebook to Developer mode (https://www.chromium.org/chromium-os/developer-information-for-chrome-os-devices/chromebook-pixel) it depends on the Chromebook your on, but it's a pretty straight forward operation, which I won't get into now.

First Chrome App pre-requisites
"Secure Shell": https://chrome.google.com/webstore/detail/secure-shell/pnhechapfaindjhompbnflcldabbghjo
"Crosh Window": https://chrome.google.com/webstore/detail/crosh-window/nhbmpbdladcchdhkemlojfjdknjadhmh

Next you want to head over to install Crouton (https://github.com/dnschneid/crouton).

Fire up the Crosh window

shell
sudo sh ~/Downloads/crouton -r trusty -t cli-extra 

Once your Chroot is up and running enter it with

sudo enter-chroot 

I can’t recommend TMUX (or something like it) more then enough, as multiple Terminals are your friend throughout your life in the Crosh Window. VIM is again my own preference you choose your poison for your favorite editor here.

So my first command installs some base tools and a few packages we’ll be needing later on.

sudo apt-get install tmux vim software-properties-common wget curl ant libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5 lib32z1 lib32z1-dev git 

Next we need to prep the machine to work with Android. That requires Java, I’ll go for version 8, again choose your poison here…

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
sudo apt-get install oracle-java8-set-default

make sure you’re all set with

java -version

Ok, the basework is done, now let’s go get the Android SDK. Head over to https://developer.android.com/sdk/index.html#Other to get the latest URL to the SDK. To download it run

cd Downloads
wget http://dl.google.com/android/android-sdk_r24.4.1-linux.tgz

Next up unpack the package

sudo tar zxf android-sdk_r24.4.1-linux.tgz -C /opt/

Now, to be able to make use of the Android goodie bag, you need to add it to your .bashrc

vim ~/.bashrc

and append this to the end of the file:

#ANDROID SDK 
export ANDROID_HOME="/opt/android-sdk-linux"
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/platform-    tools

Save and Exit

For the changes to bashrc to take effect run

source .bashrc

To make sure that root can run android and adb functions, install the allimportant sdks etc

sudo chmod 0777 -R /opt/android-sdk-linux

Congratulations you are now ready to run Android commands on your Chromebook. Have a Debug Enabled Android device floating around, go ahead and connect to your Chromebook USB port, and you will find that adb devices will see it. So now you can already sideload, install, flash and all the glorious Android Hackery you expect. Not all bad, but for not quite what we want. We want to build and deploy our own Android apps, so let’s continue...

Next up we need to install the SDKs and Tools we’ll be using, to create a basic hello world cordova Android App we’ll be needing Android 5.1.1 (API 22) platform SDK, Android SDK Build-tools version 19.1 or higher and the Android Support Repository (Extras). To list all available packages run

android list sdk --all

Woooha, that’s a load of packages to read through in the console, so let’s filter them like so, respectively

android list sdk --all | grep "5.1.1"
android list sdk --all | grep "19.1"
android list sdk --all | grep "Support "

Now that we know our IDs, we’re ready to install

android update sdk -u -a -t 16,27,144

Next up, installing Cordova. First things first, let’s go get a nice and fresh Node.js install

curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
sudo apt-get install -y nodejs

We’re now ready for Cordova goodness

sudo npm install -g cordova

And that’s pretty much it. From here on in, https://cordova.apache.org/docs/en/5.1.1/guide/platforms/android/ is your friend, but for the TL;DR; crowd.

Inside your working directory run

cordova create hello com.example.hello HelloWorld
cd hello
cordova platform add android
cordova build

or if you have an Android device attached

cordova run

And that....my friends...is how the cookie crumbles.

2 Responses
Add your response

24528

Thanks for share

over 1 year ago ·
31139

There is two way to download Emus4u on your iOS device, both the methods are explaining below, follow each and every step to get it on your device. If you skip any one of them, then Emus4u will not be installed to your device.

emus4u app

Emus4u Installer OFFicial WebSite Link; https://emus4u.co/

While iOS 10 was a successful version of the firmware, at least in terms of features, the same couldn’t be said for jailbreaks. Given the success of the previous iOS, it was with some disappointment that iOS 10 download [ext link] proved disastrous for the jailbreak community, almost seeming to go back to how jailbreaking used to be, with few utilities to choose from. This has forced us into looking for an alternative way to get some of our favorite Cydia content without the need to jailbreak.
The best solution we have found for iOS 11 users is an app installer called Emus4u. There have been other installers released, like that Emus4u iOS 11 download [ext link] and TutuApp [ext link], but most are limited in what they can offer. Emus4u offers a good choice of emulators, paid and premium content for free and modified apps that are packed with features you would normally have to pay for.
Emus4u has launched specially for iOS but now it supports Android as well. Now Android users can get access to Cydia apps o their device. To get Emus4u on our device we need
Download Emus4U APK :

This will involve downloading the APK file for Emus4U so that you can install the app onto your Android device. Please make sure you follow all of these steps exactly as written otherwise this isn’t going to work:

Emus4u APK first which is an Application package file that can be installed to Android device. Follow the guide below to make it work for your Android device.

How to Download Emus4u on Android:
Go to Settings from your Android device then go to Security.
You will get to see Unknown Source Option, enable it otherwise it will not be installed on your device.
Now download the Emus4u APK file directly on your Android device, it will take some time to download the file.
Once downloaded, go to device storage and find the file, tap on it.
You will see the Install option, tap on Install.
Tap Next > Done.
Emus4u now will be on your device Home Screen.

In any case, if Emus4un is not working on your device, then delete the installed Emus4u and reinstall it again on your Android device. Emus4u should work fine on your device, let us know how you like the iOS apps Installer on your Android device, comments below and follow

Emus4u
Method 2: Profile Configure Installation Method
First of all open Safari the open this [ link ]
On the new window tap on Install.
Type your device passcode.
Tap Install again on the Settings app.
At the end tap on Done.
Emus4u will successfully installed on your iOS device.
Emus4u Movie Box;

Emus4u Movie Box HD Apk is a free an ultimate entertaining application available to install for smart devices. This allows users to watch/download any movie, tv-show with HD quality for Free! Originally this application was designed for the Apple iOS devices like iPhones & iPads. What about Android users? Can install the MovieBox for Android devices? Thanks to developers, has made this amazing application with support multi-platform

Fix Emus4u Errors:

When Emus4u is once installed on your device, it should work fine but unfortunately, due to the high traffic volume on the server, you might get two common types of error. See the below steps to fix it.

Profile Installation Failed? Open the link to see how to fix it.
If installed Emus4u is not running on your device, go to Settings > General > Profile and Device management, find the app profile tap Trust on it.
Emus4u Not Working Fix:
If installed Emus4u is not working after fixing the above issues, like you cannot download any app from it or the downloaded app from Emus4u is not working, see the step below to fix.

Emus4u Not Working? Open the given link to see how to fix the issues.
Once all the issues have fixed, Emus4u should work fine on your device, let us know how you like it or experiencing any more issues, we will try our best to fix it and follow

about 2 months ago ·