2010-09-21

Install the latest and greatest on your HTC Dream / T-Mobile G1

Before we start create a backup of your data! Better be save than sorry! :)

In the first step we have to install an older version of Android on the phone. For the european G1 an RC7 (US: RC29) version of DREAIMG.nbh will do it. This version has a bug we need, to get root access on the phone, so that we can flash a new radio-firmware, the DangerSPL (new partition size for the system from 64MB to 96MB), a recovery image (for example from Amon_Ra) and new Android-Versions like Android 2.2 (CyanogenMod).

So we need the following software on the SD-Card:
a) DREAIMG.nbh RC7 (US: RC29)
b) Amon_Ra 1.7.0 Dream
c) Newest Radio-Firmware - 2.22.19.26i for Non US (US TMobile: 2.22.23.02)
d) DangerSPL
e) CyanogenMod

You can find a very good guide, with the necessary links for the software listed above, for the hole process on the CyanogenMod-Wiki.

1) To install the DREAIMG.nbh RC7, which is an image of Android 1.0, you need to reformat the SD-Card to a fat32 partition. Copy the DREAIMG.nbh to the root of the SD-Card. Turn off the phone. Hold the camera button pressed and press the power button. When the phone is in the bootloader mode it should start checking the DREAIMG.nbh and then start the flash-process.

1 a) With T-Mobile G1 from Austria I got the following error from the bootloader:
Not Allow
00028002


If you encounter also this error than you have to generate a goldcard. For that you will find a guide here. You will need the CID of the SD-Card. You can find it with the ASTRO File Manager. Open the App and go to /sys/class/mmc_host/mmc1/mmc1:aaaa (aaaa could be a different string aswell). Long press on the cid file and choose 'open as text'. Write down this number somewhere and then revert it pairwise (for example 125a00 -> 005a12).

1 b) You have to enter the reverted number on this homepage. Now you will receive a goldcard.img via email, save it on your computer. Now you have to apply this goldcard.img to the MBR of the SD-Card with:
dd bs=512 if=/path/to/goldcard.img of=/dev/sd[x]
... where /dev/sd[x] stands for the SD-Card.

Now you are able to flash the old Andoid 1.0 DREAIMG.nbh.

2) Now we want root access. To get it we have to open the keyboard and press Enter twice. Now type 'telnetd' and press enter. You will get no response but you now started the telnet deamon. Now go to Market and search for telnet and install Telnet from ClockworkMod. Start it and connect to localhost on port 23.

3) Now it is time to install Amon_Ra's recovery image, For that copy the recovery-RA-dream-1.7.0-cyan.img to the SD-Card and rename it to 'recovery.img' - to install it type the following into the terminal:
flash_image recovery /sdcard/recovery.img

If you get the 'file not found' message reboot the phone without the USB cable connected and then try again.

4) After installing the recovery image you can now boot into recovery mode holding the home button and pressing the power button till the recovery screen appears. Now install the newest radio image (2.22.19.26i) and after a reboot install the DangerSPL. It is important to keep this order, first radio then DangerSPL.

5) After rebooting into the recovery image you can now install the CyanogenMod 6 or the nightly builds. Before you should wipe all data and cache.

2010-08-10

Problems after Proxmox update to v1.5

After the update of Proxmox to version 1.5 and a reboot of the host all virtual qemu server (using KVM) where not booting up. It does not matter if it is a Windows XP or Windows 7, they stop there:

Starting SeaBIOS ( Version ......)

