Hardware to run Android Emulator

I thought it would be a good idea to use the touch/netbooks I bought the other day to do development on the go. Running Eclipse is certainly not a problem, but the emulator becomes a nightmare to use.

  • On the Asus EEE T101MT (Atom N450, 2GB) it takes 3 minutes to start the emulator, it will continuously response with some core android processes not responding. Any click or drag takes a few seconds before something happens.
    Verdict: Not usable.
  • The Acer Aspire 1825 PTZ (Intel SU4100, 2GB) is a bit faster with 2 minutes to start. Using the emulator is possible, but not very fluent though.
  • Compare with my regular notebook  (Dell Vostro Core 2 Duo T8300, 4GB). A minute to start and smooth to navigate. Not quite fair to compare with an Atom CPU.

The minimum hardware requirements to run decent speed emulation and debugging becomes quite clear.

The Palroid Experience: The Final Verdict

After a few days of using the device, my conclusions:

It works fine to read documents (pdf books) and watch movies (even on a screen connected via HDMI, which is a plus). You can play simlpe games. You can surf the web (minus Flash).
If you do not want to buy an Android phone (or get locked into a telco contract), you want a bigger screen but dont want to spend a bomb then this device is for you.

I do not recommend the Palroid because of these major flaws (based on the experience with the specific device I bought)

  • Dropping wireless connection.
  • Stdby mode drains the battery in few hours. My Nexus One can stand 2 days stdby (with regular but not extensive use).
  • The g-sensor does not work properly for games.
  • You can charge only with the power adapter.
  • Anrdoid 2.1 (From other feedback I could read there will BE NO UPGRADE to 2.2!)

I will wait until early next year when the dust around Android 2.3 settled, 3.0 is getting clearer and after finding out which device is future-proof (can be updated),  before getting another Android device.

Touchscreen Notebooks using Ubuntu

I purchased 2 notebooks with swivel-touch screens last weekend. Both coming with Windows 7 which I clonezilla’d, wiped out and installed Ubuntu immediately. Both are not an iPad killer whatsoever, but it suits my requirements: you can touch it, you can turn it (read books), it comes with a keyboard and I can load almost any application, even do some development work.

  • Asus EEE T101MT
    1.66 GHz Atom N450 CPU with hyperthreading
    10.1 inch screen, multi-touch resistive display with 1024 x 600 pixels resolution
    2 GB RAM and 320 GB HDD at 5400 RPM
    WiFi 802.11n
    4 cell 2400 mAh and 35 Wh battery pack, removable
    0.3 megapixel webcam
    3 USB ports,  VGA output, Ethernet, Kensington Lock, Mic and Headphones jack and SD Card reader 

    Installing Ubuntu: A breeze with 10.10 (Maverick). All info here.

  • Acer Aspire 1825PTZ
    Intel Pentium processor SU4100 (1.3 GHz, 800 MHz FSB)
    2GB Memory
    Graphics Controller: Intel GMA 4500MHD
    11.6″ Acer CineCrystal LED LCD With (capacitive) Multi Touch(1366×768)
    320GB HD
    0.3 megapixel webcam
    3 USB ports,  VGA output, HDMI Port,Ethernet, Kensington Lock, Mic and Headphones jack and SD/XD/MS Card reader 

    Installing Ubuntu: Basic Installation straight forward, but requires some hacking to get the touchscreen properly running and the auto-rotate screen. But you find all answers in this thread. And some more tricks here.

The Palroid Experience

The Palladine Palroid

More feedback after a few hours Palroid (Please stay reasonable, it is a cheap device, I just summarize my experience to keep your expectations right):

  • The wireless connection keeps on dropping (less than 5m to the wireless router). Also after each stdby need to disconnect (or rather switch off wireless) and switch on / connect again.
  • Running Android 2.1. What I heard it is unlikely they will release an upgrade to 2.2 (rumor?). Android 3.0 is targeting Tablets (rumor?), means early next year with have an outdated device. But this faith is shared by other actual Android devices as well.
  • Adobe Flash: Because Flash was introduced for Android 2.2 only, you dont have it on the Palroid. There are some websites that describe a way to load it onto 2.1 devices (eg. link here). I tried, it does NOT work.
  • System Performance: It is a simple CPU, Telechips 8902 Processor (800mhz). OK while doing one thing, but certain cpu intensive actions, like installing apps, slows down the whole device dramatically.
  • Battery: I cant judge battery runtime yet, but the battery level is updated in steps of 10%. After fully charged, it jumped straight down to 80% and 50% within 45min of use.
  • Development: No problem, I connected via USB and I could load and debug applications with Eclipse (also ddms, adb,..)

    DDMS Screenshot

  • Charging: It cant charge via USB. You need to use power adapter.
  • External drives: You cant connect external harddisk. It wont recognize it, it tries to mount as sd card. This is not a Paldroid issue, but an Android OS thing ! Not impossible though, check this link.

