[Wing, P4350 ROM development] darkstar62:
I've developed a kernel and base linux system suitable for installation on the HTC Herald / T-Mobile Wing series of phones. This image is for installation of a root filesystem directly to an SD storage card (no need for a root FS image). Several things don't work so far -- this is early development. But it's enough to play with. My hope is that we can use development on this as a jumping point for getting Google Android to run on the wing.

UPDATE (2/10/09):

I've added a Resources section to collect the useful information and links that have been posted here and in the other thread. I've also updated the known issues section for Android to reflect what I've discovered so far.

UPDATE (2/9/09):

I've got an updated kernel config and images for starting Android now! Android will now pull up the boot animation and begin startup. It still does not complete startup, but at least we know we've got the right stuff in the kernel now!

I've added instructions at the bottom for installing these and using them with an already set up linux system (per the first set of instructions).

UPDATE (2/7/09):

Here's some extra files you can grab if you're interested in development: (The patches don't apply cleanly yet against the linwizard kernel)

Kernel .config file I've used (against the linwizard 2.6.25 kernel): http://dl.getdropbox.com/u/198699/linux_wing/wing_config

Android diffs (between SDK android kernel and kernel.org 2.6.27 kernel): http://dl.getdropbox.com/u/198699/linux_wing/android-2.6.27.patch

Contents

Part 1: Linux Base System Installation Instructions

Part 2: Android Installation Instructions

Resources

Part 1: Linux Base System Installation Instructions:

The below instructions assume you have access to Linux and can read/write to your SD storage card.

To start out with, here's what you'll need:

Haret + default.txt + kernel (.zip, 1.4mb)

Root filesystem contents (.tar.gz, 13.1mb)

1. Repartition your SD card.

For this, you'll need to use something like Partition Magic or some other suitable partitioner (in Linux, you can use gparted to resize your Windows partition.) I recommend the following layout:

Partition 1: Primary, FAT16 or FAT32 containing your original Windows files (any size of your choosing)

Partition 2: Primary, Linux Swap, 128mb

Partition 3: Primary, EXT3, >=64mb
​

My linux partition is 650mb with a 1.2gb Windows partition and 128mb swap -- adjust to preference.
​

2. Format the swap and linux partitions.

In linux, run the following: (I assume your SD card is /dev/sdb -- adjust if different)

# sudo mkswap /dev/sdb2
# sudo mkfs.ext3 /dev/sdb3

I'm assuming the layout in step 1 as well.​

3. Mount the new Linux partition.

Run the following:

# sudo mount /dev/sdb3 /mnt

4. Copy the base linux system into the new Linux partition.

Save the root filesystem .tar.gz file from above to somewhere (I'll assume $HOME). Then run:

# cd /mnt
# sudo tar -xzvf $HOME/rootfs.tar.gz
# cd ..

5. Unmount the linux partition.

Run the following command:

# sudo umount /mnt

6. Mount the windows partition and copy the Haret executable + kernel.

I'll again assume you saved the "haret+kernel.zip" file to $HOME. Run the following:

# sudo mount /dev/sdb1 /mnt
# cd /mnt
# mkdir linux
# cd linux
# sudo unzip $HOME/haret+kernel.zip
# cd /
# sudo umount /mnt

At this stage, your Linux base system and kernel should be installed. All that's left is to remove your SD card and re-insert it into your phone, start up HaRET and enjoy.

7. Log in

Once you're booted into Linux, you can log in with:

Username: root

Password: wing​

Plug in a USB cord to log in on your laptop. If your laptop runs linux, you'll need to make sure that the usb0 network interface has the right address:

# sudo ifconfig usb0 10.100.0.2 up

The phone's address will be 10.100.0.1. You should be able to SSH or telnet in to the phone and mess around. Run "startx" to bring up X and such.

What's Working

Minimal X server capable of landscape and portrait video modes (KDrive, using the framebuffer (omapfb))

Touch screen support + calibration software (TSC2046 driver + tslib)

Console keyboard (some characters are difficult / impossible to type due to the limited key layout and driver)

USB gadget support for connecting with my laptop (I can SSH / telnet into the phone, or ssh/telnet from the phone into my laptop)

Full access to the SD card (even the Windows FAT side -- mmci-omap driver)

Known Issues

Bluetooth -- haven't been able to get a working driver, or anything to even recognize that it exists

WLAN -- same as bluetooth

GPRS / Phone -- same. There appears to be a GSM device, but I haven't been able to do anything with it.

Most of the extra buttons don't fire any events

LEDs for the most part don't work

Battery and power stats aren't available, as well as power management

No control of the backlight or display power

Sound not functional -- don't have any drivers / software compiled for sound, so I don't know if this would work or not

No real time clock (RTC) functionality

Part 2: Android Installation Instructions:

For these instructions, the recommended procedure is to copy the files you'll need to the Windows side of your SD card and install using the Linux boot system. Make sure you follow the instructions for getting a Linxu base system installed first before following this.

First off, grab the following files (Required)

Android patched kernel for the wing (same as the below kernel, but with android patches): http://dl.getdropbox.com/u/198699/android/zImage2

Android root filesystem, compiled for the wing: http://dl.getdropbox.com/u/198699/android/root.tar.gz

Android /system partition, compiled for the wing: http://dl.getdropbox.com/u/198699/android/system.tar.gz

Script for starting Android: http://dl.getdropbox.com/u/198699/android/start_android

You can also grab the kernel config file if you're interested in building the kernel (I'll have the android patch set available soon) (Optional):

Kernel .config file for the modified kernel: http://dl.getdropbox.com/u/198699/android/kernel_config

1. Copy all files to your wing

From Windows Mobile, download the 4 required files above and place them on your storage card:

root.tar.gz -- Place in /Storage Card/

system.tar.gz -- Place in /Storage Card/

zImage2 -- Place in /Storage Card/linux (overwrite the file that's already there, or re-name the original first)

start_android -- Place in /Storage Card/

2. Install Android

Run HaRET.exe to start Linux. It should boot the new kernel (you most likely won't notice a difference). Once in Linux, run the following commands (you can do it directly with the wing keyboard, or you may elect to use SSH (see instructions above) -- SSH is easer in my opinion):

# cd ../..
# mkdir android
# cd android
# tar -xzf ../mnt/windows/root.tar.gz
# tar -xzf ../mnt/windows/system.tar.gz
# cp ../mnt/windows/start_android ../bin
# chmod 775 ../bin/start_android

If using the Wing's keyboard, you'll need to use the following key mapping:

'/' --> 'Tab'

'-' --> 'Alt + x'

'_' --> 'Alt + c' (I think -- it's Alt + one of the letter keys)

Numbers -> 'Alt + <top row>'

3. Start Android

At this point, android is now installed and ready to run. Simply execute the following command to start Android:

# start_android

After a few seconds, you should see the Android startup animation appear.
​

Known Issues

The omapfb driver currently in use does not support page flipping, preventing the Android GUI from being displayed

Resources

WMStorage -- turn your wing into a USB SD card reader (Kudos to Kuff!): http://xdaforums.com/showpost.php?p=3263023&postcount=5

Wing Service Manual (kudos to drmidnight!): http://xdaforums.com/showpost.php?p=3291171&postcount=132

Google Andriod for Herald and Tmobile Wing -- the thread that started it all: http://xdaforums.com/showthread.php?t=398830

Enjoy