Thursday, August 21, 2014

Running Android apps for development purposes

The next major version of ProjExec is going to support mobile devices, and in particular Android. This means that the developer needs a way to test the application while developing, and the sales guys need a demo environment.
As probably everyone, we started with the emulator bundled with the Android SDK. It has several advantages:

  1. It comes out of the box with the Android SDK, for free
  2. It is heavily configurable, so you can choose from a list of existing devices to emulate, or create a custom one
  3. It can emulate several hardware architectures, including ARM and x86
  4. It behaves like a real device, including the side buttons

If this emulator is technically working, it is actually barely usable in the best case. Most of the time, it is slow as hell... The recent Intel HMAX, now bundled with the SDK, makes it faster because it natively runs x86 code. But still, if it makes the experience better, it executes slowly.

Fine. To get a better experience, I bought a real device. A 10" quad core cheap tablet from Amazon. I got a very good deal for it and, at that time, Android 4.2 was perfectly fine for development purposes. I've been pretty happy with it, once I passed the configuration steps. Forgot to say, you need to install a USB driver on your development PC to communicate with the tablet. And none is offered by Matricom, or other cheap manufacturer. I finally found a generic one that barely works: it does not see the tablet as a USB disk, but the Android Debug Bridge (adb) sees it properly. Good for dev purposes.

Now came Android 4.4, aka KitKat. I wouldn't normally look to upgrade, but this time is different. Its browser component is now based on Chrome. This is a game changer for developers because this component can  be remote debugged from another machine, directly from Chrome. See: Remote debugging on Android with Chrome. Wahoo, this works very well for hybrid apps using Apache Cordova. That's make a KitKat based device really indispensable! But wait, my cheap tablet runs 4.2, with no update in the pipe. It suddenly became obsolete. I haven't opened it for 2 months now. If one knows how to upgrade it with a generic version of KitKat, please let me know. Else, it will finish in the cemetery of obsolete devices, or in the hands of a kid in the neighborhood. By the way, I *hate* the way android devices get OS upgrades. Google should learn from Microsoft, as I don't need to change my PC when I want to update Windows. But this is another debate.

Alright. Before I spend more bucks buying a recent KitKat based device, I investigated alternate solutions.

One of them is provided by a French company called Geny Motion. It is another emulator, based on Oracle's VirtualBox. It is much faster than the emulator from the SDK, with a lot of devices being emulated. Plus, it emulates many sensors. But it has a cost that can be seen as prohibitive (>$400 per developer, per year). Hum, I might buy a few licenses over time. But this can be complex if you hire free lancers. Not sure how the licensing model would work. Google should acquire them and get their emulator integrated into the SDK, similarly to what they did with Instanciations' WindowBuilder. That would really help the Android community.

A recent announcement also caught my attention: the port of Android 4.4 to x86 is now officially available. In short, you can run Android as your main desktop PC OS. This is fun, but I don't see why I would do that on my machines. Except if it can run on a PC, then it can be also installed in a virtual environment Couldn't wait to try it on VMWare. I found many blog posts or videos telling the steps. It took me less than 30 mins to get it downloaded, installed, configured and running. It can be even faster if you run VirtualBox and download the preconfigured image (eeepc). And it is blazing fast. It feels faster than any real tablet I tried so far, even the latest 12.2" from Samsung. This is just brillant! There are still missing bits, like the availability of VMWare tools for Android, but this is sugar. Someone will certainly find out how the FreeBSD ones can be installed.

Back to my development use case. Once the VM is running, you can configure the developer options the same way you would do it on a regular device. And the you can remote access it by simply running one adb command. This is well explained here.

It does not fully replace the SDK emulator, or GenyMotion, as it doesn't provide a phone like experience, but it is great for core development and demo.

Let me know if you have the same experience, or have any trick to share. I can start with a few:
- If it goes to sleep, press the 'esc' key for more than a second to awake it (see: wake up). But better to configure the display to never go to sleep, in the Android Settings.
- The 'Power Off' button can be displayed by dragging the top right bar down (where the time is).
- Changing permanently the default resolution is done with a few edits, detailed here (easy!)
- Configure a fixed ip for you device, that makes adb easier to use

