Qdroid 2.0 on SmartQ7

If you are one of the owners of the SmartQ7 (not the SmartQ V7 having improved hardware) you might be reading this document with interest. This document explains how to install Qdroid 2.0 Alpha – an Android port – onto the SmartQ7 device.

I bought my SmartQ7 from http://www.allpmp.com end of 2009, being shipped directly from China. In the meanwhile allpmp also ships from UK for European customers.

When I switched on my SmartQ7 the first time I wasn’t really satisfiedwith the Linux system running it. The hardware is nice, but the GUI did not go well with the touch screen the SmartQ7 provides. For example typing text into an text field, the onscreen keyboard popping up did hide the text field underneath, causing blind typing.

So I was keen on testing Android OS on my nice hardware. Whereas Android is focusing the smartphones, its port Qdroid is focusing the SmartQ product family. A google code page is hosting the project, providing a short description how to install the Qdroid-2.0-Alpha version on the SmartQ7.

http://code.google.com/p/qdroid/wiki/QdroidTwoAlphaOneEn

Once installed, it turned out to be best OS I ever run on that device. Although Alpha state, all applications run smooth and I did not have any problems installing other Android applications.

The installation process of Android applications is really simple, either downloading directly via apps-store or just copying the specific APK-file onto the SD card and selecting the file from within Qdroid’s file manager.

Installing Qdroid

As the installation of Qdroid itself is a bit tricky, I poured the given description into a script installing Qdroid 2.0 from firmware package onto SD card step by step.  In addition the script is activating English as the default language on first boot, instead of Chinese.

Before invoking the script one has got to download the desired firmware of the Qdroid system. The latest firmware can be downloaded from http://code.google.com/p/qdroid/downloads/list. The time writing this is the package Qdroid_2.0_Alpha2_2010.01.09.tar.bz2.

The package contains the firmware supporting SmartQ5 and Q7. With Android-2.0 the firmware has grown and does fit anymore into the internal flash of the SmartQ7 device. Now the firmware can only boot from SD Card.

Once you have got the firmware the script is performing the following magic steps to install the Qdroid system on the SD card.

First the SD card must is partitioned into two partitions, first partition is FAT32 format, which will hold the media files later, so the size should be enough to hold movies or MP3 files later, the second partition is EXT3 format (the recommended size should be larger than 150MB), then the following steps are performed:

  1. Extract the files from firmeware package into temporary directory.
  2. Copy “boot” directory to the FAT32 partition.
  3. Copy the “files and folders” under the Qdroid_rootfs directory to the EXT3 partition.
  4. Copy the kernel kernel/Q7/qdroid_kernel into the boot directory on the FAT32 partition.
  5. Configure properties country=US, and language=en, so you dont have to bother the Chinese symbols on first boot.
  6. Finally the script ensures  make sure that all files on EXT3 partition are executable and readable

To create the boot disk you require admin/root privileges, being able to invoke sudo command. The script is invoked with the device id as second argument.  The command dmesg will tell you the device id associated with the SD cards.

The following command line demonstrates the invocation, whereas /dev/sdb must be replaced by the device id your SD card is associated with on your system, it might be /dev/sdb or /dev/sbc, or other.

sudo ./qdroid-inst.sh Qdroid_2.0_Alpha2_2010.01.09.tar.bz2 /dev/sdb

The  script is hosted at https://sourceforge.net/projects/qdroid-inst/