gPXE (htt://....) - 00:03.0 C900 PCI2.10 Pnp BBS PMM7FE0@10 C900

Press F12 for boot menu


So also trying to boot from CD-ROM will not help in that case. After some search on the web i found the solution in the Proxmox forum.

So the System was missing some packages, you can easily solve this with:

aptitude update && aptitude upgrade && aptitude install proxmox-ve-2.6.24

After reboot if you enter

# pveversion -v

you should find there the actual packages which correspond together. At the time of writing:
# pveversion -v
pve-manager: 1.5-10 (pve-manager/1.5/4822)
running kernel: 2.6.24-11-pve
proxmox-ve-2.6.24: 1.5-23
pve-kernel-2.6.24-11-pve: 2.6.24-23
pve-kernel-2.6.24-8-pve: 2.6.24-16
qemu-server: 1.1-16
pve-firmware: 1.0-5
libpve-storage-perl: 1.0-13
vncterm: 0.9-2
vzctl: 3.0.23-1pve11
vzdump: 1.2-5
vzprocps: 2.0.11-1dso2
vzquota: 3.0.11-1
pve-qemu-kvm: 0.12.4-1

2010-07-30

Install the latest and greatest on your Motorola Milestone

Before we start do a backup of your data! Better be save than sorry! :)

1) To backup the data on a Motorola Milestone you need to have a recovery version which is vulnerable. If your phone still has Android 2.0 or 2.0.1 you are on the right side.

If you already have Android 2.1 you need to downgrade just the vulnerable recovery partition of the 2.0.1 version (from SHOLS_U2_01.14.0). Therefore you normally needed access to a (virtualized) Windows-PC, install there RSD Lite (4.6.0) and the Motorola USB Drivers (4.6.5) or use a software for flashing sbf on Linux, sbf_flash, here.

The recovery image is in the SBF format, normally RSD Lite only was able to flash it. Shut down the Milestone, hold the up-button on the keyboard and turn it on again. Now connect the USB-cable, start RSD Lite and select the vulnerable recovery SBF file or under Linux type as root ./sbf_flash [sbf-file].sbf - Now flash it. :)

2) We are now able to start a update.zip with no signature. You just have to place the Open Recovery (1.46) (or Androidiani OpenRecovery for Milestone 3.3) on the SD-Card. Now turn of the Milestone, hold the Camera button pressed and turn it on again. When the warning symbol appears, you have to hold the volume up key also, then release the camera button and shortly afterwards the volume up. Maybe you need to repeat the key pressing till it works. When the recovery menu appears select update.zip - finally you can do a nandroid backup!

3) Alternatively you can flash now a fully prepared SBF f.e. from G.O.T. and flash it.

4) If you want with Open Recovery you can also root the device, overclock it and so on...

5) And if you want to run Android 2.2 or 2.3 on your Motorola Milestone you can download CyanogenMod 6.1.2/7 for Milestone from here. :)

2010-06-19

Install the latest and greatest on your HTC Hero

Before we start do a backup of your data! Better be save than sorry!

To update the GSM version of the HTC Hero (also known as T-Mobile G2) you first have to get the following:

1) flashrec - flashes the recovery partition to Android devices (works with Android 1.5, sources and development here), newest version by the time of writing: flashrec-1.1.3-20091107-2.apk
2) RA-hero Recovery ROM - important for nandroid backup, wipe and flash, actual version: RA-Hero-v1.6.2
3) New Radio-Firmware - for a better connection - newest version: 63.18.55.06OU_6.35.15.01
4) A custom ROM - like VillainROM, SenseHero (development here) or MoDaCoROM - there are more out there! ;)

Now we are copying this files to the root of the SD-Card on your HTC Hero. With a Filemanager capable of running .apk's (for example Linda File Manager) we install flashrec from our SD-Card. After that we run flashrec, make the recovery and then insert /sd-card/recovery-RA-hero-v1.6.2.img - now press the button below.

Turn of the mobile. When you restart the mobile first hold the Home-Button (and turn on the phone) and keep Home pressed until you are on the Recovery Screen. Here you should first make a nandroid backup, then flash the Radio. After that reboot it and start Android - see, if everything is still working ;)

When you restart into the recovery mode you should now make a wipe (also from dalvik cache) - this will delete all your personal data (except from SD-Card). Now flash the Custom ROM of your choice and reboot. This may take a while, so be patient! Now enjoy your new firmware! :)

2010-06-11

Efika SmartFirmware 1.3 20070122 Update

