OK, so I’ve been running Froyo (Android 2.2) on my HD2 as the day to day OS now for a week or so, and performance is now equal to (or better see screenshot left) than a Nexus one so I’ve now decided to pop together a guide on how to get it up and running for those that want to give it a go.
First things first, lets make sure we have all we need.
A fresh Class 2 or better MicroSD over 2Gb (format it in Windows, either in the phone using USB storage mode, or if you have a reader, from Windows PC natively)
NOTE : The latest zImage files do not require most of this, Just replace the files in the sdCard\Android folder with the files from the zip. If you are coming from the below modification (or any other FullRam Kernel) you will need to replace the drivers again (not required any more), just copy your backed up system.ext2 over the changed one, and all will be back to normal. If you did not backup, then just re-download the distro you are using, and replace the system.ext2 file. The only file you might need to change using the below method is the WiFi driver bcm4329.ko. Also remember to copy the new version of haret.exe into your android folder.
This will fix the WiFi : To push the updated bcm4329.ko (in the zip file) do this
- From a cmd prompt, in the tools folder of the Android SDK, type ADB shell
- type su
- type mount -o remount rw /system
- type mv /system/lib/modules/bcm4329.ko /system/lib/modules/bcm4329.ko.orig (this will backup the original driver file)
- press ctrl-c or type exit twice
- type adb push ..\bcm4329.ko /system/lib/modules (where ..\bcm4329.ko is the location of the file from the zip)
- type adb shell chmod 777 /system/lib/modules/bcm4329.ko
- goto config on your device, and enable WiFi
————————— Below is the old method if you want to use that kernel ——-
We also need the Android SDK down and installed (see here) only thing really needing installing is the USB Drivers (v3 or later) and the tools, details on the Google page linked.
OK, so we have it all downloaded then. Lets go…
- Format the SD Card, Plug the card into the HD2, plug the USB into your PC, choose the mass storage mode, and in Windows Explorer right click the drive and click Format. Let it finish.
- Open the drive and Create an Android folder on it.
- Unzip/Unrar the Android build you have downloaded, and copy all the files into the Android folder on the SD card.
The Below section is if you want the latest fastest kernel installed, but requires using command line tools in Windows, and having the ADB tools from the Android SDK installed.
- Copy the new new zImage.FULLRAM.noPC into the Android Folder.
- Copy the default.FULLRAM.txt into the Android Folder.
- Delete or rename the current startup.txt file in the Android folder.
- Rename the default.FULLRAM.txt to startup.txt
- Delete or rename the current zImage file in the Android folder.
- Rename the zImage.FULLRAM.noPC file to zImage (Please make sure you have disabled the hide known extensions in Windows, or do this from the CMD prompt). The Alternative to renaming is to edit the startup.txt you just renamed, and change the zImage line to zImage.FULLRAM.noPC
Finish here for the latest kernel
- Fire up explorer on the device, navigate to the SD Card (obviously unplug USB from PC) then to the Android folder, and click the CLRCAD file (don’t worry if nothing happens, that’s right), then the haret file. This will then boot Android.
Once Android is up and running go through the initial configuration screens if you like, however we need to fix the little graphics glitches you can see (flickery lines) this is caused by bad graphics drivers. So let’s replace them (only required if running the FULLRAM kernel)
- Connect the USB to the device and to Windows, the USB debuging notification should pop up in the notification bar in Android. Copy the two .so files you downloaded earlier (copybit and graloc) into this folder as well
- Launch a command prompt, and navigate to the tools folder of the Android SDK, and type adb shell mount -o remount rw /system
- Make a backup of the files you will be deleting, create a backup folder up the tree on windows (in the CMD prompt, type MD ..\backup), then type adb pull /system/lib/hw/copybit.*.so ..\backup and adb pull /system/lib/hw/gralloc.*.so ..\backup these can then be used to restore back to the 256/384Mb based kernel if required (use the same method as below to replace files if need be, note though you have a copybit.default.so to push as well).
- That should come back without error, now type adb shell rm /system/lib/hw/copybit.*.so and press enter, now type adb shell rm /system/lib/hw/gralloc.*.so and press enter.
- now type adb push copybit.qsd8k.so /system/lib/hw and adb push gralloc.qsd8k.so /system/lib/hw this will copy the new drivers to the device.
- Run adb shell chmod 777 /system/lib/*to set permissions (sorry forgot this step if you get a non boot, just do this step while the device is attempting to boot, then reboot it with the next step, it should fix nonboot issues)
- run adb push bcm4329.ko /system/lib/modules to update WiFi updated driver
- Now reboot the HD2, type adb shell reboot to do this.
If all went well (no errors reported etc) then the new drivers are now on the device, and the reboot to WinMo should happen.
Re-Launch Android either via file explorer again (running the two exe’s) or get one of the many launchers to do it for you. Try this one for example.
I hope that helps someone that’s trying to play with Android on the HD2. Like I say, for me it works day to day without issue. I do recommend installing SetCPU though, and setting it up to scale the CPU, and slow it down when screen off etc.
Thanks to the guys over at the HTC-Linux channel for the information used here.
NOTE : Uploading a version of matcc 1.5 rom with changes already done, will post the links when uploaded. Please note though, Mattc will NOT support this release if there is issues, however do look in his thread on XDA-Developers for possible fixes. I’ve changed nothing else in his rom besides the drivers and kernel version.
Links : Download Links