#!/bin/sh -e
## File: qdroid-inst.sh
## Installing the Qdroid 2.0 firmware for SmartQ7 and SmartQ5 on SD card
##
## Author: Frank Rehberger
## Copyright: 2010 Sked.net
## License: GPLv3
## Version: 1.0
## Last Edited: 2010-04-09echo “args $#”
if [ “$#” != “2” ]; then
echo “Error, usage: $0 <firmeware-package> <device>”
exit 1
fi

## read arguments from command line
PKG=$1
DEV=$2

## may be one of Q7 or Q5
SMARTQ_DEV=Q7

## Size of Ext partition in percentage of total capacity. Size must be
## 150MB at least, arround 200MB is a good value. Choose the right
## value depending on capacity:
##
## 1GB choose PERCENTAGE=25
## 4GB choose PERCENTAGE=5
PERCENTAGE=5

## unmount the devices if mounted
mount | grep “$DEV” &&  umount “${DEV}1” “${DEV}2”

## read size of device and calculate the number of cyls for the FAT32 partition
NOF_CYLINDERS=`sfdisk -g ${DEV} | (read t0 cyl t1; echo $cyl)`
EXT_CYLINDERS=`expr \( “$NOF_CYLINDERS” \* “$PERCENTAGE” \) / 100`
FAT_CYLINDERS=`expr “$NOF_CYLINDERS” – “$EXT_CYLINDERS”`

## partition the SD card, first is FAT32 partition using most of the
## space, second one is Linux partition using the remaining space on
## that device
echo “Creating two partitions on device”
sfdisk “$DEV” <<EOF
,${FAT_CYLINDERS},c
,,L
EOF

## format the newly created partitions, label them MEDIA and SYS
mkfs.vfat  “${DEV}1”
mkfs.ext3  -j “${DEV}2”
## disable periodic partition checks
#tune2fs -c 0 “${DEV}2”

## mount the partitions beneath the /tmp directory
echo “Mounting partitions”
mkdir -p /tmp/MEDIA; mount “${DEV}1” /tmp/MEDIA
mkdir -p /tmp/SYS;   mount “${DEV}2” /tmp/SYS

## creating a tmp-subdir makes the following commands independed of
## the release name
echo “Copying firmware to SD card”
rm -rf /tmp/qdroid-inst
mkdir -p /tmp/qdroid-inst
if tar -C /tmp/qdroid-inst/ -xjf “$PKG”; then
cp -r /tmp/qdroid-inst/*/boot  /tmp/MEDIA/
cp -a /tmp/qdroid-inst/*/Qdroid_rootfs/* /tmp/SYS/
cp    /tmp/qdroid-inst/*/kernel/$SMARTQ_DEV/qdroid_kernel /tmp/MEDIA/boot/
## settings for english usage on first bootup
mkdir -p   /tmp/SYS/data/property/
echo “US” > /tmp/SYS/data/property/persist.sys.country
echo “en” > /tmp/SYS/data/property/persist.sys.language
touch      /tmp/SYS/data/property/persist.sys.localevar
## ensure all files are readable, writable and executable on ext3 partition
chmod -R 777 /tmp/SYS/
else
echo “Error reading firmware”
exit 1
fi

echo “Syncing SD card”
sync

echo “Cleaning up”
umount /tmp/MEDIA /tmp/SYS

rm -rf /tmp/qdroid-inst/
rmdir  /tmp/MEDIA /tmp/SYS

echo “Done, now you can safely remove the SD card”

The script will create the intermediate directory /tmp/qdroid-inst/ and will unmount and mount the partitions as required. You must not access the SD card with any other application at this time, otherwise the unmount would fail.

After the script has terminated you can safely remove the SD card from reader and you can insert the SD-Card into the SmartQ7 device and switch on power, or just plugin the power supply which will cause the device to boot.  For few seconds the dual-boot manager will offer the choice for the native system or Android from SD card. Use the two up/down buttons left of screen to choose the Android systems and press the menu button left of screen to start the boot process. You can not use the touch screen to choose one of the options with finger tip, which irritated me on first trial.

I can confirm that the Wifi is working fine now. Also does the calibration programe, allthough the release notes mentioned it might not work for Q7. Otherwise you may use the workarround copying the calibration file from native Ubuntu Linux system onto the SD card, using a terminal window, from Ubuntu system’s “/etc/pointercal” to Qdroid’s “/data/etc/pointercal”.

The sound is still a problem, it may happen that after boot the volume is very low. The solution is to modify the sound volume in Settings menu once after startup, which seems to write the correct volume setting to sound driver.

The buttons  of the SmartQ7 have the following meaning:

  • Power button:
    Short Press: Sleep;
    Long Press: Shutdown dialog;
    Continuous press twice: Wake up.
  • Home button:
    Short Press: Goto home(desktop);
    Long Press: task switch.
  • Menu button:
    Short Press: App menu;
    Long Press: Soft keyboard.
  • Back button:
    Short Press: Go back;
    Long Press: None

Sadly the  Qdroid 2.0 Alpha can’t play video out of the box, but this more due to the lack of a video player. The solution is to install the free mVideoPlayer http://www.androlib.com/android.application.afzkl-development-mvideoplayer-pzDw.aspx from Qdroid-AppsStore, which is playing 3gp videos fine. In case of AVI videos they must be converted to 3GP format.

Links:

http://www.jiongtang.com/fourm/viewtopic.php?f=28&t=1218

http://code.google.com/p/qdroid/wiki/QdroidTwoAlphaOneEn

http://code.google.com/p/qdroid/

http://www.androlib.com/android.application.afzkl-development-mvideoplayer-pzDw.aspx

One Response to “Qdroid 2.0 on SmartQ7”

  1. Hide Http Referrer Says:

    Keep on the good job! Hide Http Referrer

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s


%d bloggers like this: