Skip to content

Commit

Permalink
First commit for sony hayabusa CyanogenMod 11
Browse files Browse the repository at this point in the history
  • Loading branch information
Hamster Tian committed Dec 22, 2013
0 parents commit b54cabd
Show file tree
Hide file tree
Showing 27 changed files with 893 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#过滤数据库文件、sln解决方案文件、配置文件
*~


#过滤文件夹Debug,Release,obj
nouse.git/
5 changes: 5 additions & 0 deletions Android.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
LOCAL_PATH := $(call my-dir)

ifeq ($(TARGET_DEVICE),hayabusa)
include $(call first-makefiles-under,$(LOCAL_PATH))
endif
3 changes: 3 additions & 0 deletions AndroidBoard.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)
2 changes: 2 additions & 0 deletions AndroidProducts.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
PRODUCT_MAKEFILES := \
$(LOCAL_DIR)/full_hayabusa.mk
33 changes: 33 additions & 0 deletions BoardConfig.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#inherit from the common blue definitions
-include device/sony/blue-common/BoardConfigCommon.mk

TARGET_SPECIFIC_HEADER_PATH += device/sony/hayabusa/include

TARGET_KERNEL_CONFIG := cm_blue_hayabusa_defconfig

# Partition information
BOARD_VOLD_MAX_PARTITIONS := 18

# the following two sizes are generous guesses
# since these partitions are not visible
BOARD_BOOTIMAGE_PARTITION_SIZE := 0x01400000
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 0x01400000

BOARD_SYSTEMIMAGE_PARTITION_SIZE := 1056964608
BOARD_USERDATAIMAGE_PARTITION_SIZE := 2147483648
BOARD_FLASH_BLOCK_SIZE := 131072

BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/sony/hayabusa/bluetooth

TARGET_LS_USE_ALS_NODE := true

# Recovery
BOARD_HAS_NO_SELECT_BUTTON := true
TARGET_USERIMAGES_USE_EXT4 := true

TARGET_OTA_ASSERT_DEVICE := lt29i,hayabusa,LT29i,mint,lt30p,LT30p

BOARD_HARDWARE_CLASS := device/sony/hayabusa/cmhw

# inherit from the proprietary version
-include vendor/sony/hayabusa/BoardConfigVendor.mk
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
android_device_sony_hayabusa
============================
23 changes: 23 additions & 0 deletions bluetooth/bdroid_buildcfg.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* Copyright (C) 2012 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.
*/

#ifndef _BDROID_BUILDCFG_H
#define _BDROID_BUILDCFG_H

#define BTM_DEF_LOCAL_NAME "Xperia TX"
#define BTA_DISABLE_DELAY 1000 /* in milliseconds */

#endif
22 changes: 22 additions & 0 deletions cm.dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[
{
"repository": "android_device_sony_common",
"target_path": "device/sony/common"
},
{
"repository": "android_device_sony_qcom-common",
"target_path": "device/sony/qcom-common"
},
{
"repository": "android_device_sony_blue-common",
"target_path": "device/sony/blue-common"
},
{
"repository": "android_kernel_sony_msm8x60",
"target_path": "kernel/sony/msm8x60"
},
{
"repository": "android_hardware_sony_DASH",
"target_path": "hardware/sony/DASH"
}
]
15 changes: 15 additions & 0 deletions cm.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
$(call inherit-product, device/sony/hayabusa/full_hayabusa.mk)

# Inherit CM common GSM stuff.
$(call inherit-product, vendor/cm/config/gsm.mk)

# Enhanced NFC
#$(call inherit-product, vendor/cm/config/nfc_enhanced.mk)

# Inherit CM common Phone stuff.
$(call inherit-product, vendor/cm/config/common_full_phone.mk)

PRODUCT_BUILD_PROP_OVERRIDES += PRODUCT_NAME=LT29i BUILD_FINGERPRINT=Sony/LT29i_1266-5813/LT29i:4.1.2/9.1.B.1.67/vLt_tw:user/release-keys PRIVATE_BUILD_DESC="LT29i-user 4.1.2 9.1.B.1.67 c_t_tw test-keys"

PRODUCT_NAME := cm_hayabusa
PRODUCT_DEVICE := hayabusa
52 changes: 52 additions & 0 deletions cmhw/org/cyanogenmod/hardware/VibratorHW.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/*
* Copyright (C) 2013 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.
*/


/* Added by Hamster Tian<haotia@gmail.com>
* For hayabusa,level is from 12 to 31,not begin from 0
*/

package org.cyanogenmod.hardware;

import org.cyanogenmod.hardware.util.FileUtils;

public class VibratorHW {

private static String LEVEL_PATH = "/sys/class/timed_output/vibrator/level";

public static boolean isSupported() {
return true;
}

public static int getMaxIntensity() {
return 31;
}
public static int getMinIntensity() {
return 12;
}
public static int getWarningThreshold() {
return 25;
}
public static int getCurIntensity() {
return Integer.parseInt(FileUtils.readOneLine(LEVEL_PATH));
}
public static int getDefaultIntensity() {
return 20;
}
public static boolean setIntensity(int intensity) {
return FileUtils.writeLine(LEVEL_PATH, String.valueOf(intensity));
}
}
8 changes: 8 additions & 0 deletions extract-files.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

