Compare commits

..

No commits in common. "ics" and "gingerbread-release" have entirely different histories.

119 changed files with 1663 additions and 3985 deletions

4
Android.mk Normal file → Executable file
View File

@ -16,9 +16,11 @@ ifeq ($(TARGET_BOOTLOADER_BOARD_NAME),htcleo)
LOCAL_PATH := $(my-dir)
subdir_makefiles := \
$(LOCAL_PATH)/libreference-ril/Android.mk \
$(LOCAL_PATH)/libsensors/Android.mk \
$(LOCAL_PATH)/liblights/Android.mk \
$(LOCAL_PATH)/libgps/Android.mk
$(LOCAL_PATH)/libgps/Android.mk \
$(LOCAL_PATH)/libhtc_ril_wrapper/Android.mk
include $(subdir_makefiles)

7
AndroidBoard.mk Normal file → Executable file
View File

@ -25,5 +25,12 @@ LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
ALL_PREBUILT += $(INSTALLED_KERNEL_TARGET)
file := $(TARGET_RECOVERY_ROOT_OUT)/sbin/postrecoveryboot.sh
ALL_PREBUILT += $(file)
$(file) : $(LOCAL_PATH)/postrecoveryboot.sh | $(ACP)
$(transform-prebuilt-to-target)
# include the non-open-source counterpart to this file
-include vendor/htc/leo/AndroidBoardVendor.mk

0
AndroidProducts.mk Normal file → Executable file
View File

View File

@ -23,12 +23,11 @@
# WARNING: This line must come *before* including the proprietary
# variant, so that it gets overwritten by the parent (which goes
# against the traditional rules of inheritance).
USE_CAMERA_STUB := true
USE_CAMERA_STUB := false
# inherit from the proprietary version
-include vendor/htc/leo/BoardConfigVendor.mk
TARGET_BOOTLOADER_BOARD_NAME := htcleo
TARGET_NO_BOOTLOADER := true
TARGET_BOARD_PLATFORM := qsd8k
@ -37,119 +36,76 @@ TARGET_BOARD_PLATFORM_GPU := qcom-adreno200
TARGET_CPU_ABI := armeabi-v7a
TARGET_CPU_ABI2 := armeabi
TARGET_ARCH_VARIANT := armv7-a-neon
TARGET_ARCH_VARIANT_CPU := cortex-a8
TARGET_ARCH_VARIANT_FPU := neon
ARCH_ARM_HAVE_TLS_REGISTER := true
ARCH_ARM_HAVE_VFP := true
# FPU compilation flags
TARGET_GLOBAL_CFLAGS += -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
TARGET_GLOBAL_CPPFLAGS += -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
# Call headers from msm-3.0: needed to build libs in hardware/qcom/display
TARGET_SPECIFIC_HEADER_PATH := device/htc/leo/include
TARGET_BOOTLOADER_BOARD_NAME := htcleo
# Wifi related defines
BOARD_WPA_SUPPLICANT_DRIVER := WEXT
BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_wext
WPA_SUPPLICANT_VERSION := VER_0_8_X
WPA_SUPPLICANT_VERSION := VER_0_6_X
BOARD_WLAN_DEVICE := bcm4329
WIFI_DRIVER_MODULE_PATH := "/system/lib/modules/bcm4329.ko"
WIFI_DRIVER_FW_PATH_STA := "/vendor/firmware/fw_bcm4329.bin"
WIFI_DRIVER_FW_PATH_AP := "/vendor/firmware/fw_bcm4329_apsta.bin"
WIFI_DRIVER_MODULE_ARG := "iface_name=wlan firmware_path=/vendor/firmware/fw_bcm4329.bin nvram_path=/proc/calibration"
WIFI_DRIVER_FW_STA_PATH := "/vendor/firmware/fw_bcm4329.bin"
WIFI_DRIVER_FW_AP_PATH := "/vendor/firmware/fw_bcm4329_apsta.bin"
WIFI_DRIVER_MODULE_ARG := "firmware_path=/vendor/firmware/fw_bcm4329.bin nvram_path=/proc/calibration"
WIFI_DRIVER_MODULE_NAME := "bcm4329"
BOARD_KERNEL_CMDLINE := no_console_suspend=1 wire.search_count=5
BOARD_USES_GENERIC_AUDIO := false
BOARD_KERNEL_BASE := 0x11800000
BOARD_KERNEL_NEW_PPPOX := true
BOARD_HAVE_BLUETOOTH := true
BOARD_HAVE_BLUETOOTH_BCM := true
BOARD_VENDOR_QCOM_AMSS_VERSION := 3200
#BOARD_USES_QCOM_LIBRPC := true
BOARD_VENDOR_QCOM_AMSS_VERSION := 1550
BOARD_VENDOR_USE_AKMD := akm8973
BOARD_EGL_CFG := device/htc/leo/egl.cfg
BOARD_USE_FROYO_LIBCAMERA := true
TARGET_USES_16BPPSURFACE_FOR_OPAQUE := true
BOARD_NO_RGBX_8888 := true
BOARD_USES_QCOM_LIBS := true
BOARD_USE_KINETO_COMPATIBILITY := true
BOARD_HAVE_FM_RADIO := true
BOARD_GLOBAL_CFLAGS += -DHAVE_FM_RADIO
# RIL
BOARD_USE_NEW_LIBRIL_HTC := true
# Use Special Leo update
TARGET_USES_LEOUPDATE := true
# Hardware rendering
BOARD_EGL_CFG := device/htc/leo/prebuilt/egl.cfg
USE_OPENGL_RENDERER := true
TARGET_USES_GENLOCK := true
TARGET_USES_16BPPSURFACE_FOR_OPAQUE := true
# We only have 2 buffers so still need to hack it.
COMMON_GLOBAL_CFLAGS += -DMISSING_GRALLOC_BUFFERS
# Just a safety measure to make sure its all included
COMMON_GLOBAL_CFLAGS += -DQCOM_HARDWARE
# Force refresh rate since fps calc is broke and reports 0
COMMON_GLOBAL_CFLAGS += -DREFRESH_RATE=60
# qsd8k: no support for overlay, bypass, or c2d
TARGET_USE_OVERLAY := false
TARGET_HAVE_BYPASS := false
TARGET_USES_C2D_COMPOSITION := false
# Allow fallback to ashmem
TARGET_GRALLOC_USES_ASHMEM := true
BOARD_ADRENO_DECIDE_TEXTURE_TARGET := true
COMMON_GLOBAL_CFLAGS += -DEGL_TRACE
BOARD_USES_QCOM_LIBS := true
BOARD_USES_QCOM_HARDWARE := true
TARGET_CUSTOM_RELEASETOOL := device/htc/leo/releasetools/squisher
# # cat /proc/mtd
# dev: size erasesize name
#mtd0: 00100000 00020000 "misc"
#mtd1: 00500000 00020000 "recovery"
#mtd2: 00500000 00020000 "boot"
#mtd3: 0aa00000 00020000 "system"
#mtd3: 09600000 00020000 "system"
#mtd4: 02c00000 00020000 "cache"
#mtd5: 0d900000 00020000 "userdata"
BOARD_BOOTIMAGE_PARTITION_SIZE := 0x00500000
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 0x00500000
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 0x0de00000
BOARD_USERDATAIMAGE_PARTITION_SIZE := 0x0c800000
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 0x09600000 # limited so we enforce room to grow
BOARD_USERDATAIMAGE_PARTITION_SIZE := 0x0d900000
BOARD_FLASH_BLOCK_SIZE := 131072
TARGET_RELEASETOOLS_EXTENSIONS := device/htc/common
# Define kernel config for inline building
TARGET_KERNEL_CONFIG := htcleo_defconfig
TARGET_PREBUILT_KERNEL := device/htc/leo/prebuilt/kernel
TARGET_PREBUILT_KERNEL := device/htc/leo/kernel
# to enable the GPS HAL
BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE := leo
# AMSS version to use for GPS
BOARD_VENDOR_QCOM_GPS_LOC_API_AMSS_VERSION := 3200
BOARD_USES_GPSSHIM := true
BOARD_GPS_LIBRARIES := libgps librpc
TARGET_PREBUILT_RECOVERY_KERNEL := device/htc/leo/recovery_kernel
TARGET_PREBUILT_RECOVERY_KERNEL := device/htc/leo/prebuilt/recovery_kernel
# Misc
BOARD_USE_OPENSSL_ENGINE := true
# Hacks
TARGET_USE_CUSTOM_LUN_FILE_PATH := /sys/devices/platform/usb_mass_storage/lun0/file
BOARD_USE_LEGACY_TRACKPAD := true
BOARD_USE_LEGACY_TOUCHSCREEN := true
TARGET_FORCE_CPU_UPLOAD := true
# Enable WEBGL in WebKit
ENABLE_WEBGL := true
BOARD_USES_RECOVERY_CHARGEMODE := true
TARGET_PROVIDES_INIT_RC := true

2
README
View File

@ -1,6 +1,6 @@
Device configuration for the HTC LEO (AKA HD2)
Copyright (C) 2012 The CyanogenMod Project
Copyright (C) 2011 The CyanogenMod Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

View File

@ -1,7 +0,0 @@
[
{
"repository": "android_kernel_cmhtcleo",
"target_path": "kernel/htc/leo",
"branch": "ics"
}
]

21
cm.mk
View File

@ -1,21 +0,0 @@
# Inherit AOSP device configuration for leo.
$(call inherit-product, device/htc/leo/full_leo.mk)
# Inherit some common cyanogenmod stuff.
$(call inherit-product, vendor/cm/config/common_full_phone.mk)
# Include GSM stuff
$(call inherit-product, vendor/cm/config/gsm.mk)
## Device identifier. This must come after all inclusions
PRODUCT_MODEL := HD2
PRODUCT_MANUFACTURER := HTC
PRODUCT_BRAND := htc
PRODUCT_DEVICE := leo
PRODUCT_NAME := cm_leo
PRODUCT_CODENAME := leo
# Set build fingerprint / ID / Prduct Name ect.
PRODUCT_BUILD_PROP_OVERRIDES += PRODUCT_NAME=leo BUILD_ID=IMM76I BUILD_DISPLAY_ID=IMM76I BUILD_FINGERPRINT="google/htc_leo/leo:4.0.4/IMM76I/239410:user/release-keys" PRVIATE_BUILD_DESC="full_leo-user 4.0.4 IMM76I 239410 release-keys"

View File

@ -1,47 +0,0 @@
#!/bin/sh
# 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.
DEVICE=leo
MANUFACTURER=htc
STAGESYS=~/cm-$DEVICE/system
if [ "$1" = "pull" ]; then
if [ -s "$STAGESYS" ]; then
rm -R ~/cm-$DEVICE
fi
mkdir ~/cm-$DEVICE
mkdir $STAGESYS
mkdir $STAGESYS/bin
mkdir $STAGESYS/lib
mkdir $STAGESYS/etc
adb pull /system/bin $STAGESYS/bin
adb pull /system/lib $STAGESYS/lib
adb pull /system/etc $STAGESYS/etc
fi
OUTDIR=../../../vendor/$MANUFACTURER/$DEVICE
BASE=$OUTDIR/proprietary
rm -rf $BASE/*
for FILE in `cat proprietary-files.txt | grep -v ^# | grep -v ^$`; do
DIR=`dirname $FILE`
if [ ! -d $BASE/$DIR ]; then
mkdir -p $BASE/$DIR
fi
cp $STAGESYS/$FILE $BASE/$FILE
done
./setup-makefiles.sh

2
egl.cfg Executable file
View File

@ -0,0 +1,2 @@
0 0 android
0 1 adreno200

View File

@ -19,15 +19,92 @@
DEVICE=leo
MANUFACTURER=htc
BASE=../../../vendor/$MANUFACTURER/$DEVICE/proprietary
rm -rf $BASE/*
mkdir -p ../../../vendor/$MANUFACTURER/$DEVICE/proprietary
adb pull /system/bin/akmd ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/akmd
chmod 755 ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/akmd
adb pull /system/bin/parse_radio_log ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/parse_radio_log
chmod 755 ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/parse_radio_log
adb pull /system/etc/AudioBTID.csv ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/AudioBTID.csv
adb pull /system/etc/AdieHWCodecSetting.csv ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/AdieHWCodecSetting.csv
adb pull /system/etc/firmware/BCM4329B1_002.002.023.0360.0362.hcd ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/BCM4329B1_002.002.023.0360.0362.hcd
adb pull /system/etc/firmware/BCM4329B1_002.002.023.0436.0439.hcd ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/BCM4329B1_002.002.023.0436.0439.hcd
adb pull /system/etc/firmware/BCM4329B1_002.002.023.0436.0439.hcd ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/BCM4329B1_002.002.023.0436.0439.hcd
adb pull /system/etc/firmware/BCM4329B1_002.002.023.0511.0538.hcd ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/BCM4329B1_002.002.023.0511.0538.hcd
adb pull /system/etc/firmware/bcm4329.hcd ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/bcm4329.hcd
adb pull /system/etc/firmware/htcleo.acdb ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/htcleo.acdb
adb pull /system/etc/firmware/default.acdb ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/default.acdb
adb pull /system/etc/firmware/yamato_pfp.fw ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/yamato_pfp.fw
adb pull /system/etc/firmware/yamato_pm4.fw ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/yamato_pm4.fw
adb pull /system/lib/egl/libEGL_adreno200.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libEGL_adreno200.so
adb pull /system/lib/egl/libGLESv1_CM_adreno200.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libGLESv1_CM_adreno200.so
adb pull /system/lib/egl/libGLESv2_adreno200.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libGLESv2_adreno200.so
adb pull /system/lib/egl/libq3dtools_adreno200.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libq3dtools_adreno200.so
adb pull /system/lib/libcamera.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libcamera.so
adb pull /system/lib/libgsl.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libgsl.so
adb pull /system/lib/libhtc_acoustic.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libhtc_acoustic.so
adb pull /system/lib/libhtc_ril.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libhtc_ril.so
adb pull /system/lib/libhtc_ril_wrapper.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libhtc_ril_wrapper.so
adb pull /system/lib/liboemcamera.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/liboemcamera.so
adb pull /system/lib/libOmxVdec.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libOmxVdec.so
adb pull /system/lib/libOmxVidEnc.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libOmxVidEnc.so
adb pull /system/lib/libOmxCore.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libOmxCore.so
adb pull /system/lib/libmm-omxcore.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libmm-omxcore.so
adb pull /system/lib/libgps.so ..h/../../vendor/$MANUFACTURER/$DEVICE/proprietary/libgps.so
adb pull /system/lib/hw/gps.htcleo.so ..h/../../vendor/$MANUFACTURER/$DEVICE/proprietary/gps.htcleo.so
for FILE in `cat proprietary-files.txt | grep -v ^# | grep -v ^$`; do
DIR=`dirname $FILE`
if [ ! -d $BASE/$DIR ]; then
mkdir -p $BASE/$DIR
fi
adb pull /system/$FILE $BASE/$FILE
done
(cat << EOF) | sed s/__DEVICE__/$DEVICE/g | sed s/__MANUFACTURER__/$MANUFACTURER/g > ../../../vendor/$MANUFACTURER/$DEVICE/device-vendor-blobs.mk
# 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.
# This file is generated by device/__MANUFACTURER__/__DEVICE__/extract-files.sh - DO NOT EDIT
# Prebuilt libraries that are needed to build open-source libraries
PRODUCT_COPY_FILES := \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libcamera.so:obj/lib/libcamera.so
# All the blobs necessary for leo
PRODUCT_COPY_FILES += \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/akmd:system/bin/akmd \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/parse_radio_log:system/bin/parse_radio_log \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/AudioBTID.csv:system/etc/AudioBTID.csv \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/AdieHWCodecSetting.csv:system/etc/AdieHWCodecSetting.csv \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/bcm4329.hcd:system/etc/firmware/bcm4329.hcd \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/BCM4329B1_002.002.023.0360.0362.hcd:system/etc/firmware/BCM4329B1_002.002.023.0360.0362.hcd \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/BCM4329B1_002.002.023.0436.0439.hcd:system/etc/firmware/BCM4329B1_002.002.023.0436.0439.hcd \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/BCM4329B1_002.002.023.0511.0538.hcd:system/etc/firmware/BCM4329B1_002.002.023.0511.0538.hcd \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/htcleo.acdb:system/etc/firmware/htcleo.acdb \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/bcm4329.hcd:system/etc/firmware/bcm4329.hcd \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/htcleo.acdb:system/etc/firmware/htcleo.acdb \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/default.acdb:system/etc/firmware/default.acdb \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/yamato_pfp.fw:system/etc/firmware/yamato_pfp.fw \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/yamato_pm4.fw:system/etc/firmware/yamato_pm4.fw \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libEGL_adreno200.so:system/lib/egl/libEGL_adreno200.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libGLESv1_CM_adreno200.so:system/lib/egl/libGLESv1_CM_adreno200.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libGLESv2_adreno200.so:system/lib/egl/libGLESv2_adreno200.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libq3dtools_adreno200.so:system/lib/egl/libq3dtools_adreno200.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libcamera.so:system/lib/libcamera.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libgsl.so:system/lib/libgsl.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libhtc_acoustic.so:system/lib/libhtc_acoustic.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libhtc_ril.so:system/lib/libhtc_ril.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libhtc_ril_wrapper.so:system/lib/libhtc_ril_wrapper.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/liboemcamera.so:system/lib/liboemcamera.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libOmxVdec.so:system/lib/libOmxVdec.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libOmxVidEnc.so:system/lib/libOmxVidEnc.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libOmxCore.so:system/lib/libOmxCore.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/gps.htcleo.so:system/lib/hw/gps.htcleo.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libgps.so:system/lib/libgps.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/sensors.bravo.so:system/lib/hw/sensors.bravo.so \\
EOF
./setup-makefiles.sh

BIN
firmware/fw_bcm4329.bin Executable file

Binary file not shown.

BIN
firmware/fw_bcm4329_apsta.bin Executable file

Binary file not shown.

5
full_leo.mk Normal file → Executable file
View File

@ -22,10 +22,7 @@
# Inherit from those products. Most specific first.
$(call inherit-product, $(SRC_TARGET_DIR)/product/languages_full.mk)
$(call inherit-product, device/htc/leo/leo_eu.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk)
# Leo uses high-density artwork where available
PRODUCT_LOCALES += hdpi mdpi
$(call inherit-product, $(SRC_TARGET_DIR)/product/full.mk)
# Discard inherited values and use our own instead.
PRODUCT_NAME := full_leo

0
generic_leo.mk Normal file → Executable file
View File

14
goo.mk
View File

@ -1,14 +0,0 @@
#
# Copyright (C) 2012 the cmhtcleo team
#
# GooManager specific stuff
#
PRODUCT_PROPERTY_OVERRIDES += \
ro.goo.developerid=cmhtcleo \
ro.goo.rom=cm9nightly \
ro.goo.version=$(shell date +%s)
# include goo manager
PRODUCT_COPY_FILES += \
device/htc/leo/prebuilt/GooManager.apk:system/app/GooManager.apk

View File

@ -1,169 +0,0 @@
/* include/linux/android_pmem.h
*
* Copyright (C) 2007 Google, Inc.
* Copyright (c) 2009-2010, Code Aurora Forum. All rights reserved.
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*/
#ifndef _ANDROID_PMEM_H_
#define _ANDROID_PMEM_H_
#include <linux/fs.h>
#define PMEM_KERNEL_TEST_MAGIC 0xc0
#define PMEM_KERNEL_TEST_NOMINAL_TEST_IOCTL \
_IO(PMEM_KERNEL_TEST_MAGIC, 1)
#define PMEM_KERNEL_TEST_ADVERSARIAL_TEST_IOCTL \
_IO(PMEM_KERNEL_TEST_MAGIC, 2)
#define PMEM_KERNEL_TEST_HUGE_ALLOCATION_TEST_IOCTL \
_IO(PMEM_KERNEL_TEST_MAGIC, 3)
#define PMEM_KERNEL_TEST_FREE_UNALLOCATED_TEST_IOCTL \
_IO(PMEM_KERNEL_TEST_MAGIC, 4)
#define PMEM_KERNEL_TEST_LARGE_REGION_NUMBER_TEST_IOCTL \
_IO(PMEM_KERNEL_TEST_MAGIC, 5)
#define PMEM_IOCTL_MAGIC 'p'
#define PMEM_GET_PHYS _IOW(PMEM_IOCTL_MAGIC, 1, unsigned int)
#define PMEM_MAP _IOW(PMEM_IOCTL_MAGIC, 2, unsigned int)
#define PMEM_GET_SIZE _IOW(PMEM_IOCTL_MAGIC, 3, unsigned int)
#define PMEM_UNMAP _IOW(PMEM_IOCTL_MAGIC, 4, unsigned int)
/* This ioctl will allocate pmem space, backing the file, it will fail
* if the file already has an allocation, pass it the len as the argument
* to the ioctl */
#define PMEM_ALLOCATE _IOW(PMEM_IOCTL_MAGIC, 5, unsigned int)
/* This will connect a one pmem file to another, pass the file that is already
* backed in memory as the argument to the ioctl
*/
#define PMEM_CONNECT _IOW(PMEM_IOCTL_MAGIC, 6, unsigned int)
/* Returns the total size of the pmem region it is sent to as a pmem_region
* struct (with offset set to 0).
*/
#define PMEM_GET_TOTAL_SIZE _IOW(PMEM_IOCTL_MAGIC, 7, unsigned int)
/* Revokes gpu registers and resets the gpu. Pass a pointer to the
* start of the mapped gpu regs (the vaddr returned by mmap) as the argument.
*/
#define HW3D_REVOKE_GPU _IOW(PMEM_IOCTL_MAGIC, 8, unsigned int)
#define PMEM_CACHE_FLUSH _IOW(PMEM_IOCTL_MAGIC, 8, unsigned int)
#define HW3D_GRANT_GPU _IOW(PMEM_IOCTL_MAGIC, 9, unsigned int)
#define PMEM_CLEAN_INV_CACHES _IOW(PMEM_IOCTL_MAGIC, 11, unsigned int)
#define PMEM_CLEAN_CACHES _IOW(PMEM_IOCTL_MAGIC, 12, unsigned int)
#define PMEM_INV_CACHES _IOW(PMEM_IOCTL_MAGIC, 13, unsigned int)
#define PMEM_GET_FREE_SPACE _IOW(PMEM_IOCTL_MAGIC, 14, unsigned int)
#define PMEM_ALLOCATE_ALIGNED _IOW(PMEM_IOCTL_MAGIC, 15, unsigned int)
struct pmem_region {
unsigned long offset;
unsigned long len;
};
struct pmem_addr {
unsigned long vaddr;
unsigned long offset;
unsigned long length;
};
struct pmem_freespace {
unsigned long total;
unsigned long largest;
};
struct pmem_allocation {
unsigned long size;
unsigned int align;
};
#ifdef __KERNEL__
int get_pmem_file(unsigned int fd, unsigned long *start, unsigned long *vstart,
unsigned long *end, struct file **filp);
int get_pmem_fd(int fd, unsigned long *start, unsigned long *end);
int get_pmem_user_addr(struct file *file, unsigned long *start,
unsigned long *end);
void put_pmem_file(struct file* file);
void put_pmem_fd(int fd);
void flush_pmem_fd(int fd, unsigned long start, unsigned long len);
void flush_pmem_file(struct file *file, unsigned long start, unsigned long len);
int pmem_cache_maint(struct file *file, unsigned int cmd,
struct pmem_addr *pmem_addr);
enum pmem_allocator_type {
/* Zero is a default in platform PMEM structures in the board files,
* when the "allocator_type" structure element is not explicitly
* defined
*/
PMEM_ALLOCATORTYPE_BITMAP = 0, /* forced to be zero here */
PMEM_ALLOCATORTYPE_ALLORNOTHING,
PMEM_ALLOCATORTYPE_BUDDYBESTFIT,
PMEM_ALLOCATORTYPE_MAX,
};
#define PMEM_MEMTYPE_MASK 0x7
#define PMEM_INVALID_MEMTYPE 0x0
#define PMEM_MEMTYPE_EBI1 0x1
#define PMEM_MEMTYPE_SMI 0x2
#define PMEM_MEMTYPE_RESERVED_INVALID2 0x3
#define PMEM_MEMTYPE_RESERVED_INVALID3 0x4
#define PMEM_MEMTYPE_RESERVED_INVALID4 0x5
#define PMEM_MEMTYPE_RESERVED_INVALID5 0x6
#define PMEM_MEMTYPE_RESERVED_INVALID6 0x7
#define PMEM_ALIGNMENT_MASK 0x18
#define PMEM_ALIGNMENT_RESERVED_INVALID1 0x0
#define PMEM_ALIGNMENT_4K 0x8 /* the default */
#define PMEM_ALIGNMENT_1M 0x10
#define PMEM_ALIGNMENT_RESERVED_INVALID2 0x18
/* flags in the following function defined as above. */
int32_t pmem_kalloc(const size_t size, const uint32_t flags);
int32_t pmem_kfree(const int32_t physaddr);
/* kernel api names for board specific data structures */
#define PMEM_KERNEL_EBI1_DATA_NAME "pmem_kernel_ebi1"
#define PMEM_KERNEL_SMI_DATA_NAME "pmem_kernel_smi"
struct android_pmem_platform_data
{
const char* name;
/* starting physical address of memory region */
unsigned long start;
/* size of memory region */
unsigned long size;
enum pmem_allocator_type allocator_type;
/* treated as a 'hidden' variable in the board files. Can be
* set, but default is the system init value of 0 which becomes a
* quantum of 4K pages.
*/
unsigned int quantum;
/* set to indicate maps of this region should be cached, if a mix of
* cached and uncached is desired, set this and open the device with
* O_SYNC to get an uncached region */
unsigned cached;
/* The MSM7k has bits to enable a write buffer in the bus controller*/
unsigned buffered;
/* This PMEM is on memory that may be powered off */
unsigned unstable;
};
int pmem_setup(struct android_pmem_platform_data *pdata,
long (*ioctl)(struct file *, unsigned int, unsigned long),
int (*release)(struct inode *, struct file *));
int pmem_remap(struct pmem_region *region, struct file *file,
unsigned operation);
#endif /* __KERNEL__ */
#endif //_ANDROID_PPP_H_