Just found a OpenFirmware update for the Efika5k2 board with version number 1.3 and build on 2007-01-22 here. Normaly your board should have this build date (20070122), but there is also a 1.3 version with this build date: 20061107.

To check which version you have you have to enter the following on the openfirmware:

1) cd /
2) cd /openprom
3) .properties
4) look at the build-on value

To install the new version you have to get the file and enter the following like described on the site:

1) Put the extracted file onto a USB-Stick and insert it into the Efika PPC
2) Type on the openfirmware promt "boot scsi:0 update_e_20070122"

Efika PPC board battery problems

My Efika board had a quite long time no power supply, so the onboard battery (CR2032, 3V) was empty when i tried to install the brand new MorphOS 2.5. So i got a wrong MAC address, the date was in the year 2105, and so on... Also registering MorphOS (application under MorphOS-Partition:Tools) will not work correctly (the personal Key-File is bound to the MAC address).

The solution was simple:
1) Power down the Efika5k2
2) Remove empty Battery and wait for a few seconds
3) Power up Efika and stop on the openfirmware SmartFirmware
4) cd /
5) cd /builtin/ethernet
6) .properties
7) There you see the original MAC address - write it down, just in case
8) boot
9) After MorphOS booted open a new shell and check the MAC with ifconfig
10) If the MAC is ok insert a new CR2032 Battery into the running system, if not, repeat from step 1).

2010-05-28

Installing Zend Server Community Edition on a Debian Lenny 5.0 OpenVZ container

If you want to install the Zend Server Community Edition on an existing Debian server you should do it like described here:
http://files.zend.com/help/Zend-Server-5-Community-Edition/zend-server.htm#deb_installation.htm

1) Add the following to your /etc/apt/sources.list:
deb http://repos.zend.com/zend-server/deb server non-free

2) Add the key: wget http://repos.zend.com/deb/zend.key -O- |apt-key add -

3) # apt-get update

4) # apt-get install zend-server-ce-php-5.2

5) Go to https://[servername]:10082/ZendServer to create an admin account
But here i encountered the first problem:

I just got a 503 - Service Not Available - to fix that you have to restart the Zend Server with:
# /usr/local/zend/bin/zendctl.sh restart

6) Go to https://[servername]:10082/ZendServer and enter the configuration screen
Now i was able to load https://[servername]:10082/ZendServer and create a administration account with a password.

But then, when i want to enter the admin interface i get the following error: Failed to access Web server. Please make sure that the Web server is running and listening to the correct port

So to check the status enter this:
# /usr/local/zend/bin/zendctl.sh status
[28.05.2010 17:05:33 SYSTEM] Apache is not running.
[ 28.05.2010 17:56:33 SYSTEM] watchdog for lighttpd is running.
[ 28.05.2010 17:56:33 SYSTEM] lighttpd is running.
/usr/local/zend/etc/rc.d/apache: line 116: www-browser: command not found

I found out that Zend is using lynx for the status, but it was not installed on my system.
# apt-get install lynx

When i retyped the status-info i got the following:

# /usr/local/zend/bin/zendctl.sh status
[28.05.2010 18:05:04 SYSTEM] Apache is not running.
[ 28.05.2010 18:05:04 SYSTEM] watchdog for lighttpd is running.
[ 28.05.2010 18:05:04 SYSTEM] lighttpd is running.

Looking up localhost
Making HTTP connection to localhost
Alert!: Unable to connect to remote host.

lynx: Can't access startfile http://localhost/server-status

So when i looked into /var/log/apache2/error.log i found the following entry:
Fri May 28 19:04:50 2010: [ Zend Optimizer+ (2002) Fatal Error] Unable to allocate shared memory segment of 67108864 bytes: mmap: No space left on device (28)

After some research on the web i found this post. So it turned out to be a problem on virtual environments like Virtuozzo or OpenVZ. After changing the value on the OpenVZ Host to the following it worked:

# vzctl set [OpenVZ-ID] --shmpages $(( 21504*4 )):$(( 21504*4 )) --save