export DEVICE=${PWD##*/}
export BOARDCONFIGVENDOR=true

../common/extract-files.sh $@

../common/setup-makefiles.sh
47 changes: 47 additions & 0 deletions full_hayabusa.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# 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.
#
#
# This file is the build configuration for a full Android
# build for maguro hardware. This cleanly combines a set of
# device-specific aspects (drivers) with a device-agnostic
# product configuration (apps). Except for a few implementation
# details, it only fundamentally contains two inherit-product
# lines, full and maguro, hence its name.
#
#

TARGET_SCREEN_HEIGHT := 1280
TARGET_SCREEN_WIDTH := 720

# Torch
PRODUCT_PACKAGES := \
Torch

# Inherit from those products. Most specific first.
$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk)

# Common Sony Resources
$(call inherit-product, device/sony/common/resources.mk)

# Inherit from mint device
$(call inherit-product, device/sony/hayabusa/hayabusa.mk)

# Set those variables here to overwrite the inherited values.
PRODUCT_NAME := full_hayabusa
PRODUCT_DEVICE := hayabusa
PRODUCT_BRAND := Sony
PRODUCT_MANUFACTURER := Sony
PRODUCT_MODEL := Xperia TX

55 changes: 55 additions & 0 deletions hayabusa.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#
# 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.
# 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.
#

# Inherit the blue-common definitions
$(call inherit-product, device/sony/blue-common/blue.mk)

DEVICE_PACKAGE_OVERLAYS += device/sony/hayabusa/overlay

# These are the hardware-specific features
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.telephony.gsm.xml:system/etc/permissions/android.hardware.telephony.gsm.xml

# This device is xhdpi. However the platform doesn't
# currently contain all of the bitmaps at xhdpi density so
# we do this little trick to fall back to the hdpi version
# if the xhdpi doesn't exist.
PRODUCT_AAPT_CONFIG := normal hdpi xhdpi
PRODUCT_AAPT_PREF_CONFIG := xhdpi

# Configuration scripts
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/rootdir/system/etc/sensors.conf:system/etc/sensors.conf \
$(LOCAL_PATH)/rootdir/system/etc/sysmon.cfg:system/etc/sysmon.cfg \
$(LOCAL_PATH)/rootdir/system/etc/pre_hw_config.sh:system/etc/pre_hw_config.sh \
$(LOCAL_PATH)/rootdir/system/etc/hw_config.sh:system/etc/hw_config.sh

# Device specific init
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/rootdir/init.device.rc:root/init.device.rc

# USB function switching
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/rootdir/init.sony.usb.rc:root/init.sony.usb.rc

# Device specific part for two-stage boot
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/recovery/bootrec-device:recovery/bootrec-device

$(call inherit-product, frameworks/native/build/phone-xhdpi-1024-dalvik-heap.mk)

# Include non-opensource parts
$(call inherit-product, vendor/sony/hayabusa/hayabusa-vendor.mk)
22 changes: 22 additions & 0 deletions include/sony_lights.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* Copyright (C) 2012-2013 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.
*/

char const*const LCD_BACKLIGHT_FILE = "/sys/class/leds/lcd-backlight_1/brightness";
char const*const LCD_BACKLIGHT2_FILE = "/sys/class/leds/lcd-backlight_2/brightness";
char const*const LOGO_BACKLIGHT_FILE = "/sys/class/leds/logo-backlight_1/brightness";
char const*const LOGO_BACKLIGHT2_FILE = "/sys/class/leds/logo-backlight_2/brightness";
char const*const MAX_BRIGHTNESS_FILE = "/sys/class/leds/lcd-backlight_1/max_brightness";
const int LCD_BRIGHTNESS_MIN = 10;
44 changes: 44 additions & 0 deletions overlay/frameworks/base/core/res/res/values/config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
** Copyright 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.
*/
-->

<!-- These resources are around just to allow their values to be customized
for different hardware and product builds. -->
<resources>

<!-- Setting this true forces the headset jack switches to use the/dev/input/event subsystem
rather than the uevent framework. -->
<bool name="config_useDevInputEventForAudioJack">false</bool>


<!-- Hardware 'face' keys present on the device, stored as a bit field.
This integer should equal the sum of the corresponding value for each
of the following keys present:
1 - Home
2 - Back
4 - Menu
8 - Assistant (search)
16 - App switch
32 - Camera
For example, a device with Home, Back and Menu keys would set this
config to 7. -->
<integer name="config_deviceHardwareKeys">32</integer>

<!-- LED Flashlight -->
<bool name="config_enableTorch">true</bool>
</resources>

0 comments on commit b54cabd

Please sign in to comment.