View File

@ -1,45 +0,0 @@
#ifndef _GENLOCK_H_
#define _GENLOCK_H_
#ifdef __KERNEL__
struct genlock;
struct genlock_handle;
struct genlock_handle *genlock_get_handle(void);
struct genlock_handle *genlock_get_handle_fd(int fd);
void genlock_put_handle(struct genlock_handle *handle);
struct genlock *genlock_create_lock(struct genlock_handle *);
struct genlock *genlock_attach_lock(struct genlock_handle *, int fd);
int genlock_wait(struct genlock_handle *handle, u32 timeout);
void genlock_release_lock(struct genlock_handle *);
int genlock_lock(struct genlock_handle *handle, int op, int flags,
u32 timeout);
#endif
#define GENLOCK_UNLOCK 0
#define GENLOCK_WRLOCK 1
#define GENLOCK_RDLOCK 2
#define GENLOCK_NOBLOCK (1 << 0)
struct genlock_lock {
int fd;
int op;
int flags;
int timeout;
};
#define GENLOCK_IOC_MAGIC 'G'
#define GENLOCK_IOC_NEW _IO(GENLOCK_IOC_MAGIC, 0)
#define GENLOCK_IOC_EXPORT _IOR(GENLOCK_IOC_MAGIC, 1, \
struct genlock_lock)
#define GENLOCK_IOC_ATTACH _IOW(GENLOCK_IOC_MAGIC, 2, \
struct genlock_lock)
#define GENLOCK_IOC_LOCK _IOW(GENLOCK_IOC_MAGIC, 3, \
struct genlock_lock)
#define GENLOCK_IOC_RELEASE _IO(GENLOCK_IOC_MAGIC, 4)
#define GENLOCK_IOC_WAIT _IOW(GENLOCK_IOC_MAGIC, 5, \
struct genlock_lock)
#endif

View File

@ -1,463 +0,0 @@
/* Copyright (c) 2002,2007-2011, Code Aurora Forum. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, and the entire permission notice in its entirety,
* including the disclaimer of warranties.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote
* products derived from this software without specific prior
* written permission.
*
* ALTERNATIVELY, this product may be distributed under the terms of
* the GNU General Public License, version 2, in which case the provisions
* of the GPL version 2 are required INSTEAD OF the BSD license.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
* WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
*/
#ifndef _MSM_KGSL_H
#define _MSM_KGSL_H
#define KGSL_VERSION_MAJOR 3
#define KGSL_VERSION_MINOR 7
/*context flags */
#define KGSL_CONTEXT_SAVE_GMEM 1
#define KGSL_CONTEXT_NO_GMEM_ALLOC 2
#define KGSL_CONTEXT_SUBMIT_IB_LIST 4
#define KGSL_CONTEXT_CTX_SWITCH 8
/* Memory allocayion flags */
#define KGSL_MEMFLAGS_GPUREADONLY 0x01000000
/* generic flag values */
#define KGSL_FLAGS_NORMALMODE 0x00000000
#define KGSL_FLAGS_SAFEMODE 0x00000001
#define KGSL_FLAGS_INITIALIZED0 0x00000002
#define KGSL_FLAGS_INITIALIZED 0x00000004
#define KGSL_FLAGS_STARTED 0x00000008
#define KGSL_FLAGS_ACTIVE 0x00000010
#define KGSL_FLAGS_RESERVED0 0x00000020
#define KGSL_FLAGS_RESERVED1 0x00000040
#define KGSL_FLAGS_RESERVED2 0x00000080
#define KGSL_FLAGS_SOFT_RESET 0x00000100
#define KGSL_MAX_PWRLEVELS 5
/* device id */
enum kgsl_deviceid {
KGSL_DEVICE_3D0 = 0x00000000,
KGSL_DEVICE_2D0 = 0x00000001,
KGSL_DEVICE_2D1 = 0x00000002,
KGSL_DEVICE_MAX = 0x00000003
};
enum kgsl_user_mem_type {
KGSL_USER_MEM_TYPE_PMEM = 0x00000000,
KGSL_USER_MEM_TYPE_ASHMEM = 0x00000001,
KGSL_USER_MEM_TYPE_ADDR = 0x00000002
};
struct kgsl_devinfo {
unsigned int device_id;
/* chip revision id
* coreid:8 majorrev:8 minorrev:8 patch:8
*/
unsigned int chip_id;
unsigned int mmu_enabled;
unsigned int gmem_gpubaseaddr;
/* if gmem_hostbaseaddr is NULL, we would know its not mapped into
* mmio space */
unsigned int gmem_hostbaseaddr;
unsigned int gmem_sizebytes;
};
/* this structure defines the region of memory that can be mmap()ed from this
driver. The timestamp fields are volatile because they are written by the
GPU
*/
struct kgsl_devmemstore {
volatile unsigned int soptimestamp;
unsigned int sbz;
volatile unsigned int eoptimestamp;
unsigned int sbz2;
volatile unsigned int ts_cmp_enable;
unsigned int sbz3;
volatile unsigned int ref_wait_ts;
unsigned int sbz4;
unsigned int current_context;
unsigned int sbz5;
};
#define KGSL_DEVICE_MEMSTORE_OFFSET(field) \
offsetof(struct kgsl_devmemstore, field)
/* timestamp id*/
enum kgsl_timestamp_type {
KGSL_TIMESTAMP_CONSUMED = 0x00000001, /* start-of-pipeline timestamp */
KGSL_TIMESTAMP_RETIRED = 0x00000002, /* end-of-pipeline timestamp*/
KGSL_TIMESTAMP_MAX = 0x00000002,
};
/* property types - used with kgsl_device_getproperty */
enum kgsl_property_type {
KGSL_PROP_DEVICE_INFO = 0x00000001,
KGSL_PROP_DEVICE_SHADOW = 0x00000002,
KGSL_PROP_DEVICE_POWER = 0x00000003,
KGSL_PROP_SHMEM = 0x00000004,
KGSL_PROP_SHMEM_APERTURES = 0x00000005,
KGSL_PROP_MMU_ENABLE = 0x00000006,
KGSL_PROP_INTERRUPT_WAITS = 0x00000007,
KGSL_PROP_VERSION = 0x00000008,
};
struct kgsl_shadowprop {
unsigned int gpuaddr;
unsigned int size;
unsigned int flags; /* contains KGSL_FLAGS_ values */
};
struct kgsl_pwrlevel {
unsigned int gpu_freq;
unsigned int bus_freq;
};
struct kgsl_version {
unsigned int drv_major;
unsigned int drv_minor;
unsigned int dev_major;
unsigned int dev_minor;
};
#ifdef __KERNEL__
#define KGSL_3D0_REG_MEMORY "kgsl_3d0_reg_memory"
#define KGSL_3D0_IRQ "kgsl_3d0_irq"
#define KGSL_2D0_REG_MEMORY "kgsl_2d0_reg_memory"
#define KGSL_2D0_IRQ "kgsl_2d0_irq"
#define KGSL_2D1_REG_MEMORY "kgsl_2d1_reg_memory"
#define KGSL_2D1_IRQ "kgsl_2d1_irq"
struct kgsl_grp_clk_name {
const char *clk;
const char *pclk;
};
struct kgsl_device_pwr_data {
struct kgsl_pwrlevel pwrlevel[KGSL_MAX_PWRLEVELS];
int init_level;
int num_levels;
int (*set_grp_async)(void);
unsigned int idle_timeout;
unsigned int nap_allowed;
unsigned int idle_pass;
};
struct kgsl_clk_data {
struct kgsl_grp_clk_name name;
struct msm_bus_scale_pdata *bus_scale_table;
};
struct kgsl_device_platform_data {
struct kgsl_device_pwr_data pwr_data;
struct kgsl_clk_data clk;
/* imem_clk_name is for 3d only, not used in 2d devices */
struct kgsl_grp_clk_name imem_clk_name;
};
#endif
/* structure holds list of ibs */
struct kgsl_ibdesc {
unsigned int gpuaddr;
void *hostptr;
unsigned int sizedwords;
unsigned int ctrl;
};
/* ioctls */
#define KGSL_IOC_TYPE 0x09
/* get misc info about the GPU
type should be a value from enum kgsl_property_type
value points to a structure that varies based on type
sizebytes is sizeof() that structure
for KGSL_PROP_DEVICE_INFO, use struct kgsl_devinfo
this structure contaings hardware versioning info.
for KGSL_PROP_DEVICE_SHADOW, use struct kgsl_shadowprop
this is used to find mmap() offset and sizes for mapping
struct kgsl_memstore into userspace.
*/
struct kgsl_device_getproperty {
unsigned int type;
void *value;
unsigned int sizebytes;
};
#define IOCTL_KGSL_DEVICE_GETPROPERTY \
_IOWR(KGSL_IOC_TYPE, 0x2, struct kgsl_device_getproperty)
/* read a GPU register.
offsetwords it the 32 bit word offset from the beginning of the
GPU register space.
*/
struct kgsl_device_regread {
unsigned int offsetwords;
unsigned int value; /* output param */
};
#define IOCTL_KGSL_DEVICE_REGREAD \
_IOWR(KGSL_IOC_TYPE, 0x3, struct kgsl_device_regread)
/* block until the GPU has executed past a given timestamp
* timeout is in milliseconds.
*/
struct kgsl_device_waittimestamp {
unsigned int timestamp;
unsigned int timeout;
};
#define IOCTL_KGSL_DEVICE_WAITTIMESTAMP \
_IOW(KGSL_IOC_TYPE, 0x6, struct kgsl_device_waittimestamp)
/* issue indirect commands to the GPU.
* drawctxt_id must have been created with IOCTL_KGSL_DRAWCTXT_CREATE
* ibaddr and sizedwords must specify a subset of a buffer created
* with IOCTL_KGSL_SHAREDMEM_FROM_PMEM
* flags may be a mask of KGSL_CONTEXT_ values
* timestamp is a returned counter value which can be passed to
* other ioctls to determine when the commands have been executed by
* the GPU.
*/
struct kgsl_ringbuffer_issueibcmds {
unsigned int drawctxt_id;
unsigned int ibdesc_addr;
unsigned int numibs;
unsigned int timestamp; /*output param */
unsigned int flags;
};
#define IOCTL_KGSL_RINGBUFFER_ISSUEIBCMDS \
_IOWR(KGSL_IOC_TYPE, 0x10, struct kgsl_ringbuffer_issueibcmds)
/* read the most recently executed timestamp value
* type should be a value from enum kgsl_timestamp_type
*/
struct kgsl_cmdstream_readtimestamp {
unsigned int type;
unsigned int timestamp; /*output param */
};
#define IOCTL_KGSL_CMDSTREAM_READTIMESTAMP_OLD \
_IOR(KGSL_IOC_TYPE, 0x11, struct kgsl_cmdstream_readtimestamp)
#define IOCTL_KGSL_CMDSTREAM_READTIMESTAMP \
_IOWR(KGSL_IOC_TYPE, 0x11, struct kgsl_cmdstream_readtimestamp)
/* free memory when the GPU reaches a given timestamp.
* gpuaddr specify a memory region created by a
* IOCTL_KGSL_SHAREDMEM_FROM_PMEM call
* type should be a value from enum kgsl_timestamp_type
*/
struct kgsl_cmdstream_freememontimestamp {
unsigned int gpuaddr;
unsigned int type;
unsigned int timestamp;
};
#define IOCTL_KGSL_CMDSTREAM_FREEMEMONTIMESTAMP \
_IOW(KGSL_IOC_TYPE, 0x12, struct kgsl_cmdstream_freememontimestamp)
/* Previous versions of this header had incorrectly defined
IOCTL_KGSL_CMDSTREAM_FREEMEMONTIMESTAMP as a read-only ioctl instead
of a write only ioctl. To ensure binary compatability, the following
#define will be used to intercept the incorrect ioctl
*/
#define IOCTL_KGSL_CMDSTREAM_FREEMEMONTIMESTAMP_OLD \
_IOR(KGSL_IOC_TYPE, 0x12, struct kgsl_cmdstream_freememontimestamp)
/* create a draw context, which is used to preserve GPU state.
* The flags field may contain a mask KGSL_CONTEXT_* values
*/
struct kgsl_drawctxt_create {
unsigned int flags;
unsigned int drawctxt_id; /*output param */
};
#define IOCTL_KGSL_DRAWCTXT_CREATE \
_IOWR(KGSL_IOC_TYPE, 0x13, struct kgsl_drawctxt_create)
/* destroy a draw context */
struct kgsl_drawctxt_destroy {
unsigned int drawctxt_id;
};
#define IOCTL_KGSL_DRAWCTXT_DESTROY \
_IOW(KGSL_IOC_TYPE, 0x14, struct kgsl_drawctxt_destroy)
/* add a block of pmem, fb, ashmem or user allocated address
* into the GPU address space */
struct kgsl_map_user_mem {
int fd;
unsigned int gpuaddr; /*output param */
unsigned int len;
unsigned int offset;
unsigned int hostptr; /*input param */
enum kgsl_user_mem_type memtype;
unsigned int reserved; /* May be required to add
params for another mem type */
};
#define IOCTL_KGSL_MAP_USER_MEM \
_IOWR(KGSL_IOC_TYPE, 0x15, struct kgsl_map_user_mem)
/* add a block of pmem or fb into the GPU address space */
struct kgsl_sharedmem_from_pmem {
int pmem_fd;
unsigned int gpuaddr; /*output param */
unsigned int len;
unsigned int offset;
};
#define IOCTL_KGSL_SHAREDMEM_FROM_PMEM \
_IOWR(KGSL_IOC_TYPE, 0x20, struct kgsl_sharedmem_from_pmem)
/* remove memory from the GPU's address space */
struct kgsl_sharedmem_free {
unsigned int gpuaddr;
};
#define IOCTL_KGSL_SHAREDMEM_FREE \
_IOW(KGSL_IOC_TYPE, 0x21, struct kgsl_sharedmem_free)
struct kgsl_cff_user_event {
unsigned char cff_opcode;
unsigned int op1;
unsigned int op2;
unsigned int op3;
unsigned int op4;
unsigned int op5;
unsigned int __pad[2];
};
#define IOCTL_KGSL_CFF_USER_EVENT \
_IOW(KGSL_IOC_TYPE, 0x31, struct kgsl_cff_user_event)
struct kgsl_gmem_desc {
unsigned int x;
unsigned int y;
unsigned int width;
unsigned int height;
unsigned int pitch;
};
struct kgsl_buffer_desc {
void *hostptr;
unsigned int gpuaddr;
int size;
unsigned int format;
unsigned int pitch;
unsigned int enabled;
};
struct kgsl_bind_gmem_shadow {
unsigned int drawctxt_id;
struct kgsl_gmem_desc gmem_desc;
unsigned int shadow_x;
unsigned int shadow_y;
struct kgsl_buffer_desc shadow_buffer;
unsigned int buffer_id;
};
#define IOCTL_KGSL_DRAWCTXT_BIND_GMEM_SHADOW \
_IOW(KGSL_IOC_TYPE, 0x22, struct kgsl_bind_gmem_shadow)
/* add a block of memory into the GPU address space */
struct kgsl_sharedmem_from_vmalloc {
unsigned int gpuaddr; /*output param */
unsigned int hostptr;
unsigned int flags;
};
#define IOCTL_KGSL_SHAREDMEM_FROM_VMALLOC \
_IOWR(KGSL_IOC_TYPE, 0x23, struct kgsl_sharedmem_from_vmalloc)
#define IOCTL_KGSL_SHAREDMEM_FLUSH_CACHE \
_IOW(KGSL_IOC_TYPE, 0x24, struct kgsl_sharedmem_free)
struct kgsl_drawctxt_set_bin_base_offset {
unsigned int drawctxt_id;
unsigned int offset;
};
#define IOCTL_KGSL_DRAWCTXT_SET_BIN_BASE_OFFSET \
_IOW(KGSL_IOC_TYPE, 0x25, struct kgsl_drawctxt_set_bin_base_offset)
enum kgsl_cmdwindow_type {
KGSL_CMDWINDOW_MIN = 0x00000000,
KGSL_CMDWINDOW_2D = 0x00000000,
KGSL_CMDWINDOW_3D = 0x00000001, /* legacy */
KGSL_CMDWINDOW_MMU = 0x00000002,
KGSL_CMDWINDOW_ARBITER = 0x000000FF,
KGSL_CMDWINDOW_MAX = 0x000000FF,
};
/* write to the command window */
struct kgsl_cmdwindow_write {
enum kgsl_cmdwindow_type target;
unsigned int addr;
unsigned int data;
};
#define IOCTL_KGSL_CMDWINDOW_WRITE \
_IOW(KGSL_IOC_TYPE, 0x2e, struct kgsl_cmdwindow_write)
struct kgsl_gpumem_alloc {
unsigned long gpuaddr;
size_t size;
unsigned int flags;
};
#define IOCTL_KGSL_GPUMEM_ALLOC \
_IOWR(KGSL_IOC_TYPE, 0x2f, struct kgsl_gpumem_alloc)
struct kgsl_cff_syncmem {
unsigned int gpuaddr;
unsigned int len;
unsigned int __pad[2]; /* For future binary compatibility */
};
#define IOCTL_KGSL_CFF_SYNCMEM \
_IOW(KGSL_IOC_TYPE, 0x30, struct kgsl_cff_syncmem)
#ifdef __KERNEL__
#ifdef CONFIG_MSM_KGSL_DRM
int kgsl_gem_obj_addr(int drm_fd, int handle, unsigned long *start,
unsigned long *len);
#else
#define kgsl_gem_obj_addr(...) 0
#endif
#endif
#endif /* _MSM_KGSL_H */