Enjoy Android development!


  1. Hi friends, This is Murali from Chennai. I am a technology freak. Your technical information is really useful for me. Keep update your blog.
    Oracle Training Institutes in Chennai

  2. I went through article. , it provides clear insights about the android technology. Android is most trusted platform for developing stunning mobile application and it loaded with lot of resources to use from. android training in Chennai

  3. Thanks for your informative post on Java application development. This open source platform assists software developers to create stunning mobile application with ease. Further, they can make use of this platform at free of cost. J2EE Training in Chennai | JAVA Training in Chennai

  4. Great information. Thanks for providing us such a useful information. Keep up the good work and continue providing us more quality information from time to time. Android Development

  5. WP WOO SMS Plugin is a multi supportive completely arranged word-press module particularly proposed for request trade clients to upgrade your business and courses of action through publicizing.

    sms plugin

  6. Great blog..You have clearly explained about android application..Step by step explanation is too good to understand..Its very useful for me to understand..Keep on sharing..
    Android training in chennai

  7. It is nice to hear this information which is new and innovative, it is also useful for those who working as programmers.

    CCNA Training in Chennai | CCNA Training Institute in Chennai | Best CCNA Training in Chennai

  8. A phone call is a phone bring in which somebody converses with a few individuals in the meantime. The phone calls might be intended to permit the called gathering to take part amid the call, or the ring might be set so that the called party simply listens into the call and can't talk. It is now and again called ATC (sound video chat).
    Conference Call

  9. Outstanding post along with great blog thanks for sharing this useful sharing Video Calling App

  10. Thanku For sharing about android apps..
    Best SEO training in hyderabad all modules are clearly solved and practice with guide.seo training in hyderabadAnd clearly getting knowledge of seo.

  11. The game controls are shown just under gold miner. Movement mechanisms primarily include acceleration and tilting controls. cubefield
    It consists of a total of 17 levels and the challenge you face in each level increases as you go up. unfair mario The game basically has a red ball that has to be moved across the various obstacles in its path to the goal. slitherio
    In order to gain the highest tanh trouble | tank trouble 2 scores you should try to avoid the difficulties, be smart and quick. The game offers you tank death matches where you should show off your concentration and accurate shots the only way towards success tank trouble 3 . If your performance will be good, the game will reward you. Some bonuses will appear during the game play of tank trouble
    unfair mario

  12. I feel thanks to you for posting such a good blog, keep updates regularly
    sharing with us that awesome article you have amazing blog.....salesforce training in hyderabad

  13. Helpful Information
    Freshers jobs way provide freshers jobs ,walkins,direct recruitment,openings for freshers and experienced and recruiting experienced and freshers Walkins

  14. useful information

    Online recruitment for bank jobs and government jobs and you can get Notification and application to apply online for bank jobs and govt jobs

  15. Useful information:
    General Awareness and Current Affairs with Latest Current Affairs Quiz, GK Updates, General Knowledge Last 6 Months Current Affairs, Placement Papers, Model Papers, Interview Questions @

  16. Pretty article! I found some useful information in your blog, it was awesome to read, thanks for sharing this great content to my vision, keep sharing.

    Best Android Training in Chennai | Best iOS Training in Chennai

  17. This is excellent information. It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful to me...
    Android Training in Chennai
    Ios Training in Chennai

  18. It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful to me...
    Android Training in Chennai
    Ios Training in Chennai

  19. Best jobs information providing web site latest updates
    CAG Recruitment 2017
    Recent jobs update for more details follow our site
    Forest Beat Officer Recruitment 2017

  20. Interesting and informative article.. very useful to me.. thanks for sharing your wonderful ideas.. please keep on updating..

    Android Training in chennai | Android course in chennai

  21. Hi, i really enjoyed to read your article.. i got clear idea through your views and ideas.. thanks for sharing your post..

    Java Training in chennai | Software Testing Training in chennai

  22. Good information provided ypur website. Thanks for sharing the awesome information
    keep posting intersting topics on your website.
    UPPSC notification 2017
    Outstanding post along with great blog thanks for sharing this is very useful
    UPPSC recruitment 2017

  23. Thank you for sharing this information and I really appreciate this effort of yours next I will be waiting for your great future update post thank you very much.
    eCommerce Support Services In India

  24. Welcome to Kerala Public Service Commission(KPSC) Board KPSC thulasi Login kpsc thulasi The KPSC thulasi Official Site Containing Lot of information provided PSC login Here we can provide the contact details and address of kpsc thulasi kpsc login more latest govt jobs notification follow our site we inform and update everything about jobs information Kerala psc

  25. Thanks to shared this informative details with us. Keep updating.
    DBA course syllabus | DBA training courses