summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Android.mk2
-rw-r--r--AndroidBoard.mk64
-rw-r--r--BoardConfig.mk79
-rw-r--r--board-info.txt6
-rw-r--r--device_sapphire.mk44
-rw-r--r--device_sapphire_as.mk22
-rw-r--r--device_sapphire_eu.mk22
-rw-r--r--device_sapphire_us.mk22
-rw-r--r--egl.cfg33
-rw-r--r--gps.conf_AS6
-rw-r--r--gps.conf_EU6
-rw-r--r--gps.conf_US6
-rw-r--r--h2w_headset.kl9
-rw-r--r--init.sapphire.rc76
-rw-r--r--kernelbin0 -> 2151564 bytes
-rw-r--r--media_profiles.xml153
-rw-r--r--sapphire-keypad.kcm64
-rw-r--r--sapphire-keypad.kl85
-rw-r--r--system.prop18
-rw-r--r--vold.fstab18
-rw-r--r--wlan.kobin0 -> 637312 bytes
21 files changed, 734 insertions, 1 deletions
diff --git a/Android.mk b/Android.mk
index b62be78..7c9724a 100644
--- a/Android.mk
+++ b/Android.mk
@@ -13,4 +13,4 @@
# limitations under the License.
-include $(call my-dir)/recovery/Android.mk
+include $(call all-named-subdir-makefiles, boot libsensors recovery)
diff --git a/AndroidBoard.mk b/AndroidBoard.mk
new file mode 100644
index 0000000..2c20b8c
--- /dev/null
+++ b/AndroidBoard.mk
@@ -0,0 +1,64 @@
+# Copyright (C) 2009 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+LOCAL_PATH := $(call my-dir)
+
+ifeq ($(TARGET_PREBUILT_KERNEL),)
+TARGET_PREBUILT_KERNEL := $(LOCAL_PATH)/kernel
+endif
+
+file := $(INSTALLED_KERNEL_TARGET)
+ALL_PREBUILT += $(file)
+$(file): $(TARGET_PREBUILT_KERNEL) | $(ACP)
+ $(transform-prebuilt-to-target)
+
+$(call add-radio-file,recovery/images/firmware_install.565)
+$(call add-radio-file,recovery/images/firmware_error.565)
+$(call add-radio-file,recovery/images/bitmap_size.txt)
+
+file := $(TARGET_OUT_KEYLAYOUT)/sapphire-keypad.kl
+ALL_PREBUILT += $(file)
+$(file) : $(LOCAL_PATH)/sapphire-keypad.kl | $(ACP)
+ $(transform-prebuilt-to-target)
+
+file := $(TARGET_OUT_KEYLAYOUT)/h2w_headset.kl
+ALL_PREBUILT += $(file)
+$(file) : $(LOCAL_PATH)/h2w_headset.kl | $(ACP)
+ $(transform-prebuilt-to-target)
+
+file := $(TARGET_ROOT_OUT)/init.sapphire.rc
+ALL_PREBUILT += $(file)
+$(file) : $(LOCAL_PATH)/init.sapphire.rc | $(ACP)
+ $(transform-prebuilt-to-target)
+
+
+include $(CLEAR_VARS)
+LOCAL_SRC_FILES := sapphire-keypad.kcm
+include $(BUILD_KEY_CHAR_MAP)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE_CLASS := ETC
+LOCAL_MODULE := vold.fstab
+LOCAL_SRC_FILES := $(LOCAL_MODULE)
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := wlan.ko
+LOCAL_MODULE_TAGS := user
+LOCAL_MODULE_CLASS := ETC
+LOCAL_MODULE_PATH := $(TARGET_OUT)/lib/modules
+LOCAL_SRC_FILES := $(LOCAL_MODULE)
+include $(BUILD_PREBUILT)
+
+-include vendor/htc/sapphire/AndroidBoardVendor.mk
diff --git a/BoardConfig.mk b/BoardConfig.mk
new file mode 100644
index 0000000..e6d8df8
--- /dev/null
+++ b/BoardConfig.mk
@@ -0,0 +1,79 @@
+# Copyright (C) 2009 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# config.mk
+#
+# Product-specific compile-time definitions.
+#
+
+TARGET_BOARD_PLATFORM := msm7k
+TARGET_CPU_ABI := armeabi
+
+TARGET_NO_BOOTLOADER := true
+
+# Wifi related defines
+BOARD_WPA_SUPPLICANT_DRIVER := CUSTOM
+BOARD_WPA_SUPPLICANT_PRIVATE_LIB := libWifiApi
+BOARD_WLAN_TI_STA_DK_ROOT := system/wlan/ti/sta_dk_4_0_4_32
+WIFI_DRIVER_MODULE_PATH := "/system/lib/modules/wlan.ko"
+WIFI_DRIVER_MODULE_ARG := ""
+WIFI_DRIVER_MODULE_NAME := "wlan"
+WIFI_FIRMWARE_LOADER := "wlan_loader"
+
+TARGET_BOOTLOADER_LIBS := \
+ libboot_board_sapphire \
+ libboot_arch_msm7k \
+ libboot_arch_armv6
+
+TARGET_BOOTLOADER_LINK_SCRIPT := \
+ hardware/msm7k/boot/boot.ld
+
+TARGET_BOOTLOADER_BOARD_NAME := sapphire
+
+BOARD_KERNEL_CMDLINE := no_console_suspend=1 console=null
+
+BOARD_HAVE_BLUETOOTH := true
+
+BOARD_GPS_LIBRARIES := libgps
+
+BOARD_VENDOR_USE_AKMD := akm8976
+
+BOARD_VENDOR_QCOM_AMSS_VERSION := 6220
+
+# # cat /proc/mtd
+# dev: size erasesize name
+# mtd0: 00040000 00020000 "misc"
+# mtd1: 00500000 00020000 "recovery"
+# mtd2: 00280000 00020000 "boot"
+# mtd3: 05a00000 00020000 "system"
+# mtd4: 05000000 00020000 "cache"
+# mtd5: 127c0000 00020000 "userdata"
+BOARD_BOOTIMAGE_PARTITION_SIZE := 0x00280000
+BOARD_RECOVERYIMAGE_PARTITION_SIZE := 0x00500000
+BOARD_SYSTEMIMAGE_PARTITION_SIZE := 0x05a00000
+BOARD_USERDATAIMAGE_PARTITION_SIZE := 0x127c0000
+# The size of a block that can be marked bad.
+BOARD_FLASH_BLOCK_SIZE := 131072
+
+# OpenGL drivers config file path
+BOARD_EGL_CFG := device/htc/sapphire/egl.cfg
+
+# No fallback font by default for Sapphire (space savings)
+NO_FALLBACK_FONT:=true
+
+TARGET_RECOVERY_UI_LIB := librecovery_ui_sapphire librecovery_ui_htc
+
+TARGET_RECOVERY_UPDATER_LIBS += librecovery_updater_htc
+
+TARGET_RELEASETOOLS_EXTENSIONS := device/htc/common
diff --git a/board-info.txt b/board-info.txt
new file mode 100644
index 0000000..c6459be
--- /dev/null
+++ b/board-info.txt
@@ -0,0 +1,6 @@
+reject serialno=HT7*|HT80*|HT81*
+require board=sapphire
+require version-bootloader=1.33.2005|1.33.0005|1.33.3004|1.33.3005|1.33.3007
+require version-baseband=2.22.19.26I
+require version-cpld=10|12
+
diff --git a/device_sapphire.mk b/device_sapphire.mk
new file mode 100644
index 0000000..21ad680
--- /dev/null
+++ b/device_sapphire.mk
@@ -0,0 +1,44 @@
+#
+# Copyright (C) 2008 Google Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# To be included directly by a device_sapphire*.mk makefile;
+# do not use inherit-product on this file.
+
+# stuff common to all HTC phones
+$(call inherit-product, device/htc/common/common.mk)
+
+PRODUCT_MANUFACTURER := HTC
+DEVICE_PACKAGE_OVERLAYS := device/htc/sapphire/overlay device/htc/common/overlay vendor/htc/common/overlay
+
+# we have enough storage space to hold precise GC data
+#PRODUCT_TAGS += dalvik.gc.type-precise
+
+# Install the features available on this device.
+PRODUCT_COPY_FILES += \
+ frameworks/base/data/etc/android.hardware.camera.autofocus.xml:system/etc/permissions/android.hardware.camera.autofocus.xml \
+ frameworks/base/data/etc/android.hardware.telephony.gsm.xml:system/etc/permissions/android.hardware.telephony.gsm.xml \
+ frameworks/base/data/etc/android.hardware.touchscreen.multitouch.xml:system/etc/permissions/android.hardware.touchscreen.multitouch.xml
+
+#include Windows Media
+include vendor/pv/wm/WindowsMedia.mk
+
+
+PRODUCT_PROPERTY_OVERRIDES +=
+ ro.media.dec.jpeg.memcap=10000000
+
+# media configuration xml file
+PRODUCT_COPY_FILES += \
+ device/htc/sapphire/media_profiles.xml:/system/etc/media_profiles.xml
diff --git a/device_sapphire_as.mk b/device_sapphire_as.mk
new file mode 100644
index 0000000..08d21d0
--- /dev/null
+++ b/device_sapphire_as.mk
@@ -0,0 +1,22 @@
+#
+# Copyright (C) 2008 Google Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# To be included directly by a product makefile; do not use inherit-product.
+
+PRODUCT_COPY_FILES += \
+ device/htc/sapphire/gps.conf_AS:system/etc/gps.conf
+
+$(call inherit-product, device/htc/sapphire/device_sapphire.mk)
diff --git a/device_sapphire_eu.mk b/device_sapphire_eu.mk
new file mode 100644
index 0000000..4a15972
--- /dev/null
+++ b/device_sapphire_eu.mk
@@ -0,0 +1,22 @@
+#
+# Copyright (C) 2008 Google Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# To be included directly by a product makefile; do not use inherit-product.
+
+PRODUCT_COPY_FILES += \
+ device/htc/sapphire/gps.conf_EU:system/etc/gps.conf
+
+$(call inherit-product, device/htc/sapphire/device_sapphire.mk)
diff --git a/device_sapphire_us.mk b/device_sapphire_us.mk
new file mode 100644
index 0000000..f53b068
--- /dev/null
+++ b/device_sapphire_us.mk
@@ -0,0 +1,22 @@
+#
+# Copyright (C) 2008 Google Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# To be included directly by a product makefile; do not use inherit-product.
+
+PRODUCT_COPY_FILES += \
+ device/htc/sapphire/gps.conf_US:system/etc/gps.conf
+
+$(call inherit-product, device/htc/sapphire/device_sapphire.mk)
diff --git a/egl.cfg b/egl.cfg
new file mode 100644
index 0000000..1abab05
--- /dev/null
+++ b/egl.cfg
@@ -0,0 +1,33 @@
+#
+# Copyright (C) 2009 Google Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#
+# One line per configuration, of the form:
+#
+# D I TAG
+#
+# D: display (0: default)
+# I: implementation (0: software, 1: hardware)
+# TAG: a unique tag
+#
+# The library name loaded by EGL is constructed as (in that order):
+#
+# /system/lib/egl/libGLES_$TAG.so
+# /system/lib/egl/lib{EGL|GLESv1_CM|GLESv2}_$TAG.so
+#
+
+
+0 0 android
+0 1 qcom
diff --git a/gps.conf_AS b/gps.conf_AS
new file mode 100644
index 0000000..51154b9
--- /dev/null
+++ b/gps.conf_AS
@@ -0,0 +1,6 @@
+NTP_SERVER=asia.pool.ntp.org
+XTRA_SERVER_1=http://xtra1.gpsonextra.net/xtra.bin
+XTRA_SERVER_2=http://xtra2.gpsonextra.net/xtra.bin
+XTRA_SERVER_3=http://xtra3.gpsonextra.net/xtra.bin
+SUPL_HOST=supl.google.com
+SUPL_PORT=7276
diff --git a/gps.conf_EU b/gps.conf_EU
new file mode 100644
index 0000000..926f884
--- /dev/null
+++ b/gps.conf_EU
@@ -0,0 +1,6 @@
+NTP_SERVER=europe.pool.ntp.org
+XTRA_SERVER_1=http://xtra1.gpsonextra.net/xtra.bin
+XTRA_SERVER_2=http://xtra2.gpsonextra.net/xtra.bin
+XTRA_SERVER_3=http://xtra3.gpsonextra.net/xtra.bin
+SUPL_HOST=supl.google.com
+SUPL_PORT=7276
diff --git a/gps.conf_US b/gps.conf_US
new file mode 100644
index 0000000..b766326
--- /dev/null
+++ b/gps.conf_US
@@ -0,0 +1,6 @@
+NTP_SERVER=north-america.pool.ntp.org
+XTRA_SERVER_1=http://xtra1.gpsonextra.net/xtra.bin
+XTRA_SERVER_2=http://xtra2.gpsonextra.net/xtra.bin
+XTRA_SERVER_3=http://xtra3.gpsonextra.net/xtra.bin
+SUPL_HOST=supl.google.com
+SUPL_PORT=7276
diff --git a/h2w_headset.kl b/h2w_headset.kl
new file mode 100644
index 0000000..14f4382
--- /dev/null
+++ b/h2w_headset.kl
@@ -0,0 +1,9 @@
+key 107 ENDCALL WAKE_DROPPED
+key 113 MUTE
+key 114 VOLUME_DOWN
+key 115 VOLUME_UP
+key 163 MEDIA_NEXT
+key 164 MEDIA_PLAY_PAUSE
+key 165 MEDIA_PREVIOUS
+key 226 HEADSETHOOK WAKE
+key 231 CALL WAKE_DROPPED
diff --git a/init.sapphire.rc b/init.sapphire.rc
new file mode 100644
index 0000000..c54a8d0
--- /dev/null
+++ b/init.sapphire.rc
@@ -0,0 +1,76 @@
+on early-init
+ device mtd@misc 0460 radio diag
+
+# Set timeout value for rmnet stats.
+ write /sys/devices/virtual/net/rmnet0/timeout_suspend 5000000
+ write /sys/devices/virtual/net/rmnet0/timeout 18000000
+
+on boot
+# unmap left alt to avoid console switch
+ setkey 0x0 0x38 0x0
+# sapphire reset SEND+MENU+END
+ setkey 0x0 0xe7 0x706
+ setkey 0x0 0x8b 0x707
+
+ setkey 0x40 0xe7 0x706
+ setkey 0x40 0x8b 0x707
+
+ setkey 0x80 0xe7 0x706
+ setkey 0x80 0x8b 0x707
+
+ setkey 0xc0 0xe7 0x706
+ setkey 0xc0 0x8b 0x707
+ setkey 0xc0 0x6b 0x20c
+
+ mkdir /data/misc/wifi 0770 wifi wifi
+ mkdir /data/misc/wifi/sockets 0770 wifi wifi
+ mkdir /data/misc/dhcp 0770 dhcp dhcp
+ chown dhcp dhcp /data/misc/dhcp
+
+ # bluetooth power up/down interface
+ chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
+ chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
+ chmod 0660 /sys/class/rfkill/rfkill0/state
+
+ # cpufreq configurations
+ write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 245760
+ write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ondemand
+ write /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate 40000
+ write /sys/devices/system/cpu/cpufreq/ondemand/up_threshold 85
+
+# compass/accelerometer daemon
+service akmd /system/bin/akmd
+ user compass
+ group compass misc input
+
+service wlan_loader /system/bin/wlan_loader \
+ -f /system/etc/wifi/Fw1251r1c.bin -e /proc/calibration \
+ -i /system/etc/wifi/tiwlan.ini
+ disabled
+ oneshot
+
+service wpa_supplicant /system/bin/wpa_supplicant \
+ -Dtiwlan0 -itiwlan0 -c/data/misc/wifi/wpa_supplicant.conf -q
+# we will start as root and wpa_supplicant will switch to user wifi
+# after setting up the capabilities required for WEXT
+# user wifi
+# group wifi inet keystore
+ socket wpa_tiwlan0 dgram 660 wifi wifi
+ disabled
+ oneshot
+
+service dhcpcd /system/bin/dhcpcd -ABKL
+ disabled
+ oneshot
+
+service hciattach /system/bin/hciattach \
+ -n -s 115200 /dev/ttyHS0 texasalt 4000000 flow
+ user bluetooth
+ group bluetooth net_bt_admin
+ disabled
+
+# bugreport is triggered by the KEY_BACK and KEY_MENU keycodes
+service bugreport /system/bin/dumpstate -d -v -o /sdcard/bugreports/bugreport
+ disabled
+ oneshot
+ keycodes 158 139
diff --git a/kernel b/kernel
new file mode 100644
index 0000000..e56ba52
--- /dev/null
+++ b/kernel
Binary files differ
diff --git a/media_profiles.xml b/media_profiles.xml
new file mode 100644
index 0000000..d683b1f
--- /dev/null
+++ b/media_profiles.xml
@@ -0,0 +1,153 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!DOCTYPE MediaSettings [
+<!ELEMENT MediaSettings (CamcorderProfiles,
+ EncoderOutputFileFormat+,
+ VideoEncoderCap+,
+ AudioEncoderCap+,
+ VideoDecoderCap,
+ AudioDecoderCap)>
+<!ELEMENT CamcorderProfiles (EncoderProfile+, ImageEncoding+, ImageDecoding, Camera)>
+<!ELEMENT EncoderProfile (Video, Audio)>
+<!ATTLIST EncoderProfile quality (high|low) #REQUIRED>
+<!ATTLIST EncoderProfile fileFormat (mp4|3gp) #REQUIRED>
+<!ATTLIST EncoderProfile duration (30|60) #REQUIRED>
+<!ELEMENT Video EMPTY>
+<!ATTLIST Video codec (h264|h263|m4v) #REQUIRED>
+<!ATTLIST Video bitRate CDATA #REQUIRED>
+<!ATTLIST Video width CDATA #REQUIRED>
+<!ATTLIST Video height CDATA #REQUIRED>
+<!ATTLIST Video frameRate CDATA #REQUIRED>
+<!ELEMENT Audio EMPTY>
+<!ATTLIST Audio codec (amrnb|amrwb|aac) #REQUIRED>
+<!ATTLIST Audio bitRate CDATA #REQUIRED>
+<!ATTLIST Audio sampleRate CDATA #REQUIRED>
+<!ATTLIST Audio channels (1|2) #REQUIRED>
+<!ELEMENT ImageEncoding EMPTY>
+<!ATTLIST ImageEncoding quality (90|80|70|60|50|40) #REQUIRED>
+<!ELEMENT ImageDecoding EMPTY>
+<!ATTLIST ImageDecoding memCap CDATA #REQUIRED>
+<!ELEMENT Camera EMPTY>
+<!ATTLIST Camera previewFrameRate CDATA #REQUIRED>
+<!ELEMENT EncoderOutputFileFormat EMPTY>
+<!ATTLIST EncoderOutputFileFormat name (mp4|3gp) #REQUIRED>
+<!ELEMENT VideoEncoderCap EMPTY>
+<!ATTLIST VideoEncoderCap name (h264|h263|m4v|wmv) #REQUIRED>
+<!ATTLIST VideoEncoderCap enabled (true|false) #REQUIRED>
+<!ATTLIST VideoEncoderCap minBitRate CDATA #REQUIRED>
+<!ATTLIST VideoEncoderCap maxBitRate CDATA #REQUIRED>
+<!ATTLIST VideoEncoderCap minFrameWidth CDATA #REQUIRED>
+<!ATTLIST VideoEncoderCap maxFrameWidth CDATA #REQUIRED>
+<!ATTLIST VideoEncoderCap minFrameHeight CDATA #REQUIRED>
+<!ATTLIST VideoEncoderCap maxFrameHeight CDATA #REQUIRED>
+<!ATTLIST VideoEncoderCap minFrameRate CDATA #REQUIRED>
+<!ATTLIST VideoEncoderCap maxFrameRate CDATA #REQUIRED>
+<!ELEMENT AudioEncoderCap EMPTY>
+<!ATTLIST AudioEncoderCap name (amrnb|amrwb|aac|wma) #REQUIRED>
+<!ATTLIST AudioEncoderCap enabled (true|false) #REQUIRED>
+<!ATTLIST AudioEncoderCap minBitRate CDATA #REQUIRED>
+<!ATTLIST AudioEncoderCap maxBitRate CDATA #REQUIRED>
+<!ATTLIST AudioEncoderCap minSampleRate CDATA #REQUIRED>
+<!ATTLIST AudioEncoderCap maxSampleRate CDATA #REQUIRED>
+<!ATTLIST AudioEncoderCap minChannels (1|2) #REQUIRED>
+<!ATTLIST AudioEncoderCap maxChannels (1|2) #REQUIRED>
+<!ELEMENT VideoDecoderCap EMPTY>
+<!ATTLIST VideoDecoderCap name (wmv) #REQUIRED>
+<!ATTLIST VideoDecoderCap enabled (true|false) #REQUIRED>
+<!ELEMENT AudioDecoderCap EMPTY>
+<!ATTLIST AudioDecoderCap name (wma) #REQUIRED>
+<!ATTLIST AudioDecoderCap enabled (true|false) #REQUIRED>
+]>
+<!--
+ This file is used to declare the multimedia profiles and capabilities
+ on an android-powered device.
+-->
+<MediaSettings>
+ <!-- Each camcorder profile defines a set of predefined configuration parameters -->
+ <CamcorderProfiles>
+
+ <EncoderProfile quality="high" fileFormat="3gp" duration="60">
+ <Video codec="h263"
+ bitRate="360000"
+ width="352"
+ height="288"
+ frameRate="20" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+ </EncoderProfile>
+
+ <EncoderProfile quality="low" fileFormat="3gp" duration="60">
+ <Video codec="h263"
+ bitRate="192000"
+ width="176"
+ height="144"
+ frameRate="20" />
+
+ <Audio codec="amrnb"
+ bitRate="12200"
+ sampleRate="8000"
+ channels="1" />
+
+ </EncoderProfile>
+
+ <ImageEncoding quality="90" />
+ <ImageEncoding quality="80" />
+ <ImageEncoding quality="70" />
+ <ImageDecoding memCap="20000000" />
+
+ <Camera previewFrameRate="0" />
+
+ </CamcorderProfiles>
+
+
+ <EncoderOutputFileFormat name="3gp" />
+ <EncoderOutputFileFormat name="mp4" />
+
+ <!--
+ If a codec is not enabled, it is invisible to the applications
+ In other words, the applications won't be able to use the codec
+ or query the capabilities of the codec at all if it is disabled
+ -->
+ <VideoEncoderCap name="h263" enabled="true"
+ minBitRate="192000" maxBitRate="420000"
+ minFrameWidth="176" maxFrameWidth="352"
+ minFrameHeight="144" maxFrameHeight="288"
+ minFrameRate="1" maxFrameRate="20" />
+
+ <VideoEncoderCap name="m4v" enabled="true"
+ minBitRate="192000" maxBitRate="420000"
+ minFrameWidth="176" maxFrameWidth="352"
+ minFrameHeight="144" maxFrameHeight="288"
+ minFrameRate="1" maxFrameRate="20" />
+
+ <AudioEncoderCap name="amrnb" enabled="true"
+ minBitRate="5525" maxBitRate="12200"
+ minSampleRate="8000" maxSampleRate="8000"
+ minChannels="1" maxChannels="1" />
+
+ <!--
+ FIXME:
+ We do not check decoder capabilities at present
+ At present, we only check whether windows media is visible
+ for TEST applications. For other applications, we do
+ not perform any checks at all.
+ -->
+ <VideoDecoderCap name="wmv" enabled="true"/>
+ <AudioDecoderCap name="wma" enabled="true"/>
+</MediaSettings>
diff --git a/sapphire-keypad.kcm b/sapphire-keypad.kcm
new file mode 100644
index 0000000..2f9af21
--- /dev/null
+++ b/sapphire-keypad.kcm
@@ -0,0 +1,64 @@
+[type=QWERTY]
+
+# keycode display number base caps fn caps_fn
+
+A 'A' '2' 'a' 'A' 'a' 'A'
+B 'B' '2' 'b' 'B' 'b' 'B'
+C 'C' '2' 'c' 'C' 'c' 0x00E7
+D 'D' '3' 'd' 'D' ''' 0x00
+E 'E' '3' 'e' 'E' '"' 0x0301
+F 'F' '3' 'f' 'F' '[' 0x00A5
+G 'G' '4' 'g' 'G' ']' '_'
+H 'H' '4' 'h' 'H' '<' '{'
+I 'I' '4' 'i' 'I' '-' 0x0302
+J 'J' '5' 'j' 'J' '>' '}'
+K 'K' '5' 'k' 'K' ';' '~'
+L 'L' '5' 'l' 'L' ':' '`'
+M 'M' '6' 'm' 'M' '!' 0x00
+N 'N' '6' 'n' 'N' 'n' 0x0303
+O 'O' '6' 'o' 'O' '+' 0x00
+P 'P' '7' 'p' 'P' '=' 0x00
+Q 'Q' '7' 'q' 'Q' '|' 0x0300
+R 'R' '7' 'r' 'R' '`' 0x20AC
+S 'S' '7' 's' 'S' '\' 0x00DF
+T 'T' '8' 't' 'T' '{' 0x00A3
+U 'U' '8' 'u' 'U' '_' 0x0308
+V 'V' '8' 'v' 'V' 'v' 'V'
+W 'W' '9' 'w' 'W' '~' 0x00
+X 'X' '9' 'x' 'X' 'x' 0xEF00
+Y 'Y' '9' 'y' 'Y' '}' 0x00A1
+Z 'Z' '9' 'z' 'Z' 'z' 'Z'
+
+# on pc keyboards
+COMMA ',' ',' ',' ',' ',' ','
+PERIOD '.' '.' '.' '.' '.' 0x2026
+AT '@' 0x00 '@' '@' '@' 0x2022
+SLASH '/' '/' '/' '?' '?' '\'
+
+SPACE 0x20 0x20 0x20 0x20 0xEF01 0xEF01
+ENTER 0xa 0xa 0xa 0xa 0xa 0xa
+
+TAB 0x9 0x9 0x9 0x9 0x9 0x9
+0 '0' '0' '0' ')' ')' ')'
+1 '1' '1' '1' '!' '!' '!'
+2 '2' '2' '2' '"' '"' '"'
+3 '3' '3' '3' '#' '#' '#'
+4 '4' '4' '4' '$' '$' '$'
+5 '5' '5' '5' '%' '%' '%'
+6 '6' '6' '6' '^' '^' '^'
+7 '7' '7' '7' '&' '&' '&'
+8 '8' '8' '8' '*' '*' '*'
+9 '9' '9' '9' '(' '(' '('
+GRAVE '`' '`' '`' '~' '`' '~'
+MINUS '-' '-' '-' '_' '-' '_'
+EQUALS '=' '=' '=' '+' '=' '+'
+LEFT_BRACKET '[' '[' '[' '{' '[' '{'
+RIGHT_BRACKET ']' ']' ']' '}' ']' '}'
+BACKSLASH '\' '\' '\' '|' '\' '|'
+SEMICOLON ';' ';' ';' ':' ';' ':'
+APOSTROPHE ''' ''' ''' '"' ''' '"'
+STAR '*' '*' '*' '*' '*' '*'
+POUND '#' '#' '#' '#' '#' '#'
+PLUS '+' '+' '+' '+' '+' '+'
+
+
diff --git a/sapphire-keypad.kl b/sapphire-keypad.kl
new file mode 100644
index 0000000..d924344
--- /dev/null
+++ b/sapphire-keypad.kl
@@ -0,0 +1,85 @@
+key 399 GRAVE
+key 2 1
+key 3 2
+key 4 3
+key 5 4
+key 6 5
+key 7 6
+key 8 7
+key 9 8
+key 10 9
+key 11 0
+key 158 BACK WAKE_DROPPED
+key 230 SOFT_RIGHT WAKE
+key 60 SOFT_RIGHT WAKE
+key 107 ENDCALL WAKE_DROPPED
+key 62 ENDCALL WAKE_DROPPED
+key 229 MENU WAKE_DROPPED
+key 59 MENU WAKE_DROPPED
+key 139 MENU WAKE_DROPPED
+key 127 SEARCH WAKE_DROPPED
+key 228 POUND
+key 227 STAR
+key 231 CALL WAKE_DROPPED
+key 61 CALL WAKE_DROPPED
+key 232 DPAD_CENTER WAKE_DROPPED
+key 108 DPAD_DOWN WAKE_DROPPED
+key 103 DPAD_UP WAKE_DROPPED
+key 102 HOME WAKE
+key 105 DPAD_LEFT WAKE_DROPPED
+key 106 DPAD_RIGHT WAKE_DROPPED
+key 115 VOLUME_UP WAKE
+key 114 VOLUME_DOWN WAKE
+key 116 POWER WAKE
+key 211 FOCUS
+key 212 CAMERA
+
+key 16 Q
+key 17 W
+key 18 E
+key 19 R
+key 20 T
+key 21 Y
+key 22 U
+key 23 I
+key 24 O
+key 25 P
+key 26 LEFT_BRACKET
+key 27 RIGHT_BRACKET
+key 43 BACKSLASH
+
+key 30 A
+key 31 S
+key 32 D
+key 33 F
+key 34 G
+key 35 H
+key 36 J
+key 37 K
+key 38 L
+key 39 SEMICOLON
+key 40 APOSTROPHE
+key 14 DEL
+
+key 44 Z
+key 45 X
+key 46 C
+key 47 V
+key 48 B
+key 49 N
+key 50 M
+key 51 COMMA
+key 52 PERIOD
+key 53 SLASH
+key 28 ENTER
+
+key 56 ALT_LEFT
+key 42 SHIFT_LEFT
+key 15 TAB
+key 57 SPACE
+key 150 EXPLORER
+key 155 ENVELOPE
+
+key 12 MINUS
+key 13 EQUALS
+key 215 AT
diff --git a/system.prop b/system.prop
new file mode 100644
index 0000000..e5bb39b
--- /dev/null
+++ b/system.prop
@@ -0,0 +1,18 @@
+#
+# system.prop for sapphire
+#
+
+rild.libpath=/system/lib/libhtc_ril.so
+wifi.interface = tiwlan0
+# Time between scans in seconds. Keep it high to minimize battery drain.
+# This only affects the case in which there are remembered access points,
+# but none are in range.
+wifi.supplicant_scan_interval = 15
+
+# density in DPI of the LCD of this board. This is used to scale the UI
+# appropriately. If this property is not defined, the default value is 160 dpi.
+ro.sf.lcd_density = 160
+
+# Default network type
+# 0 => WCDMA Preferred.
+ro.telephony.default_network = 0
diff --git a/vold.fstab b/vold.fstab
new file mode 100644
index 0000000..efbb07b
--- /dev/null
+++ b/vold.fstab
@@ -0,0 +1,18 @@
+## Vold 2.0 fstab for HTC Magic (Sapphire)
+#
+## - San Mehat (san@android.com)
+##
+
+#######################
+## Regular device mount
+##
+## Format: dev_mount <label> <mount_point> <part> <sysfs_path1...>
+## label - Label for the volume
+## mount_point - Where the volume will be mounted
+## part - Partition # (1 based), or 'auto' for first usable partition.
+## <sysfs_path> - List of sysfs paths to source devices
+######################
+
+# Mounts the first usable partition of the specified device
+dev_mount sdcard /mnt/sdcard auto /devices/platform/goldfish_mmc.0 /devices/platform/msm_sdcc.2/mmc_host/mmc1
+
diff --git a/wlan.ko b/wlan.ko
new file mode 100644
index 0000000..276b0af
--- /dev/null
+++ b/wlan.ko
Binary files differ