View File

@ -1,93 +0,0 @@
/* include/linux/msm_mdp.h
*
* Copyright (C) 2007 Google Incorporated
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#ifndef _MSM_MDP_H_
#define _MSM_MDP_H_
#include <linux/types.h>
#define MSMFB_IOCTL_MAGIC 'm'
#define MSMFB_GRP_DISP _IOW(MSMFB_IOCTL_MAGIC, 1, unsigned int)
#define MSMFB_BLIT _IOW(MSMFB_IOCTL_MAGIC, 2, unsigned int)
enum {
MDP_RGB_565, /* RGB 565 planar */
MDP_XRGB_8888, /* RGB 888 padded */
MDP_Y_CBCR_H2V2, /* Y and CbCr, pseudo planar w/ Cb is in MSB */
MDP_ARGB_8888, /* ARGB 888 */
MDP_RGB_888, /* RGB 888 planar */
MDP_Y_CRCB_H2V2, /* Y and CrCb, pseudo planar w/ Cr is in MSB */
MDP_YCRYCB_H2V1, /* YCrYCb interleave */
MDP_Y_CRCB_H2V1, /* Y and CrCb, pseduo planar w/ Cr is in MSB */
MDP_Y_CBCR_H2V1, /* Y and CrCb, pseduo planar w/ Cr is in MSB */
MDP_RGBA_8888, /* ARGB 888 */
MDP_BGRA_8888, /* ABGR 888 */
MDP_RGBX_8888, /* RGBX 888 */
MDP_IMGTYPE_LIMIT /* Non valid image type after this enum */
};
enum {
PMEM_IMG,
FB_IMG,
};
/* flag values */
#define MDP_ROT_NOP 0
#define MDP_FLIP_LR 0x1
#define MDP_FLIP_UD 0x2
#define MDP_ROT_90 0x4
#define MDP_ROT_180 (MDP_FLIP_UD|MDP_FLIP_LR)
#define MDP_ROT_270 (MDP_ROT_90|MDP_FLIP_UD|MDP_FLIP_LR)
#define MDP_ROT_MASK 0x7
#define MDP_DITHER 0x8
#define MDP_BLUR 0x10
#define MDP_BLEND_FG_PREMULT 0x20000
#define MDP_TRANSP_NOP 0xffffffff
#define MDP_ALPHA_NOP 0xff
/* drewis: added for android 4.0 */
#define MDP_BLIT_NON_CACHED 0x01000000
/* drewis: end */
struct mdp_rect {
uint32_t x;
uint32_t y;
uint32_t w;
uint32_t h;
};
struct mdp_img {
uint32_t width;
uint32_t height;
uint32_t format;
uint32_t offset;
int memory_id; /* the file descriptor */
};
struct mdp_blit_req {
struct mdp_img src;
struct mdp_img dst;
struct mdp_rect src_rect;
struct mdp_rect dst_rect;
uint32_t alpha;
uint32_t transp_mask;
uint32_t flags;
};
struct mdp_blit_req_list {
uint32_t count;
struct mdp_blit_req req[];
};
#endif /* _MSM_MDP_H_ */

View File

@ -1,241 +0,0 @@
/* Copyright (c) 2008-2009, Code Aurora Forum. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of Code Aurora nor
* the names of its contributors may be used to endorse or promote
* products derived from this software without specific prior written
* permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef _MSM_VDEC_H_
#define _MSM_VDEC_H_
#include <linux/types.h>
#define VDEC_IOCTL_MAGIC 'v'
#define VDEC_IOCTL_INITIALIZE _IOWR(VDEC_IOCTL_MAGIC, 1, struct vdec_init)
#define VDEC_IOCTL_SETBUFFERS _IOW(VDEC_IOCTL_MAGIC, 2, struct vdec_buffer)
#define VDEC_IOCTL_QUEUE _IOWR(VDEC_IOCTL_MAGIC, 3, \
struct vdec_input_buf)
#define VDEC_IOCTL_REUSEFRAMEBUFFER _IOW(VDEC_IOCTL_MAGIC, 4, unsigned int)
#define VDEC_IOCTL_FLUSH _IOW(VDEC_IOCTL_MAGIC, 5, unsigned int)
#define VDEC_IOCTL_EOS _IO(VDEC_IOCTL_MAGIC, 6)
#define VDEC_IOCTL_GETMSG _IOR(VDEC_IOCTL_MAGIC, 7, struct vdec_msg)
#define VDEC_IOCTL_CLOSE _IO(VDEC_IOCTL_MAGIC, 8)
#define VDEC_IOCTL_FREEBUFFERS _IOW(VDEC_IOCTL_MAGIC, 9, struct vdec_buf_info)
#define VDEC_IOCTL_GETDECATTRIBUTES _IOR(VDEC_IOCTL_MAGIC, 10, \
struct vdec_dec_attributes)
#define VDEC_IOCTL_GETVERSION _IOR(VDEC_IOCTL_MAGIC, 11, struct vdec_version)
enum {
VDEC_FRAME_DECODE_OK,
VDEC_FRAME_DECODE_ERR,
VDEC_FATAL_ERR,
VDEC_FLUSH_FINISH,
VDEC_EOS,
VDEC_FRAME_FLUSH,
VDEC_STREAM_SWITCH,
VDEC_SUSPEND_FINISH,
VDEC_BUFFER_CONSUMED
};
enum {
VDEC_FLUSH_INPUT,
VDEC_FLUSH_OUTPUT,
VDEC_FLUSH_ALL
};
enum {
VDEC_BUFFER_TYPE_INPUT,
VDEC_BUFFER_TYPE_OUTPUT,
VDEC_BUFFER_TYPE_INTERNAL1,
VDEC_BUFFER_TYPE_INTERNAL2,
};
enum {
VDEC_QUEUE_SUCCESS,
VDEC_QUEUE_FAILED,
VDEC_QUEUE_BADSTATE,
};
enum {
VDEC_COLOR_FORMAT_NV21 = 0x01,
VDEC_COLOR_FORMAT_NV21_YAMOTO = 0x02
};
struct vdec_input_buf_info {
u32 offset;
u32 data;
u32 size;
int timestamp_lo;
int timestamp_hi;
int avsync_state;
u32 flags;
};
struct vdec_buf_desc {
u32 bufsize;
u32 num_min_buffers;
u32 num_max_buffers;
};
struct vdec_buf_req {
u32 max_input_queue_size;
struct vdec_buf_desc input;
struct vdec_buf_desc output;
struct vdec_buf_desc dec_req1;
struct vdec_buf_desc dec_req2;
};
struct vdec_region_info {
u32 src_id;
u32 offset;
u32 size;
};
struct vdec_config {
u32 fourcc; /* video format */
u32 width; /* source width */
u32 height; /* source height */
u32 order; /* render decoder order */
u32 notify_enable; /* enable notify input buffer done event */
u32 vc1_rowbase;
u32 h264_startcode_detect;
u32 h264_nal_len_size;
u32 postproc_flag;
u32 fruc_enable;
u32 color_format; /* used to set YUV color format */
};
struct vdec_vc1_panscan_regions {
int num;
int width[4];
int height[4];
int xoffset[4];
int yoffset[4];
};
struct vdec_cropping_window {
u32 x1;
u32 y1;
u32 x2;
u32 y2;
};
struct vdec_frame_info {
u32 status; /* video decode status */
u32 offset; /* buffer offset */
u32 data1; /* user data field 1 */
u32 data2; /* user data field 2 */
int timestamp_lo; /* lower 32 bits timestamp, in msec */
int timestamp_hi; /* higher 32 bits timestamp, in msec */
int cal_timestamp_lo; /* lower 32 bits cal timestamp, in msec */
int cal_timestamp_hi; /* higher 32 bits cal timestamp, in msec */
u32 dec_width; /* frame roi width */
u32 dec_height; /* frame roi height */
struct vdec_cropping_window cwin; /* The frame cropping window */
u32 picture_type[2]; /* picture coding type */
u32 picture_format; /* picture coding format */
u32 vc1_rangeY; /* luma range mapping */
u32 vc1_rangeUV; /* chroma range mapping */
u32 picture_resolution; /* scaling factor */
u32 frame_disp_repeat; /* how often repeated by disp */
u32 repeat_first_field; /* repeat 1st field after 2nd */
u32 top_field_first; /* top field displayed first */
u32 interframe_interp; /* not for inter-frame interp */
struct vdec_vc1_panscan_regions panscan; /* pan region */
u32 concealed_macblk_num; /* number of concealed macro blk */
u32 flags; /* input flags */
u32 performance_stats; /* performance statistics returned by decoder */
u32 data3; /* user data field 3 */
};
struct vdec_buf_info {
u32 buf_type;
struct vdec_region_info region;
u32 num_buf;
u32 islast;
};
struct vdec_buffer {
u32 pmem_id;
struct vdec_buf_info buf;
};
struct vdec_sequence {
u8 *header;
u32 len;
};
struct vdec_config_sps {
struct vdec_config cfg;
struct vdec_sequence seq;
};
#define VDEC_MSG_REUSEINPUTBUFFER 1
#define VDEC_MSG_FRAMEDONE 2
struct vdec_msg {
u32 id;
union {
/* id = VDEC_MSG_REUSEINPUTBUFFER */
u32 buf_id;
/* id = VDEC_MSG_FRAMEDONE */
struct vdec_frame_info vfr_info;
};
};
struct vdec_init {
struct vdec_config_sps sps_cfg;
struct vdec_buf_req *buf_req;
};
struct vdec_input_buf {
u32 pmem_id;
struct vdec_input_buf_info buffer;
struct vdec_queue_status *queue_status;
};
struct vdec_queue_status {
u32 status;
};
struct vdec_dec_attributes {
u32 fourcc;
u32 profile;
u32 level;
u32 dec_pic_width;
u32 dec_pic_height;
struct vdec_buf_desc input;
struct vdec_buf_desc output;
struct vdec_buf_desc dec_req1;
struct vdec_buf_desc dec_req2;
};
struct vdec_version {
u32 major;
u32 minor;
};
#endif /* _MSM_VDEC_H_ */

View File

@ -1,331 +0,0 @@
/* Copyright (c) 2008-2009, Code Aurora Forum. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of Code Aurora nor
* the names of its contributors may be used to endorse or promote
* products derived from this software without specific prior written
* permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef _MSM_VENC_H_
#define _MSM_VENC_H_
#include <linux/types.h>
#define VENC_MAX_RECON_BUFFERS 2
#define VENC_FLAG_EOS 0x00000001
#define VENC_FLAG_END_OF_FRAME 0x00000010
#define VENC_FLAG_SYNC_FRAME 0x00000020
#define VENC_FLAG_EXTRA_DATA 0x00000040
#define VENC_FLAG_CODEC_CONFIG 0x00000080
enum venc_flush_type {
VENC_FLUSH_INPUT,
VENC_FLUSH_OUTPUT,
VENC_FLUSH_ALL
};
enum venc_state_type {
VENC_STATE_PAUSE = 0x1,
VENC_STATE_START = 0x2,
VENC_STATE_STOP = 0x4
};
enum venc_event_type_enum {
VENC_EVENT_START_STATUS,
VENC_EVENT_STOP_STATUS,
VENC_EVENT_SUSPEND_STATUS,
VENC_EVENT_RESUME_STATUS,
VENC_EVENT_FLUSH_STATUS,
VENC_EVENT_RELEASE_INPUT,
VENC_EVENT_DELIVER_OUTPUT,
VENC_EVENT_UNKNOWN_STATUS
};
enum venc_status_code {
VENC_STATUS_SUCCESS,
VENC_STATUS_ERROR,
VENC_STATUS_INVALID_STATE,
VENC_STATUS_FLUSHING,
VENC_STATUS_INVALID_PARAM,
VENC_STATUS_CMD_QUEUE_FULL,
VENC_STATUS_CRITICAL,
VENC_STATUS_INSUFFICIENT_RESOURCES,
VENC_STATUS_TIMEOUT
};
enum venc_msg_code {
VENC_MSG_INDICATION,
VENC_MSG_INPUT_BUFFER_DONE,
VENC_MSG_OUTPUT_BUFFER_DONE,
VENC_MSG_NEED_OUTPUT_BUFFER,
VENC_MSG_FLUSH,
VENC_MSG_START,
VENC_MSG_STOP,
VENC_MSG_PAUSE,
VENC_MSG_RESUME,
VENC_MSG_STOP_READING_MSG
};
enum venc_error_code {
VENC_S_SUCCESS,
VENC_S_EFAIL,
VENC_S_EFATAL,
VENC_S_EBADPARAM,
VENC_S_EINVALSTATE,
VENC_S_ENOSWRES,
VENC_S_ENOHWRES,
VENC_S_EBUFFREQ,
VENC_S_EINVALCMD,
VENC_S_ETIMEOUT,
VENC_S_ENOREATMPT,
VENC_S_ENOPREREQ,
VENC_S_ECMDQFULL,
VENC_S_ENOTSUPP,
VENC_S_ENOTIMPL,
VENC_S_ENOTPMEM,
VENC_S_EFLUSHED,
VENC_S_EINSUFBUF,
VENC_S_ESAMESTATE,
VENC_S_EINVALTRANS
};
enum venc_mem_region_enum {
VENC_PMEM_EBI1,
VENC_PMEM_SMI
};
struct venc_buf_type {
unsigned int region;
unsigned int phys;
unsigned int size;
int offset;
};
struct venc_qp_range {
unsigned int min_qp;
unsigned int max_qp;
};
struct venc_frame_rate {
unsigned int frame_rate_num;
unsigned int frame_rate_den;
};
struct venc_slice_info {
unsigned int slice_mode;
unsigned int units_per_slice;
};
struct venc_extra_data {
unsigned int slice_extra_data_flag;
unsigned int slice_client_data1;
unsigned int slice_client_data2;
unsigned int slice_client_data3;
unsigned int none_extra_data_flag;
unsigned int none_client_data1;
unsigned int none_client_data2;
unsigned int none_client_data3;
};
struct venc_common_config {
unsigned int standard;
unsigned int input_frame_height;
unsigned int input_frame_width;
unsigned int output_frame_height;
unsigned int output_frame_width;
unsigned int rotation_angle;
unsigned int intra_period;
unsigned int rate_control;
struct venc_frame_rate frame_rate;
unsigned int bitrate;
struct venc_qp_range qp_range;
unsigned int iframe_qp;
unsigned int pframe_qp;
struct venc_slice_info slice_config;
struct venc_extra_data extra_data;
};
struct venc_nonio_buf_config {
struct venc_buf_type recon_buf1;
struct venc_buf_type recon_buf2;
struct venc_buf_type wb_buf;
struct venc_buf_type cmd_buf;
struct venc_buf_type vlc_buf;
};
struct venc_mpeg4_config {
unsigned int profile;
unsigned int level;
unsigned int time_resolution;
unsigned int ac_prediction;
unsigned int hec_interval;
unsigned int data_partition;
unsigned int short_header;
unsigned int rvlc_enable;
};
struct venc_h263_config {
unsigned int profile;
unsigned int level;
};
struct venc_h264_config {
unsigned int profile;
unsigned int level;
unsigned int max_nal;
unsigned int idr_period;
};
struct venc_pmem {
int src;
int fd;
unsigned int offset;
void *virt;
void *phys;
unsigned int size;
};
struct venc_buffer {
unsigned char *ptr_buffer;
unsigned int size;
unsigned int len;
unsigned int offset;
long long time_stamp;
unsigned int flags;
unsigned int client_data;
};
struct venc_buffers {
struct venc_pmem recon_buf[VENC_MAX_RECON_BUFFERS];
struct venc_pmem wb_buf;
struct venc_pmem cmd_buf;
struct venc_pmem vlc_buf;
};
struct venc_buffer_flush {
unsigned int flush_mode;
};
union venc_msg_data {
struct venc_buffer buf;
struct venc_buffer_flush flush_ret;
};
struct venc_msg {
unsigned int status_code;
unsigned int msg_code;
union venc_msg_data msg_data;
unsigned int msg_data_size;
};
union venc_codec_config {
struct venc_mpeg4_config mpeg4_params;
struct venc_h263_config h263_params;
struct venc_h264_config h264_params;
};
struct venc_q6_config {
struct venc_common_config config_params;
union venc_codec_config codec_params;
struct venc_nonio_buf_config buf_params;
void *callback_event;
};
struct venc_hdr_config {
struct venc_common_config config_params;
union venc_codec_config codec_params;
};
struct venc_init_config {
struct venc_q6_config q6_config;
struct venc_buffers q6_bufs;
};
struct venc_seq_config {
int size;
struct venc_pmem buf;
struct venc_q6_config q6_config;
};
struct venc_version {
u32 major;
u32 minor;
};
#define VENC_IOCTL_MAGIC 'V'
#define VENC_IOCTL_CMD_READ_NEXT_MSG \
_IOWR(VENC_IOCTL_MAGIC, 1, struct venc_msg)
#define VENC_IOCTL_CMD_STOP_READ_MSG _IO(VENC_IOCTL_MAGIC, 2)
#define VENC_IOCTL_SET_INPUT_BUFFER \
_IOW(VENC_IOCTL_MAGIC, 3, struct venc_pmem)
#define VENC_IOCTL_SET_OUTPUT_BUFFER \
_IOW(VENC_IOCTL_MAGIC, 4, struct venc_pmem)
#define VENC_IOCTL_CMD_START _IOW(VENC_IOCTL_MAGIC, 5, struct venc_init_config)
#define VENC_IOCTL_CMD_ENCODE_FRAME \
_IOW(VENC_IOCTL_MAGIC, 6, struct venc_buffer)
#define VENC_IOCTL_CMD_FILL_OUTPUT_BUFFER \
_IOW(VENC_IOCTL_MAGIC, 7, struct venc_buffer)
#define VENC_IOCTL_CMD_FLUSH \
_IOW(VENC_IOCTL_MAGIC, 8, struct venc_buffer_flush)
#define VENC_IOCTL_CMD_PAUSE _IO(VENC_IOCTL_MAGIC, 9)
#define VENC_IOCTL_CMD_RESUME _IO(VENC_IOCTL_MAGIC, 10)
#define VENC_IOCTL_CMD_STOP _IO(VENC_IOCTL_MAGIC, 11)
#define VENC_IOCTL_SET_INTRA_PERIOD \
_IOW(VENC_IOCTL_MAGIC, 12, int)
#define VENC_IOCTL_CMD_REQUEST_IFRAME _IO(VENC_IOCTL_MAGIC, 13)
#define VENC_IOCTL_GET_SEQUENCE_HDR \
_IOWR(VENC_IOCTL_MAGIC, 14, struct venc_seq_config)
#define VENC_IOCTL_SET_INTRA_REFRESH \
_IOW(VENC_IOCTL_MAGIC, 15, int)
#define VENC_IOCTL_SET_FRAME_RATE \
_IOW(VENC_IOCTL_MAGIC, 16, struct venc_frame_rate)
#define VENC_IOCTL_SET_TARGET_BITRATE \
_IOW(VENC_IOCTL_MAGIC, 17, int)
#define VENC_IOCTL_SET_QP_RANGE \
_IOW(VENC_IOCTL_MAGIC, 18, struct venc_qp_range)
#define VENC_IOCTL_GET_VERSION \
_IOR(VENC_IOCTL_MAGIC, 19, struct venc_version)
#endif

142
init.htcleo.rc Normal file
View File

@ -0,0 +1,142 @@
on boot
mount debugfs /sys/kernel/debug /sys/kernel/debug
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
chown radio radio /sys/module/pm/parameters/idle_sleep_mode
# Set error receiver
setprop ro.error.receiver.htc.apps com.android.updater
# ruu
write /data/misc/screen_lock_status 0
chown system system /data/misc/screen_lock_status
chmod 644 /data/misc/screen_lock_status
# for wireless modem
chown system system /sys/module/serial/parameters/modem_enabled
chown system system /dev/ttyHSUSB0
chown system system /dev/smd9
chown media media /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
# Power Management
write /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate 40000
# Overwrite framework low memory killer minfree setting
write /sys/module/lowmemorykiller/parameters/minfree 3584,4096,6144,7168,7680,8192
# Enable low memory killer to check file pages
write /sys/module/lowmemorykiller/parameters/minfile 0,0,0,5120,5632,6144
write /sys/module/lowmemorykiller/parameters/check_filepages
service hciattach /system/bin/brcm_patchram_plus --enable_hci\
--baudrate 3000000 --patchram /etc/firmware/bcm4329.hcd /dev/ttyHS0
user bluetooth
group bluetooth net_bt_admin
disabled
#service btld /system/bin/logwrapper /system/bin/btld -lpm 1 -hb 3000000
# user root
# group bluetooth net_bt_admin
# disabled
# oneshot
# compass/accelerometer daemon
service akmd /system/bin/akmd
user compass
group compass misc input
service wpa_supplicant /system/bin/wpa_supplicant \
-Dwext -ieth0 -c/data/misc/wifi/wpa_supplicant.conf
#user wifi
#group wifi inet
socket wpa_eth0 dgram 660 wifi wifi
disabled
oneshot
service dhcpcd_eth0 /system/bin/dhcpcd -ABKL
disabled
oneshot
service iprenew_eth0 /system/bin/dhcpcd -n
disabled
oneshot
# for USB internet sharing
service udhcpd /system/bin/udhcpd
disabled
oneshot
#service netsharing_on /system/bin/netsharing net on
# disabled
# oneshot
#service netsharing_off /system/bin/netsharing net off
# disabled
# oneshot
#service netsharing_pass /system/bin/netsharing net_pass on
# disabled
# oneshot
#service modem /system/xbin/wireless_modem
# user system
# group system
# disabled
#service zchgd /system/bin/zchgd
# user root
# group root graphics
# oneshot
service dumpstate /system/bin/dumpstate -s
socket dumpstate stream 0660 shell log
disabled
oneshot
#on property:dev.bootcomplete=1
# start bootcomplete
#service bootcomplete /system/bin/bootcomplete
# user root
# group root
# disabled
# oneshot
#service shutdown /system/bin/shutdown
# user root
# group root
# disabled
# oneshot
#service ipd /system/bin/ipd
# socket ipd stream 666 root inet
# Execute files in /etc/init.d before booting
service sysinit /system/bin/logwrapper /system/xbin/busybox run-parts /system/etc/init.d
disabled
oneshot
#on property:service.modem.enable=1
# start modem
#on property:service.modem.enable=0
# stop modem
#service srv_ser2net /system/bin/ser2net -n
# disabled
#on property:service.ser2net.enable=1
# start srv_ser2net
#on property:service.ser2net.enable=0
# stop srv_ser2net

131
init.leo.rc Executable file
View File

@ -0,0 +1,131 @@
on init
mount rootfs rootfs / remount
mkdir /app-cache 01777 system system
mount tmpfs tmpfs /app-cache size=8m
mount rootfs rootfs / ro remount
# Define the memory thresholds at which the above process classes will
# be killed. These numbers are in pages (4k).
setprop ro.FOREGROUND_APP_MEM 3584
setprop ro.VISIBLE_APP_MEM 4096
setprop ro.SECONDARY_SERVER_MEM 6144
setprop ro.BACKUP_APP_MEM 6144
setprop ro.HOME_APP_MEM 6144
setprop ro.HIDDEN_APP_MEM 7168
setprop ro.CONTENT_PROVIDER_MEM 7680
setprop ro.EMPTY_APP_MEM 8192
on boot
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
chown radio radio /sys/module/pm/parameters/idle_sleep_mode
# for wireless modem
chown system system /sys/module/serial/parameters/modem_enabled
chown system system /dev/ttyHSUSB0
chown system system /dev/smd9
chown media media /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
# Power Management
write /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate 40000
# Overwrite framework low memory killer minfree setting
write /sys/module/lowmemorykiller/parameters/minfree 3584,4096,6144,7168,7680,8192
# Enable low memory killer to check file pages
write /sys/module/lowmemorykiller/parameters/minfile 0,0,0,5120,5632,6144
write /sys/module/lowmemorykiller/parameters/check_filepages 1
service wpa_supplicant /system/bin/logwrapper /system/bin/wpa_supplicant \
-Dwext -ieth0 -c/data/misc/wifi/wpa_supplicant.conf
# 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_eth0 dgram 660 wifi wifi
disabled
oneshot
service dhcpcd /system/bin/dhcpcd -ABKL eth0
disabled
oneshot
# compass/accelerometer daemon
service akmd /system/bin/akmd
user compass
group compass misc input
# bugreport is triggered by the KEY_VOLUMEUP and BTN_MOUSE keycodes
service bugreport /system/bin/dumpstate -d -v -o /sdcard/bugreports/bugreport
disabled
oneshot
keycodes 115 272
#service hciattach /system/bin/brcm_patchram_plus --enable_hci --patchram /etc/firmware/bcm4329.hcd /dev/ttyHS0
# user bluetooth
# group bluetooth net_bt_admin
# disabled
# Make sure we startup btld before hcid
# Set target address to emulator host loopback IF
# Limit baudrate to 460800 to ensure reliable uart operation
#service btld /system/bin/logwrapper /system/bin/btld -hwtun 10.0.2.2 -hb 460800 3000000 -lpm 1
service btld /system/bin/logwrapper /system/bin/btld -lpm 1 -hb 3000000
user root
group bluetooth net_bt_admin
disabled
oneshot
# for USB internet sharing
service udhcpd /system/bin/udhcpd
disabled
oneshot
service netsharing_on /system/bin/netsharing net on
disabled
oneshot
service netsharing_off /system/bin/netsharing net off
disabled
oneshot
service netsharing_pass /system/bin/netsharing net_pass on
disabled
oneshot
service modem /system/xbin/wireless_modem
user system
group system
disabled
service zchgd /system/bin/zchgd
user root
group root graphics
oneshot
on property:service.modem.enable=1
start modem
on property:service.modem.enable=0
stop modem
service srv_ser2net /system/bin/ser2net -n
disabled
on property:service.ser2net.enable=1
start srv_ser2net
on property:service.ser2net.enable=0
stop srv_ser2net
service clockd /system/bin/clockd

451
init.rc Normal file
View File

@ -0,0 +1,451 @@
on early-init
start ueventd
on init
sysclktz 0
loglevel 3
# setup the global environment
export PATH /sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin
export LD_LIBRARY_PATH /vendor/lib:/system/lib
export ANDROID_BOOTLOGO 1
export ANDROID_CACHE /cache
export ANDROID_ROOT /system
export ANDROID_ASSETS /system/app
export ANDROID_DATA /data
export DOWNLOAD_CACHE /cache/download
export EXTERNAL_STORAGE /mnt/sdcard
export ASEC_MOUNTPOINT /mnt/asec
export LOOP_MOUNTPOINT /mnt/obb
export SD_EXT_DIRECTORY /sd-ext
export BOOTCLASSPATH /system/framework/core.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/core-junit.jar
# Backward compatibility
symlink /system/etc /etc
symlink /sys/kernel/debug /d
# Right now vendor lives on the same filesystem as system,
# but someday that may change.
symlink /system/vendor /vendor
# create mountpoints
mkdir /mnt 0775 root system
mkdir /mnt/sdcard 0000 system system
# Create cgroup mount point for cpu accounting
mkdir /acct
mount cgroup none /acct cpuacct
mkdir /acct/uid
# Backwards Compat - XXX: Going away in G*
symlink /mnt/sdcard /sdcard
mkdir /system
mkdir /data 0771 system system
mkdir /cache 0771 system cache
mkdir /config 0500 root root
# Directory for putting things only root should see.
mkdir /mnt/secure 0700 root root
# Directory for staging bindmounts
mkdir /mnt/secure/staging 0700 root root
# Directory-target for where the secure container
# imagefile directory will be bind-mounted
mkdir /mnt/secure/asec 0700 root root
# Secure container public mount points.
mkdir /mnt/asec 0700 root system
mount tmpfs tmpfs /mnt/asec mode=0755,gid=1000
# Filesystem image public mount points.
mkdir /mnt/obb 0700 root system
mount tmpfs tmpfs /mnt/obb mode=0755,gid=1000
mkdir /sd-ext 0771 system system
write /proc/sys/kernel/panic_on_oops 1
write /proc/sys/kernel/hung_task_timeout_secs 0
write /proc/cpu/alignment 4
write /proc/sys/kernel/sched_latency_ns 10000000
write /proc/sys/kernel/sched_wakeup_granularity_ns 2000000
write /proc/sys/kernel/sched_compat_yield 1
write /proc/sys/kernel/sched_child_runs_first 0
# Create cgroup mount points for process groups
mkdir /dev/cpuctl
mount cgroup none /dev/cpuctl cpu
chown system system /dev/cpuctl
chown system system /dev/cpuctl/tasks
chmod 0777 /dev/cpuctl/tasks
write /dev/cpuctl/cpu.shares 1024
mkdir /dev/cpuctl/fg_boost
chown system system /dev/cpuctl/fg_boost/tasks
chmod 0777 /dev/cpuctl/fg_boost/tasks
write /dev/cpuctl/fg_boost/cpu.shares 1024
mkdir /dev/cpuctl/bg_non_interactive
chown system system /dev/cpuctl/bg_non_interactive/tasks
chmod 0777 /dev/cpuctl/bg_non_interactive/tasks
# 5.0 %
write /dev/cpuctl/bg_non_interactive/cpu.shares 52
on fs
# mount mtd partitions
# Mount /system rw first to give the filesystem a chance to save a checkpoint
mount yaffs2 mtd@system /system
mount yaffs2 mtd@system /system ro remount
mount yaffs2 mtd@userdata /data nosuid nodev
# leo specific for the purpose of RM and unlimited download space
if [ ! -d /data/cachemnt ] ; then
mkdir /data/cachemnt
chown system:system /data/cachemnt
chmod 777 /data/cachemnt
fi
symlink /data/cachemnt /cache
chown system:system /data/cachemnt
on post-fs
# once everything is setup, no need to modify /
mount rootfs rootfs / ro remount
# We chown/chmod /data again so because mount is run as root + defaults
chown system system /data
chmod 0771 /data
# Mount compressed filesystems
mount squashfs loop@/system/lib/modules/modules.sqf /system/lib/modules ro
mount squashfs loop@/system/xbin/xbin.sqf /system/xbin ro
# Create dump dir and collect dumps.
# Do this before we mount cache so eventually we can use cache for
# storing dumps on platforms which do not have a dedicated dump partition.
mkdir /data/dontpanic
chown root log /data/dontpanic
chmod 0750 /data/dontpanic
# Collect apanic data, free resources and re-arm trigger
copy /proc/apanic_console /data/dontpanic/apanic_console
chown root log /data/dontpanic/apanic_console
chmod 0640 /data/dontpanic/apanic_console
copy /proc/apanic_threads /data/dontpanic/apanic_threads
chown root log /data/dontpanic/apanic_threads
chmod 0640 /data/dontpanic/apanic_threads
write /proc/apanic_console 1
# Same reason as /data above
chown system cache /cache
chmod 0771 /cache
# This may have been created by the recovery system with odd permissions
chown system cache /cache/recovery
chmod 0770 /cache/recovery
#change permissions on vmallocinfo so we can grab it from bugreports
chown root log /proc/vmallocinfo
chmod 0440 /proc/vmallocinfo
#change permissions on kmsg & sysrq-trigger so bugreports can grab kthread stacks
chown root system /proc/kmsg
chmod 0440 /proc/kmsg
chown root system /proc/sysrq-trigger
chmod 0220 /proc/sysrq-trigger
# create basic filesystem structure
mkdir /data/misc 01771 system misc
mkdir /data/misc/bluetoothd 0770 bluetooth bluetooth
mkdir /data/misc/bluetooth 0770 system system
mkdir /data/misc/keystore 0700 keystore keystore
mkdir /data/misc/vpn 0770 system system
mkdir /data/misc/systemkeys 0700 system system
mkdir /data/misc/vpn/profiles 0770 system system
# give system access to wpa_supplicant.conf for backup and restore
mkdir /data/misc/wifi 0770 wifi wifi
chmod 0770 /data/misc/wifi
chmod 0660 /data/misc/wifi/wpa_supplicant.conf
mkdir /data/local 0771 shell shell
mkdir /data/local/tmp 0771 shell shell
mkdir /data/local/download 0771 system cache
mkdir /data/data 0771 system system
mkdir /data/app-private 0771 system system
mkdir /data/app 0771 system system
mkdir /data/property 0700 root root
mkdir /cache/download 0771 system cache
# create dalvik-cache and double-check the perms
mkdir /data/dalvik-cache 0771 system system
chown system system /data/dalvik-cache
chmod 0771 /data/dalvik-cache
mkdir /cache/dalvik-cache 0771 system system
chown system system /cache/dalvik-cache
chmod 0771 /cache/dalvik-cache
# create the lost+found directories, so as to enforce our permissions
mkdir /data/lost+found 0770
mkdir /cache/lost+found 0770
# double check the perms, in case lost+found already exists, and set owner
chown root root /data/lost+found
chmod 0770 /data/lost+found
chown root root /cache/lost+found
chmod 0770 /cache/lost+found
# allow net_raw to have access to /dev/socket directory
chown root net_raw /dev/socket
chmod 0775 /dev/socket
# allow system to modify cpufreq control files
chown root system /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
chown root system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chown root system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
on boot
# basic network init
ifup lo
hostname localhost
domainname localdomain
# set RLIMIT_NICE to allow priorities from 19 to -20
setrlimit 13 40 40
# Define the oom_adj values for the classes of processes that can be
# killed by the kernel. These are used in ActivityManagerService.
setprop ro.FOREGROUND_APP_ADJ 0
setprop ro.VISIBLE_APP_ADJ 1
setprop ro.PERCEPTIBLE_APP_ADJ 2
setprop ro.HEAVY_WEIGHT_APP_ADJ 3
setprop ro.SECONDARY_SERVER_ADJ 4
setprop ro.BACKUP_APP_ADJ 5
setprop ro.HOME_APP_ADJ 6
setprop ro.HIDDEN_APP_MIN_ADJ 7
setprop ro.EMPTY_APP_ADJ 15
# Define the memory thresholds at which the above process classes will
# be killed. These numbers are in pages (4k).
setprop ro.FOREGROUND_APP_MEM 2048
setprop ro.VISIBLE_APP_MEM 3072
setprop ro.PERCEPTIBLE_APP_MEM 4096
setprop ro.HEAVY_WEIGHT_APP_MEM 4096
setprop ro.SECONDARY_SERVER_MEM 6144
setprop ro.BACKUP_APP_MEM 6144
setprop ro.HOME_APP_MEM 6144
setprop ro.HIDDEN_APP_MEM 7168
setprop ro.EMPTY_APP_MEM 8192
# Write value must be consistent with the above properties.
# Note that the driver only supports 6 slots, so we have combined some of
# the classes into the same memory level; the associated processes of higher
# classes will still be killed first.
write /sys/module/lowmemorykiller/parameters/adj 0,1,2,4,7,15
write /proc/sys/vm/overcommit_memory 1
write /proc/sys/vm/min_free_order_shift 4
write /sys/module/lowmemorykiller/parameters/minfree 2048,3072,4096,6144,7168,8192
# Set init its forked children's oom_adj.
write /proc/1/oom_adj -16
# Tweak background writeout
write /proc/sys/vm/dirty_expire_centisecs 200
write /proc/sys/vm/dirty_background_ratio 5
# Permissions for System Server and daemons.
chown radio system /sys/android_power/state
chown radio system /sys/android_power/request_state
chown radio system /sys/android_power/acquire_full_wake_lock
chown radio system /sys/android_power/acquire_partial_wake_lock
chown radio system /sys/android_power/release_wake_lock
chown radio system /sys/power/state
chown radio system /sys/power/wake_lock
chown radio system /sys/power/wake_unlock
chmod 0660 /sys/power/state
chmod 0660 /sys/power/wake_lock
chmod 0660 /sys/power/wake_unlock
chown system system /sys/class/timed_output/vibrator/enable
chown system system /sys/class/leds/keyboard-backlight/brightness
chown system system /sys/class/leds/lcd-backlight/brightness
chown system system /sys/class/leds/button-backlight/brightness
chown system system /sys/class/leds/jogball-backlight/brightness
chown system system /sys/class/leds/red/brightness
chown system system /sys/class/leds/green/brightness
chown system system /sys/class/leds/blue/brightness
chown system system /sys/class/leds/red/device/grpfreq
chown system system /sys/class/leds/red/device/grppwm
chown system system /sys/class/leds/red/device/blink
chown system system /sys/class/leds/red/brightness
chown system system /sys/class/leds/green/brightness
chown system system /sys/class/leds/blue/brightness
chown system system /sys/class/leds/red/device/grpfreq
chown system system /sys/class/leds/red/device/grppwm
chown system system /sys/class/leds/red/device/blink
chown system system /sys/class/timed_output/vibrator/enable
chown system system /sys/module/sco/parameters/disable_esco
chown system system /sys/kernel/ipv4/tcp_wmem_min
chown system system /sys/kernel/ipv4/tcp_wmem_def
chown system system /sys/kernel/ipv4/tcp_wmem_max
chown system system /sys/kernel/ipv4/tcp_rmem_min
chown system system /sys/kernel/ipv4/tcp_rmem_def
chown system system /sys/kernel/ipv4/tcp_rmem_max
chown root radio /proc/cmdline
# Define TCP buffer sizes for various networks
# ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax,
setprop net.tcp.buffersize.default 4096,87380,110208,4096,16384,110208
setprop net.tcp.buffersize.wifi 4095,87380,110208,4096,16384,110208
setprop net.tcp.buffersize.umts 4094,87380,110208,4096,16384,110208
setprop net.tcp.buffersize.edge 4093,26280,35040,4096,16384,35040
setprop net.tcp.buffersize.gprs 4092,8760,11680,4096,8760,11680
# Include extra init file
import /system/etc/init.local.rc
# Run sysinit
exec /system/bin/sysinit
class_start default
## Daemon processes to be run by init.
##
service ueventd /sbin/ueventd
critical
service console /system/bin/sh
console
disabled
user shell
group log
on property:ro.secure=0
start console
# adbd is controlled by the persist.service.adb.enable system property
service adbd /sbin/adbd
disabled
# adbd on at boot in emulator
on property:ro.kernel.qemu=1
start adbd
on property:persist.service.adb.enable=1
start adbd
on property:persist.service.adb.enable=0
stop adbd
service servicemanager /system/bin/servicemanager
user system
critical
onrestart restart zygote
onrestart restart media
service vold /system/bin/vold
socket vold stream 0660 root mount
ioprio be 2
service netd /system/bin/netd
socket netd stream 0660 root system
socket dnsproxyd stream 0660 root inet
service debuggerd /system/bin/debuggerd
service ril-daemon /system/bin/rild -l /system/lib/libhtc_ril_wrapper.so -- -d /dev/smd0 nand_init rmnet_mode
socket rild stream 660 root radio
socket rild-debug stream 660 radio system
user root
group radio cache inet misc audio sdcard_rw net_admin net_raw
service zygote /system/bin/app_process -Xzygote /system/bin --zygote --start-system-server
socket zygote stream 666
onrestart write /sys/android_power/request_state wake
onrestart write /sys/power/state on
onrestart restart media
onrestart restart netd
service media /system/bin/mediaserver
user media
group system audio camera graphics inet net_bt net_bt_admin net_raw
ioprio rt 4
service bootanim /system/bin/bootanimation
user graphics
group graphics
disabled
oneshot
service dbus /system/bin/dbus-daemon --system --nofork
socket dbus stream 660 bluetooth bluetooth
user bluetooth
group bluetooth net_bt_admin
service bluetoothd /system/bin/bluetoothd -n
socket bluetooth stream 660 bluetooth bluetooth
socket dbus_bluetooth stream 660 bluetooth bluetooth
# init.rc does not yet support applying capabilities, so run as root and
# let bluetoothd drop uid to bluetooth with the right linux capabilities
group bluetooth net_bt_admin misc
disabled
service hfag /system/bin/sdptool add --channel=10 HFAG
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
service hsag /system/bin/sdptool add --channel=11 HSAG
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
service opush /system/bin/sdptool add --channel=12 OPUSH
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
service pbap /system/bin/sdptool add --channel=19 PBAP
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
service installd /system/bin/installd
socket installd stream 600 system system
service racoon /system/bin/racoon
socket racoon stream 600 system system
# racoon will setuid to vpn after getting necessary resources.
group net_admin
disabled
oneshot
service mtpd /system/bin/mtpd
socket mtpd stream 600 system system
user vpn
group vpn net_admin net_raw
disabled
oneshot
service keystore /system/bin/keystore /data/misc/keystore
user keystore
group keystore
socket keystore stream 666
service dumpstate /system/bin/dumpstate -s
socket dumpstate stream 0660 shell log
disabled
oneshot

BIN
kernel Executable file

Binary file not shown.

BIN
leo-keypad.kcm.bin Normal file

Binary file not shown.

93
leo-keypad.kl Executable file
View File

@ -0,0 +1,93 @@
key 102 HOME WAKE_DROPPED
key 139 MENU WAKE_DROPPED
key 158 BACK WAKE_DROPPED
key 231 CALL WAKE_DROPPED
key 107 ENDCALL WAKE_DROPPED
key 116 POWER WAKE_DROPPED
key 115 VOLUME_UP WAKE
key 114 VOLUME_DOWN WAKE
# 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 61 CALL 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 217 SEARCH
# key 228 POUND
# key 227 STAR
#
# 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 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

406
leo.mk Normal file → Executable file
View File

@ -1,242 +1,164 @@
#
# 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.
#
PRODUCT_COPY_FILES += \
device/htc/leo/prebuilt/init.htcleo.rc:root/init.htcleo.rc \
device/htc/leo/prebuilt/init.htcleo.usb.rc:root/init.htcleo.usb.rc \
device/htc/leo/prebuilt/ueventd.htcleo.rc:root/ueventd.htcleo.rc \
device/htc/leo/prebuilt/logo.rle:root/logo.rle \
# Add the postrecoveryboot.sh so that the recovery.fstab can be changed
PRODUCT_COPY_FILES += \
device/htc/leo/postrecoveryboot.sh:recovery/root/sbin/postrecoveryboot.sh
# we have enough storage space to hold precise GC data
PRODUCT_TAGS += dalvik.gc.type-precise
## (2) Also get non-open-source GSM-specific aspects if available
$(call inherit-product-if-exists, vendor/htc/leo/leo-vendor.mk)
DEVICE_PACKAGE_OVERLAYS += device/htc/leo/overlay
PRODUCT_LOCALES := en
# General properties
PRODUCT_PROPERTY_OVERRIDES += \
ro.sf.lcd_density=240 \
ro.ril.ecc.HTC-ELL=92,93,94 \
ro.ril.ecc.HTC-WWE=999 \
ro.ril.enable.a52.HTC-ITA=1 \
ro.ril.enable.a53.HTC-ITA=1 \
ro.ril.enable.a52=0 \
ro.ril.enable.a53=1 \
ro.ril.enable.dtm=1 \
ro.ril.gprsclass=12 \
ro.ril.hsdpa.category=8 \
ro.ril.hsupa.category=5 \
ro.ril.hsxpa=2 \
ro.ril.enable.prl.recognition=1 \
ro.telephony.ril.v3=signalstrength \
ro.ril.def.agps.mode=2 \
ro.ril.enable.managed.roaming=1 \
ro.ril.oem.nosim.ecclist=911,112,999,000,08,118,120,122,110,119,995 \
ro.ril.emc.mode=2 \
mobiledata.interfaces=rmnet0,rmnet1,rmnet2,ppp0
PRODUCT_PROPERTY_OVERRIDES += \
media.a1026.nsForVoiceRec=0 \
media.a1026.enableA1026=1 \
ro.media.dec.jpeg.memcap=20000000 \
ro.opengles.version=131072
# Default network type.
# 0 => /* GSM/WCDMA (WCDMA preferred) */
# 3 => /* GSM/WCDMA (auto mode, according to PRL) */
PRODUCT_PROPERTY_OVERRIDES += ro.telephony.default_network=0
PRODUCT_PROPERTY_OVERRIDES += \
wifi.interface=wlan0 \
ro.ril.disable.power.collapse=0 \
wifi.supplicant_scan_interval=60
# Improve touch responsiveness
PRODUCT_PROPERTY_OVERRIDES += \
Debug.performance.tuning=1 \
Video.accelerate.hw=1
# Fix black screen after call
PRODUCT_PROPERTY_OVERRIDES += \
ro.lge.proximity.delay=10 \
mot.proximity.delay=10
PRODUCT_COPY_FILES += \
frameworks/base/data/etc/handheld_core_hardware.xml:system/etc/permissions/handheld_core_hardware.xml \
frameworks/base/data/etc/android.hardware.camera.flash-autofocus.xml:system/etc/permissions/android.hardware.camera.flash-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.location.gps.xml:system/etc/permissions/android.hardware.location.gps.xml \
frameworks/base/data/etc/android.hardware.wifi.xml:system/etc/permissions/android.hardware.wifi.xml \
frameworks/base/data/etc/android.hardware.sensor.proximity.xml:system/etc/permissions/android.hardware.sensor.proximity.xml \
frameworks/base/data/etc/android.hardware.sensor.light.xml:system/etc/permissions/android.hardware.sensor.light.xml \
frameworks/base/data/etc/android.software.sip.voip.xml:system/etc/permissions/android.software.sip.voip.xml \
frameworks/base/data/etc/android.hardware.touchscreen.multitouch.xml:system/etc/permissions/android.hardware.touchscreen.multitouch.xml \
frameworks/base/data/etc/android.hardware.usb.accessory.xml:system/etc/permissions/android.hardware.usb.accessory.xml \
frameworks/base/data/etc/android.hardware.sensor.accelerometer.xml:system/etc/permissions/android.hardware.sensor.accelerometer.xml \
frameworks/base/data/etc/android.hardware.sensor.compass.xml:system/etc/permissions/android.hardware.sensor.compass.xml
# media config xml file
PRODUCT_COPY_FILES += \
device/htc/leo/prebuilt/media_profiles.xml:system/etc/media_profiles.xml
# This file is used to install the enable RMNET and corresponding modules which dont get activated by normal module script, mount cache so that downloads work correctly
PRODUCT_COPY_FILES += \
device/htc/leo/prebuilt/init.d/01modules:system/etc/init.d/01modules \
device/htc/leo/prebuilt/init.d/02usb_tethering:system/etc/init.d/02usb_tethering \
device/htc/leo/prebuilt/init.d/10mic_level:system/etc/init.d/10mic_level \
device/htc/leo/prebuilt/init.d/97ppp:system/etc/init.d/97ppp
# Sensors
PRODUCT_PACKAGES += \
sensors.htcleo \
lights.htcleo \
gps.htcleo
# Audio
PRODUCT_PACKAGES += \
audio.a2dp.default \
audio.primary.qsd8k \
audio_policy.qsd8k \
libaudioutils
# GPU
PRODUCT_PACKAGES += \
copybit.qsd8k \
gralloc.qsd8k \
hwcomposer.default \
hwcomposer.qsd8k \
liboverlay \
libgenlock \
libmemalloc \
libtilerenderer \
libQcomUI
# Omx
PRODUCT_PACKAGES += \
libmm-omxcore \
libOmxCore \
libOmxVdec \
libOmxVidEnc \
libstagefrighthw
# Omx cli test apps
#PRODUCT_PACKAGES += \
# liblasic \
# mm-vdec-omx-test \
# ast-mm-vdec-omx-test \
# mm-venc-omx-test
# htcleo misc
PRODUCT_PACKAGES += \
camera.qsd8k \
leo-reference-ril \
libgps \
libhtc_ril_wrapper
PRODUCT_PACKAGES += \
Stk \
Camera \
Torch \
librs_jni \
Launcher2
# strict mode
ADDITIONAL_DEFAULT_PROPERTIES += persist.sys.strictmode.disable=true
# make fallback to mdpi possible
# e.g. for maintaining crisp assets on 160dpi
PRODUCT_AAPT_CONFIG := normal hdpi mdpi
PRODUCT_AAPT_PREF_CONFIG := hdpi mdpi
PRODUCT_PROPERTY_OVERRIDES += \
debug.sf.hw=1 \
debug.composition.type=mdp \
dalvik.vm.dexopt-flags=m=y \
dalvik.vm.checkjni=false \
dalvik.vm.heapsize=128m \
dalvik.vm.heapgrowthlimit=48m \
dalvik.vm.heapstartsize=5m \
dalvik.vm.dexopt-data-only=1 \
dalvik.vm.verify-bytecode=false \
dalvik.vm.lockprof.threshold=500 \
windowsmgr.max_events_per_sec=120
# Force launcher/apps into memory
PRODUCT_PROPERTY_OVERRIDES += \
ro.HOME_APP_ADJ=1 \
ro.PERCEPTIBLE_APP_ADJ=0
# HardwareRenderer properties
# dirty_regions: "false" to disable partial invalidates, override if enabletr=true
PRODUCT_PROPERTY_OVERRIDES += \
hwui.render_dirty_regions=false \
hwui.disable_vsync=true \
hwui.print_config=choice \
debug.enabletr=false
# Force 2 buffers - gralloc defaults to 3 and we only have 2
PRODUCT_PROPERTY_OVERRIDES += \
debug.gr.numframebuffers=2
# disable jni check
PRODUCT_PROPERTY_OVERRIDES += \
ro.kernel.android.checkjni=0 \
dalvik.vm.checkjni=0
# Set usb type
PRODUCT_PROPERTY_OVERRIDES += \
persist.sys.usb.config=mass_storage \
persist.service.adb.enable=1
PRODUCT_COPY_FILES += \
device/htc/leo/prebuilt/vold.fstab:system/etc/vold.fstab
# Keylayouts
PRODUCT_COPY_FILES += \
device/htc/leo/prebuilt/keylayout/htcleo-keypad.kl:system/usr/keylayout/htcleo-keypad.kl \
device/htc/leo/prebuilt/keylayout/htcleo-keypad.kcm:system/usr/keychars/htcleo-keypad.kcm \
device/htc/leo/prebuilt/keylayout/h2w_headset.kl:system/usr/keylayout/h2w_headset.kl
# Touchscreen
PRODUCT_COPY_FILES += \
device/htc/leo/prebuilt/htcleo-touchscreen.idc:system/usr/idc/htcleo-touchscreen.idc
# PPP files
PRODUCT_COPY_FILES += \
device/htc/leo/prebuilt/ppp/ip-up:system/etc/ppp/ip-up \
device/htc/leo/prebuilt/ppp/ip-down:system/etc/ppp/ip-down \
device/htc/leo/prebuilt/ppp/ppp:system/ppp \
device/htc/leo/prebuilt/ppp/options:system/etc/ppp/options
# The gps config appropriate for this device
PRODUCT_COPY_FILES += \
device/htc/leo/prebuilt/gps.conf:system/etc/gps.conf
# stuff common to all HTC phones
$(call inherit-product, device/htc/common/common.mk)
# goo.im stuff
$(call inherit-product, device/htc/leo/goo.mk)
PRODUCT_NAME := htc_leo
PRODUCT_DEVICE := leo
#
# 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.
#
#
# This is the product configuration for a generic GSM leo,
# not specialized for any geography.
#
## (1) First, the most specific values, i.e. the aspects that are specific to GSM
PRODUCT_COPY_FILES += \
device/htc/leo/init.htcleo.rc:root/init.htcleo.rc \
device/htc/leo/init.rc:root/init.rc \
PRODUCT_PROPERTY_OVERRIDES += \
ro.sf.lcd_density=240 \
rild.libpath=/system/lib/libhtc_ril.so \
ro.ril.ecc.HTC-ELL=92,93,94 \
ro.ril.ecc.HTC-WWE=999 \
ro.ril.enable.a52.HTC-ITA=1 \
ro.ril.enable.a53.HTC-ITA=1 \
ro.ril.enable.a52=0 \
ro.ril.enable.a53=1 \
ro.ril.enable.dtm=1 \
ro.ril.gprsclass=12 \
ro.ril.hsdpa.category=8 \
ro.ril.hsupa.category=5 \
ro.ril.hsxpa=2 \
mobiledata.interfaces=rmnet0,rmnet1,rmnet2,ppp0 \
wifi.interface=eth0 \
wifi.supplicant_scan_interval=15
# Default network type.
# 0 => WCDMA preferred.
PRODUCT_PROPERTY_OVERRIDES += \
ro.telephony.default_network=0
# Set default_france.acdb to audio_ctl driver if the ro.cid is HTC__203
PRODUCT_PROPERTY_OVERRIDES += \
ro.ril.enable.prl.recognition=1
# The OpenGL ES API level that is natively supported by this device.
# This is a 16.16 fixed point number
PRODUCT_PROPERTY_OVERRIDES += \
ro.opengles.version=131072
# we have enough storage space to hold precise GC data
PRODUCT_TAGS += dalvik.gc.type-precise
PRODUCT_PROPERTY_OVERRIDES += \
ro.media.dec.jpeg.memcap=20000000
# This is a high density device with more memory, so larger vm heaps for it.
PRODUCT_PROPERTY_OVERRIDES += \
dalvik.vm.heapsize=32m
# leo have huge 250Mb unwritable system and small 50Mb cache .
PRODUCT_PROPERTY_OVERRIDES += \
dalvik.vm.dexopt-data-only=1
## (2) Also get non-open-source GSM-specific aspects if available
$(call inherit-product-if-exists, vendor/htc/leo/leo-vendor.mk)
DEVICE_PACKAGE_OVERLAYS += device/htc/leo/overlay
PRODUCT_COPY_FILES += \
frameworks/base/data/etc/handheld_core_hardware.xml:system/etc/permissions/handheld_core_hardware.xml \
frameworks/base/data/etc/android.hardware.camera.flash-autofocus.xml:system/etc/permissions/android.hardware.camera.flash-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.location.gps.xml:system/etc/permissions/android.hardware.location.gps.xml \
frameworks/base/data/etc/android.hardware.wifi.xml:system/etc/permissions/android.hardware.wifi.xml \
frameworks/base/data/etc/android.hardware.sensor.proximity.xml:system/etc/permissions/android.hardware.sensor.proximity.xml \
frameworks/base/data/etc/android.hardware.sensor.light.xml:system/etc/permissions/android.hardware.sensor.light.xml \
frameworks/base/data/etc/android.software.sip.voip.xml:system/etc/permissions/android.software.sip.voip.xml \
frameworks/base/data/etc/android.hardware.touchscreen.multitouch.xml:system/etc/permissions/android.hardware.touchscreen.multitouch.xml
# media config xml file
PRODUCT_COPY_FILES += \
device/htc/leo/media_profiles.xml:system/etc/media_profiles.xml
PRODUCT_PACKAGES += \
sensors.htcleo \
lights.htcleo \
librs_jni \
gralloc.qsd8k \
copybit.qsd8k \
leo-reference-ril \
gps.htcleo \
libgps \
libhtc_ril_wrapper
# leo uses high-density artwork where available
PRODUCT_LOCALES := hdpi
PRODUCT_COPY_FILES += \
device/htc/leo/vold.fstab:system/etc/vold.fstab
# Keylayouts
PRODUCT_COPY_FILES += \
device/htc/leo/leo-keypad.kl:system/usr/keylayout/leo-keypad.kl \
device/htc/leo/leo-keypad.kcm.bin:system/usr/keychars/leo-keypad.kcm.bin \
device/htc/leo/h2w_headset.kl:system/usr/keylayout/h2w_headset.kl
# Firmware
PRODUCT_COPY_FILES += \
device/htc/leo/firmware/fw_bcm4329.bin:system/etc/firmware/fw_bcm4329.bin \
device/htc/leo/firmware/fw_bcm4329_apsta.bin:system/etc/firmware/fw_bcm4329_apsta.bin
#GSM APN LIST
PRODUCT_COPY_FILES += \
vendor/cyanogen/prebuilt/common/etc/apns-conf.xml:system/etc/apns-conf.xml
PRODUCT_COPY_FILES += \
device/htc/leo/modules/bcm4329.ko:system/lib/modules/bcm4329.ko \
device/htc/leo/modules/cifs.ko:system/lib/modules/cifs.ko \
device/htc/leo/modules/msm_rmnet.ko:system/lib/modules/msm_rmnet.ko \
device/htc/leo/modules/nls_utf8.ko:system/lib/modules/nls_utf8.ko \
device/htc/leo/modules/tun.ko:system/lib/modules/tun.ko \
device/htc/leo/modules/fuse.ko:system/lib/modules/fuse.ko
PRODUCT_COPY_FILES += \
device/htc/leo/kernel:boot/zImage \
ifeq ($(TARGET_PREBUILT_KERNEL),)
LOCAL_KERNEL := device/htc/leo/kernel
else
LOCAL_KERNEL := $(TARGET_PREBUILT_KERNEL)
endif
# The gps config appropriate for this device
PRODUCT_COPY_FILES += \
device/htc/leo/gps.conf:system/etc/gps.conf
PRODUCT_COPY_FILES += \
$(LOCAL_KERNEL):kernel
# media profiles and capabilities spec
$(call inherit-product, device/htc/leo/media_a1026.mk)
# stuff common to all HTC phones
$(call inherit-product, device/htc/common/common.mk)
PRODUCT_NAME := htc_leo
PRODUCT_DEVICE := leo

