- 1 Linux & Android on Kaiser
- 2 Current state
- 3 Useful links
- 4 Research
- 5 Progress
- 6 Build a Kernel
- 7 How to build the Kaiser/Nike/Polaris/Vogue kernel
- 8 Compile the kernel
- 9 Get su & busybox Working
- 10 Android data.gz image Customization
- 11 Android system.img Customization
- 12 Restoring Bookmarks and Email settings on a new data.img
- 13 Bookmarks
- 14 Email accounts
- 15 Porting linux command line apps to Android
- 16 Android Keyboard Customization
- 17 Android Kaiser wifi
- 18 Android on the Kaiser (And Variants)
- 18.1 Please edit me to keep everyone up to date!
- 18.2 How to get Android up and running on the Kaiser's SD card (doesn't flash phone).
- 18.3 Here is an example directory structure of a working storage card.
- 18.4 How do I install an .APK file that I've downloaded?
- 18.5 Will Android reflash my phone?
- 18.6 Can I Make calls?
- 18.7 Can I send or receive texts or picture messages?
- 18.8 Does GPS Work?
- 18.9 Will Android ever turn on me?
- 18.10 Sites of interest.
Linux & Android on Kaiser
This page is meant for people who want to know the progress on getting Linux (and Android) to work on the HTC Kaiser device.
A lot of work has already been done by the following contributors (in alphabetical order):
- baz/ginge (Barry Carter)
- dzo (Dr. Martin J. Johnson)
- marbalon (Marcin)
- martin_(Martin Ling)
- premy (Patrick Remy)
PLEASE NOTE: The above named persons do not take responsibility for anything you do with your phones.
In case you feel you can help out, you can find us using IRC on #htc-linux on Freenode.
You can also email:
firstname.lastname@example.org email@example.com (author of this document)
Here are some tips on customization. When you make changes in a way that would be useful to other Android users, create a patch and attach it to a forum post so that it can be incorporated into future images.
Please note that Android on the Kaiser is partially working, there is a lot of development still to be done. You can run Android, but device drivers are not working properly or even not at all. Below you'll see what works and what doesn't.
|Boot||Yes||Android is booting.|
|Graphical interface||Yes||Graphical interface working fine. Some applications have resolution issues|
|R/W Access to /dev/smd0 (Control Channel)||Yes||.|
|R/W Access to /dev/smd1 (For PPP)||Yes||.|
|SD Storage Access||Yes||.|
|Hardware keyboard||Yes||Very functional keypad including LEDs.|
|Hardware button mapping||Yes||.|
|Hardware buttons: On/Off||No||.|
|Stylus detection||Yes||A functional touch screen.|
|WLAN||yes||Data works, incomplete DMA support.|
|Audio Routing (Phone)||Yes||Calls and pcm audio works.|
- Android on HTC Wiki
- Kaiser FAQ
- Google Android and Linux for KAISER!!
- Customizing initrd.gz
- Kaiser Memory Map
- Kaiser IRQ
- Kaiser GPIO
- Kaiser CPLD
- Kaiser MDP
- Kaiser MDDI
- Kaiser CAM1
- Kaiser CAM2
- Kaiser Bluetooth
- Kaiser WIFI
- Kaiser Touchscreen
- Kaiser Battery
|Is under heavy development latest build:||http://www.androidonhtc.com/kaiser:latest_builds|
Build a Kernel
How to build the Kaiser/Nike/Polaris/Vogue kernel
This mini HOWTO is taken from dwaradzyn's post and slightly changed/updated
- Assuming you have all essential software installed
- Ubuntu: sudo apt-get install git-core git jfsutils xfsprogs quota isdnutils-base nfs-common oprofile
- Let's start with creating a directory for the kernel
- mkdir android-kernel
- cd android-kernel
- Fists let's take care of arm toolchain. Download the toolchain (74MB) into the android-kernel dir
- wget http://www.codesourcery.com/downloads/public/gnu_toolchain/arm-none-linux-gnueabi/arm-2008q3-72-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2-O arm-2008q3-72-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
- Unpack it
- tar xjf arm-2008q3-72-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
- that creates a folder "arm-2008q3"
- Next thing is to get the sources from repository. To make it happen (this could take a while, it downloads ~280MB)
- git clone git://git.linuxtogo.org/home/groups/mobile-linux/kernel.git
- there's now a folder "kernel" besides "arm-2008q3"
- sample output:
Initialized empty Git repository in /home/user/android-kernel/kernel/.git/
remote: Counting objects: 908251, done.
remote: Compressing objects: 100% (153970/153970), done.
remote: Total 908251 (delta 755115), reused 906063 (delta 753016)
Receiving objects: 100% (908251/908251), 281.86 MiB || 292 KiB/s, done.
Resolving deltas: 100% (755115/755115), done.
Checking out files: 100% (22584/22584), done.
- The htc-vogue branch is of our interest (again it could take a few seconds)
The reason we use the vogue branch is that the code is very similar to the original vogue code.
- cd kernel
- git checkout -b htc-vogue origin/htc-vogue
- sample output:
Branch htc-vogue set up to track remote branch refs/remotes/origin/htc-vogue.
Switched to a new branch "htc-vogue"
- To update this branch once new commits have been made
- run "git pull" (inside kernel directory)
Compile the kernel
Prepare default .config for Kaiser. The following will launch the config menu and ensure Kaiser is selected (along with Niki/Polaris/Vogue) in System Type. Also take care, that File Systems -> Miscellaneous Filesystems -> SquashFS is selected if you are going to mount squash images.
- make vogue_defconfig ARCH=arm; make menuconfig
lots of output
- configuration written to .config
- And finally compile the kernel to get zImage (takes a minute or two):
- export PATH=/path_to_android-kernel/arm-2008q3/bin:$PATH
- make zImage ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-
lots of output
Kernel: arch/arm/boot/zImage is ready
- Now copy zImage to your phone and play with it.
Easiest way I found is to use synce-pcp (apt-get install librapi2-tools) when connected through USB
- synce-pcp arch/arm/boot/zImage :/Storage Card/zImage (or whatever the card is called in your language - e.g. Speicherkarte in German)
or just copy it to the SD-card using a cardreader
- cp arch/arm/boot/zImage /media/disk-1 (path to your SD-card)
The other files you need:
- data.gz (=> data.img)
- tap the haret.exe, and accept the warning
- when haret is running tap "run"
haret will now load the kernel and boot up android..
and you are ready to go..
when you have made the changes you want to the kernel it is just a matter of overwriting the zImage on the phone.
Get su & busybox Working
The problem is that su and busybox are not in the PATH. The busybox tools are in the /bin directory. There are other tools in the /system/xbin directory (including su), but there are not as useful. To confirm this try running /bin/ls --version which should be the busybox version. Running ls should give a color-coded listing of files and directories.
There are at least a couple ways to solve this problem. Try one of the following.
Change the PATH when you start a shell
Run a line like export PATH=/bin:$PATH every time you start a shell. This will add the busybox tools to your PATH.
Follow the instructions for Android data.gz image Customization. Once you have extracted the image on your PC, do the following.
cd local ln -s /bin bin
This will create a symbolic link from the data image (which is in the PATH) to the /bin directory.
By the way, the /data/local/bin directory is in the data.gz image. The /bin directory is in the initrd.gz image.
Android data.gz image Customization
To customize the data.gz image, you either need to extract the files or mount the image on your PC. Let's mount the image. Copy the data.gz file from your SD card to your PC. mkdir data_image cp data.gz data_original.gz #make a backup gunzip data.gz sudo mount -o loop data data_image su and enter your PC root password cd data_image Look around and make changes sync cd .. exit #exit from su sudo umount data_image gzip data Copy the data.gz to your SD card.
If you have problems, paste your shell session into a forum post and ask for help nicely.
Android system.img Customization
To customize the system.img image, you either need to extract the files or mount the image on your PC. Let's mount the image.
- Copy the
system.imgfile from your SD card to your PC.
- mkdir stock-system
- sudo mount -o loop system.img stock-system
- genext2fs -d stock-system -b 300000 -a system.ext2
- mkdir temp
- sudo mount -o loop system.ext2 temp/
- sudo mkfs.cramfs temp/ system.1.5.img
sudo umount system_image
sudo umount temp
If you have problems, paste your shell session into a forum post and ask for help nicely.
Restoring Bookmarks and Email settings on a new data.img
If you need to start with fresh data.img frequently, you'll have to set your bookmarks, email and other settings again. It's possible to save your preferences in a text file and restore them in a new data.img. Basically, we'll dump the database into a text file and then restore it.
To dump the bookmarks into a text file, do something like this.
$ su -c "sqlite3 /data/data/com.android.browser/databases/browser.db"
sqlite> .output bookmarks.sql
sqlite> .mode insert
sqlite> select* from bookmarks
You'll need to edit the file bookmarks.sql changing
bookmarks. Save the file on your sdcard.
Here's a short script to restore the bookmarks database.
# import bookmark database from sql format
#delete all bookmarks echo deleting all bookmarks before import... su -c "sqlite3 /data/data/com.android.browser/databases/browser.db 'delete from bookmarks'"
#import bookmarks from sdcard echo Importing bookmarks... su -c "sqlite3 /data/data/com.android.browser/databases/browser.db '.read /sdcard/bookmarks.sql'"
The email account information is stored in a file like
Save that file on your sdcard. When you use a fresh data.img, copy it over before your start the email application. (If you need to edit the xml file, use
sort -k 3 AndroidMail.Main.xml first to organize the file a little.)
Porting linux command line apps to Android
Here are some links to information on porting command line linux apps to Android. We need help creating some better instructions.
Android Keyboard Customization
Can you help complete these instructions? How can I add the ">" key to the AT&T Tilt keymap?
Here are some relevant documents.
- How Android keymaps work http://www.netmite.com/android/mydroid/development/pdk/docs/keymaps_keyboard_input.html
- How to edit the .kcm.bin file without makekcharmap http://forum.xda-developers.com/showthread.php?t=504710
- Some discussion with links http://groups.google.com/group/android-platform/browse_thread/thread/eda3e06103144d80
Android Kaiser wifi
Here is a package with all the needed files and a brief how to to get wifi running on the ti-series of wireless radios. http://www.homecncfun.com/my-downloads/?did=7
Android on the Kaiser (And Variants)
This page is meant for people who want to know the progress and process of getting Android (even Linux) to work on the Kaiser.
Warning! Please read all the instructions BEFORE attempting, this is not ready for full public use yet and a lot of features do not work, or just plain crash. Be prepared to do soft resets, possible data loss of your SD Card, or a hard reset if things go bad. If you still want to try Google Android on your Kaiser, please continue reading.
Please edit me to keep everyone up to date!
Current state - Android 1.1
|SD Storage Access||Partial||Will see Audio and Photos|
|Hardware keyboard||Yes||add board-kaiser-keypad.atttilt=1 to default.txt in set cmdline for ATT Tilt|
|Audio||Yes||To listen to your music|
|Audio Routing (Phone)||Yes||To make & receive calls|
Rather than keep the above table up to date, you can check the port status on the Android on HTC Site here
Updated 11/10/2010 - thought it might be helpful to list the different builds available, they all have pros and cons and things that don't quite work. There are 2 main versions at present, but each 'cook' creates their own variant, so its personal choice which one you wish to use. Donut is Android 1.6. Eclair is Android 2.1
Most stable build (has the most working features) at time of writing is Myn's Warm Donut (Android 1.6).
Below is the current list of builds with what Doesn't work! next to it.
- Myn's Warm Donut - Camera Quality, Video Recording, Front Camera
- Polymod 2.1g - Camera
- Polymod 2.1d - BT Audio, Camera
- Super Eclair - Camera, BT Audio
- CyanogenMod Stable - Aqtrans - Camera, BT Audio. More frequently updated.
- Myn's Warm Eclair - Camera, BT Audio.
- VaniljEclair RLS2 - Cemera (install BT update on thread to get BT working, good clean build.
A good Thread for those new to Android Android FAQ - Starting point for Android newbies
Ensure you have the latest Kernel for your build for Eclair use dzo kernel's
Another good thread to check out is Google Android on the HTC Kaiser
How to get Android up and running on the Kaiser's SD card (doesn't flash phone).
Note: Radio and ROM version no longer matter (not verified.) And formatting the Storage card to FAT32 seems to work better.
You need both the basefiles and Haret archive files.
- Extract these files to the root of your SD card
- Edit default.txt to look like the following:
set RAMSIZE 0x07000000
set RAMADDR 0x10000000
set FBDURINGBOOT 0
set MTYPE 1553
set KERNEL zImage
set initrd "\Storage Card\initrd.gz"
set cmdline "pm.sleep_mode=4 board-htcvogue.panel_type=0 msm_sdcc.msmsdcc_fmax=20000000 no_console_suspend"
- For non english version of Windows Mobile, replace "Storage Card" by the name of your storage card. E.g. "Carte de Stockage" for French.
- AT&T Users should replace the 'cmdline' above with the following to enable data connections:
set cmdline "ppp.username=WAP@CINGULARGPRS.COM ppp.password=CINGULAR1 board-kaiser-keypad.atttilt=0 pm.sleep_mode=4 board-htcvogue.panel_type=0 msm_sdcc.msmsdcc_fmax=20000000 no_console_suspend"
- Run the file
- Click the Run button >
- It is possible to use a folder for the files, or to use a kaiser specific default.txt which is in Dzo's archive but as some people find difficulty doing this, I have provided a simple set of instructions.
- If you really don't understand any of the above, or even below, I STRONGLY suggest to reconsider messing with Android until it matures a little more to run on our Kaisers.
Here is an example directory structure of a working storage card.
AndroidApps/ -- This folder is for .APK files, which I will explain later.
PICTURES/ -- Put photos here!
wallpapers/ -- The phone will read this just like the "Pictures Folder"
./data.gz -- data.bin after you load it for the first time.
./DEFAULT.TXT -- This file will tell HARET what to do.
./HARET.exe -- Loads Android
./system.bin -- System Files
./zImage -- The Kernel, The heart of linux, be prepared to replace this file a lot as updates are released.
How do I install an .APK file that I've downloaded?
Easy! Create the AndroidApps folder on your storage card, and place them in there. Note that some apps will not show up unless you use another app called appinstaller that will let you use NON Market apps on the phone more easily.
Will Android reflash my phone?
NO! at least not yet. What it does is shut down Windows Mobile to load up Android, which does not harm your existing Rom.
Can I Make calls?
Yes, you can also receive calls as well! As of right now though, all audio is through the speakerphone.
Can I send or receive texts or picture messages?
SMS is working, and MMS works when connected to the internet.
Does GPS Work?
Will Android ever turn on me?
Well, not unless you let it watch Terminator or Battlestar Galatica too much. But that would just be silly, a phone watching tv.... Or would it...
Sites of interest.
- The latest builds for the Kaiser
- Google Android for Kaiser Thread
- Android system files, made for the vogue, but most works with the Kaiser
- Some Android .APK Files
- A good place for non market Android applications
- More Android applications
- List of G1 Applications, Credit for the link goes to stats555.