From 526a0c4b954021654e0f44ed8e50ca7c02e2429d Mon Sep 17 00:00:00 2001 From: Paul Kocialkowski Date: Sun, 20 Apr 2014 23:15:43 +0200 Subject: Initial Replicant 4.2 commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Many thanks to Lukas Märdian for his great work: part of the changes introduced in this commit reflect his work. Signed-off-by: Paul Kocialkowski --- Android.mk | 4 +- AndroidProducts.mk | 1 - BoardConfig.mk | 34 +- CleanSpec.mk | 7 +- bootimg.mk | 60 +- cm.mk | 28 +- configs/vold.fstab | 2 + full_gta04.mk | 2 - gpio-keys.kl | 1 - gta04.mk | 33 +- init.gta04.rc | 43 -- init.gta04.usb.rc | 77 -- initlogo.rle | Bin 76436 -> 0 bytes initlogo.svg | 827 --------------------- liblights/Android.mk | 31 - liblights/lights.c | 276 ------- lights/Android.mk | 27 + lights/lights.c | 276 +++++++ .../frameworks/base/core/res/res/values/arrays.xml | 50 +- .../frameworks/base/core/res/res/values/config.xml | 33 +- .../base/core/res/res/xml/storage_list.xml | 56 +- .../SettingsProvider/res/values/defaults.xml | 20 + .../LatinIME/java/res/values/dimens.xml | 25 - .../LatinIME/java/res/values/donottranslate.xml | 20 + recovery/init.recovery.gta04.rc | 15 + recovery/recovery.fstab | 6 + recovery/recovery_keys.c | 52 ++ releasetools.py | 23 + replicant_gta04_install.sh | 383 +++++++--- rootdir/fstab.gta04 | 4 + rootdir/init.gta04.rc | 58 ++ rootdir/init.gta04.usb.rc | 70 ++ rootdir/initlogo.rle | Bin 0 -> 76436 bytes rootdir/initlogo.svg | 827 +++++++++++++++++++++ rootdir/ueventd.gta04.rc | 12 + tsc2007.idc | 3 - twl4030_pwrbutton.kl | 1 - ueventd.gta04.rc | 12 - usr/idc/TSC2007_Touchscreen.idc | 3 + usr/keylayout/Phone_button.kl | 1 + usr/keylayout/twl4030_pwrbutton.kl | 1 + 41 files changed, 1879 insertions(+), 1525 deletions(-) create mode 100644 configs/vold.fstab delete mode 100644 gpio-keys.kl delete mode 100644 init.gta04.rc delete mode 100755 init.gta04.usb.rc delete mode 100644 initlogo.rle delete mode 100644 initlogo.svg delete mode 100644 liblights/Android.mk delete mode 100644 liblights/lights.c create mode 100644 lights/Android.mk create mode 100644 lights/lights.c create mode 100644 overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml delete mode 100644 overlay/packages/inputmethods/LatinIME/java/res/values/dimens.xml create mode 100644 overlay/packages/inputmethods/LatinIME/java/res/values/donottranslate.xml create mode 100644 recovery/init.recovery.gta04.rc create mode 100644 recovery/recovery.fstab create mode 100644 recovery/recovery_keys.c create mode 100644 releasetools.py create mode 100644 rootdir/fstab.gta04 create mode 100644 rootdir/init.gta04.rc create mode 100755 rootdir/init.gta04.usb.rc create mode 100644 rootdir/initlogo.rle create mode 100644 rootdir/initlogo.svg create mode 100644 rootdir/ueventd.gta04.rc delete mode 100644 tsc2007.idc delete mode 100644 twl4030_pwrbutton.kl delete mode 100644 ueventd.gta04.rc create mode 100644 usr/idc/TSC2007_Touchscreen.idc create mode 100644 usr/keylayout/Phone_button.kl create mode 100644 usr/keylayout/twl4030_pwrbutton.kl diff --git a/Android.mk b/Android.mk index 223a5e5..8e2bd0e 100644 --- a/Android.mk +++ b/Android.mk @@ -1,4 +1,4 @@ -# Copyright (C) 2012 Paul Kocialkowski +# Copyright (C) 2012-2014 Paul Kocialkowski # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,8 +16,6 @@ LOCAL_PATH := $(call my-dir) ifeq ($(TARGET_DEVICE),gta04) -ifneq ($(TARGET_SIMULATOR),true) include $(call all-makefiles-under,$(LOCAL_PATH)) -endif endif diff --git a/AndroidProducts.mk b/AndroidProducts.mk index 621c59c..5987620 100644 --- a/AndroidProducts.mk +++ b/AndroidProducts.mk @@ -11,7 +11,6 @@ # 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_MAKEFILES := \ $(LOCAL_DIR)/full_gta04.mk diff --git a/BoardConfig.mk b/BoardConfig.mk index 3daf6c9..e3a564a 100755 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2013 Paul Kocialkowski +# Copyright (C) 2012-2014 Paul Kocialkowski # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,6 +15,7 @@ # CPU TARGET_CPU_ABI := armeabi-v7a TARGET_CPU_ABI2 := armeabi +TARGET_ARCH := arm TARGET_ARCH_VARIANT := armv7-a-neon TARGET_GLOBAL_CFLAGS += -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp TARGET_GLOBAL_CPPFLAGS += -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp @@ -26,22 +27,36 @@ TARGET_BOOTLOADER_BOARD_NAME := gta04 # Images TARGET_NO_RADIOIMAGE := true -TARGET_NO_BOOTLOADER := false +TARGET_NO_BOOTLOADER := true TARGET_NO_KERNEL := false BOARD_USES_UBOOT := true BOARD_CUSTOM_BOOTIMG_MK := device/goldelico/gta04/bootimg.mk +# Partitions +TARGET_USERIMAGES_USE_EXT4 := true +BOARD_SYSTEMIMAGE_PARTITION_SIZE := 314572800 +BOARD_USERDATAIMAGE_PARTITION_SIZE := 209715200 +BOARD_FLASH_BLOCK_SIZE := 4096 + # Bootloaders -TARGET_BOOTLOADER_SOURCE := bootable/bootloader/goldelico/gta04/u-boot/ -TARGET_BOOTLOADER_CONFIG := omap3_gta04_config +TARGET_UBOOT_SOURCE := bootable/bootloader/goldelico/gta04/u-boot/ +TARGET_UBOOT_CONFIG := omap3_gta04_config TARGET_XLOADER_SOURCE := bootable/bootloader/goldelico/gta04/x-loader/ TARGET_XLOADER_CONFIG := omap3530gta04_config +TARGET_XLOADER_MLO := true # Kernel -TARGET_KERNEL_CONFIG := gta04_defconfig TARGET_KERNEL_SOURCE := kernel/goldelico/gta04 +TARGET_KERNEL_CONFIG := gta04_defconfig +TARGET_KERNEL_RECOVERY_CONFIG := gta04_recovery_defconfig TARGET_KERNEL_LOADADDR := 0x80008000 +# Recovery +TARGET_RECOVERY_FSTAB := device/goldelico/gta04/recovery/recovery.fstab +BOARD_CUSTOM_RECOVERY_KEYMAPPING := ../../device/goldelico/gta04/recovery/recovery_keys.c +TARGET_RECOVERY_PRE_COMMAND := "echo 1 > /cache/.startrecovery" +TARGET_RELEASETOOLS_EXTENSIONS := device/goldelico/gta04 + # Hardware BOARD_HAVE_FM_RADIO := false BOARD_HAVE_BLUETOOTH := false @@ -50,5 +65,14 @@ USE_CAMERA_STUB := true BOARD_HAS_NO_SELECT_BUTTON := true +# Boot animation +TARGET_BOOTANIMATION_PRELOAD := true +TARGET_BOOTANIMATION_TEXTURE_CACHE := true +TARGET_BOOTANIMATION_USE_RGB565 := true + +# Graphics +USE_OPENGL_RENDERER := false +TARGET_DISABLE_TRIPLE_BUFFERING := true + # Audio BOARD_USE_TINYALSA_AUDIO := true diff --git a/CleanSpec.mk b/CleanSpec.mk index c72d2ef..fd8beb0 100644 --- a/CleanSpec.mk +++ b/CleanSpec.mk @@ -1,4 +1,4 @@ -# Copyright (C) 2012 Paul Kocialkowski +# Copyright (C) 2012-2014 Paul Kocialkowski # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,10 +11,5 @@ # 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. -# -$(call add-clean-step, find $(PRODUCT_OUT) -name "*.apk" | xargs rm) $(call add-clean-step, rm -rf $(TARGET_OUT)/build.prop) -$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/PACKAGING/systemimage_intermediates) -# $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libaudio_intermediates) -# add newer instructions according to what we'll have in this directory diff --git a/bootimg.mk b/bootimg.mk index 540fb11..1ac2bbc 100644 --- a/bootimg.mk +++ b/bootimg.mk @@ -1,27 +1,45 @@ +# Copyright (C) 2012-2014 Paul Kocialkowski +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + LOCAL_PATH := $(call my-dir) -INSTALLED_XLOADER_MODULE := $(PRODUCT_OUT)/xloader +INSTALLED_RAMDISK_TARGET := $(PRODUCT_OUT)/ramdisk.cpio +INSTALLED_XLOADER_TARGET := $(PRODUCT_OUT)/MLO +INSTALLED_UBOOT_TARGET := $(PRODUCT_OUT)/u-boot.bin +INSTALLED_UBOOT_SCRIPT_TARGET := $(PRODUCT_OUT)/boot.scr +INSTALLED_UBOOT_SPLASH_TARGET := $(PRODUCT_OUT)/splash.rgb16z + +BUILT_RAMDISK_TARGET := $(INSTALLED_RAMDISK_TARGET) -INSTALLED_BOOTLOADERIMAGE_TARGET := $(PRODUCT_OUT)/u-boot.bin -INSTALLED_XLOADERIMAGE_TARGET := $(PRODUCT_OUT)/MLO -INSTALLED_BOOTLOADER_SCRIPT_TARGET := $(PRODUCT_OUT)/boot.scr -INSTALLED_BOOTLOADER_SPLASH_TARGET := $(PRODUCT_OUT)/splash.rgb16z +$(INSTALLED_RAMDISK_TARGET): $(MKBOOTFS) $(INTERNAL_RAMDISK_FILES) + $(call pretty,"Target ram disk: $@") + $(hide) $(MKBOOTFS) $(TARGET_ROOT_OUT) > $@ -$(INSTALLED_BOOTIMAGE_TARGET): $(MKIMAGE) $(INSTALLED_RAMDISK_TARGET) $(INSTALLED_KERNEL_TARGET) - $(call pretty,"Boot image: $@") +$(INSTALLED_BOOTIMAGE_TARGET): $(INSTALLED_KERNEL_TARGET) $(ACP) $(INSTALLED_KERNEL_TARGET) $@ - @echo -e ${CL_INS}"Made boot image: $@"${CL_RST} + @echo -e ${CL_CYN}"Made boot image: $@"${CL_RST} + +$(INSTALLED_RECOVERYIMAGE_TARGET): $(INSTALLED_RECOVERY_KERNEL_TARGET) + $(ACP) $(INSTALLED_RECOVERY_KERNEL_TARGET) $@ + @echo -e ${CL_CYN}"Made recovery image: $@"${CL_RST} -$(INSTALLED_BOOTLOADERIMAGE_TARGET): $(INSTALLED_XLOADER_MODULE) $(INSTALLED_BOOTLOADER_MODULE) $(MKIMAGE) - $(call pretty,"X-Loader image: $(INSTALLED_XLOADER_MODULE)") - $(ACP) $(INSTALLED_XLOADER_MODULE) $(INSTALLED_XLOADERIMAGE_TARGET) - @echo -e ${CL_INS}"Made X-Loader image: $(INSTALLED_XLOADERIMAGE_TARGET)"${CL_RST} - $(call pretty,"Bootloader splash: $(INSTALLED_BOOTLOADER_SPLASH_TARGET)") - $(ACP) $(BOOTLOADER_SRC)/../boot-scr/splash.rgb16z $(INSTALLED_BOOTLOADER_SPLASH_TARGET) - @echo -e ${CL_INS}"Made bootloader splash: $(INSTALLED_BOOTLOADER_SPLASH_TARGET)"${CL_RST} - $(call pretty,"Bootloader script: $(INSTALLED_BOOTLOADER_SCRIPT_TARGET)") - $(MKIMAGE) -A arm -T script -C none -n "boot.scr" -d $(BOOTLOADER_SRC)/../boot-scr/boot.txt $(INSTALLED_BOOTLOADER_SCRIPT_TARGET) - @echo -e ${CL_INS}"Made bootloader script: $(INSTALLED_BOOTLOADER_SCRIPT_TARGET)"${CL_RST} - $(call pretty,"Bootloader image: $@") - $(ACP) $(INSTALLED_BOOTLOADER_MODULE) $@ - @echo -e ${CL_INS}"Made bootloader image: $@"${CL_RST} +$(INSTALLED_BOOTLOADERIMAGE_TARGET): $(INSTALLED_XLOADER_MODULE) $(INSTALLED_UBOOT_MODULE) $(MKIMAGE) + $(ACP) $(INSTALLED_XLOADER_MODULE) $(INSTALLED_XLOADER_TARGET) + @echo -e ${CL_CYN}"Made X-Loader: $(INSTALLED_XLOADER_TARGET)"${CL_RST} + $(ACP) $(UBOOT_SRC)/../boot-scr/splash.rgb16z $(INSTALLED_UBOOT_SPLASH_TARGET) + @echo -e ${CL_CYN}"Made U-Boot splash: $(INSTALLED_UBOOT_SPLASH_TARGET)"${CL_RST} + $(MKIMAGE) -A arm -T script -C none -n "boot.scr" -d $(UBOOT_SRC)/../boot-scr/boot.txt $(INSTALLED_UBOOT_SCRIPT_TARGET) + @echo -e ${CL_CYN}"Made U-Boot script: $(INSTALLED_UBOOT_SCRIPT_TARGET)"${CL_RST} + $(ACP) $(INSTALLED_UBOOT_MODULE) $(INSTALLED_UBOOT_TARGET) + @echo -e ${CL_CYN}"Made U-Boot: $(INSTALLED_UBOOT_TARGET)"${CL_RST} diff --git a/cm.mk b/cm.mk index 5819f9f..1736ec2 100644 --- a/cm.mk +++ b/cm.mk @@ -1,16 +1,30 @@ -# Inherit some common CM stuff. +# Copyright (C) 2012-2014 Paul Kocialkowski +# +# 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 GSM config $(call inherit-product, vendor/replicant/config/gsm.mk) -PRODUCT_RELEASE_NAME := GTA04 -# Inherit some common CM stuff. +PRODUCT_RELEASE_NAME := gta04 + +TARGET_BOOTANIMATION_NAME := vertical-480x640 + +# Inherit common phone config $(call inherit-product, vendor/replicant/config/common_full_phone.mk) -# Inherit device configuration +# Inherit device config $(call inherit-product, device/goldelico/gta04/full_gta04.mk) -# Inherit Software GL configuration. -$(call inherit-product, vendor/replicant/config/software_gl.mk) - PRODUCT_NAME := replicant_gta04 PRODUCT_DEVICE := gta04 PRODUCT_BRAND := Goldelico diff --git a/configs/vold.fstab b/configs/vold.fstab new file mode 100644 index 0000000..0615764 --- /dev/null +++ b/configs/vold.fstab @@ -0,0 +1,2 @@ +# USB disk +dev_mount usbdisk /storage/usbdisk auto /devices/platform/musb-omap2430/musb-hdrc.1.auto diff --git a/full_gta04.mk b/full_gta04.mk index 7ae3a5a..ae740ce 100644 --- a/full_gta04.mk +++ b/full_gta04.mk @@ -16,8 +16,6 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/languages_full.mk) $(call inherit-product, $(SRC_TARGET_DIR)/product/full.mk) $(call inherit-product, device/goldelico/gta04/gta04.mk) -PRODUCT_LOCALES += hdpi - PRODUCT_NAME := full_gta04 PRODUCT_DEVICE := gta04 PRODUCT_BRAND := goldelico diff --git a/gpio-keys.kl b/gpio-keys.kl deleted file mode 100644 index 3d30e23..0000000 --- a/gpio-keys.kl +++ /dev/null @@ -1 +0,0 @@ -key 169 BACK WAKE_DROPPED diff --git a/gta04.mk b/gta04.mk index 507f496..2a284ce 100644 --- a/gta04.mk +++ b/gta04.mk @@ -1,4 +1,4 @@ -# Copyright (C) 2012 Paul Kocialkowski +# Copyright (C) 2012-2014 Paul Kocialkowski # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,25 +21,37 @@ PRODUCT_COPY_FILES += \ # Ramdisk PRODUCT_COPY_FILES += \ - device/goldelico/gta04/init.gta04.rc:root/init.gta04.rc \ - device/goldelico/gta04/init.gta04.usb.rc:root/init.gta04.usb.rc \ - device/goldelico/gta04/ueventd.gta04.rc:root/ueventd.gta04.rc + device/goldelico/gta04/rootdir/init.gta04.rc:root/init.gta04.rc \ + device/goldelico/gta04/rootdir/init.gta04.usb.rc:root/init.gta04.usb.rc \ + device/goldelico/gta04/rootdir/ueventd.gta04.rc:root/ueventd.gta04.rc \ + device/goldelico/gta04/rootdir/fstab.gta04:root/fstab.gta04 + +# Recovery +PRODUCT_COPY_FILES += \ + device/goldelico/gta04/recovery/init.recovery.gta04.rc:root/init.recovery.gta04.rc + +PRODUCT_PROPERTY_OVERRIDES += \ + ro.cwm.forbid_format=/boot # USB PRODUCT_PROPERTY_OVERRIDES += \ - persist.sys.usb.config=mass_storage,adb + persist.sys.usb.config=mtp + +# Storage +PRODUCT_COPY_FILES += \ + device/goldelico/gta04/configs/vold.fstab:system/etc/vold.fstab # Input PRODUCT_COPY_FILES += \ - device/goldelico/gta04/tsc2007.idc:system/usr/idc/tsc2007.idc \ - device/goldelico/gta04/twl4030_pwrbutton.kl:system/usr/keylayout/twl4030_pwrbutton.kl \ - device/goldelico/gta04/gpio-keys.kl:system/usr/keylayout/gpio-keys.kl + device/goldelico/gta04/usr/idc/TSC2007_Touchscreen.idc:system/usr/idc/TSC2007_Touchscreen.idc \ + device/goldelico/gta04/usr/keylayout/twl4030_pwrbutton.kl:system/usr/keylayout/twl4030_pwrbutton.kl \ + device/goldelico/gta04/usr/keylayout/Phone_button.kl:system/usr/keylayout/Phone_button.kl # Graphics PRODUCT_LOCALES := hdpi PRODUCT_COPY_FILES += \ - device/goldelico/gta04/initlogo.rle:root/initlogo.rle + device/goldelico/gta04/rootdir/initlogo.rle:root/initlogo.rle # Audio PRODUCT_PACKAGES += \ @@ -58,11 +70,10 @@ PRODUCT_COPY_FILES += \ # Dalvik PRODUCT_PROPERTY_OVERRIDES += \ - dalvik.vm.lockprof.threshold=500 \ dalvik.vm.dexopt-data-only=1 \ dalvik.vm.checkjni=false \ ro.kernel.android.checkjni=0 PRODUCT_TAGS += dalvik.gc.type-precise -include frameworks/base/build/phone-hdpi-512-dalvik-heap.mk +include frameworks/native/build/phone-hdpi-512-dalvik-heap.mk diff --git a/init.gta04.rc b/init.gta04.rc deleted file mode 100644 index 3245366..0000000 --- a/init.gta04.rc +++ /dev/null @@ -1,43 +0,0 @@ -import init.gta04.usb.rc - -on early-init - export EXTERNAL_STORAGE /mnt/sdcard - mkdir /mnt/sdcard 0000 system system - symlink /mnt/sdcard /sdcard - - mkdir /mnt/boot 0000 system system - -on boot - # Modem GPIO - chown radio radio /sys/class/gpio/gpio186/value - chmod 660 /sys/class/gpio/gpio186/value - - # Lights - chown system system /sys/class/backlight/pwm-backlight/brightness - chown system system /sys/class/backlight/pwm-backlight/max_brightness - chown system system /sys/class/leds/gta04:red:power/brightness - chown system system /sys/class/leds/gta04:red:power/max_brightness - chown system system /sys/class/leds/gta04:green:power/brightness - chown system system /sys/class/leds/gta04:green:power/max_brightness - chown system system /sys/class/leds/gta04:red:aux/brightness - chown system system /sys/class/leds/gta04:red:aux/max_brightness - chown system system /sys/class/leds/gta04:green:aux/brightness - chown system system /sys/class/leds/gta04:green:aux/max_brightness - - # Audio - chown system audio /sys/class/gpio/gpio55/value - chmod 0660 /sys/class/gpio/gpio55/value - -on fs - mount ext4 /dev/block/mmcblk0p2 /system wait - mount ext4 /dev/block/mmcblk0p2 /system ro wait remount - mount ext4 /dev/block/mmcblk0p3 /cache nosuid wait - mount ext4 /dev/block/mmcblk0p4 /data nosuid wait - mount vfat /dev/block/mmcblk0p1 /mnt/boot/ ro wait - -on post-fs-data - mkdir /data/media 0775 media_rw media_rw - chown media_rw media_rw /data/media - -service sdcard /system/bin/sdcard /data/media 1023 1023 - class late_start diff --git a/init.gta04.usb.rc b/init.gta04.usb.rc deleted file mode 100755 index f417a6c..0000000 --- a/init.gta04.usb.rc +++ /dev/null @@ -1,77 +0,0 @@ -on property:sys.usb.config=mass_storage - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/idVendor 18d1 - write /sys/class/android_usb/android0/idProduct 0001 - write /sys/class/android_usb/android0/functions $sys.usb.config - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state $sys.usb.config - -on property:sys.usb.config=mass_storage,adb - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/idVendor 18d1 - write /sys/class/android_usb/android0/idProduct 0003 - write /sys/class/android_usb/android0/functions $sys.usb.config - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state $sys.usb.config - -on property:sys.usb.config=mtp - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/idVendor 18d1 - write /sys/class/android_usb/android0/idProduct 0006 - write /sys/class/android_usb/android0/functions $sys.usb.config - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state $sys.usb.config - -on property:sys.usb.config=mtp,adb - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/idVendor 18d1 - write /sys/class/android_usb/android0/idProduct 0007 - write /sys/class/android_usb/android0/functions $sys.usb.config - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state $sys.usb.config - -on property:sys.usb.config=ptp - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/idVendor 18d1 - write /sys/class/android_usb/android0/idProduct 0008 - write /sys/class/android_usb/android0/functions $sys.usb.config - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state $sys.usb.config - -on property:sys.usb.config=ptp,adb - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/idVendor 18d1 - write /sys/class/android_usb/android0/idProduct 0009 - write /sys/class/android_usb/android0/functions $sys.usb.config - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state $sys.usb.config - -on property:sys.usb.config=rndis - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/idVendor 18d1 - write /sys/class/android_usb/android0/idProduct 000a - write /sys/class/android_usb/android0/functions $sys.usb.config - write /sys/class/android_usb/android0/bDeviceClass 224 - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state $sys.usb.config - -on property:sys.usb.config=rndis,adb - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/idVendor 18d1 - write /sys/class/android_usb/android0/idProduct 000b - write /sys/class/android_usb/android0/functions $sys.usb.config - write /sys/class/android_usb/android0/bDeviceClass 224 - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state $sys.usb.config - -on property:sys.usb.config=rndis,dm - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/idVendor 18d1 - write /sys/class/android_usb/android0/idProduct 000c - write /sys/class/android_usb/android0/functions $sys.usb.config - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state $sys.usb.config diff --git a/initlogo.rle b/initlogo.rle deleted file mode 100644 index 740cc91..0000000 Binary files a/initlogo.rle and /dev/null differ diff --git a/initlogo.svg b/initlogo.svg deleted file mode 100644 index d8dab57..0000000 --- a/initlogo.svg +++ /dev/null @@ -1,827 +0,0 @@ - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/liblights/Android.mk b/liblights/Android.mk deleted file mode 100644 index 49f1d1b..0000000 --- a/liblights/Android.mk +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright (C) 2012 Paul Kocialkowski -# -# 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. - -ifeq ($(TARGET_DEVICE),gta04) - -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) - -LOCAL_SRC_FILES := lights.c - -LOCAL_SHARED_LIBRARIES := liblog - -LOCAL_PRELINK_MODULE := false -LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw -LOCAL_MODULE_TAGS := optional - -LOCAL_MODULE := lights.gta04 -include $(BUILD_SHARED_LIBRARY) - -endif diff --git a/liblights/lights.c b/liblights/lights.c deleted file mode 100644 index 2eeb171..0000000 --- a/liblights/lights.c +++ /dev/null @@ -1,276 +0,0 @@ -/* - * Copyright (C) 2012 Paul Kocialkowski - * - * 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. - */ - -#define LOG_TAG "lights" -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* - * Globals - */ - -pthread_mutex_t lights_mutex = PTHREAD_MUTEX_INITIALIZER; - -const char backlight_brightness[] = - "/sys/class/backlight/pwm-backlight/brightness"; -const char backlight_max_brightness[] = - "/sys/class/backlight/pwm-backlight/max_brightness"; - -const char battery_red_brightness[] = - "/sys/class/leds/gta04:red:power/brightness"; -const char battery_red_max_brightness[] = - "/sys/class/leds/gta04:red:power/max_brightness"; -const char battery_green_brightness[] = - "/sys/class/leds/gta04:green:power/brightness"; -const char battery_green_max_brightness[] = - "/sys/class/leds/gta04:green:power/max_brightness"; - -const char notifications_red_brightness[] = - "/sys/class/leds/gta04:red:aux/brightness"; -const char notifications_red_max_brightness[] = - "/sys/class/leds/gta04:red:aux/max_brightness"; -const char notifications_green_brightness[] = - "/sys/class/leds/gta04:green:aux/brightness"; -const char notifications_green_max_brightness[] = - "/sys/class/leds/gta04:green:aux/max_brightness"; - -/* - * Lights utils - */ - -int sysfs_write_int(char *path, int value) -{ - char buf[10]; - int length = 0; - int fd = -1; - int rc; - - if(path == NULL) - return -1; - - length = snprintf(buf, 10, "%d\n", value); - - fd = open(path, O_WRONLY); - if(fd < 0) - return -1; - - rc = write(fd, buf, length); - - close(fd); - - if(rc < length) - return -1; - - return 0; -} - -int sysfs_read_int(char *path) -{ - char buf[10]; - int val = 0; - int fd = -1; - int rc; - - if(path == NULL) - return -1; - - fd = open(path, O_RDONLY); - if(fd < 0) - return -1; - - rc = read(fd, buf, 10); - if(rc <= 0) { - close(fd); - return -1; - } - - val = atoi(buf); - - return val; -} - -/* - * Lights functions - */ - -static int set_light_notifications(struct light_device_t *dev, - const struct light_state_t *state) -{ - int red, green; - int max; - int rc; - - // GTA04 only has red and green - red = state->color & 0x00ff0000; - green = state->color & 0x0000ff00; - - // Red max - pthread_mutex_lock(&lights_mutex); - max = sysfs_read_int(notifications_red_max_brightness); - pthread_mutex_unlock(&lights_mutex); - - if(max > 0) - red = (red * max) / 0xff; - - // Green max - pthread_mutex_lock(&lights_mutex); - max = sysfs_read_int(notifications_green_max_brightness); - pthread_mutex_unlock(&lights_mutex); - - if(max > 0) - green = (green * max) / 0xff; - - pthread_mutex_lock(&lights_mutex); - rc = sysfs_write_int(notifications_red_brightness, red); - if(rc >= 0) - rc = sysfs_write_int(notifications_green_brightness, green); - pthread_mutex_unlock(&lights_mutex); - - return rc; -} - -static int set_light_battery(struct light_device_t *dev, - const struct light_state_t *state) -{ - int red, green; - int max; - int rc; - - // GTA04 only has red and green - red = state->color & 0x00ff0000; - green = state->color & 0x0000ff00; - - // Red max - pthread_mutex_lock(&lights_mutex); - max = sysfs_read_int(battery_red_max_brightness); - pthread_mutex_unlock(&lights_mutex); - - if(max > 0) - red = (red * max) / 0xff; - - // Green max - pthread_mutex_lock(&lights_mutex); - max = sysfs_read_int(battery_green_max_brightness); - pthread_mutex_unlock(&lights_mutex); - - if(max > 0) - green = (green * max) / 0xff; - - pthread_mutex_lock(&lights_mutex); - rc = sysfs_write_int(battery_red_brightness, red); - if(rc >= 0) - rc = sysfs_write_int(battery_green_brightness, green); - pthread_mutex_unlock(&lights_mutex); - - return rc; -} - -static int set_light_backlight(struct light_device_t *dev, - const struct light_state_t *state) -{ - int color; - unsigned char brightness; - int brightness_max; - int rc; - - pthread_mutex_lock(&lights_mutex); - brightness_max = - sysfs_read_int(backlight_max_brightness); - pthread_mutex_unlock(&lights_mutex); - - color = state->color & 0x00ffffff; - brightness = ((77*((color>>16) & 0x00ff)) + (150*((color>>8) & 0x00ff)) - + (29*(color & 0x00ff))) >> 8; - - if(brightness_max > 0) - brightness = (brightness * brightness_max) / 0xff; - - LOGD("Setting brightness to: %d", brightness); - - pthread_mutex_lock(&lights_mutex); - rc = sysfs_write_int(backlight_brightness, brightness); - pthread_mutex_unlock(&lights_mutex); - - return rc; -} - -/* - * Interface - */ - -static int close_lights(struct light_device_t *dev) -{ - LOGD("close_lights()"); - - if(dev != NULL) - free(dev); - - return 0; -} - -static int open_lights(const struct hw_module_t *module, char const *name, - struct hw_device_t **device) -{ - struct light_device_t *dev = NULL; - int (*set_light)(struct light_device_t *dev, - const struct light_state_t *state); - - LOGD("open_lights(): %s", name); - - if(strcmp(LIGHT_ID_BACKLIGHT, name) == 0) { - set_light = set_light_backlight; - } else if(strcmp(LIGHT_ID_BATTERY, name) == 0) { - set_light = set_light_battery; - } else if(strcmp(LIGHT_ID_NOTIFICATIONS, name) == 0) { - set_light = set_light_notifications; - } else { - return -1; - } - - pthread_mutex_init(&lights_mutex, NULL); - - 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; - - *device = (struct hw_device_t *) dev; - - return 0; -} - -static struct hw_module_methods_t lights_module_methods = { - .open = open_lights, -}; - -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 = "Goldelico GTA04 lights", - .author = "Paul Kocialkowski", - .methods = &lights_module_methods, -}; diff --git a/lights/Android.mk b/lights/Android.mk new file mode 100644 index 0000000..9dc66f6 --- /dev/null +++ b/lights/Android.mk @@ -0,0 +1,27 @@ +# Copyright (C) 2012-2014 Paul Kocialkowski +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := lights.c + +LOCAL_SHARED_LIBRARIES := liblog + +LOCAL_PRELINK_MODULE := false +LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw +LOCAL_MODULE_TAGS := optional + +LOCAL_MODULE := lights.gta04 +include $(BUILD_SHARED_LIBRARY) diff --git a/lights/lights.c b/lights/lights.c new file mode 100644 index 0000000..418c5ef --- /dev/null +++ b/lights/lights.c @@ -0,0 +1,276 @@ +/* + * Copyright (C) 2012-2014 Paul Kocialkowski + * + * 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. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#define LOG_TAG "lights" +#include +#include + +/* + * Globals + */ + +const char backlight_brightness[] = + "/sys/class/backlight/pwm-backlight/brightness"; +const char backlight_max_brightness[] = + "/sys/class/backlight/pwm-backlight/max_brightness"; + +const char battery_red_brightness[] = + "/sys/class/leds/gta04:red:power/brightness"; +const char battery_red_max_brightness[] = + "/sys/class/leds/gta04:red:power/max_brightness"; +const char battery_green_brightness[] = + "/sys/class/leds/gta04:green:power/brightness"; +const char battery_green_max_brightness[] = + "/sys/class/leds/gta04:green:power/max_brightness"; + +const char notifications_red_brightness[] = + "/sys/class/leds/gta04:red:aux/brightness"; +const char notifications_red_max_brightness[] = + "/sys/class/leds/gta04:red:aux/max_brightness"; +const char notifications_green_brightness[] = + "/sys/class/leds/gta04:green:aux/brightness"; +const char notifications_green_max_brightness[] = + "/sys/class/leds/gta04:green:aux/max_brightness"; + +pthread_mutex_t lights_mutex = PTHREAD_MUTEX_INITIALIZER; + +/* + * Sysfs + */ + +int sysfs_value_read(const char *path) +{ + char buffer[100]; + int value; + int fd = -1; + int rc; + + if (path == NULL) + return -1; + + fd = open(path, O_RDONLY); + if (fd < 0) + goto error; + + rc = read(fd, &buffer, sizeof(buffer)); + if (rc <= 0) + goto error; + + value = atoi(buffer); + goto complete; + +error: + value = -1; + +complete: + if (fd >= 0) + close(fd); + + return value; +} + +int sysfs_value_write(const char *path, int value) +{ + char buffer[100]; + int fd = -1; + int rc; + + if (path == NULL) + return -1; + + fd = open(path, O_WRONLY); + if (fd < 0) + goto error; + + snprintf((char *) &buffer, sizeof(buffer), "%d\n", value); + + rc = write(fd, buffer, strlen(buffer)); + if (rc < (int) strlen(buffer)) + goto error; + + rc = 0; + goto complete; + +error: + rc = -1; + +complete: + if (fd >= 0) + close(fd); + + return rc; +} + +/* + * Lights + */ + +int set_light_notifications(struct light_device_t *dev, + const struct light_state_t *state) +{ + int red, green; + int max; + int rc = 0; + + // GTA04 only has red and green + red = state->color & 0x00ff0000; + green = state->color & 0x0000ff00; + + pthread_mutex_lock(&lights_mutex); + + // Red max + max = sysfs_value_read(notifications_red_max_brightness); + if(max > 0) + red = (red * max) / 0xff; + + // Green max + max = sysfs_value_read(notifications_green_max_brightness); + if(max > 0) + green = (green * max) / 0xff; + + rc |= sysfs_value_write(notifications_red_brightness, red); + rc |= sysfs_value_write(notifications_green_brightness, green); + + pthread_mutex_unlock(&lights_mutex); + + return rc; +} + +int set_light_battery(struct light_device_t *dev, + const struct light_state_t *state) +{ + int red, green; + int max; + int rc = 0; + + // GTA04 only has red and green + red = state->color & 0x00ff0000; + green = state->color & 0x0000ff00; + + pthread_mutex_lock(&lights_mutex); + + // Red max + max = sysfs_value_read(battery_red_max_brightness); + if(max > 0) + red = (red * max) / 0xff; + + // Green max + max = sysfs_value_read(battery_green_max_brightness); + if(max > 0) + green = (green * max) / 0xff; + + rc |= sysfs_value_write(battery_red_brightness, red); + rc |= sysfs_value_write(battery_green_brightness, green); + + pthread_mutex_unlock(&lights_mutex); + + return rc; +} + +int set_light_backlight(struct light_device_t *dev, + const struct light_state_t *state) +{ + int brightness; + int color; + int max; + int rc; + + pthread_mutex_lock(&lights_mutex); + + color = state->color & 0x00ffffff; + brightness = ((77 * ((color >> 16) & 0xff)) + (150 * ((color >> 8) & 0xff)) + (29 * (color & 0xff))) >> 8; + + // Brightness max + max = sysfs_value_read(backlight_max_brightness); + if(max > 0) + brightness = (brightness * max) / 0xff; + + rc = sysfs_value_write(backlight_brightness, brightness); + + pthread_mutex_unlock(&lights_mutex); + + return rc; +} + +/* + * Interface + */ + +int close_lights(struct light_device_t *dev) +{ + ALOGD("%s()", __func__); + + if(dev != NULL) + free(dev); + + return 0; +} + +int open_lights(const struct hw_module_t *module, char const *name, + struct hw_device_t **device) +{ + struct light_device_t *dev = NULL; + int (*set_light)(struct light_device_t *dev, + const struct light_state_t *state); + + ALOGD("%s(%s)", __func__, name); + + if(strcmp(LIGHT_ID_BACKLIGHT, name) == 0) { + set_light = set_light_backlight; + } else if(strcmp(LIGHT_ID_BATTERY, name) == 0) { + set_light = set_light_battery; + } else if(strcmp(LIGHT_ID_NOTIFICATIONS, name) == 0) { + set_light = set_light_notifications; + } else { + return -1; + } + + pthread_mutex_init(&lights_mutex, NULL); + + dev = (struct light_device_t *) 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; + + *device = (struct hw_device_t *) dev; + + return 0; +} + +struct hw_module_methods_t lights_module_methods = { + .open = open_lights, +}; + +struct hw_module_t HAL_MODULE_INFO_SYM = { + .tag = HARDWARE_MODULE_TAG, + .version_major = 1, + .version_minor = 0, + .id = LIGHTS_HARDWARE_MODULE_ID, + .name = "Goldelico GTA04 lights", + .author = "Paul Kocialkowski", + .methods = &lights_module_methods, +}; diff --git a/overlay/frameworks/base/core/res/res/values/arrays.xml b/overlay/frameworks/base/core/res/res/values/arrays.xml index fd660ad..fb4bbb1 100644 --- a/overlay/frameworks/base/core/res/res/values/arrays.xml +++ b/overlay/frameworks/base/core/res/res/values/arrays.xml @@ -1,32 +1,28 @@ - - - - @string/reboot_reboot - + Copyright (C) 2014 Paul Kocialkowski + + 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. + --> + + + + @string/reboot_reboot + @string/reboot_recovery + + + + recovery + diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml index b42bacf..8635e41 100644 --- a/overlay/frameworks/base/core/res/res/values/config.xml +++ b/overlay/frameworks/base/core/res/res/values/config.xml @@ -1,27 +1,22 @@ + Copyright (C) 2012 Paul Kocialkowski + + 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. + --> - true - true diff --git a/overlay/frameworks/base/core/res/res/xml/storage_list.xml b/overlay/frameworks/base/core/res/res/xml/storage_list.xml index ba086a1..c4213c2 100644 --- a/overlay/frameworks/base/core/res/res/xml/storage_list.xml +++ b/overlay/frameworks/base/core/res/res/xml/storage_list.xml @@ -1,41 +1,29 @@ + Copyright (C) 2014 Paul Kocialkowski + + 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 - + 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. + --> - + + + diff --git a/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml b/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml new file mode 100644 index 0000000..d78d55e --- /dev/null +++ b/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml @@ -0,0 +1,20 @@ + + + + + toggleUser|toggleBrightness|toggleVolume|toggleSettings|toggleWifi|toggleMobileData|toggleBattery|toggleAirplane|toggleBluetooth + diff --git a/overlay/packages/inputmethods/LatinIME/java/res/values/dimens.xml b/overlay/packages/inputmethods/LatinIME/java/res/values/dimens.xml deleted file mode 100644 index 83d2898..0000000 --- a/overlay/packages/inputmethods/LatinIME/java/res/values/dimens.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - 4 - - 160dip - diff --git a/overlay/packages/inputmethods/LatinIME/java/res/values/donottranslate.xml b/overlay/packages/inputmethods/LatinIME/java/res/values/donottranslate.xml new file mode 100644 index 0000000..a0849a9 --- /dev/null +++ b/overlay/packages/inputmethods/LatinIME/java/res/values/donottranslate.xml @@ -0,0 +1,20 @@ + + + + + 2 + diff --git a/recovery/init.recovery.gta04.rc b/recovery/init.recovery.gta04.rc new file mode 100644 index 0000000..9ba71e5 --- /dev/null +++ b/recovery/init.recovery.gta04.rc @@ -0,0 +1,15 @@ +on fs + mount ext4 /dev/block/mmcblk0p3 /cache wait + +on post-fs + rm /cache/.startrecovery + +service console /sbin/sh + class core + console + disabled + user root + group root + +on property:ro.debuggable=1 + start console diff --git a/recovery/recovery.fstab b/recovery/recovery.fstab new file mode 100644 index 0000000..625dcdf --- /dev/null +++ b/recovery/recovery.fstab @@ -0,0 +1,6 @@ +/boot vfat /dev/block/mmcblk0p1 +/system ext4 /dev/block/mmcblk0p2 +/cache ext4 /dev/block/mmcblk0p3 +/data ext4 /dev/block/mmcblk0p4 + +/sdcard datamedia /dev/null diff --git a/recovery/recovery_keys.c b/recovery/recovery_keys.c new file mode 100644 index 0000000..1016aea --- /dev/null +++ b/recovery/recovery_keys.c @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2014 Paul Kocialkowski + * + * 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. + */ + +#include + +#include "recovery_ui.h" +#include "common.h" +#include "extendedcommands.h" + +int get_allow_toggle_display(); + +int device_toggle_display(volatile char* key_pressed, int key_code) { + int alt = key_pressed[KEY_LEFTALT] || key_pressed[KEY_RIGHTALT]; + if (alt && key_code == KEY_L) + return 1; + // allow toggling of the display if the correct key is pressed, and the display toggle is allowed or the display is currently off + if (ui_get_showing_back_button()) { + return 0; + //return get_allow_toggle_display() && (key_code == KEY_HOME || key_code == KEY_MENU || key_code == KEY_END); + } + return get_allow_toggle_display() && (key_code == KEY_HOME || key_code == KEY_MENU || key_code == KEY_POWER || key_code == KEY_END); +} + +int device_handle_key(int key_code, int visible) { + if (visible) { + switch (key_code) { + case KEY_PHONE: + return HIGHLIGHT_DOWN; + case KEY_POWER: + if (ui_get_showing_back_button()) { + return SELECT_ITEM; + } + if (!get_allow_toggle_display()) + return GO_BACK; + } + } + + return NO_ACTION; +} diff --git a/releasetools.py b/releasetools.py new file mode 100644 index 0000000..d339555 --- /dev/null +++ b/releasetools.py @@ -0,0 +1,23 @@ +# Copyright (C) 2014 Paul Kocialkowski +# +# 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. + +import common +import os + +def FullOTA_InstallEnd(info): + info.script.script = [ cmd for cmd in info.script.script if not "boot.img" in cmd ] + + info.script.Mount("/boot"); + info.script.script.append('package_extract_file("boot.img", "/boot/boot.img");') + info.script.Unmount("/boot"); diff --git a/replicant_gta04_install.sh b/replicant_gta04_install.sh index dcca69c..9d1f41d 100755 --- a/replicant_gta04_install.sh +++ b/replicant_gta04_install.sh @@ -2,7 +2,7 @@ # Replicant GTA04 installer # -# Copyright (C) 2012-2013 Paul Kocialkowski, GPLv2 +# Copyright (C) 2012-2014 Paul Kocialkowski, GPLv2 # # Based on mkcard.sh v0.5 # Copyright (C) 2009 Graeme Gregory , GPLv2 @@ -18,13 +18,13 @@ # along with this program. If not, see . # -# Env vars +# Environment # export LC_ALL=C # -# Global vars +# Globals # DRIVE="" @@ -33,7 +33,10 @@ DRIVE_SIZE="" DRIVE_CYLINDERS="" DRIVE_PART="" -FILES_BASE="./" +SYSTEM_ZIP="replicant-4.2-gta04.zip" +BOOT_FILES="MLO u-boot.bin boot.scr splash.rgb16z recovery.img" + +FILES_BASE="." MOUNT_BASE="/media" # @@ -42,25 +45,34 @@ MOUNT_BASE="/media" # Display +display_help() { + echo "Usage: $0 [COMMAND] [DRIVE]" + echo "" + echo "It is expected that the following files are located in $FILES_BASE:" + echo " $BOOT_FILES for setup" + echo " $SYSTEM_ZIP for install" + echo "" + echo "Commands:" + echo " setup - setup the drive and copy the base files" + echo " install - install the system on the drive" + echo "" + echo "Optional arguments:" + echo " [DRIVE] - drive node to use" +} + display_banner() { echo "Replicant GTA04 installer" echo "" } -display_help() { - echo "Usage: $0 [FILES_BASE] [DRIVE]" +display_complete() { echo "" - echo "Arguments:" - echo "- The [FILES_BASE] argument is the path to the files" - echo " The following files must be in that directory:" - echo " MLO, u-boot.bin, splash.rgb16z, boot.scr, boot.img, system.tar.bz2" - echo "- The [DRIVE] argument is the sdcard drive node and can be omitted" + echo "Process completed!" } # Drive -drive_select_list() -{ +drive_select_list() { drives_dir="/dev/disk/by-id/" count=0 @@ -95,8 +107,7 @@ drive_select_list() done } -drive_select() -{ +drive_select() { echo "Available devices:" drive_select_list "show" @@ -107,10 +118,37 @@ drive_select() echo "" } -drive_select_confirm() { +drive_umount() { + list=$( mount | grep $DRIVE | sed "s|$DRIVE[0-9]* on \([^ ]*\) .*|\1|g" ) + + for mount_point in $list + do + echo "Unmounting $mount_point" + + umount "$mount_point" + if [ $? != 0 ] + then + echo "Unmounting $mount_point failed, arborting!" + exit 1 + fi + done +} + +drive_part() { + if [ -e "${DRIVE}p1" ] + then + DRIVE_PART="${DRIVE}p" + else + DRIVE_PART="${DRIVE}" + fi +} + +# Setup + +setup_drive_confirm() { if [ "$DRIVE" = "" ] then - echo "Wrong drive block" + echo "Invalid drive block" exit 1 fi @@ -127,8 +165,8 @@ drive_select_confirm() { for mount_point in $list do - mount_point_dir=$( dirname $mount_point ) - if [ "$mount_point_dir" != "/media" ] && [ "$mount_point_dir" != "/mnt" ] && [ "$mount_point" != "/media" ] && [ "$mount_point" != "/mnt" ] + mount_point_check=$( dirname $mount_point | grep -P "^/mnt|mount" ) + if [ "$mount_point_check" != "" ] then echo "" echo "Warning: the drive is mounted as $mount_point!" @@ -149,23 +187,9 @@ drive_select_confirm() { fi } -drive_umount() { - list=$( mount | grep $DRIVE | sed "s|$DRIVE[0-9]* on \([^ ]*\) .*|\1|g" ) - - for mount_point in $list - do - echo "Unmounting $mount_point" +setup_drive_empty() { + drive_umount - umount "$mount_point" - if [ $? != 0 ] - then - echo "Unmounting $mount_point failed, arborting!" - exit 1 - fi - done -} - -drive_empty() { # Backup dd if="$DRIVE" of=".drive_start_backup" bs=1024 count=1024 @@ -177,7 +201,7 @@ drive_empty() { fi } -drive_rescue() { +setup_drive_rescue() { if [ -f ".drive_start_backup" ] then echo -n "Something went wrong, do you want to restore drive start backup? [Y/N] " @@ -188,19 +212,14 @@ drive_rescue() { fi } -drive_infos_get() { +setup_drive_infos() { DRIVE_SIZE=$( fdisk -l "$DRIVE" | grep Disk | grep bytes | awk '{print $5}' ) DRIVE_CYLINDERS=$( echo "$DRIVE_SIZE/255/63/512" | bc ) } -drive_eject() { - rm -rf ".drive_start_backup" - eject "$DRIVE" -} - -drive_partitions_set() { +setup_drive_partition() { boot_size=$( echo "(50 * 1024 * 1024) / ($DRIVE_SIZE/$DRIVE_CYLINDERS)" | bc ) - system_size=$( echo "(250 * 1024 * 1024) / ($DRIVE_SIZE/$DRIVE_CYLINDERS)" | bc ) + system_size=$( echo "(350 * 1024 * 1024) / ($DRIVE_SIZE/$DRIVE_CYLINDERS)" | bc ) cache_size=$( echo "(100 * 1024 * 1024) / ($DRIVE_SIZE/$DRIVE_CYLINDERS)" | bc ) { @@ -217,32 +236,28 @@ drive_partitions_set() { sleep 1 - if [ -e "${DRIVE}p1" ] - then - DRIVE_PART="${DRIVE}p" - else - DRIVE_PART="${DRIVE}" - fi + drive_part mkfs.vfat -F 32 -n "boot" "${DRIVE_PART}1" - mkfs.ext2 -L "system" "${DRIVE_PART}2" - mkfs.ext2 -L "cache" "${DRIVE_PART}3" - mkfs.ext2 -L "data" "${DRIVE_PART}4" + mkfs.ext4 -L "system" "${DRIVE_PART}2" + mkfs.ext4 -L "cache" "${DRIVE_PART}3" + mkfs.ext4 -L "data" "${DRIVE_PART}4" sleep 1 } -drive_write() { - echo "Writing boot files" +setup_boot_install() { + echo "Installing boot files" + + drive_part mkdir -p "$MOUNT_BASE/boot" mount "${DRIVE_PART}1" "$MOUNT_BASE/boot" - cp $FILES_BASE/MLO "$MOUNT_BASE/boot/" - cp $FILES_BASE/u-boot.bin "$MOUNT_BASE/boot/" - cp $FILES_BASE/splash.rgb16z "$MOUNT_BASE/boot" - cp $FILES_BASE/boot.scr "$MOUNT_BASE/boot" - cp $FILES_BASE/boot.img "$MOUNT_BASE/boot" + for file in $BOOT_FILES + do + cp "$FILES_BASE/$file" "$MOUNT_BASE/boot/" + done dir=$( pwd ) echo "Syncing boot files" @@ -252,52 +267,223 @@ drive_write() { umount "$MOUNT_BASE/boot" rmdir "$MOUNT_BASE/boot" +} + +setup_drive_eject() { + rm -rf ".drive_start_backup" + eject "$DRIVE" +} - echo "Writing system files" +# Install - mkdir -p "$MOUNT_BASE/system" - mount "${DRIVE_PART}2" "$MOUNT_BASE/system" +install_package_extract_dir() { + destination="$MOUNT_BASE"$( dirname "$2") - tar -p -xf "system.tar.bz2" -C "$MOUNT_BASE/system/" --strip-components=1 "system/" - if [ $? != 0 ] + if [ $# -lt 2 ] then - umount "$MOUNT_BASE/system" - rmdir "$MOUNT_BASE/system" + return + fi - exit 1 + unzip -o "$FILES_BASE/$SYSTEM_ZIP" "$1/**" -d "$destination" +} + +install_package_extract_file() { + destination="$MOUNT_BASE"$( dirname "$2") + + if [ $# -lt 2 ] + then + return + fi + + unzip -o "$FILES_BASE/$SYSTEM_ZIP" "$1" -d "$destination" +} + +install_symlink() { + source="" + + if [ $# -lt 2 ] + then + return + fi + + for path in $@ + do + if [ "$source" = "" ] + then + source="$path" + continue + fi + + unlink "$MOUNT_BASE$path" + ln -s "$source" "$MOUNT_BASE$path" + done +} + +install_set_perm() { + uid="" + gid="" + mode="" + + if [ $# -lt 4 ] + then + return fi + for value in $@ + do + if [ "$uid" = "" ] + then + uid="$value" + continue + fi + + if [ "$gid" = "" ] + then + gid="$value" + continue + fi + + if [ "$mode" = "" ] + then + mode="$value" + continue + fi + + chown "$uid:$gid" "$MOUNT_BASE$value" + chmod "$mode" "$MOUNT_BASE$value" + done +} + +install_set_perm_recursive() { + uid="" + gid="" + dir_mode="" + file_mode="" + + if [ $# -lt 4 ] + then + return + fi + + for value in $@ + do + if [ "$uid" = "" ] + then + uid="$value" + continue + fi + + if [ "$gid" = "" ] + then + gid="$value" + continue + fi + + if [ "$dir_mode" = "" ] + then + dir_mode="$value" + continue + fi + + if [ "$file_mode" = "" ] + then + file_mode="$value" + continue + fi + + find "$MOUNT_BASE$value" -type d -exec chown "$uid:$gid" {} \; -exec chmod "$dir_mode" {} \; + find "$MOUNT_BASE$value" -type f -exec chown "$uid:$gid" {} \; -exec chmod "$file_mode" {} \; + done +} + +install_command() { + command=$( echo "$1" | sed "s/[ \t]*\([^(]*\)(.*/\1/g" ) + arguments=$( echo "$1" | sed -e "s/[^(]*(\([^)]*\));.*/\1/g" -e "s/[ \t]*,[ \t]*/ /g" | tr -d '"') + + case "$command" in + "package_extract_dir") + install_package_extract_dir $arguments + ;; + "package_extract_file") + install_package_extract_file $arguments + ;; + "symlink") + install_symlink $arguments + ;; + "set_perm") + install_set_perm $arguments + ;; + "set_perm_recursive") + install_set_perm_recursive $arguments + ;; + esac +} + +install_script() { + unzip -p "$FILES_BASE/$SYSTEM_ZIP" "META-INF/com/google/android/updater-script" | while read line + do + end_test=$( echo "$line" | grep -P "\);$" ) + + COMMAND="$COMMAND$line" + + if [ "$end_test" != "" ] + then + install_command "$COMMAND" + + COMMAND="" + fi + done +} + +install_mount() { + drive_part + + drive_umount + + mkdir -p "$MOUNT_BASE/boot" + mount "${DRIVE_PART}1" "$MOUNT_BASE/boot" + + mkdir -p "$MOUNT_BASE/system" + mount "${DRIVE_PART}2" "$MOUNT_BASE/system" +} + +install_umount() { + drive_part + dir=$( pwd ) - echo "Syncing system files" + echo "Syncing files" + + cd "$MOUNT_BASE/boot" + sync + cd "$dir" + cd "$MOUNT_BASE/system" sync cd "$dir" + umount "$MOUNT_BASE/boot" + rmdir "$MOUNT_BASE/boot" + umount "$MOUNT_BASE/system" rmdir "$MOUNT_BASE/system" } -display_end() { - echo "" - echo "Your drive is now ready to be used!" +install_eject() { + eject "$DRIVE" } -# Script start +# +# Main +# -if [ $# -eq 0 ] || [ $# -gt 2 ] || [ "$1" = "--help" ] || [ "$1" = "help" ] +if [ $# -lt 1 ] || [ $# -gt 2 ] then display_help exit 1 fi -if [ $# -eq 1 ] -then - FILES_BASE=$1 -fi - -if [ $# -eq 2 ] +if [ $# -gt 1 ] then - FILES_BASE=$1 DRIVE=$2 fi @@ -308,15 +494,26 @@ then drive_select fi -# Drive -drive_select_confirm -drive_umount -drive_empty -drive_infos_get - -drive_partitions_set -drive_write - -# Finishing -display_end -drive_eject +case $1 in + "setup") + setup_drive_confirm + drive_umount + setup_drive_empty + setup_drive_infos + setup_drive_partition + setup_boot_install + setup_drive_eject + + display_complete + ;; + "install") + install_mount + install_script + install_umount + install_eject + ;; + *) + display_help + exit 1 + ;; +esac diff --git a/rootdir/fstab.gta04 b/rootdir/fstab.gta04 new file mode 100644 index 0000000..4aaa1cb --- /dev/null +++ b/rootdir/fstab.gta04 @@ -0,0 +1,4 @@ +/dev/block/mmcblk0p1 /mnt/boot vfat ro wait +/dev/block/mmcblk0p2 /system ext4 ro wait +/dev/block/mmcblk0p3 /cache ext4 nosuid wait +/dev/block/mmcblk0p4 /data ext4 nosuid wait diff --git a/rootdir/init.gta04.rc b/rootdir/init.gta04.rc new file mode 100644 index 0000000..57f81f1 --- /dev/null +++ b/rootdir/init.gta04.rc @@ -0,0 +1,58 @@ +import init.gta04.usb.rc + +on init + mkdir /mnt/boot 0700 system system + + mkdir /mnt/shell/emulated 0700 shell shell + mkdir /storage/emulated 0555 root root + + export EXTERNAL_STORAGE /storage/emulated/legacy + export EMULATED_STORAGE_SOURCE /mnt/shell/emulated + export EMULATED_STORAGE_TARGET /storage/emulated + + # Legacy + symlink /storage/emulated/legacy /sdcard + symlink /storage/emulated/legacy /mnt/sdcard + symlink /storage/emulated/legacy /storage/sdcard + symlink /mnt/shell/emulated/0 /storage/emulated/legacy + + # USB disk + mkdir /storage/usbdisk 0666 system system + symlink /storage/usbdisk /mnt/usbdisk + symlink /mnt/usbdisk /usbdisk + + symlink /mnt/boot /boot + + chmod 0660 /dev/cpuctl + +on boot + # Modem GPIO + chown radio radio /sys/class/gpio/gpio186/value + chmod 660 /sys/class/gpio/gpio186/value + + # Lights + chown system system /sys/class/backlight/pwm-backlight/brightness + chown system system /sys/class/backlight/pwm-backlight/max_brightness + chown system system /sys/class/leds/gta04:red:power/brightness + chown system system /sys/class/leds/gta04:red:power/max_brightness + chown system system /sys/class/leds/gta04:green:power/brightness + chown system system /sys/class/leds/gta04:green:power/max_brightness + chown system system /sys/class/leds/gta04:red:aux/brightness + chown system system /sys/class/leds/gta04:red:aux/max_brightness + chown system system /sys/class/leds/gta04:green:aux/brightness + chown system system /sys/class/leds/gta04:green:aux/max_brightness + + # Audio + chown system audio /sys/class/gpio/gpio55/value + chmod 0660 /sys/class/gpio/gpio55/value + +on fs + mount_all /fstab.gta04 + + setprop ro.crypto.fuse_sdcard true + +on post-fs-data + mkdir /data/media 0770 media_rw media_rw + +service sdcard /system/bin/sdcard /data/media /mnt/shell/emulated 1023 1023 + class late_start diff --git a/rootdir/init.gta04.usb.rc b/rootdir/init.gta04.usb.rc new file mode 100755 index 0000000..b6bd413 --- /dev/null +++ b/rootdir/init.gta04.usb.rc @@ -0,0 +1,70 @@ +on boot + write /sys/class/android_usb/android0/iManufacturer ${ro.product.manufacturer} + write /sys/class/android_usb/android0/iProduct ${ro.product.model} + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + + write /sys/class/android_usb/android0/f_rndis/manufacturer Goldelico + write /sys/class/android_usb/android0/f_rndis/vendorID 18d1 + write /sys/class/android_usb/android0/f_rndis/wceis 1 + +on property:sys.usb.config=adb + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 18d1 + write /sys/class/android_usb/android0/idProduct 0001 + write /sys/class/android_usb/android0/functions ${sys.usb.config} + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=mtp + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 18d1 + write /sys/class/android_usb/android0/idProduct 0002 + write /sys/class/android_usb/android0/functions ${sys.usb.config} + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=mtp,adb + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 18d1 + write /sys/class/android_usb/android0/idProduct 0003 + write /sys/class/android_usb/android0/functions ${sys.usb.config} + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=ptp + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 18d1 + write /sys/class/android_usb/android0/idProduct 0004 + write /sys/class/android_usb/android0/functions ${sys.usb.config} + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=ptp,adb + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 18d1 + write /sys/class/android_usb/android0/idProduct 0005 + write /sys/class/android_usb/android0/functions ${sys.usb.config} + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=rndis + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 18d1 + write /sys/class/android_usb/android0/idProduct 0008 + write /sys/class/android_usb/android0/functions ${sys.usb.config} + write /sys/class/android_usb/android0/bDeviceClass 224 + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=rndis,adb + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 18d1 + write /sys/class/android_usb/android0/idProduct 0009 + write /sys/class/android_usb/android0/functions ${sys.usb.config} + write /sys/class/android_usb/android0/bDeviceClass 224 + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} diff --git a/rootdir/initlogo.rle b/rootdir/initlogo.rle new file mode 100644 index 0000000..740cc91 Binary files /dev/null and b/rootdir/initlogo.rle differ diff --git a/rootdir/initlogo.svg b/rootdir/initlogo.svg new file mode 100644 index 0000000..d8dab57 --- /dev/null +++ b/rootdir/initlogo.svg @@ -0,0 +1,827 @@ + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/rootdir/ueventd.gta04.rc b/rootdir/ueventd.gta04.rc new file mode 100644 index 0000000..7be3ef3 --- /dev/null +++ b/rootdir/ueventd.gta04.rc @@ -0,0 +1,12 @@ +# Modem + +/dev/ttyHS0 0660 radio radio +/dev/ttyHS1 0660 radio radio +/dev/ttyHS2 0660 radio radio +/dev/ttyHS3 0660 radio radio +/dev/ttyHS4 0660 radio radio +/dev/ttyHS5 0660 radio radio +/dev/ttyHS6 0660 radio radio +/dev/ttyHS7 0660 radio radio +/dev/ttyHS8 0660 radio radio +/dev/ttyHS9 0660 radio radio diff --git a/tsc2007.idc b/tsc2007.idc deleted file mode 100644 index 6c1df26..0000000 --- a/tsc2007.idc +++ /dev/null @@ -1,3 +0,0 @@ -touch.deviceType = touchScreen -touch.orientationAware = 1 -touch.pressure.calibration = amplitude diff --git a/twl4030_pwrbutton.kl b/twl4030_pwrbutton.kl deleted file mode 100644 index ef2c8f6..0000000 --- a/twl4030_pwrbutton.kl +++ /dev/null @@ -1 +0,0 @@ -key 116 POWER WAKE diff --git a/ueventd.gta04.rc b/ueventd.gta04.rc deleted file mode 100644 index 7be3ef3..0000000 --- a/ueventd.gta04.rc +++ /dev/null @@ -1,12 +0,0 @@ -# Modem - -/dev/ttyHS0 0660 radio radio -/dev/ttyHS1 0660 radio radio -/dev/ttyHS2 0660 radio radio -/dev/ttyHS3 0660 radio radio -/dev/ttyHS4 0660 radio radio -/dev/ttyHS5 0660 radio radio -/dev/ttyHS6 0660 radio radio -/dev/ttyHS7 0660 radio radio -/dev/ttyHS8 0660 radio radio -/dev/ttyHS9 0660 radio radio diff --git a/usr/idc/TSC2007_Touchscreen.idc b/usr/idc/TSC2007_Touchscreen.idc new file mode 100644 index 0000000..6c1df26 --- /dev/null +++ b/usr/idc/TSC2007_Touchscreen.idc @@ -0,0 +1,3 @@ +touch.deviceType = touchScreen +touch.orientationAware = 1 +touch.pressure.calibration = amplitude diff --git a/usr/keylayout/Phone_button.kl b/usr/keylayout/Phone_button.kl new file mode 100644 index 0000000..1232ea5 --- /dev/null +++ b/usr/keylayout/Phone_button.kl @@ -0,0 +1 @@ +key 169 BACK WAKE_DROPPED diff --git a/usr/keylayout/twl4030_pwrbutton.kl b/usr/keylayout/twl4030_pwrbutton.kl new file mode 100644 index 0000000..129f9ba --- /dev/null +++ b/usr/keylayout/twl4030_pwrbutton.kl @@ -0,0 +1 @@ +key 116 POWER WAKE_DROPPED -- cgit v1.1