0
leo_as.mk Normal file → Executable file
View File

11
leo_eu.mk Normal file → Executable file
View File

@ -19,18 +19,9 @@
# configured with Europe-specific settings.
#
# Copy gsmconfig here for now as a workaround
# GSM APN list
PRODUCT_COPY_FILES += \
vendor/cm/prebuilt/common/etc/apns-conf.xml:system/etc/apns-conf.xml
# GSM SPN overrides list
PRODUCT_COPY_FILES += \
vendor/cm/prebuilt/common/etc/spn-conf.xml:system/etc/spn-conf.xml
# The gps config appropriate for this device
PRODUCT_COPY_FILES += \
device/htc/leo/prebuilt/gps_eu.conf:system/etc/gps.conf
device/htc/leo/gps_eu.conf:system/etc/gps.conf
# The rest of the configuration is inherited from a generic config

0
leo_us.mk Normal file → Executable file
View File

View File

@ -1,12 +1,11 @@
/*
* Copyright (C) 2011 The CyanogenMod Project
* Copyright (C) 2012 marc1706
* Copyright (C) 2008 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
* 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,
@ -15,6 +14,8 @@
* limitations under the License.
*/
// #define LOG_NDEBUG 0
#define LOG_TAG "lights"
#include <cutils/log.h>
@ -25,398 +26,215 @@
#include <errno.h>
#include <fcntl.h>
#include <pthread.h>
#include <time.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <hardware/lights.h>
static pthread_once_t g_init = PTHREAD_ONCE_INIT;
/******************************************************************************/
static pthread_mutex_t g_lock = PTHREAD_MUTEX_INITIALIZER;
static struct light_state_t g_notification;
static struct light_state_t g_battery;
static int g_backlight = 255;
static struct light_state_t g_notification = {0,0,0,0,0};
static struct light_state_t g_battery = {0,0,0,0,0};
// battery state checker vars
#define BATT_NONE 1
#define BATT_FULL 5
#define BATT_CHARGING 9
static char const*const GREEN_LED_FILE
= "/sys/class/leds/green/brightness";
static pthread_t t_battery_checker = 0;
static int battery_thread_check = 1;
static int last_battery_state = 0;
static int force_led_amber = 0;
static int battery_thread_running = 0;
static char const*const AMBER_LED_FILE
= "/sys/class/leds/amber/brightness";
// sysfs files
char const*const AMBER_LED_FILE = "/sys/class/leds/amber/brightness";
char const*const GREEN_LED_FILE = "/sys/class/leds/green/brightness";
static char const*const RED_LED_FILE
= "/sys/class/leds/red/brightness";
char const*const BUTTON_FILE = "/sys/class/leds/button-backlight/brightness";
static char const*const LCD_FILE
= "/sys/class/leds/lcd-backlight/brightness";
char const*const AMBER_BLINK_FILE = "/sys/class/leds/amber/blink";
char const*const GREEN_BLINK_FILE = "/sys/class/leds/green/blink";
static char const*const AMBER_BLINK_FILE
= "/sys/class/leds/amber/blink";
char const*const LCD_BACKLIGHT_FILE = "/sys/class/leds/lcd-backlight/brightness";
static char const*const GREEN_BLINK_FILE
= "/sys/class/leds/green/blink";
char const*const BATTERY_STATUS_FILE = "/sys/class/power_supply/battery/status";
static char const*const RED_BLINK_FILE
= "/sys/class/leds/red/blink";
static char const*const BUTTON_FILE
= "/sys/class/leds/button-backlight/brightness";
enum {
LED_AMBER,
LED_GREEN,
LED_BLUE,
LED_BLANK,
};
/**
* Aux method, write int to file
* device methods
*/
static int write_int (const char* path, int value) {
int fd;
static int already_warned = 0;
fd = open(path, O_RDWR);
if (fd < 0) {
if (already_warned == 0) {
LOGE("write_int failed to open %s\n", path);
already_warned = 1;
}
return -errno;
}
char buffer[20];
int bytes = snprintf(buffer, sizeof(buffer), "%d\n",value);
int written = write (fd, buffer, bytes);
close (fd);
return written == -1 ? -errno : 0;
}
void init_globals (void) {
pthread_mutex_init (&g_lock, NULL);
}
static int is_lit (struct light_state_t const* state) {
return state->color & 0x00ffffff;
}
static void set_speaker_light_locked (struct light_device_t *dev, struct light_state_t *state) {
unsigned int colorRGB = state->color & 0xFFFFFF;
unsigned int color = LED_BLANK;
if (colorRGB & 0xFF)
color = LED_BLUE;
if ((colorRGB >> 8)&0xFF)
color = LED_GREEN;
if ((colorRGB >> 16)&0xFF)
color = LED_AMBER;
/*
* this is needed in order to make sure that we don't show the green led
* at first while having a battery level between 90% and 100%
* -- marc1706
*/
if (state->flashMode == LIGHT_FLASH_NONE && color == LED_GREEN &&
force_led_amber) {
color = LED_AMBER;
force_led_amber = 0;
}
int amber = (colorRGB >> 16)&0xFF;
int green = (colorRGB >> 8)&0xFF;
int blue = (colorRGB)&0xFF;
switch (state->flashMode) {
case LIGHT_FLASH_TIMED:
switch (color) {
case LED_AMBER:
write_int (AMBER_BLINK_FILE, 2);
write_int (GREEN_LED_FILE, 0);
break;
case LED_GREEN:
write_int (GREEN_BLINK_FILE, 3);
write_int (AMBER_LED_FILE, 0);
break;
case LED_BLUE:
write_int (GREEN_BLINK_FILE, 3);
write_int (AMBER_LED_FILE, 0);
break;
case LED_BLANK:
write_int (AMBER_BLINK_FILE, 0);
write_int (GREEN_BLINK_FILE, 0);
break;
default:
LOGE("set_led_state colorRGB=%08X, unknown color\n",
colorRGB);
break;
}
break;
case LIGHT_FLASH_NONE:
switch (color) {
case LED_AMBER:
write_int (AMBER_LED_FILE, 1);
write_int (GREEN_LED_FILE, 0);
break;
case LED_GREEN:
write_int (AMBER_LED_FILE, 0);
write_int (GREEN_LED_FILE, 1);
break;
case LED_BLUE:
write_int (AMBER_LED_FILE, 0);
write_int (GREEN_LED_FILE, 1);
break;
case LED_BLANK:
write_int (AMBER_LED_FILE, 0);
write_int (GREEN_LED_FILE, 0);
break;
}
break;
default:
LOGE("set_led_state colorRGB=%08X, unknown mode %d\n",
colorRGB, state->flashMode);
}
}
/*
* check battery level and change LED if necessary
* Copyright (C) 2012 Marc Alexander - marc1706
*
* @param (int) ret: return 1 if charging, 0 if full
*/
static int check_battery_level(int ret) {
char str[20];
int batt, battery_state;
memset(&str[0], 0, sizeof(str));
batt = open(BATTERY_STATUS_FILE,O_RDONLY);
read(batt, str, 20);
close(batt);
battery_state = 0;
battery_state = sprintf(str, "%s", str);
if (last_battery_state != BATT_CHARGING && last_battery_state != BATT_FULL) {
last_battery_state = BATT_NONE;
LOGE("%s: Incorrect last battery_state! Resetting last battery state!",
__func__);
}
if (battery_state != BATT_CHARGING && battery_state != BATT_FULL)
LOGE("%s: Incorrect battery_state!", __func__);
// did the battery state change?
if (battery_state != last_battery_state) {
last_battery_state = battery_state;
// battery & notification led should show
if (is_lit (&g_battery) && is_lit (&g_notification)) {
if (battery_state == BATT_CHARGING) {
// Charging -- fast blink amber
write_int (AMBER_BLINK_FILE, 2);
write_int (GREEN_LED_FILE, 0);
if (ret)
ret = 1;
} else {
// Charging -- fast blink green
write_int (AMBER_LED_FILE, 0);
write_int (GREEN_BLINK_FILE, 3);
// cancel thread if we reached full level
battery_thread_check = 0;
if (ret)
ret = 1;
}
} else if (!(is_lit (&g_battery) && is_lit (&g_notification))) {
if (battery_state == BATT_CHARGING) {
// Charging
write_int (AMBER_LED_FILE, 1);
write_int (GREEN_LED_FILE, 0);
if (ret)
ret = 1;
} else if (battery_state == BATT_FULL) {
// Full
write_int (AMBER_LED_FILE, 0);
write_int (GREEN_LED_FILE, 1);
// cancel thread if we reached full level
battery_thread_check = 0;
if (ret)
ret = 0;
}
}
LOGI("%s: state=%u", __func__, battery_state);
} else if (ret) {
if (battery_state == BATT_CHARGING)
ret = 1;
else
ret = 0;
}
return ret;
}
/*
* thread routing for checking the battery state
* Copyright (C) 2012 Marc Alexander - marc1706
*/
void *battery_level_check(void *arg) {
struct timespec wait;
wait.tv_nsec = 1;
wait.tv_sec = 5;
struct timespec start_wait;
start_wait.tv_nsec = 500000000;
start_wait.tv_sec = 0;
// wait for last thread to finish
while (battery_thread_running)
nanosleep(&start_wait, NULL);
battery_thread_running = 1;
battery_thread_check = 1;
while (battery_thread_check) {
check_battery_level(0);
nanosleep(&wait, NULL);
}
LOGI("%s: done with thread", __func__);
battery_thread_running = 0;
return NULL;
}
/*
* start thread for checking battery state
* Copyright (C) 2012 Marc Alexander - marc1706
*/
void start_battery_thread() {
LOGI("%s: start thread", __func__);
if (t_battery_checker == 0)
pthread_create(&t_battery_checker, NULL, battery_level_check, NULL);
}
static void set_speaker_light_locked_dual (struct light_device_t *dev, struct light_state_t *bstate, struct light_state_t *nstate) {
unsigned int bcolorRGB = bstate->color & 0xFFFFFF;
unsigned int bcolor = LED_BLANK;
int is_charging = check_battery_level(1);
if ((bcolorRGB >> 8)&0xFF) bcolor = LED_GREEN;
if ((bcolorRGB >> 16)&0xFF) bcolor = LED_AMBER;
if (bcolor == LED_GREEN && is_charging) {
write_int (AMBER_BLINK_FILE, 2);
write_int (GREEN_LED_FILE, 0);
start_battery_thread();
} else if (bcolor == LED_AMBER) {
write_int (AMBER_BLINK_FILE, 2);
write_int (GREEN_LED_FILE, 0);
} else if (bcolor == LED_GREEN) {
write_int (AMBER_LED_FILE, 0);
write_int (GREEN_BLINK_FILE, 3);
} else {
LOGE("set_led_state (dual) unexpected color: bcolorRGB=%08x\n", bcolorRGB);
}
}
static void handle_speaker_battery_locked (struct light_device_t *dev) {
unsigned int colorRGB = g_battery.color & 0xFFFFFF;
int ret = 0;
// reset threads first
t_battery_checker = 0;
battery_thread_check = 0;
if (is_lit (&g_battery) && is_lit (&g_notification)) {
set_speaker_light_locked_dual (dev, &g_battery, &g_notification);
} else if (is_lit (&g_battery)) {
// check if battery is below 100% and we are trying to show the green led
if ((colorRGB >> 8)&0xFF) {
ret = check_battery_level(1);
if (ret) {
force_led_amber = 1;
start_battery_thread();
}
LOGV("%s: changing color from LED_GREEN to LED_AMBER", __func__);
}
set_speaker_light_locked (dev, &g_battery);
} else {
set_speaker_light_locked (dev, &g_notification);
}
LOGV("%s: g_battery=%d , g_notification=%d", __func__, is_lit (&g_battery),
is_lit (&g_notification));
}
static int set_light_buttons (struct light_device_t* dev,
struct light_state_t const* state) {
int err = 0;
int on = is_lit (state);
pthread_mutex_lock (&g_lock);
err = write_int (BUTTON_FILE, on?255:0);
pthread_mutex_unlock (&g_lock);
return err;
}
static int rgb_to_brightness(struct light_state_t const* state)
static int
write_int(char const* path, int value)
{
int color = state->color & 0x00ffffff;
return ((77*((color>>16)&0x00ff))
+ (150*((color>>8)&0x00ff)) + (29*(color&0x00ff))) >> 8;
int fd;
static int already_warned = 0;
fd = open(path, O_RDWR);
if (fd >= 0) {
char buffer[20];
int bytes = sprintf(buffer, "%d\n", value);
int amt = write(fd, buffer, bytes);
close(fd);
return amt == -1 ? -errno : 0;
} else {
if (already_warned == 0) {
LOGE("write_int failed to open %s\n", path);
already_warned = 1;
}
return -errno;
}
}
static int set_light_backlight(struct light_device_t* dev,
struct light_state_t const* state) {
int err = 0;
int brightness = rgb_to_brightness(state);
LOGV("%s: brightness=%d color=0x%08x",
__func__,brightness, state->color);
pthread_mutex_lock(&g_lock);
g_backlight = brightness;
err = write_int(LCD_BACKLIGHT_FILE, brightness);
pthread_mutex_unlock(&g_lock);
return err;
static int
is_lit(struct light_state_t const* state)
{
return state->color & 0x00ffffff;
}
static int set_light_battery (struct light_device_t* dev,
struct light_state_t const* state) {
pthread_mutex_lock (&g_lock);
g_battery = *state;
handle_speaker_battery_locked(dev);
pthread_mutex_unlock (&g_lock);
return 0;
static int
rgb_to_brightness(struct light_state_t const* state)
{
int color = state->color & 0x00ffffff;
return ((77*((color>>16)&0x00ff))
+ (150*((color>>8)&0x00ff)) + (29*(color&0x00ff))) >> 8;
}
static int set_light_attention (struct light_device_t* dev,
struct light_state_t const* state) {
/* bravo has no attention, bad bravo */
/* dito on the leo */
return 0;
static int
set_light_backlight(struct light_device_t* dev,
struct light_state_t const* state)
{
int err = 0;
int brightness = rgb_to_brightness(state);
pthread_mutex_lock(&g_lock);
err = write_int(LCD_FILE, brightness);
pthread_mutex_unlock(&g_lock);
return err;
}
static int set_light_notifications (struct light_device_t* dev,
struct light_state_t const* state) {
pthread_mutex_lock (&g_lock);
g_notification = *state;
handle_speaker_battery_locked (dev);
pthread_mutex_unlock (&g_lock);
return 0;
static int
set_light_buttons(struct light_device_t* dev,
struct light_state_t const* state)
{
int err = 0;
int on = is_lit(state);
pthread_mutex_lock(&g_lock);
err = write_int(BUTTON_FILE, on?255:0);
pthread_mutex_unlock(&g_lock);
return err;
}
/* Close the lights device */
static int close_lights (struct light_device_t *dev) {
if (dev)
free (dev);
static int
set_speaker_light_locked(struct light_device_t* dev,
struct light_state_t const* state)
{
int len;
int alpha, red, green, blue;
int blink, freq, pwm;
int onMS, offMS;
unsigned int colorRGB;
return 0;
switch (state->flashMode) {
case LIGHT_FLASH_TIMED:
blink = 1;
onMS = state->flashOnMS;
offMS = state->flashOffMS;
break;
case LIGHT_FLASH_HARDWARE:
blink = 1;
onMS = state->flashOnMS;
offMS = state->flashOffMS;
break;
case LIGHT_FLASH_NONE:
blink = 0;
onMS = 0;
offMS = 0;
break;
default:
blink = 1;
onMS = 0;
offMS = 0;
break;
}
colorRGB = state->color;
#if 0
LOGD("set_speaker_light_locked colorRGB=%08X, onMS=%d, offMS=%d\n",
colorRGB, onMS, offMS);
#endif
red = (colorRGB >> 16) & 0xFF;
green = (colorRGB >> 8) & 0xFF;
blue = colorRGB & 0xFF;
if (red) {
write_int(GREEN_LED_FILE, 0);
write_int(AMBER_LED_FILE, 1);
if (blink) {
//blink must come after brightness change
write_int(AMBER_BLINK_FILE, 1);
}
} else if (green || blue) {
write_int(AMBER_LED_FILE, 0);
write_int(GREEN_LED_FILE, 1);
if (blink) {
write_int(GREEN_BLINK_FILE, 1);
}
} else {
write_int(GREEN_LED_FILE, 0);
write_int(AMBER_LED_FILE, 0);
}
return 0;
}
static void
handle_speaker_battery_locked(struct light_device_t* dev)
{
if (is_lit(&g_battery)) {
set_speaker_light_locked(dev, &g_battery);
} else {
set_speaker_light_locked(dev, &g_notification);
}
}
static int
set_light_battery(struct light_device_t* dev,
struct light_state_t const* state)
{
pthread_mutex_lock(&g_lock);
g_battery = *state;
handle_speaker_battery_locked(dev);
pthread_mutex_unlock(&g_lock);
return 0;
}
static int
set_light_notifications(struct light_device_t* dev,
struct light_state_t const* state)
{
pthread_mutex_lock(&g_lock);
g_notification = *state;
handle_speaker_battery_locked(dev);
pthread_mutex_unlock(&g_lock);
return 0;
}
/** Close the lights device */
static int
close_lights(struct light_device_t *dev)
{
if (dev) {
free(dev);
}
return 0;
}
@ -426,58 +244,55 @@ static int close_lights (struct light_device_t *dev) {
* module methods
*/
/* Open a new instance of a lights device using name */
static int open_lights (const struct hw_module_t* module, char const* name,
struct hw_device_t** device) {
int (*set_light)(struct light_device_t* dev,
struct light_state_t const* state);
/** Open a new instance of a lights device using name */
static int open_lights(const struct hw_module_t* module, char const* name,
struct hw_device_t** device)
{
int (*set_light)(struct light_device_t* dev,
struct light_state_t const* state);
if (0 == strcmp(LIGHT_ID_BACKLIGHT, name)) {
set_light = set_light_backlight;
}
else if (0 == strcmp(LIGHT_ID_BUTTONS, name)) {
set_light = set_light_buttons;
}
else if (0 == strcmp(LIGHT_ID_BATTERY, name)) {
set_light = set_light_battery;
}
else if (0 == strcmp(LIGHT_ID_ATTENTION, name)) {
set_light = set_light_attention;
}
else if (0 == strcmp(LIGHT_ID_NOTIFICATIONS, name)) {
set_light = set_light_notifications;
}
else {
return -EINVAL;
}
if (0 == strcmp(LIGHT_ID_BACKLIGHT, name)) {
set_light = set_light_backlight;
}
else if (0 == strcmp(LIGHT_ID_BUTTONS, name)) {
set_light = set_light_buttons;
}
else if (0 == strcmp(LIGHT_ID_BATTERY, name)) {
set_light = set_light_battery;
}
else if (0 == strcmp(LIGHT_ID_NOTIFICATIONS, name)) {
set_light = set_light_notifications;
}
else {
return -EINVAL;
}
pthread_once (&g_init, init_globals);
struct light_device_t *dev = calloc(1, sizeof(struct light_device_t));
struct light_device_t *dev = calloc(1, sizeof(struct light_device_t));
dev->common.tag = HARDWARE_DEVICE_TAG;
dev->common.version = 0;
dev->common.module = (struct hw_module_t*)module;
dev->common.close = (int (*)(struct hw_device_t*))close_lights;
dev->set_light = set_light;
dev->common.tag = HARDWARE_DEVICE_TAG;
dev->common.version = 0;
dev->common.module = (struct hw_module_t*)module;
dev->common.close = (int (*)(struct hw_device_t*))close_lights;
dev->set_light = set_light;
*device = (struct hw_device_t*) dev;
return 0;
*device = (struct hw_device_t*)dev;
return 0;
}
static struct hw_module_methods_t lights_module_methods = {
.open = open_lights,
.open = open_lights,
};
/*
* The lights Module
*/
const struct hw_module_t HAL_MODULE_INFO_SYM = {
.tag = HARDWARE_MODULE_TAG,
.version_major = 1,
.version_minor = 0,
.id = LIGHTS_HARDWARE_MODULE_ID,
.name = "HTC leo lights module",
.author = "Marc Alexander",
.methods = &lights_module_methods,
.tag = HARDWARE_MODULE_TAG,
.version_major = 1,
.version_minor = 0,
.id = LIGHTS_HARDWARE_MODULE_ID,
.name = "QCT MSM7K lights Module",
.author = "Google, Inc.",
.methods = &lights_module_methods,
};

30
media_a1026.mk Normal file
View File

@ -0,0 +1,30 @@
#
# 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.
#
#
# This file describes the use of the A1026 chip by the media
# framework using system properties.
#
# Note: The property key and value has some length
# limit as defined by PROPERTY_KEY_MAX and
# PROPERTY_VALUE_MAX, respectively
#
# WARNING: We may not use system properties for specifying
# media capabilities and profiles in the future
#
PRODUCT_PROPERTY_OVERRIDES += \
media.a1026.nsForVoiceRec = 0 \
media.a1026.enableA1026 = 1

View File

@ -22,7 +22,7 @@
AudioDecoderCap)>
<!ELEMENT CamcorderProfiles (EncoderProfile+, ImageEncoding+, ImageDecoding, Camera)>
<!ELEMENT EncoderProfile (Video, Audio)>
<!ATTLIST EncoderProfile quality (480p|qcif) #REQUIRED>
<!ATTLIST EncoderProfile quality (high|low) #REQUIRED>
<!ATTLIST EncoderProfile fileFormat (mp4|3gp) #REQUIRED>
<!ATTLIST EncoderProfile duration (30|60) #REQUIRED>
<!ELEMENT Video EMPTY>
@ -78,22 +78,22 @@
<MediaSettings>
<!-- Each camcorder profile defines a set of predefined configuration parameters -->
<CamcorderProfiles cameraId="0">
<!-- Added but disabled for now until stagefright is fixed
<EncoderProfile quality="720p" fileFormat="mp4" duration="60">
<!--
<EncoderProfile quality="hd" fileFormat="mp4" duration="60">
<Video codec="m4v"
bitRate="6000000"
width="1280"
height="720"
frameRate="30" />
frameRate="24" />
<Audio codec="aac"
bitRate="96000"
sampleRate="16000"
channels="1" />
bitRate="96000"
sampleRate="16000"
channels="1" />
</EncoderProfile>
-->
<EncoderProfile quality="480p" fileFormat="mp4" duration="60">
<Video codec="m4v"
-->
<EncoderProfile quality="high" fileFormat="mp4" duration="60">
<Video codec="h264"
bitRate="3000000"
width="720"
height="480"
@ -105,7 +105,7 @@
channels="1" />
</EncoderProfile>
<EncoderProfile quality="qcif" fileFormat="3gp" duration="30">
<EncoderProfile quality="low" fileFormat="3gp" duration="30">
<Video codec="h263"
bitRate="256000"
width="176"
@ -119,27 +119,33 @@
</EncoderProfile>
<EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="60">
<ImageEncoding quality="90" />
<ImageEncoding quality="80" />
<ImageEncoding quality="70" />
</CamcorderProfiles>
<CamcorderProfiles cameraId="1">
<EncoderProfile quality="high" fileFormat="mp4" duration="60">
<Video codec="h264"
bitRate="3000000"
width="720"
bitRate="2000000"
width="640"
height="480"
frameRate="24" />
<!-- Audio settings are not used for timealpse video recording -->
<Audio codec="aac"
bitRate="96000"
sampleRate="16000"
channels="1" />
</EncoderProfile>
<EncoderProfile quality="timelapseqcif" fileFormat="3gp" duration="30">
<EncoderProfile quality="low" fileFormat="3gp" duration="30">
<Video codec="h263"
bitRate="256000"
width="176"
height="144"
frameRate="15" />
<!-- Audio settings are not used for timealpse video recording -->
<Audio codec="amrnb"
bitRate="12200"
sampleRate="8000"
@ -150,13 +156,11 @@
<ImageEncoding quality="80" />
<ImageEncoding quality="70" />
<ImageDecoding memCap="20000000" />
<ImageDecoding memCap="10000000" />
<Camera previewFrameRate="0" />
</CamcorderProfiles>
<EncoderOutputFileFormat name="3gp" />
<EncoderOutputFileFormat name="mp4" />
@ -167,21 +171,21 @@
-->
<VideoEncoderCap name="h264" enabled="true"
minBitRate="64000" maxBitRate="6000000"
minFrameWidth="176" maxFrameWidth="720"
minFrameWidth="176" maxFrameWidth="800"
minFrameHeight="144" maxFrameHeight="480"
minFrameRate="15" maxFrameRate="30" />
minFrameRate="1" maxFrameRate="30" />
<VideoEncoderCap name="h263" enabled="true"
minBitRate="64000" maxBitRate="6000000"
minFrameWidth="176" maxFrameWidth="720"
minFrameWidth="176" maxFrameWidth="800"
minFrameHeight="144" maxFrameHeight="480"
minFrameRate="15" maxFrameRate="30" />
minFrameRate="1" maxFrameRate="30" />
<VideoEncoderCap name="m4v" enabled="true"
minBitRate="64000" maxBitRate="8000000"
minFrameWidth="176" maxFrameWidth="1280"
minFrameHeight="144" maxFrameHeight="720"
minFrameRate="15" maxFrameRate="30" />
minFrameRate="1" maxFrameRate="30" />
<AudioEncoderCap name="aac" enabled="true"
minBitRate="8192" maxBitRate="96000"

BIN
modules/bcm4329.ko Normal file

Binary file not shown.

BIN
modules/cifs.ko Normal file

Binary file not shown.

BIN
modules/fuse.ko Normal file

Binary file not shown.

BIN
modules/kineto_gan.ko Normal file

Binary file not shown.

BIN
modules/msm_rmnet.ko Normal file

Binary file not shown.

BIN
modules/nls_utf8.ko Normal file

Binary file not shown.

BIN
modules/tun.ko Normal file

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 291 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 192 KiB

View File

@ -21,53 +21,66 @@
for different hardware and product builds. -->
<resources>
<!-- Flag indicating whether the surface flinger has limited
alpha compositing functionality in hardware. If set, the window
manager will disable alpha trasformation in animations where not
strictly needed. -->
<bool name="config_sf_limitedAlpha">true</bool>
<!-- Flag indicating whether we should enable the automatic brightness in Settings.
config_hardware_automatic_brightness_available is not set, so we will use software implementation -->
<bool name="config_automatic_brightness_available">true</bool>
<!-- disable menu hard key on HD2 in non-pattern lockscreen -->
<bool name="config_disableMenuKeyInLockScreen">true</bool>
<!-- Flag indicating whether the surface flinger has limited
alpha compositing functionality in hardware. If set, the window
manager will disable alpha trasformation in animations where not
strictly needed. -->
<bool name="config_sf_limitedAlpha">false</bool>
<!-- Flag indicating whether the surface flinger is inefficient
at performing a blur. Used by parts of the UI to turn off
the blur effect where it isn't worth the performance hit.
As of Honeycomb, blurring is not supported anymore. -->
<bool name="config_sf_slowBlur">true</bool>
<!-- Array of light sensor LUX values to define our levels for auto backlight brightness support.
The N entries of this array define N + 1 zones as follows:
<integer-array name="config_autoBrightnessLevels">
<item>160</item>
<item>225</item>
<item>320</item>
<item>640</item>
<item>1280</item>
<item>2600</item>
<item>5800</item>
Zone 0: 0 <= LUX < array[0]
Zone 1: array[0] <= LUX < array[1]
...
Zone N: array[N - 1] <= LUX < array[N]
Zone N + 1: array[N] <= LUX < infinity
Must be overridden in platform specific overlays -->
<integer-array name="config_autoBrightnessLevels">
<item>11</item>
<item>41</item>
<item>91</item>
<item>161</item>
<item>226</item>
<item>321</item>
<item>641</item>
<item>1281</item>
<item>2601</item>
</integer-array>
<!-- Array of output values for LCD backlight corresponding to the LUX values
in the config_autoBrightnessLevels array. This array should have size one greater
than the size of the config_autoBrightnessLevels array. -->
in the config_autoBrightnessLevels array. This array should have size one greater
than the size of the config_autoBrightnessLevels array.
-->
<integer-array name="config_autoBrightnessLcdBacklightValues">
<item>80</item>
<item>100</item>
<item>120</item>
<item>140</item>
<item>160</item>
<item>180</item>
<item>220</item>
<item>89</item>
<item>89</item>
<item>126</item>
<item>164</item>
<item>164</item>
<item>164</item>
<item>187</item>
<item>210</item>
<item>233</item>
<item>255</item>
</integer-array>
<!-- Array of output values for button backlight corresponding to the LUX values
in the config_autoBrightnessLevels array. This array should have size one greater
than the size of the config_autoBrightnessLevels array. -->
in the config_autoBrightnessLevels array. This array should have size one greater
than the size of the config_autoBrightnessLevels array.
-->
<integer-array name="config_autoBrightnessButtonBacklightValues">
<item>255</item>
<item>255</item>
<item>255</item>
<item>255</item>
<item>0</item>
@ -79,20 +92,22 @@
</integer-array>
<!-- Array of output values for keyboard backlight corresponding to the LUX values
in the config_autoBrightnessLevels array. This array should have size one greater
in the config_autoBrightnessLevels array. This array should have size one greater
than the size of the config_autoBrightnessLevels array.
Leo has no keyboard so all values are zero. -->
Passion has no keyboard so all values are zero.
-->
<integer-array name="config_autoBrightnessKeyboardBacklightValues">
<item>0</item>
<item>0</item>
<item>0</item>
<item>0</item>
<item>0</item>
<item>0</item>
<item>0</item>
<item>0</item>
</integer-array>
<!-- Component name of the default wallpaper. This will be ImageWallpaper if not
specified -->
<string name="default_wallpaper_component">com.android.wallpaper/.nexus.NexusWallpaper</string>
<integer name="config_deskDockKeepsScreenOn">0</integer>
<integer name="config_carDockKeepsScreenOn">1</integer>
@ -108,21 +123,22 @@
<!-- Component name of the service providing geocoder API support. -->
<string name="config_geocodeProvider">com.google.android.location.GeocodeProvider</string>
<!-- An Array of "[Connection name],[ConnectivityManager.TYPE_xxxx],
[associated radio-type],[priority],[restoral-timer(ms)],[dependencyMet] -->
<!-- the 5th element "resore-time" indicates the number of milliseconds to delay
before automatically restore the default connection. Set -1 if the connection
does not require auto-restore. -->
<!-- the 6th element indicates boot-time dependency-met value. -->
<!-- XXXXX NOTE THE FOLLOWING RESOURCES USE THE WRONG NAMING CONVENTION.
Please don't copy them, copy anything else. -->
<!-- This string array should be overridden by the device to present a list of network
attributes. This is used by the connectivity manager to decide which networks can coexist
based on the hardware -->
<!-- An Array of "[Connection name],[ConnectivityManager connection type],
[associated radio-type],[priority] -->
<string-array translatable="false" name="networkAttributes">
<item>"wifi,1,1,1,-1,true"</item>
<item>"mobile,0,0,0,-1,true"</item>
<item>"mobile_mms,2,0,2,60000,true"</item>
<item>"mobile_supl,3,0,2,60000,true"</item>
<item>"mobile_dun,4,0,3,60000,true"</item>
<item>"mobile_hipri,5,0,3,60000,true"</item>
<item>"mobile_bluetooth,7,7,1,-1,true"</item>
<item>"wifi_p2p,13,1,0,-1,true"</item>
<item>"wifi,1,1,1"</item>
<item>"mobile,0,0,0"</item>
<item>"mobile_mms,2,0,2"</item>
<item>"mobile_supl,3,0,2"</item>
<item>"mobile_dun,4,0,4"</item>
<item>"mobile_hipri,5,0,3"</item>
</string-array>
<!-- List of regexpressions describing the interface (if any) that represent tetherable
@ -132,67 +148,44 @@
<item>"usb0"</item>
</string-array>
<!-- Regex array of allowable upstream ifaces for tethering - for example if you want
tethering on a new interface called "foo2" add <item>"foo\\d"</item> to the array -->
<string-array translatable="false" name="config_tether_upstream_regexs">
<item>"rmnet\\d"</item>
<item>"ppp\\d"</item>
<item>"eth\\d"</item>
</string-array>
<!-- List of regexpressions describing the interface (if any) that represent tetherable
Wifi interfaces. If the device doesn't want to support tethering over Wifi this
should be empty. An example would be "softap.*" -->
<string-array translatable="false" name="config_tether_wifi_regexs">
<item>"wl0.1"</item>
</string-array>
<!-- List of regexpressions describing the interface (if any) that represent tetherable
bluetooth interfaces. If the device doesn't want to support tethering over bluetooth this
should be empty. -->
<string-array translatable="false" name="config_tether_bluetooth_regexs">
<item>bnep\\d</item>
</string-array>
<!-- This string array should be overridden by the device to present a list of radio
attributes. This is used by the connectivity manager to decide which networks can coexist
based on the hardware -->
<!-- An Array of "[ConnectivityManager connectionType],
[# simultaneous connection types]" -->
<string-array translatable="false" name="radioAttributes">
<item>"1,1"</item>
<item>"0,1"</item>
<item>"7,1"</item>
</string-array>
<!-- Array of ConnectivityManager.TYPE_xxxx values allowable for tethering -->
<!-- Common options are [1, 4] for TYPE_WIFI and TYPE_MOBILE_DUN or
<!== [0,1,5,7] for TYPE_MOBILE, TYPE_WIFI, TYPE_MOBILE_HIPRI and TYPE_BLUETOOTH -->
<integer-array translatable="false" name="config_tether_upstream_types">
<item>0</item>
<item>1</item>
<item>4</item>
<item>5</item>
<item>7</item>
</integer-array>
<!-- Vibrator pattern for a very short but reliable vibration for soft keyboard tap -->
<!-- Vibrator pattern for a very short but reliable vibration for soft keyboard tap -->
<integer-array name="config_keyboardTapVibePattern">
<item>30</item>
</integer-array>
<!-- Boolean indicating if we require the use of DUN on mobile for tethering -->
<bool translatable="false" name="config_tether_dun_required">false</bool>
<!-- Vibrator pattern for a very short but reliable vibration for soft keyboard tap -->
<integer-array name="config_keyboardTapVibePattern">
<item>30</item>
</integer-array>
<!-- If this is true, the screen will come on when you unplug usb/power/whatever. -->
<bool name="config_unplugTurnsOnScreen">true</bool>
<!-- Whether a software navigation bar should be shown. NOTE: in the future this may be
autodetected from the Configuration. -->
<bool name="config_showNavigationBar">false</bool>
<!-- Minimum screen brightness allowed by the power manager. -->
<integer name="config_screenBrightnessDim">10</integer>
<!-- If this is true, the screen will fade off. -->
<!-- Enable use of power animations -->
<bool name="config_animateScreenLights">false</bool>
<!-- Enables or disables fading edges when marquee is enabled in TextView. -->
<bool name="config_ui_enableFadingMarquee">false</bool>
<!-- Enable Tablet tweaks -->
<bool name="cm_default_has_soft_buttons">true</bool>
<bool name="cm_default_show_soft_home">false</bool>
<bool name="cm_default_show_soft_menu">false</bool>
<bool name="cm_default_show_soft_back">false</bool>
<bool name="cm_default_show_soft_search">false</bool>
<bool name="cm_default_show_soft_quick_na">false</bool>
</resources>

View File

@ -1,4 +0,0 @@
<resources>
<!-- Height of the horizontal navigation bar on devices that require it -->
<dimen name="navigation_bar_height">35dp</dimen>
</resources>

View File

@ -19,12 +19,12 @@
<device name="Android">
<item name="none">0</item>
<item name="screen.on">110</item>
<item name="screen.on">100</item>
<item name="bluetooth.active">142</item> <!-- In call -->
<item name="bluetooth.on">0.3</item>
<!-- CPU wakelock held for 830ms on bluetooth headset at command. 43mA * 830 -->
<item name="bluetooth.at">35690</item>
<item name="screen.full">250</item>
<item name="screen.full">160</item>
<item name="wifi.on">4</item>
<item name="wifi.active">120</item>
<item name="wifi.scan">220</item>
@ -32,7 +32,7 @@
<item name="dsp.video">88</item>
<item name="radio.active">300</item>
<item name="gps.on">170</item>
<item name="battery.capacity">1230</item>
<item name="battery.capacity">1390</item>
<item name="radio.scanning">70</item>
<array name="radio.on"> <!-- Strength 0 to BINS-1 -->
<value>3</value>
@ -69,4 +69,4 @@
<value>148.5</value>
<value>168.4</value>
</array>
</device>
</device>

View File

@ -1,41 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
**
** Copyright 2011, 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.
*/
-->
<!-- The <device> element should contain one or more <storage> elements.
Exactly one of these should have the attribute primary="true".
This storage will be the primary external storage and should have mountPoint="/mnt/sdcard".
Each storage should have both a mountPoint and storageDescription attribute.
The following attributes are optional:
primary: (boolean) this storage is the primary external storage
removable: (boolean) this is removable storage (for example, a real SD card)
emulated: (boolean) the storage is emulated via the FUSE sdcard daemon
mtpReserve: (integer) number of megabytes of storage MTP should reserve for free storage
(used for emulated storage that is shared with system's data partition)
A storage should not have both emulated and removable set to true
-->
<StorageList xmlns:android="http://schemas.android.com/apk/res/android">
<storage android:mountPoint="/mnt/sdcard"
android:storageDescription="@string/storage_sd_card"
android:primary="true"
android:removable="true"
android:allowMassStorage="true" />
</StorageList>

View File

@ -19,9 +19,4 @@
<resources>
<bool name="def_accelerometer_rotation">true</bool>
<bool name="def_screen_brightness_automatic_mode">true</bool>
<integer name="def_screen_off_timeout">60000</integer>
<bool name="def_install_non_market_apps">true</bool>
<string name="def_backup_transport">com.google.android.backup/.BackupTransportService</string>
</resources>

View File

@ -1,28 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
** Copyright 2011, 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.
*/
-->
<!-- These resources are around just to allow their values to be customized
for different hardware and product builds. -->
<resources>
<!-- Control whether status bar should distinguish HSPA data icon form UMTS
data icon on devices -->
<bool name="config_hspa_data_distinguishable">true</bool>
</resources>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/**
* 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.
*/
-->
<resources>
<bool name="def_expect_ime_autopop">true</bool>
</resources>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<bool name="has_trackball">false</bool>
<bool name="has_dual_notification_led">true</bool>
<bool name="has_camera_button">false</bool>
<bool name="has_rgb_notification_led">false</bool>
<bool name="has_led_flash">true</bool>
<bool name="has_search_button">false</bool>
</resources>

0
overlay/packages/apps/Contacts/res/values/config.xml Executable file → Normal file
View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 411 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 316 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 151 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 429 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 222 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 201 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

View File

@ -1,36 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
* 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.
-->
<resources>
<string-array name="wallpapers" translatable="false">
<item>wallpaper_street_lights</item>
<item>wallpaper_stream</item>
<item>wallpaper_phasebeam</item>
<item>wallpaper_pulse</item>
<item>wallpaper_nexusrain</item>
<item>wallpaper_stars</item>
<item>wallpaper_canyon</item>
<item>wallpaper_grass</item>
<item>wallpaper_zanzibar</item>
<item>wallpaper_cloud</item>
<item>wallpaper_monumentvalley</item>
<item>wallpaper_mountains</item>
<item>wallpaper_sunset</item>
<item>wallpaper_goldengate</item>
<item>wallpaper_shuttle</item>
</string-array>
</resources>

View File

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<bool name="config_hardwareAccelerated">true</bool>
</resources>

View File

@ -18,10 +18,9 @@
version 1 - initial version.
version 2 - added recipientLimit.
version 3 - added min/max recycler values.
version 4 - added sms to mms text threshold.
-->
<mms_config version="4">
<mms_config version="3">
<!-- Maximum message size in bytes for a MMS message -->
<int name="maxMessageSize">1048576</int>
@ -32,31 +31,9 @@
<int name="maxImageWidth">2592</int>
<!-- User-Agent parameter used in MMS http request -->
<string name="userAgent">Bravo</string>
<string name="userAgent">Passion</string>
<!-- UAProf URL -->
<string name="uaProfUrl">http://www.htcmms.com.tw/Android/Common/Bravo/ua-profile.xml</string>
<!-- Maximum number of recipients allowed per message. Use a value of -1
to indicate no limit. -->
<int name="recipientLimit">-1</int>
<!-- Maximum number of SMS message segments in a long text message before converting
the SMS message to an MMS message. -->
<int name="smsToMmsTextThreshold">4</int>
<!-- If true, The text message over 160 characters will be sent in multi part.
If false, The text message over 160 characters will be sent
via multi media message. -->
<bool name="enableMultipartSMS">false</bool>
<!-- If true, The mms support slide duration.
If false, The mms does not support slide duration and we have to
set duration value. -->
<bool name="enableSlideDuration">true</bool>
<!-- Maximum length for message text. Use a value of -1
to indicate default value -->
<int name="maxMessageTextSize">-1</int>
<string name="uaProfUrl">http://www.htcmms.com.tw/Android/Common/nexusone/ua-profile.xml</string>
</mms_config>

View File

@ -14,18 +14,24 @@
limitations under the License.
-->
<!-- Leo-specific phone app resources. -->
<!-- Passion-specific phone app resources. -->
<resources>
<!-- Determine whether calls to mute the microphone in PhoneUtils
are routed through the android.media.AudioManager class (true) or through
the com.android.internal.telephony.Phone interface (false). -->
<bool name="send_mic_mute_to_AudioManager">true</bool>
<!-- Enable the onscreen touch UI for all states of the in-call UI. -->
<bool name="allow_incoming_call_touch_ui">true</bool>
<bool name="allow_in_call_touch_ui">true</bool>
<!-- This is a device with capacitive buttons, so disable the feature
where BACK rejects the current incoming call. (Since it's so
easy to press the key accidentally as you pull the phone out of
your pocket.) -->
<bool name="allow_back_key_to_reject_incoming_call">false</bool>
<!-- Enable the onscreen "Dial" button in the emergency dialer. -->
<bool name="config_show_onscreen_dial_button">true</bool>
<!-- This device implements a noise suppression device for in call audio-->
<bool name="has_in_call_noise_suppression">true</bool>
<!-- This device uses libaudio-qsd8k which implements
AudioHardware::setMicMute(bool state) and AudioHardware::getMicMute(bool* state)
so microphone muting calls should be routed through the AudioManager API. -->
<bool name="send_mic_mute_to_AudioManager">true</bool>
</resources>

41
overlay/packages/apps/Settings/res/values/bools.xml Executable file → Normal file
View File

@ -1,18 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- 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.
-->
<resources>
<!-- Whether or not the dock settings are to be displayed for this device when docked -->
<bool name="has_dock_settings">true</bool>
</resources>
<?xml version="1.0" encoding="utf-8"?>
<!-- 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.
-->
<resources>
<!-- Whether or not there is a notification led that is too intrusive to be pulsing
constantly -->
<bool name="has_intrusive_led">true</bool>
<!-- Whether or not the dock settings are to be displayed for this device when docked -->
<bool name="has_dock_settings">true</bool>
</resources>

View File

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2012 The CyanogenMod 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.
-->
<resources xmlns:xliff="urnasis:names:tc:xliff:document:1.2 ">
<!-- LED Flashlight -->
<bool name="has_led_flash">true</bool>
</resources>

9
postrecoveryboot.sh Executable file → Normal file
View File

@ -5,12 +5,3 @@ sleep 2
if [[ "`grep clk= /proc/cmdline`" == "" ]]; then
sed -i 's/\/boot\t\tmtd/\/boot\t\tyaffs2/g' /etc/recovery.fstab
fi
# Commented out as it may or may not require this
#mount /dev/block/mmcblk0p2 /sd-ext | grep sd-ext | awk '{print $5}'
#FS=`mount | grep sd-ext | awk '{print $5}'`
#umount /sd-ext
#sed -i 's/\/sd-ext\ \ \ \ \ auto/\/sd-ext\t\t'$FS'/g' /etc/recovery.fstab
#cat >> /etc/fstab << EOF
#/dev/block/mmcblk0p2 /sd-ext $FS rw
#EOF

Binary file not shown.

View File

@ -1,32 +0,0 @@
#
# 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.
#
# 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 adreno200

Binary file not shown.

View File

@ -1,53 +0,0 @@
# Copyright (C) 2011 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.
#
# Input Device Calibration File for the htcleo touch screen.
#
# Basic Parameters
touch.deviceType = touchScreen
touch.orientationAware = 1
# Size
touch.size.calibration = default
touch.size.scale = 10
touch.size.bias = 160
touch.size.isSummed = 1
# Pressure
# Driver reports signal strength as pressure.
#
# A normal thumb touch while touching the back of the device
# typically registers about 100 signal strength units although
# this value is highly variable and is sensitive to contact area,
# manner of contact and environmental conditions. We set the
# scale so that a normal touch with good signal strength will be
# reported as having a pressure somewhere in the vicinity of 1.0,
# a featherlight touch will be below 1.0 and a heavy or large touch
# will be above 1.0. We don't expect these values to be accurate.
touch.pressure.calibration = amplitude
touch.pressure.scale = 0.01
# Orientation
touch.orientation.calibration = none
# Keyboard
keyboard.layout = htcleo-keypad
keyboard.characterMap = Virtual
keyboard.orientationAware = 1
keyboard.builtIn = 0
device.internal = 1

View File

@ -1,16 +0,0 @@
#!/system/bin/sh
#
# Load MODULES
sleep 1
if [ -f /system/ppp ]
then
echo "Not loading RMNET module as /system/ppp exists"
else
echo "Loading RMNET module as /system/ppp doesn't exist"
insmod /system/lib/modules/msm_rmnet.ko
fi
insmod /system/lib/modules/tun.ko
insmod /system/lib/modules/cifs.ko
insmod /system/lib/modules/nls_utf8.ko
insmod /system/lib/modules/fuse.ko
echo "+++ TUN / CIFS activated +++";

View File

@ -1,4 +0,0 @@
#!/system/bin/sh
# A workaround for native USB Tethering (by tytung)
/system/bin/netcfg usb0 up

View File

@ -1,17 +0,0 @@
#!/system/bin/sh
#Usage: echo 'device_id level' > /proc/mic_level
#Level range: 0-1000; -1 use level from acdb
#Current levels (device_id):
echo '0 400' > /proc/mic_level
echo '1 600' > /proc/mic_level
echo '2 800' > /proc/mic_level
echo '3 800' > /proc/mic_level
echo '4 800' > /proc/mic_level
#Current levels (device_id):
#HANDSET (0): 400
#SPKR_PHONE (1): 600
#HEADSET (2): 800
#TTY_HEADSET (3): 800
#BT_SCO (4): 800

View File

@ -1,20 +0,0 @@
#!/system/bin/sh
if [ -f /system/ppp ]
then
echo "preparing to use ppp for data connections..."
chown 1001.1001 /dev/smd1
touch /etc/ppp/active
touch /etc/ppp/pap-secrets
touch /etc/ppp/chap-secrets
touch /etc/ppp/options.smd
touch /etc/ppp/options.smd1
touch /etc/ppp/ppp-gprs.pid
touch /etc/ppp/resolv.conf
chown 0.1001 /system/etc/ppp/*
chmod 775 /system/etc/ppp/*
chown 0.0 /system/bin/pppd
chmod 4755 /system/bin/pppd
#/system/bin/pppd /dev/smd1 defaultroute
fi

View File

@ -1,242 +0,0 @@
import init.htcleo.usb.rc
on early-init
export SD_EXT_DIRECTORY /sd-ext
mkdir /sd-ext 0771 system system
export EXTERNAL_STORAGE /mnt/sdcard
mkdir /mnt/sdcard 0000 system system
# for backwards compatibility
symlink /mnt/sdcard /sdcard
on fs
mount yaffs2 mtd@system /system remount noatime nodiratime
mount yaffs2 mtd@userdata /data remount nosuid nodev noatime nodiratime
on post-fs-data
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
setprop vold.post_fs_data_done 1
on boot
mount debugfs /sys/kernel/debug /sys/kernel/debug
# 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
chown bluetooth bluetooth /dev/ttyHS0
chmod 0600 /dev/ttyHS0
# bluetooth MAC address programming
chown bluetooth bluetooth /sys/module/board_htcleo/parameters/bdaddr
setprop ro.bt.bdaddr_path /sys/module/board_htcleo/parameters/bdaddr
# bluetooth car dock pin
chown system system /sys/class/switch/dock/bt_pin
# Permissions for Liblights.
chown system system /sys/class/leds/green/brightness
chown system system /sys/class/leds/green/blink
chown system system /sys/class/leds/amber/brightness
chown system system /sys/class/leds/amber/blink
chown system system /sys/class/leds/button-backlight/brightness
chown system system /sys/class/leds/lcd-backlight/brightness
# ===============================
# begin of permissions for htcleo
# ===============================
# flashlight
chown system camera /sys/devices/platform/flashlight.0/leds/flashlight/brightness
chmod 0660 /sys/devices/platform/flashlight.0/leds/flashlight/brightness
chmod 0666 /sys/devices/platform/flashlight.0/leds/flashlight/max_brightness
# 720p cam support
symlink /dev/msm_camera/control0 /dev/msm_camera/control1
symlink /dev/msm_camera/frame0 /dev/msm_camera/frame1
symlink /dev/msm_camera/config0 /dev/msm_camera/config1
# ICS camera
chmod 0777 /dev/msm_camera/config0
chmod 0777 /dev/msm_camera/config1
chmod 0777 /dev/msm_camera/control0
chmod 0777 /dev/msm_camera/control1
chmod 0777 /dev/msm_camera/frame0
chmod 0777 /dev/msm_camera/frame1
chmod 0777 /dev/graphics/fb0
# allow net_raw to have access to /dev/socket directory
chown root net_raw /dev/socket
chmod 0775 /dev/socket
# allow system to modify cpufreq control files
chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
chown root system /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
chown root system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chown root system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
# for wireless modem
chown system system /sys/module/serial/parameters/modem_enabled
chown system.system /dev/cpu_dma_latency
chown system system /dev/smd0
chown system system /dev/smd1
chown system system /dev/smd9
chown system system /dev/smd27
chown system system /dev/ttyHSUSB0
# others
chown radio system /sys/camera_led_status/led_ril_status
chown system system /sys/camera_led_status/led_wimax_status
chown system system /sys/camera_led_status/led_hotspot_status
chown radio radio /sys/module/pm/parameters/idle_sleep_mode
chmod 0666 /dev/rfkill
#chmod 0666 /dev/q6venc
chmod 0666 /proc/cmdline
chmod 666 /dev/input/event0
chmod 666 /dev/input/event1
chmod 666 /dev/input/event2
chmod 666 /dev/input/event3
chmod 666 /dev/input/event4
chmod 666 /dev/input/event5
chmod 666 /dev/input/event6
chmod 666 /dev/uinput
chmod 666 /dev/msm_qcelp_in
chmod 666 /dev/msm_aac_in
chmod 666 /dev/msm_audio_ctl
chmod 666 /dev/msm_audio_route
chmod 666 /dev/msm_mp3
chmod 666 /dev/msm_pcm_in
chmod 666 /dev/msm_pcm_out
chmod 666 /dev/qmi0
chmod 666 /dev/qmi1
chmod 666 /dev/qmi2
chmod 666 /etc/bluez/audio.conf
chmod 666 /etc/bluez/hcid.conf
chmod 666 /etc/bluez/input.conf
chmod 0777 /dev/smd0
chmod 0777 /dev/smd1
chmod 0777 /dev/smd27
chmod 0777 /dev/msm_camera
chmod 0777 /dev/akm8973_aot
chmod 0777 /dev/akm8973_daemon
chmod 0777 /dev/cpu_dma_latency
chmod 0777 /dev/lightsensor
chmod 0777 /dev/bma150
chmod 0777 /dev/kgsl
chmod 0777 /dev/cm3602
chmod 0777 /dev/htc-acoustic
#chmod 0777 /dev/vfe
#chmod 0777 /dev/camera
#chmod 0777 /dev/compass
# Wireless properties
setprop net.dns1 8.8.8.8
setprop net.dns2 8.8.4.4
# =============================
# end of permissions for htcleo
# =============================
# enable the GPS
setprop ro.ril.def.agps.mode 2
# Add permissions for camera access
chmod 0666 /dev/msm_camera/config0
chmod 0666 /dev/msm_camera/control0
chmod 0666 /dev/msm_camera/frame0
chmod 0666 /dev/graphics/fb0
# performance tweaks for flash
write /sys/block/mtdblock3/bdi/read_ahead_kb 4
write /sys/block/mtdblock4/bdi/read_ahead_kb 4
write /sys/block/mtdblock5/bdi/read_ahead_kb 4
# Power Management
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 245000
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 998400
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ondemand
write /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate 40000
# KSM defaults
# write /sys/kernel/mm/ksm/sleep_millisecs 1500
write /sys/kernel/mm/ksm/sleep_millisecs 3000
write /sys/kernel/mm/ksm/pages_to_scan 256
# enable KSM
write /sys/kernel/mm/ksm/run 1
# Wakelock debug
write /sys/module/wakelock/parameters/debug_mask 7
# Fast dormancy settings
setprop ro.ril.fast.dormancy.rule 1
setprop ro.ril.fd.scron.timeout 4
setprop ro.ril.fd.scroff.timeout 3
# GPRS class
setprop ro.ril.gprsclass 10
# compass/accelerometer daemon
service akmd /system/bin/akmd
class main
user compass
group compass misc input
service wpa_supplicant /system/bin/wpa_supplicant \
-Dwext -iwlan0 -c/data/misc/wifi/wpa_supplicant.conf
# 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
class main
socket wpa_wlan0 dgram 660 wifi wifi
disabled
oneshot
service dhcpcd_wlan0 /system/bin/dhcpcd -ABKL
class main
disabled
oneshot
service dhcpcd_bnep0 /system/bin/dhcpcd -ABKL
class main
disabled
oneshot
service iprenew_wlan0 /system/bin/dhcpcd -n
class main
disabled
oneshot
service iprenew_bnep0 /system/bin/dhcpcd -n
class main
disabled
oneshot
# bugreport is triggered by the KEY_VOLUMEUP and BTN_MOUSE keycodes
service bugreport /system/bin/dumpstate -d -v -o /sdcard/bugreports/bugreport
class main
disabled
oneshot
keycodes 115 272
service hciattach /system/bin/brcm_patchram_plus --enable_hci --enable_lpm \
--baudrate 3000000 --patchram /etc/firmware/bcm4329.hcd /dev/ttyHS0
class main
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
service dspcrashd /system/bin/dspcrashd

View File

@ -1,43 +0,0 @@
on property:sys.usb.config=none
exec /system/bin/netcfg usb0 down
stop adbd
write /sys/class/usb_composite/adb/enable 0
write /sys/class/usb_composite/usb_mass_storage/enable 0
write /sys/class/usb_composite/rndis/enable 0
setprop sys.usb.state $sys.usb.config
on property:sys.usb.config=adb
write /sys/class/usb_composite/adb/enable 1
start adbd
setprop sys.usb.state $sys.usb.config
on property:sys.usb.config=mass_storage
write /sys/class/usb_composite/usb_mass_storage/enable 1
start adbd
setprop sys.usb.state $sys.usb.config
on property:sys.usb.config=mass_storage,adb
write /sys/class/usb_composite/usb_mass_storage/enable 1
write /sys/class/usb_composite/adb/enable 1
start adbd
setprop sys.usb.state $sys.usb.config
on property:sys.usb.config=rndis
exec /system/bin/netcfg usb0 up
write /sys/class/usb_composite/rndis/enable 1
setprop sys.usb.state $sys.usb.config
on property:sys.usb.config=rndis,adb
exec /system/bin/netcfg usb0 up
write /sys/class/usb_composite/rndis/enable 1
write /sys/class/usb_composite/adb/enable 1
start adbd
setprop sys.usb.state $sys.usb.config
on property:sys.usb.config=mass_storage,rndis,adb
exec /system/bin/netcfg usb0 up
write /sys/class/usb_composite/usb_mass_storage/enable 1
write /sys/class/usb_composite/rndis/enable 1
write /sys/class/usb_composite/adb/enable 1
start adbd
setprop sys.usb.state $sys.usb.config

Binary file not shown.

View File

@ -1,544 +0,0 @@
# 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.
#
# Key character map for a built-in generic virtual keyboard primarily used
# for instrumentation and testing purposes.
#
type FULL
### Basic QWERTY keys ###
key A {
label: 'A'
base: 'a'
shift, capslock: 'A'
ctrl, alt, meta: none
}
key B {
label: 'B'
base: 'b'
shift, capslock: 'B'
ctrl, alt, meta: none
}
key C {
label: 'C'
base: 'c'
shift, capslock: 'C'
alt: '\u00e7'
shift+alt: '\u00c7'
ctrl, meta: none
}
key D {
label: 'D'
base: 'd'
shift, capslock: 'D'
ctrl, alt, meta: none
}
key E {
label: 'E'
base: 'e'
shift, capslock: 'E'
alt: '\u0301'
ctrl, meta: none
}
key F {
label: 'F'
base: 'f'
shift, capslock: 'F'
ctrl, alt, meta: none
}
key G {
label: 'G'
base: 'g'
shift, capslock: 'G'
ctrl, alt, meta: none
}
key H {
label: 'H'
base: 'h'
shift, capslock: 'H'
ctrl, alt, meta: none
}
key I {
label: 'I'
base: 'i'
shift, capslock: 'I'
alt: '\u0302'
ctrl, meta: none
}
key J {
label: 'J'
base: 'j'
shift, capslock: 'J'
ctrl, alt, meta: none
}
key K {
label: 'K'
base: 'k'
shift, capslock: 'K'
ctrl, alt, meta: none
}
key L {
label: 'L'
base: 'l'
shift, capslock: 'L'
ctrl, alt, meta: none
}
key M {
label: 'M'
base: 'm'
shift, capslock: 'M'
ctrl, alt, meta: none
}
key N {
label: 'N'
base: 'n'
shift, capslock: 'N'
alt: '\u0303'
ctrl, meta: none
}
key O {
label: 'O'
base: 'o'
shift, capslock: 'O'
ctrl, alt, meta: none
}
key P {
label: 'P'
base: 'p'
shift, capslock: 'P'
ctrl, alt, meta: none
}
key Q {
label: 'Q'
base: 'q'
shift, capslock: 'Q'
ctrl, alt, meta: none
}
key R {
label: 'R'
base: 'r'
shift, capslock: 'R'
ctrl, alt, meta: none
}
key S {
label: 'S'
base: 's'
shift, capslock: 'S'
alt: '\u00df'
ctrl, meta: none
}
key T {
label: 'T'
base: 't'
shift, capslock: 'T'
ctrl, alt, meta: none
}
key U {
label: 'U'
base: 'u'
shift, capslock: 'U'
alt: '\u0308'
ctrl, meta: none
}
key V {
label: 'V'
base: 'v'
shift, capslock: 'V'
ctrl, alt, meta: none
}
key W {
label: 'W'
base: 'w'
shift, capslock: 'W'
ctrl, alt, meta: none
}
key X {
label: 'X'
base: 'x'
shift, capslock: 'X'
ctrl, alt, meta: none
}
key Y {
label: 'Y'
base: 'y'
shift, capslock: 'Y'
ctrl, alt, meta: none
}
key Z {
label: 'Z'
base: 'z'
shift, capslock: 'Z'
ctrl, alt, meta: none
}
key 0 {
label, number: '0'
base: '0'
shift: ')'
ctrl, alt, meta: none
}
key 1 {
label, number: '1'
base: '1'
shift: '!'
ctrl, alt, meta: none
}
key 2 {
label, number: '2'
base: '2'
shift: '@'
ctrl, alt, meta: none
}
key 3 {
label, number: '3'
base: '3'
shift: '#'
ctrl, alt, meta: none
}
key 4 {
label, number: '4'
base: '4'
shift: '$'
ctrl, alt, meta: none
}
key 5 {
label, number: '5'
base: '5'
shift: '%'
ctrl, alt, meta: none
}
key 6 {
label, number: '6'
base: '6'
shift: '^'
ctrl, alt, meta: none
alt+shift: '\u0302'
}
key 7 {
label, number: '7'
base: '7'
shift: '&'
ctrl, alt, meta: none
}
key 8 {
label, number: '8'
base: '8'
shift: '*'
ctrl, alt, meta: none
}
key 9 {
label, number: '9'
base: '9'
shift: '('
ctrl, alt, meta: none
}
key SPACE {
label: ' '
base: ' '
ctrl, alt: none
meta: fallback SEARCH
}
key ENTER {
label: '\n'
base: '\n'
ctrl, alt, meta: none
}
key TAB {
label: '\t'
base: '\t'
ctrl, alt: none
meta: fallback APP_SWITCH
}
key COMMA {
label, number: ','
base: ','
shift: '<'
ctrl, alt, meta: none
}
key PERIOD {
label, number: '.'
base: '.'
shift: '>'
ctrl, alt, meta: none
}
key SLASH {
label, number: '/'
base: '/'
shift: '?'
ctrl, alt, meta: none
}
key GRAVE {
label, number: '`'
base: '`'
shift: '~'
alt: '\u0300'
alt+shift: '\u0303'
ctrl, meta: none
}
key MINUS {
label, number: '-'
base: '-'
shift: '_'
ctrl, alt, meta: none
}
key EQUALS {
label, number: '='
base: '='
shift: '+'
ctrl, alt, meta: none
}
key LEFT_BRACKET {
label, number: '['
base: '['
shift: '{'
ctrl, alt, meta: none
}
key RIGHT_BRACKET {
label, number: ']'
base: ']'
shift: '}'
ctrl, alt, meta: none
}
key BACKSLASH {
label, number: '\\'
base: '\\'
shift: '|'
ctrl, alt, meta: none
}
key SEMICOLON {
label, number: ';'
base: ';'
shift: ':'
ctrl, alt, meta: none
}
key APOSTROPHE {
label, number: '\''
base: '\''
shift: '"'
ctrl, alt, meta: none
}
### Numeric keypad ###
key NUMPAD_0 {
label, number: '0'
base: fallback INSERT
numlock: '0'
ctrl, alt, meta: none
}
key NUMPAD_1 {
label, number: '1'
base: fallback MOVE_END
numlock: '1'
ctrl, alt, meta: none
}
key NUMPAD_2 {
label, number: '2'
base: fallback DPAD_DOWN
numlock: '2'
ctrl, alt, meta: none
}
key NUMPAD_3 {
label, number: '3'
base: fallback PAGE_DOWN
numlock: '3'
ctrl, alt, meta: none
}
key NUMPAD_4 {
label, number: '4'
base: fallback DPAD_LEFT
numlock: '4'
ctrl, alt, meta: none
}
key NUMPAD_5 {
label, number: '5'
base: fallback DPAD_CENTER
numlock: '5'
ctrl, alt, meta: none
}
key NUMPAD_6 {
label, number: '6'
base: fallback DPAD_RIGHT
numlock: '6'
ctrl, alt, meta: none
}
key NUMPAD_7 {
label, number: '7'
base: fallback MOVE_HOME
numlock: '7'
ctrl, alt, meta: none
}
key NUMPAD_8 {
label, number: '8'
base: fallback DPAD_UP
numlock: '8'
ctrl, alt, meta: none
}
key NUMPAD_9 {
label, number: '9'
base: fallback PAGE_UP
numlock: '9'
ctrl, alt, meta: none
}
key NUMPAD_LEFT_PAREN {
label, number: '('
base: '('
ctrl, alt, meta: none
}
key NUMPAD_RIGHT_PAREN {
label, number: ')'
base: ')'
ctrl, alt, meta: none
}
key NUMPAD_DIVIDE {
label, number: '/'
base: '/'
ctrl, alt, meta: none
}
key NUMPAD_MULTIPLY {
label, number: '*'
base: '*'
ctrl, alt, meta: none
}
key NUMPAD_SUBTRACT {
label, number: '-'
base: '-'
ctrl, alt, meta: none
}
key NUMPAD_ADD {
label, number: '+'
base: '+'
ctrl, alt, meta: none
}
key NUMPAD_DOT {
label, number: '.'
base: fallback FORWARD_DEL
numlock: '.'
ctrl, alt, meta: none
}
key NUMPAD_COMMA {
label, number: ','
base: ','
ctrl, alt, meta: none
}
key NUMPAD_EQUALS {
label, number: '='
base: '='
ctrl, alt, meta: none
}
key NUMPAD_ENTER {
label: '\n'
base: '\n' fallback ENTER
ctrl, alt, meta: none fallback ENTER
}
### Special keys on phones ###
key AT {
label, number: '@'
base: '@'
}
key STAR {
label, number: '*'
base: '*'
}
key POUND {
label, number: '#'
base: '#'
}
key PLUS {
label, number: '+'
base: '+'
}
### Non-printing keys ###
key ESCAPE {
base: fallback BACK
meta: fallback HOME
alt: fallback MENU
}

View File

@ -1,12 +0,0 @@
key 231 CALL WAKE_DROPPED
key 107 ENDCALL WAKE_DROPPED
key 116 POWER WAKE
key 115 VOLUME_UP WAKE
key 114 VOLUME_DOWN WAKE
key 158 BACK WAKE_DROPPED
key 102 HOME WAKE_DROPPED
key 229 MENU WAKE_DROPPED
key 59 MENU WAKE_DROPPED
key 139 MENU WAKE_DROPPED
key 127 SEARCH WAKE_DROPPED
key 217 SEARCH WAKE_DROPPED

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More