From 0515d0fe93ec2a4c49688b6fc7be18050708e8fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= Date: Mon, 26 Sep 2011 04:11:48 +0000 Subject: [PATCH 1/3] leo: Support new touch to focus overlay Change-Id: Ic9449cfdf7fd0be4296ab1cf0133eaeda9d77ae2 --- .../apps/Camera/res/values/config.xml | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 overlay/packages/apps/Camera/res/values/config.xml diff --git a/overlay/packages/apps/Camera/res/values/config.xml b/overlay/packages/apps/Camera/res/values/config.xml new file mode 100644 index 0000000..ae964ee --- /dev/null +++ b/overlay/packages/apps/Camera/res/values/config.xml @@ -0,0 +1,25 @@ + + + + + + + touch-focus + From 77ea40b3e8c3a7b4a997a76c122e137b69c84c41 Mon Sep 17 00:00:00 2001 From: Arif Ali Date: Wed, 12 Oct 2011 11:46:10 +0100 Subject: [PATCH 2/3] leo: update code * move all prebuilt stuff into the prebuild folder * Create the system.prop so that we can have spaces in the rild.args * moved the LEOUPDATE stuff so now uses squisher * changed the initrd.gz creating, so that everything is in init.htcleo.rc * 01modules is now moved here, rather than cyanogen vendor files Change-Id: I7fb7d87503e46f6a11a8228ae29b3f50187d5634 --- BoardConfig.mk | 13 +- extract-files.sh | 14 +- init.htcleo.rc | 142 ------ init.leo.rc | 131 ----- init.rc | 451 ------------------ leo.mk | 87 +--- leo_eu.mk | 2 +- postrecoveryboot.sh | 10 + prebuilt/01modules | 16 + egl.cfg => prebuilt/egl.cfg | 0 .../firmware}/fw_bcm4329.bin | Bin .../firmware}/fw_bcm4329_apsta.bin | Bin gps.conf => prebuilt/gps.conf | 0 gps_eu.conf => prebuilt/gps_eu.conf | 0 prebuilt/init.htcleo.rc | 263 ++++++++++ prebuilt/init.leo.rc | 1 + kernel => prebuilt/kernel | Bin .../keylayout/h2w_headset.kl | 0 .../keylayout/leo-keypad.kcm.bin | Bin .../keylayout/leo-keypad.kl | 0 .../media_profiles.xml | 0 {modules => prebuilt/modules}/bcm4329.ko | Bin {modules => prebuilt/modules}/cifs.ko | Bin {modules => prebuilt/modules}/fuse.ko | Bin {modules => prebuilt/modules}/kineto_gan.ko | Bin {modules => prebuilt/modules}/msm_rmnet.ko | Bin {modules => prebuilt/modules}/nls_utf8.ko | Bin {modules => prebuilt/modules}/tun.ko | Bin recovery_kernel => prebuilt/recovery_kernel | Bin ueventd.leo.rc => prebuilt/ueventd.htcleo.rc | 0 prebuilt/ueventd.leo.rc | 1 + prebuilt/vold.fstab | 18 + releasetools/squisher | 180 +++++++ releasetools/squisher.sh | 28 ++ system.prop | 49 ++ unzip-files.sh | 2 - 36 files changed, 598 insertions(+), 810 deletions(-) delete mode 100644 init.htcleo.rc delete mode 100755 init.leo.rc delete mode 100644 init.rc create mode 100644 prebuilt/01modules rename egl.cfg => prebuilt/egl.cfg (100%) rename {firmware => prebuilt/firmware}/fw_bcm4329.bin (100%) rename {firmware => prebuilt/firmware}/fw_bcm4329_apsta.bin (100%) rename gps.conf => prebuilt/gps.conf (100%) rename gps_eu.conf => prebuilt/gps_eu.conf (100%) create mode 100644 prebuilt/init.htcleo.rc create mode 120000 prebuilt/init.leo.rc rename kernel => prebuilt/kernel (100%) rename h2w_headset.kl => prebuilt/keylayout/h2w_headset.kl (100%) rename leo-keypad.kcm.bin => prebuilt/keylayout/leo-keypad.kcm.bin (100%) rename leo-keypad.kl => prebuilt/keylayout/leo-keypad.kl (100%) rename media_profiles.xml => prebuilt/media_profiles.xml (100%) rename {modules => prebuilt/modules}/bcm4329.ko (100%) rename {modules => prebuilt/modules}/cifs.ko (100%) rename {modules => prebuilt/modules}/fuse.ko (100%) rename {modules => prebuilt/modules}/kineto_gan.ko (100%) rename {modules => prebuilt/modules}/msm_rmnet.ko (100%) rename {modules => prebuilt/modules}/nls_utf8.ko (100%) rename {modules => prebuilt/modules}/tun.ko (100%) rename recovery_kernel => prebuilt/recovery_kernel (100%) rename ueventd.leo.rc => prebuilt/ueventd.htcleo.rc (100%) create mode 120000 prebuilt/ueventd.leo.rc create mode 100755 prebuilt/vold.fstab create mode 100755 releasetools/squisher create mode 100755 releasetools/squisher.sh create mode 100755 system.prop diff --git a/BoardConfig.mk b/BoardConfig.mk index be03779..c072da6 100755 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -62,7 +62,7 @@ BOARD_VENDOR_QCOM_AMSS_VERSION := 1550 BOARD_VENDOR_USE_AKMD := akm8973 -BOARD_EGL_CFG := device/htc/leo/egl.cfg +BOARD_EGL_CFG := device/htc/leo/prebuilt/egl.cfg BOARD_USE_FROYO_LIBCAMERA := true @@ -75,10 +75,7 @@ BOARD_USE_KINETO_COMPATIBILITY := true BOARD_HAVE_FM_RADIO := true BOARD_GLOBAL_CFLAGS += -DHAVE_FM_RADIO -# Use Special Leo update -TARGET_USES_LEOUPDATE := true - - +TARGET_CUSTOM_RELEASETOOL := device/htc/leo/releasetools/squisher # # cat /proc/mtd # dev: size erasesize name @@ -97,15 +94,13 @@ BOARD_FLASH_BLOCK_SIZE := 131072 TARGET_RELEASETOOLS_EXTENSIONS := device/htc/common -TARGET_PREBUILT_KERNEL := device/htc/leo/kernel +TARGET_PREBUILT_KERNEL := device/htc/leo/prebuilt/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 -TARGET_PREBUILT_RECOVERY_KERNEL := device/htc/leo/recovery_kernel +TARGET_PREBUILT_RECOVERY_KERNEL := device/htc/leo/prebuilt/recovery_kernel BOARD_USES_RECOVERY_CHARGEMODE := true - -TARGET_PROVIDES_INIT_RC := true diff --git a/extract-files.sh b/extract-files.sh index 5498ca0..aa6f6e2 100755 --- a/extract-files.sh +++ b/extract-files.sh @@ -43,14 +43,11 @@ adb pull /system/lib/libcamera.so ../../../vendor/$MANUFACTURER/$DEVICE/propriet 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 (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 @@ -83,10 +80,10 @@ PRODUCT_COPY_FILES += \\ 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/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/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 \\ @@ -97,14 +94,11 @@ vendor/__MANUFACTURER__/__DEVICE__/proprietary/htcleo.acdb:system/etc/firmware/h 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 \\ + vendor/__MANUFACTURER__/__DEVICE__/proprietary/sensors.bravo.so:system/lib/hw/sensors.bravo.so \\ EOF ./setup-makefiles.sh diff --git a/init.htcleo.rc b/init.htcleo.rc deleted file mode 100644 index ecc5756..0000000 --- a/init.htcleo.rc +++ /dev/null @@ -1,142 +0,0 @@ -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 diff --git a/init.leo.rc b/init.leo.rc deleted file mode 100755 index af3dd00..0000000 --- a/init.leo.rc +++ /dev/null @@ -1,131 +0,0 @@ -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 - diff --git a/init.rc b/init.rc deleted file mode 100644 index 38fac2f..0000000 --- a/init.rc +++ /dev/null @@ -1,451 +0,0 @@ -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 diff --git a/leo.mk b/leo.mk index f4b2722..255b676 100755 --- a/leo.mk +++ b/leo.mk @@ -23,57 +23,12 @@ ## (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 - + device/htc/leo/prebuilt/init.htcleo.rc:root/init.htcleo.rc \ + device/htc/leo/prebuilt/ueventd.htcleo.rc:root/ueventd.htcleo.rc \ # 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) @@ -93,7 +48,11 @@ PRODUCT_COPY_FILES += \ # media config xml file PRODUCT_COPY_FILES += \ - device/htc/leo/media_profiles.xml:system/etc/media_profiles.xml + 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 +PRODUCT_COPY_FILES += \ + device/htc/leo/prebuilt/01modules:system/etc/init.d/01modules PRODUCT_PACKAGES += \ sensors.htcleo \ @@ -112,44 +71,44 @@ PRODUCT_PACKAGES += \ PRODUCT_LOCALES := hdpi PRODUCT_COPY_FILES += \ - device/htc/leo/vold.fstab:system/etc/vold.fstab + device/htc/leo/prebuilt/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 + device/htc/leo/prebuilt/keylayout/leo-keypad.kl:system/usr/keylayout/leo-keypad.kl \ + device/htc/leo/prebuilt/keylayout/leo-keypad.kcm.bin:system/usr/keychars/leo-keypad.kcm.bin \ + device/htc/leo/prebuilt/keylayout/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 + device/htc/leo/prebuilt/firmware/fw_bcm4329.bin:system/etc/firmware/fw_bcm4329.bin \ + device/htc/leo/prebuilt/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 + 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 + device/htc/leo/prebuilt/modules/bcm4329.ko:system/lib/modules/bcm4329.ko \ + device/htc/leo/prebuilt/modules/cifs.ko:system/lib/modules/cifs.ko \ + device/htc/leo/prebuilt/modules/msm_rmnet.ko:system/lib/modules/msm_rmnet.ko \ + device/htc/leo/prebuilt/modules/nls_utf8.ko:system/lib/modules/nls_utf8.ko \ + device/htc/leo/prebuilt/modules/tun.ko:system/lib/modules/tun.ko \ + device/htc/leo/prebuilt/modules/fuse.ko:system/lib/modules/fuse.ko PRODUCT_COPY_FILES += \ - device/htc/leo/kernel:boot/zImage \ + device/htc/leo/prebuilt/kernel:boot/zImage \ ifeq ($(TARGET_PREBUILT_KERNEL),) -LOCAL_KERNEL := device/htc/leo/kernel +LOCAL_KERNEL := device/htc/leo/prebuilt/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 + device/htc/leo/prebuilt/gps.conf:system/etc/gps.conf PRODUCT_COPY_FILES += \ $(LOCAL_KERNEL):kernel diff --git a/leo_eu.mk b/leo_eu.mk index 83d2236..df93a27 100755 --- a/leo_eu.mk +++ b/leo_eu.mk @@ -21,7 +21,7 @@ # The gps config appropriate for this device PRODUCT_COPY_FILES += \ - device/htc/leo/gps_eu.conf:system/etc/gps.conf + device/htc/leo/prebuilt/gps_eu.conf:system/etc/gps.conf # The rest of the configuration is inherited from a generic config diff --git a/postrecoveryboot.sh b/postrecoveryboot.sh index 6342351..51f2f42 100644 --- a/postrecoveryboot.sh +++ b/postrecoveryboot.sh @@ -5,3 +5,13 @@ 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 + diff --git a/prebuilt/01modules b/prebuilt/01modules new file mode 100644 index 0000000..5ad743c --- /dev/null +++ b/prebuilt/01modules @@ -0,0 +1,16 @@ +#!/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 +++"; diff --git a/egl.cfg b/prebuilt/egl.cfg similarity index 100% rename from egl.cfg rename to prebuilt/egl.cfg diff --git a/firmware/fw_bcm4329.bin b/prebuilt/firmware/fw_bcm4329.bin similarity index 100% rename from firmware/fw_bcm4329.bin rename to prebuilt/firmware/fw_bcm4329.bin diff --git a/firmware/fw_bcm4329_apsta.bin b/prebuilt/firmware/fw_bcm4329_apsta.bin similarity index 100% rename from firmware/fw_bcm4329_apsta.bin rename to prebuilt/firmware/fw_bcm4329_apsta.bin diff --git a/gps.conf b/prebuilt/gps.conf similarity index 100% rename from gps.conf rename to prebuilt/gps.conf diff --git a/gps_eu.conf b/prebuilt/gps_eu.conf similarity index 100% rename from gps_eu.conf rename to prebuilt/gps_eu.conf diff --git a/prebuilt/init.htcleo.rc b/prebuilt/init.htcleo.rc new file mode 100644 index 0000000..09d4cd7 --- /dev/null +++ b/prebuilt/init.htcleo.rc @@ -0,0 +1,263 @@ +on init + export TERMINFO /system/etc/terminfo + + 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 + + write /proc/sys/kernel/sched_min_granularity_ns 100000 + +on fs + mount yaffs2 mtd@system /system remount + mount rootfs rootfs / rw remount + mkdir /sd-ext 0771 system system + + # DRMv1 rights storage + symlink /data/local /data/drm + mkdir /data/local/rights 0777 shell shell + chown shell shell /data/drm + write /data/drm/rights/mid.txt 0 + chmod 0777 /data/drm/rights/mid.txt + +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 + + # 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 + + 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 + + # Write value must be consistent with the above properties. + # Note that the driver only supports 6 slots, so we have HOME_APP at the + # same memory level as services. + write /sys/module/lowmemorykiller/parameters/adj 0,1,2,7,14,15 + + # 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/red/brightness + chown system system /sys/class/leds/red/blink + chown system system /sys/class/leds/blue/brightness + chown system system /sys/class/leds/blue/blink + chown system system /sys/class/leds/jogball-backlight/brightness + chown system system /sys/class/leds/jogball-backlight/color + chown system system /sys/class/leds/jogball-backlight/period + chown system system /sys/class/leds/button-backlight/brightness + chown system system /sys/class/leds/lcd-backlight/brightness + + # Permissions for camera + 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 media system /sys/android_camera/cam_mode + + # enable the GPS + setprop ro.ril.def.agps.mode 2 + + # performance tweaks for flash + write /sys/block/mtdblock3/bdi/read_ahead_kb 2048 + write /sys/block/mtdblock4/bdi/read_ahead_kb 2048 + write /sys/block/mtdblock5/bdi/read_ahead_kb 2048 + # increase read throughput from sd card + write /sys/block/mmcblk0/bdi/read_ahead_kb 204 + + # 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/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 + chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor + chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq + chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq + + # 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 + + chown root radio /proc/cmdline + chown system system /dev/ttyHS0 + chown system system /dev/smd0 + chown system system /dev/smd1 + chown system system /dev/smd27 + + chmod 0666 /dev/rfkill + chmod 0666 /dev/q6venc + chmod 0666 /dev/ttyHS0 + chmod 0666 /dev/ttyHS1 + chmod 666 /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_aac_in + chmod 666 /dev/msm_audio_ctl + chmod 666 /dev/msm_audio_route + chmod 666 /dev/msm_mp3 + chmod 666 /dev/msm_qcelp_in + chmod 666 /dev/msm_snd + chmod 666 /dev/msm_audpre + + chmod 666 /dev/msm_pcm_in + chmod 666 /dev/msm_pcm_out + chmod 666 /dev/msm_pcm_ctl + chmod 666 /dev/msm_hw3dm + chmod 666 /dev/msm_hw3dc + + 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/kgsl + chmod 0777 /dev/smd0 + chmod 0777 /dev/smd1 + chmod 0777 /dev/smd27 + chmod 0777 /dev/vfe + chmod 0777 /dev/camera + chmod 0777 /dev/msm_camera + chmod 0777 /dev/vogue_gps + chmod 0777 /dev/akm8973_aot + chmod 0777 /dev/akm8973_daemon + chmod 0777 /dev/compass + chmod 0777 /dev/lightsensor + chmod 0777 /dev/bma150 + chmod 0777 /dev/cm3602 + chmod 0777 /dev/htc-acoustic + + # flashlight + chown system camera /sys/class/leds/flashlight/brightness + chmod 0666 /sys/class/leds/flashlight/brightness + chmod 0666 /sys/class/leds/flashlight/max_brightness + chown system camera /sys/devices/platform/flashlight.0/leds/flashlight/brightness + chmod 0660 /sys/devices/platform/flashlight.0/leds/flashlight/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 + + chmod 666 /sys/class/i2c-adapter/i2c-0/0-0018/enable + chmod 666 /sys/class/i2c-adapter/i2c-0/0-0019/enable + chmod 666 /sys/class/i2c-adapter/i2c-0/0-0018/rate + chmod 666 /sys/class/i2c-adapter/i2c-0/0-0019/rate + chmod 666 /sys/class/i2c-adapter/i2c-0/0-0018/scale + chmod 666 /sys/class/i2c-adapter/i2c-0/0-0019/scale + + # 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 + + # PPP stuff + chown radio radio /dev/smd1 + chown root radio /system/etc/ppp + chown root root /system/bin/pppd; + chmod 755 /system/etc/ppp/* + chmod 4755 /system/bin/pppd + + if [ -f /system/ppp ] + then + # PPP enabled, doing PPP specific stuff + + # Create link for resolv.conf (generated by pppd) + symlink /etc/ppp/resolv.conf /etc/resolv.conf + + # Tweak kernel low memory handling + write /proc/sys/vm/lowmem_reserve_ratio 8 8 + write /proc/sys/vm/min_free_kbytes 8192 + fi + +service hciattach /system/bin/brcm_patchram_plus --enable_hci --enable_lpm \ + --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 + +# Execute files in /etc/init.d before booting +service sysinit /system/bin/logwrapper /system/xbin/busybox run-parts /system/etc/init.d + disabled + oneshot diff --git a/prebuilt/init.leo.rc b/prebuilt/init.leo.rc new file mode 120000 index 0000000..5a5346f --- /dev/null +++ b/prebuilt/init.leo.rc @@ -0,0 +1 @@ +init.htcleo.rc \ No newline at end of file diff --git a/kernel b/prebuilt/kernel similarity index 100% rename from kernel rename to prebuilt/kernel diff --git a/h2w_headset.kl b/prebuilt/keylayout/h2w_headset.kl similarity index 100% rename from h2w_headset.kl rename to prebuilt/keylayout/h2w_headset.kl diff --git a/leo-keypad.kcm.bin b/prebuilt/keylayout/leo-keypad.kcm.bin similarity index 100% rename from leo-keypad.kcm.bin rename to prebuilt/keylayout/leo-keypad.kcm.bin diff --git a/leo-keypad.kl b/prebuilt/keylayout/leo-keypad.kl similarity index 100% rename from leo-keypad.kl rename to prebuilt/keylayout/leo-keypad.kl diff --git a/media_profiles.xml b/prebuilt/media_profiles.xml similarity index 100% rename from media_profiles.xml rename to prebuilt/media_profiles.xml diff --git a/modules/bcm4329.ko b/prebuilt/modules/bcm4329.ko similarity index 100% rename from modules/bcm4329.ko rename to prebuilt/modules/bcm4329.ko diff --git a/modules/cifs.ko b/prebuilt/modules/cifs.ko similarity index 100% rename from modules/cifs.ko rename to prebuilt/modules/cifs.ko diff --git a/modules/fuse.ko b/prebuilt/modules/fuse.ko similarity index 100% rename from modules/fuse.ko rename to prebuilt/modules/fuse.ko diff --git a/modules/kineto_gan.ko b/prebuilt/modules/kineto_gan.ko similarity index 100% rename from modules/kineto_gan.ko rename to prebuilt/modules/kineto_gan.ko diff --git a/modules/msm_rmnet.ko b/prebuilt/modules/msm_rmnet.ko similarity index 100% rename from modules/msm_rmnet.ko rename to prebuilt/modules/msm_rmnet.ko diff --git a/modules/nls_utf8.ko b/prebuilt/modules/nls_utf8.ko similarity index 100% rename from modules/nls_utf8.ko rename to prebuilt/modules/nls_utf8.ko diff --git a/modules/tun.ko b/prebuilt/modules/tun.ko similarity index 100% rename from modules/tun.ko rename to prebuilt/modules/tun.ko diff --git a/recovery_kernel b/prebuilt/recovery_kernel similarity index 100% rename from recovery_kernel rename to prebuilt/recovery_kernel diff --git a/ueventd.leo.rc b/prebuilt/ueventd.htcleo.rc similarity index 100% rename from ueventd.leo.rc rename to prebuilt/ueventd.htcleo.rc diff --git a/prebuilt/ueventd.leo.rc b/prebuilt/ueventd.leo.rc new file mode 120000 index 0000000..4df21fc --- /dev/null +++ b/prebuilt/ueventd.leo.rc @@ -0,0 +1 @@ +ueventd.htcleo.rc \ No newline at end of file diff --git a/prebuilt/vold.fstab b/prebuilt/vold.fstab new file mode 100755 index 0000000..93e53b2 --- /dev/null +++ b/prebuilt/vold.fstab @@ -0,0 +1,18 @@ +## Vold 2.0 fstab for HTC htcleo +# +## - San Mehat (san@android.com) +## + +####################### +## Regular device mount +## +## Format: dev_mount