Now i can configure Zend finally.

2010-05-09

Viking GPS data editor and analyzer

My last post was about open-gpstracker - an useful Android application that is able to export the tracks to the gpx format. Now i want to tell you about an application for Ubuntu Linux to view and edit the gpx files.

We are talking about Viking, a open source project hosted on SourceForge.net - with the possibility to import OpenStreetMap data. At the time of writing the actual version in the Ubuntu 10.04 LTS repository is 0.9.9-3, on the Viking page it is 0.9.93.

open-gpstracker - Free GPS Tracker for Android

If you are searching for an Open Source GPS Tracker for your Android mobile you will find open-gpstracker very useful! It is licensed under GPL v3.

With this Android application you are able to collect the GPS data from your phone and export it to the gpx format - I started using it to track my sport activities.

The homepage is on a google code project page - unfortunately the last version (0.9.13) for Android 1.5 was published 2010-02-21. So it is the last version usable for mobiles like my HTC Hero (if there will be no Android 2.1 release from HTC). Also the application is not available on the google market searching with Android 1.5.

The newest version by the time of writing is 0.9.15. So for integrating twitter into this application the developer Rene de Groot started to twitter.

2010-05-05

Using nmap to scan Ports

If you need to know, which ports are open on a system you can scan it with the open source tool nmap.

A simple
nmap [ip or domain]
will result in a list of open/filtered ports.

nmap -sT [ip or domain]
will scan the TCP-Ports.

nmap -sU [ip or domain]
will scan the UDP-Ports.

nmap -p 20-400 [ip or domain]
will check all ports between 20 and 400.

2010-05-03

Installing sun-java6-doc on Debian Lenny

During installing Sun Java (now from Oracle) on Debian 5.0 the package sun-java6-doc is asking the user for downloading the docs:

This package is an installer package, it does not actually contain the
JDK documentation. You will need to go download one of the
archives:

jdk-6u12-docs.zip jdk-6u12-docs-ja.zip

(choose the non-update version if this is the first installation).
Please visit

http://java.sun.com/javase/downloads/

now and download. The file should be owned by root.root and be copied
to /tmp.

[Press RETURN to try again, 'no' + RETURN to abort]

Searching for it on the Java site results in 0 entries. But there is a way to get it working:

Download the latest jdk-docs (in my case jdk-6u18-docs.zip) to your /tmp directory and rename it to jdk-6u12-docs.zip. Now the sun-java6-doc will be satisfied.

2010-04-13

Upgrade to Ubuntu alpha or beta releases

If you want to upgrade to the newest and fanciest Ubuntu versions the easiest way is to enter this command:

sudo ubuntu-manager -d

In this case you don't have to alter /etc/apt/sources.list to the new version (for example from karmic to lucid) and then do a apt-get update && apt-get dist-upgrade. Also it removes some unused packages too.

Disappearing Gnome panel

If you have problems with disappearing panels after booting up the system, which can be caused by taking too long for restoring the session or because your system is slow anyway, there is a simple method to restore them: simply type

pkill gnome-panel

into the shell. After that the Gnome panel is restarting automatically!

2010-03-28

Ubuntu Distribution Upgrade in a OpenVZ Container

If you use Debain Lenny on your OpenVZ host and your Container is a Ubuntu 9.04 and you want to do a apt-get dist-upgrade to 9.10 you will end on the host with this error:

# vzctl enter 1234
enter into VE 1234 failed
Unable to open pty: No such file or directory

What happend? In Ubuntu upstart is responsible for the initialization process but therefore it needs some kernel specific stuff which is not in the 2.6.26 kernel from Debian Lenny. There is a bug report on Launchpad describing the problem.

So on the blog of bodhizazen, the person who started the bug report, you can find the needed upstart script of Stéphane Graber. Like written in bodhizazen blog entry do the following on the host:

cd /var/lib/vz/private/[VZID]/etc/init/
wget http://bodhizazen.net/openvz.conf