Android Tablet: Palladine Palroid

Getting more into Android development made me look out for tablet style Android. The Android tablet boom is just starting and every other week you find a new device. I went to Sitex 2010 in Singapore and bought a Palladine Palroid for 339.- SGD.  Palladine is a Singapore based company producing screens, now venturing into the tablet business. I assume the Palroid’s are (partly) manufactured in China and final assembled and quality checked in Singapore. Right now there is not much info about the device in the web yet. Here a few first impressions out of the box:

 

Palroid Box

 

Palroid Box

Palroid Box

Whats in the box ?

Palroid Keyboard

In the box you find the device, a pouch, a stylus pen, a earphone, a mini HDMI wire, charger and 2 USB wires.

We need to be reasonable while judging the device and its quality. It comes at the entry level price and dont compare it straightforward with a Android device 3 times more expensive like the DELL.

Some quick facts upon first glance:

  • Despite its price the device and the body looks OK. Nicely build casing.
  • Memory 256 MB
  • Build-in 8GB for your files, plus SD card slot.
  • No camera or GPS.
  • No phone function or SIM card slot.
  • Battery is build-in.
  • You van use it out-of-the box, it comes with some selected pre-installed applications. I could watch movies on the spot, open Excel sheets and read PDF’s.
  • It comes with Android 2.1 (means there is NO flash in your browser).
  • It comes with Android Market and you can download lots and lots of applications that work with 2.1
  • Use the HDMI wire to connect it to your Full HD TV.
  • The touchscreen is a bit sluggish, but you get used to it or use the stylus (strangely the device has no “hole” to put the stylus in, so loosing the stylus is one of the first things that happen to you)

My recommendation:  If you want an Android on a shoestring and just do simple things like reading, watch movies, simple games,.. Go for it. If you expect a lot with the style factor of an iPad and smooth touchscreen, you need to pay more !

I am charging the device and will update you with more results and facts soon. Stay tuned !

Backup of domains in Glassfish V3

This CLI asadmin function is not available for 3.0.1. All you get is

glassfish@ubuntu:/opt/app-server/bin$ ./asadmin backup-domain
CLI194 Previously supported command: backup-domain is not supported for this release.

It is planned to come back in the upcoming version 3.1. (link)

I tried to migrate a domain from server A to server B (same glassfish release) by copying the complete domain folder (10.000 plus files!). It did not work either.

ERROR: Error creating archive. (java.io.FileNotFoundException: /var/xyz/xyzdomain/osgi-cache/felix/bundle1/version0.-1/revision.location (No such file or directory))

Error starting domain

Right now no choice other than creating the domain again and redo the manual settings before deploying the application.

Hudson Plugin’s of the day

I really enjoy using Hudson as CI platform every day. It is open, it is vastly extensible, has a great community support and not to forget the outstanding job by Kohsuke to create Hudson and lay out the foundation of this ecosystem. There is always more to learn, find new ways to do jobs with Hudson, maybe that is the reason why there is no book yet about Hudson. I just want to highlight 3 very simple plugins that make life easer:

  • Build Timeout (link)
    I have some jobs that take a long time, mainly because they transfer artifacts to S3 and deploy applications to test and demo servers. Once in a while I run into timeouts or hanging batch scripts which will make the complete job haning. If you dont notice you start creating a build queue. This plugin terminates a job if it extends the configurable time limit.

    Build Timeout

  • Time Stamper (link)
    With lon running jobs if would be helpful when which task started and how long it took to finish. The plugin does nothing but putting a timestamp in front of each line of the console output.

    Time Stamper

  • FTP Publisher (link)
    For simple file transfers you might want to try this plugin instead of batch script coding the transfer.

How to run a ftp server on an Amazon Micro Instance

A micro instance which runs for your with Linux at 0.025 U$ per hour (around 18 U$ a month) is just right to operate a FTP server. Plus the data transfer which costs you 0.1U$ IN and around 0.15U$ OUT.
There is only a minor challenge to get started, the elastic IP assignment which makes it impossible to connect to the ftp server in passive mode out of-the-box.
This short tutorial describes how to get started and covers also the use of virtual users (we skip the basic art assuming you are familar with creating instances and the handling of key-files etc.).