Now you can connect again to your virtual ubuntu machine. But if you upgrade from Ubuntu 9.10 to 10.04 you will receive the error message like above.

The solution was found fast, again from Stéphane Graber.

Simply edit /etc/init/openvz.conf and remove the two mount lines for /proc and /sys.


Now you can enjoy your Ubuntu 10.04 LTS container on a Debian Lenny host.

2010-03-19

HTC Hero adb access under Ubuntu 9.10 amd64

When i connected my HTC Hero (formerly T-Mobile G2) with my Ubuntu 9.10 64bit to get shell access to it i had the following problem:

$ ./adb shell
error: insufficient permissions for device

$ ./adb devices
?????? no permissions

So i found a solution here: http://developer.android.com/guide/developing/device.html
First you should generate a new udev rule:

sudo vim /etc/udev/rules.d/51-android.rules
---
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
---

Now you have to change the rights:

sudo chmod a+r /etc/udev/rules.d/51-android.rules

Also you have to reload the udev rules:

sudo service udev reload

Now if you reconnect your HTC Hero you will have access with adb from the Android SDK Tools!

Installing Andriod SDK under Ubuntu 9.10 amd64

If you want to install the Android SDK under Ubuntu 64 bit you first have to install the 32bit libs:

apt-get install ia32-libs

Also you need the sun-java:

apt-get install sun-java6-bin

Now you can proceed like written on http://developer.android.com/sdk/index.html

1) Download the SDK for Linux from here: http://developer.android.com/sdk/download.html?v=android-sdk_r05-linux_86.tgz and extract it to a place you like.

2) apt-get install eclipse

3) in Eclipse -> Help -> Install new Software add the following location: https://dl-ssl.google.com/android/eclipse/ - most likely if you are using Ubuntu 9.10 and Eclipse from the repository you will suffer from this bug also: https://bugs.launchpad.net/ubuntu/+source/eclipse/+bug/460944?comments=all - a empty plugin list. In this case add
The Eclipse Project Updates - http://download.eclipse.org/eclipse/updates/3.5 and Galileo - http://download.eclipse.org/releases/galileo also.

4) Now install all stuff from the https://dl-ssl.google.com/android/eclipse/ location and restart Eclipse.

5) Now in Eclipse go to -> Window -> Preferences -> Android and Point to your Android SDK root directory.

6) Now it's time to add an SDK for your Android Platform - therefore in Eclipse go to -> Window -> Android SDK and AVD Manager -> Available Packages and choose your Android SDK Version

Voila! :)

2010-03-14

fosvm 0.03a

Working on the shell is not everyone's favorite way to interact with a computer, especially when it comes to the point to enter a long cryptographic command, which you only need once or twice a year, for example changing some parameters on a openvz container.

So I was searching for a free and open source management tool like the nice Proxmox Virtual Environment - but Proxmox VE is just available for 64bit Intel/AMD systems, which support Intel VT or AMD-V capable CPU.

On the OpenVZ homepage I found a page with control panels. I started at the first entry on the page: fosvm - Free Open Source Virtual Machine Manager

It looked like the thing I was searching for - a lightweight monitor. I'm running a fresh installed Debian Lenny, so for the installation I had to add the following packages: apache2, php5, php5-mysql, mysql.

For fosvm 0.03a to work, you need to create a mysql-user with some privileges. In the documentation I couldn't find the privileges which were exactly needed. Before you start the installation of fosvm 0.03a, you should fix the install script, install.sh, by changing the line "crontab -l > cron/tmp.cron" to "crontab cron/tmp.cron", or else you will write the actual crontab into the file, not the other way around. I also created a forum-post about this problem, hoping the maintainer of fosvm will response.

fosvm looks real promising, and like most of open source projects starting with a 0.0x version number and ending with a 'a' for alpha are not yet ready for productive systems - but i will keep an eye on it!

2010-02-10

back to the blog

now that i found my blog again, i will (maybe) start to blog more frequently! :)