I advise to create a separate volume in EC2 if you plan to ftp large amount of files or eventually opt for a bigger instance.

How to add a volume:

  • Create a new volume specifying a suitable size (you pay for the size you allocate not for the size you use inside the volume!)
  • Attach it to the instance (define a device, eg. /dev/sdf)
  • Login to you instance format the volume (mkfs -t ext2 /dev/sdf)
  • Create a mountpoint (mkdir  /mnt/ftpvolume)
  • Mount the volume (mount /dev/sdf /mn/ftpvolume)
    Be aware: you need to mount every time you restart the instance ! There are scripts to do it automatically, but this is not straight forward in EC2)

How to install and configure the ftp service:

  • Look for an Ubuntu i386 server AMI in your preferred region and create a new instance.
  • Use a security group with an open port 21 and the passive ports (eg.62222 to 63333 as configured below).
  • Create an elastic IP and attach it to the new instance.
  • Login the instance (using ssh and your private key).
  • Add the ftp server vsftpd package (sudo apt-get install vsftpd.conf)
  • Add the libpam package which we need to maintain the virtual users (sudo apt-get install libpam-pwdfile)
  • Add the mini-httpd package which contains the hptasswd command we need to enter the passwords (apt-get install mini-httpd)
  • Configure PAM (vi /etc/pam.d/vsftpd)
    Remove other content in this file.

    auth required pam_pwdfile.so pwdfile /etc/ftpd.passwd
    account required pam_permit.so
    
  • Configure vsftpd (vi /etc/vsftpd.conf)
    This shows only the important changes and new entries

    ...
    local_enable=YES
    ...
    write_enable=YES
    ...
    local_umask=022
    ...
    chroot_local_user=YES
    ...
    virtual_use_local_privs=YES
    guest_enable=YES
    user_sub_token=$USER
    local_root=/mnt/ftpvolume/ftphome/$USER {or whatever your ftp root folder is going to be}
    hide_ids=YES
    pasv_min_port=62222
    pasv_max_port=63333
    pasv_address={your Elastic IP}
    
  • Restart vsftpd (service vsftpd restart)
  • Create the root directory for the ftp service as defined in the config file
  • Create user and user directory
    For the first user you add
    htpasswd -c /etc/ftpd.passwd Username
    subsequent users
    htpasswd /etc/ftpd.passwd Username
    mkdir /mnt/ftpvolume/ftphome/username
    chmod 777 /mnt/ftpvolume/ftphome/username
  • Create a superuser ftpadmin with access to all user directories
    Instead of creating own folder, create a link
    ln -s /mnt/ftpvolume/ftphome ftpadmin

Remarks: This might not be best practice, but
a) for the EC2 instance you open only port 32
b) vsftpd is the best choice for secure ftp
c) each virtual user is locked into his home-folder.

Feel free to add comments in regards of security.

Android Market Spam

I totally DO NOT favor Apple’s strategy with their censorship style 110% control of application and content that runs on their proprietary devices like iPad and iPhone ! But it seems with the Android market we are approaching the other end, total freedom and no control which opens eventually the floodgates for spam, trash applications or trojan horses. Here one sample, I observe some trashy girls pics applications showing up regularly in the Software Library section, obviously the guy keep on re-submitting into application areas with little traffic. Its not one but dozens of them, soon there will be so much of this stuff. And can you explain to me why an application that does nothing but showing pictures need to have access to your location, phone calls and Internet connection ?

Android Market Trash

PIcture Display with lots of access rights

My Review of Java Message Service

Originally submitted at O’Reilly

 

 

Java Message Service, Second Edition, is a thorough introduction to the standard API that supports “messaging” — the software-to-software exchange of crucial data among network computers. With this practical guide, you’ll learn how JMS can help you solve many architectura…

Old Topic, but a good starting point.

By AnotherJavaDude from Singapore on 10/29/2010
4out of 5

Pros: Well-written, Helpful examples, Accurate

Best Uses: Intermediate

Describe Yourself: Maker, Developer

Despite JMS being an “old” (in IT terms) piece of technology (API), you still find requirements for it in lots of projects and the basic needs of a messaging API are fully satisfied, even not updated since 2002.
This book is one of the few books covering the topic at all, and coming with code samples is the best you can get to get started with JMS. With a fair background of your application/messaging server and your favourite IDE you should be able to get the samples running.

(legalese)