From eeb2444cbdc9cd24bb4ccf76924291e363c727a3 Mon Sep 17 00:00:00 2001 From: KalimochoAz Date: Mon, 7 Feb 2011 17:00:58 +0100 Subject: [PATCH] More additions and setup-makefiles Removed also white spaces Added Firmaware to proprietary and added directory create Modified error at libOmxVidEnc.so that was libOmxVidEnc modified error in manufacturer Full revision. Now works properly Change-Id: Ibdabb72f6f87ffc7430407e39faecb79a109ef78 --- BoardConfig.mk | 4 +- BoardConfigVendor.mk | 17 ---- click-vendor-blobs.mk | 51 ------------ click.mk | 37 ++++++--- copy-files.sh | 14 +--- custom/10calibrate_screen | 0 custom/backuptool.sh | 0 custom/compcache | 0 egl.cfg => custom/egl.cfg | 0 custom/keychars/bahamas-keypad.kcm.bin | Bin 0 -> 896 bytes custom/keychars/qwerty.kcm.bin | Bin 0 -> 896 bytes custom/keychars/qwerty2.kcm.bin | Bin 0 -> 896 bytes custom/keylayout/AVRCP.kl | 6 ++ custom/keylayout/bahamas-keypad.kl | 89 ++++++++++++++++++++ custom/keylayout/h2w_headset.kl | 9 +++ custom/keylayout/qwerty.kl | 89 ++++++++++++++++++++ custom/rzscontrol | Bin extract-files.sh | 95 ++++++++++++++++++++++ libcamera/exifwriter.c | 108 ++++++++++++------------- setup-makefiles.sh | 101 +++++++++++++++++++++++ vendorsetup.sh | 0 21 files changed, 475 insertions(+), 145 deletions(-) delete mode 100644 BoardConfigVendor.mk delete mode 100644 click-vendor-blobs.mk mode change 100644 => 100755 custom/10calibrate_screen mode change 100644 => 100755 custom/backuptool.sh mode change 100644 => 100755 custom/compcache rename egl.cfg => custom/egl.cfg (100%) create mode 100644 custom/keychars/bahamas-keypad.kcm.bin create mode 100644 custom/keychars/qwerty.kcm.bin create mode 100644 custom/keychars/qwerty2.kcm.bin create mode 100644 custom/keylayout/AVRCP.kl create mode 100644 custom/keylayout/bahamas-keypad.kl create mode 100644 custom/keylayout/h2w_headset.kl create mode 100644 custom/keylayout/qwerty.kl mode change 100644 => 100755 custom/rzscontrol create mode 100755 extract-files.sh create mode 100755 setup-makefiles.sh mode change 100644 => 100755 vendorsetup.sh diff --git a/BoardConfig.mk b/BoardConfig.mk index 4f189bd..fbb1378 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -12,7 +12,7 @@ USE_CAMERA_STUB := true BOARD_USE_FROYO_LIBCAMERA := true # inherit from the proprietary version --include device/htc/click/BoardConfigVendor.mk +-include vendor/htc/click/BoardConfigVendor.mk # ARMv6-compatible processor rev 5 (v6l) TARGET_BOARD_PLATFORM := msm7k @@ -63,7 +63,7 @@ BOARD_HAS_LIMITED_EGL := true TARGET_HARDWARE_3D := false # OpenGL drivers config file path -BOARD_EGL_CFG := device/htc/click/egl.cfg +BOARD_EGL_CFG := device/htc/click/custom/egl.cfg # No authoring clock for OpenCore # BOARD_NO_PV_AUTHORING_CLOCK := true diff --git a/BoardConfigVendor.mk b/BoardConfigVendor.mk deleted file mode 100644 index a23b18b..0000000 --- a/BoardConfigVendor.mk +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (C) 2010 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# This file is generated by device/htc/click/setup-makefiles.sh - -USE_CAMERA_STUB := false diff --git a/click-vendor-blobs.mk b/click-vendor-blobs.mk deleted file mode 100644 index 8df3b69..0000000 --- a/click-vendor-blobs.mk +++ /dev/null @@ -1,51 +0,0 @@ -# libgps is necessary to complete the compilation -PRODUCT_COPY_FILES += \ - device/htc/click/proprietary/libgps.so:obj/lib/libgps.so \ - device/htc/click/custom/logo.rle:root/logo.rle - -# proprietary for modules -$(call inherit-product, device/htc/click/KernelModules.mk) - -PRODUCT_COPY_FILES += \ - device/htc/click/custom/backuptool.sh:system/bin/backuptool.sh - -# proprietary for etc -PRODUCT_COPY_FILES += \ - device/htc/click/custom/10calibrate_screen:system/etc/init.d/10calibrate_screen \ - device/htc/click/custom/sysctl.conf:system/etc/sysctl.conf - -# click Calibration and other apps -PRODUCT_COPY_FILES += \ - device/htc/click/proprietary/app/HTCCalibrate.apk:system/app/HTCCalibrate.apk - -# proprietary for /system/bin -PRODUCT_COPY_FILES += \ - device/htc/click/custom/compcache:system/bin/compcache \ - device/htc/click/custom/rzscontrol:system/bin/rzscontrol - -# Other bin stuff -PRODUCT_COPY_FILES += \ - device/htc/click/proprietary/akm8973:system/bin/akm8973 - -# proprietary stuff -PRODUCT_COPY_FILES += \ - device/htc/click/proprietary/AudioPara4.csv:system/etc/AudioPara4.csv \ - device/htc/click/proprietary/AudioFilter.csv:system/etc/AudioFilter.csv \ - device/htc/click/proprietary/AudioPreProcess.csv:system/etc/AudioPreProcess.csv \ - device/htc/click/proprietary/liboemcamera.so:system/lib/liboemcamera.so \ - device/htc/click/proprietary/libmmcamera.so:system/lib/libmmcamera.so \ - device/htc/click/proprietary/libmm-qcamera-tgt.so:system/lib/libmm-qcamera-tgt.so \ - device/htc/click/proprietary/libmmjpeg.so:system/lib/libmmjpeg.so \ - device/htc/click/proprietary/libaudioeq.so:system/lib/libaudioeq.so \ - device/htc/click/proprietary/libqcamera.so:system/lib/libqcamera.so \ - device/htc/click/proprietary/libmm-adspsvc.so:system/lib/libmm-adspsvc.so \ - device/htc/click/proprietary/libOmxH264Dec.so:system/lib/libOmxH264Dec.so \ - device/htc/click/proprietary/libOmxMpeg4Dec.so:system/lib/libOmxMpeg4Dec.so \ - device/htc/click/proprietary/libOmxVidEnc.so:system/lib/libOmxVidEnc.so \ - device/htc/click/proprietary/libmm-adspsvc.so:system/lib/libmm-adspsvc.so \ - device/htc/click/proprietary/libhtc_acoustic.so:system/lib/libhtc_acoustic.so \ - device/htc/click/proprietary/libhtc_ril.so:system/lib/libhtc_ril.so \ - device/htc/click/proprietary/firmware/Fw1251r1c.bin:system/etc/wifi/Fw1251r1c.bin \ - device/htc/click/proprietary/firmware/brf6300.bin:system/etc/firmware/brf6300.bin \ - device/htc/click/proprietary/libgps.so:system/lib/libgps.so \ - device/htc/click/proprietary/firmware/brf6350.bin:system/etc/firmware/brf6350.bin diff --git a/click.mk b/click.mk index f55c046..64f2e8d 100644 --- a/click.mk +++ b/click.mk @@ -26,8 +26,6 @@ PRODUCT_COPY_FILES += \ packages/wallpapers/LivePicker/android.software.live_wallpaper.xml:/system/etc/permissions/android.software.live_wallpaper.xml \ device/htc/click/vold.fstab:system/etc/vold.fstab -$(call inherit-product, device/htc/click/click-vendor-blobs.mk) - PRODUCT_PACKAGES += \ librs_jni \ sensors.bahamas \ @@ -61,13 +59,27 @@ PRODUCT_COPY_FILES += \ # keychars and keylayout files PRODUCT_COPY_FILES += \ - device/htc/click/proprietary/keychars/bahamas-keypad.kcm.bin:system/usr/keychars/bahamas-keypad.kcm.bin \ - device/htc/click/proprietary/keychars/qwerty.kcm.bin:system/usr/keychars/qwerty.kcm.bin \ - device/htc/click/proprietary/keychars/qwerty2.kcm.bin:system/usr/keychars/qwerty2.kcm.bin \ - device/htc/click/proprietary/keylayout/AVRCP.kl:system/usr/keylayout/AVRCP.kl \ - device/htc/click/proprietary/keylayout/bahamas-keypad.kl:system/usr/keylayout/bahamas-keypad.kl \ - device/htc/click/proprietary/keylayout/h2w_headset.kl:system/usr/keylayout/h2w_headset.kl \ - device/htc/click/proprietary/keylayout/qwerty.kl:system/usr/keylayout/qwerty.kl + device/htc/click/custom/keychars/bahamas-keypad.kcm.bin:system/usr/keychars/bahamas-keypad.kcm.bin \ + device/htc/click/custom/keychars/qwerty.kcm.bin:system/usr/keychars/qwerty.kcm.bin \ + device/htc/click/custom/keychars/qwerty2.kcm.bin:system/usr/keychars/qwerty2.kcm.bin \ + device/htc/click/custom/keylayout/AVRCP.kl:system/usr/keylayout/AVRCP.kl \ + device/htc/click/custom/keylayout/bahamas-keypad.kl:system/usr/keylayout/bahamas-keypad.kl \ + device/htc/click/custom/keylayout/h2w_headset.kl:system/usr/keylayout/h2w_headset.kl \ + device/htc/click/custom/keylayout/qwerty.kl:system/usr/keylayout/qwerty.kl + +# extra etc config files +PRODUCT_COPY_FILES += \ + device/htc/click/custom/10calibrate_screen:system/etc/init.d/10calibrate_screen \ + device/htc/click/custom/sysctl.conf:system/etc/sysctl.conf + +# precompiled files for /system/bin +PRODUCT_COPY_FILES += \ + device/htc/click/custom/compcache:system/bin/compcache \ + device/htc/click/custom/rzscontrol:system/bin/rzscontrol + +# Backup-Tool for install +PRODUCT_COPY_FILES += \ + device/htc/click/custom/backuptool.sh:system/bin/backuptool.sh PRODUCT_PROPERTY_OVERRIDES += \ ro.media.dec.jpeg.memcap=10000000 @@ -155,9 +167,16 @@ endif PRODUCT_COPY_FILES += \ $(LOCAL_KERNEL):kernel + $(call inherit-product, device/common/gps/gps_eu_supl.mk) $(call inherit-product, device/htc/common/common.mk) $(call inherit-product, build/target/product/full_base.mk) PRODUCT_NAME := htc_click PRODUCT_DEVICE := click + +# See comment at the top of this file. This is where the other +# half of the device-specific product definition file takes care +# of the aspects that require proprietary drivers that aren't +# commonly available +$(call inherit-product-if-exists, vendor/htc/click/click-vendor.mk) diff --git a/copy-files.sh b/copy-files.sh index 8f8997e..233cd35 100755 --- a/copy-files.sh +++ b/copy-files.sh @@ -1,9 +1,6 @@ mkdir proprietary - mkdir proprietary/app - mkdir proprietary/keylayout mkdir proprietary/firmware - mkdir proprietary/keychars - adb pull /system/app/HTCCalibrate.apk proprietary/app/ + adb pull /system/app/HTCCalibrate.apk proprietary/ adb pull /system/etc/AudioPara4.csv proprietary/ adb pull /system/etc/AudioFilter.csv proprietary/ adb pull /system/etc/AudioPreProcess.csv proprietary/ @@ -23,13 +20,6 @@ adb pull /system/lib/libhtc_acoustic.so proprietary/ adb pull /system/lib/libhtc_ril.so proprietary/ adb pull /system/bin/akm8973 proprietary/ - adb pull /system/usr/keychars/bahamas-keypad.kcm.bin proprietary/keychars/ - adb pull /system/usr/keychars/qwerty.kcm.bin proprietary/keychars/ - adb pull /system/usr/keychars/qwerty2.kcm.bin proprietary/keychars/ - adb pull /system/usr/keylayout/AVRCP.kl proprietary/keylayout/ - adb pull /system/usr/keylayout/bahamas-keypad.kl proprietary/keylayout/ - adb pull /system/usr/keylayout/h2w_headset.kl proprietary/keylayout/ - adb pull /system/usr/keylayout/qwerty.kl proprietary/keylayout/ adb pull /system/etc/wifi/Fw1251r1c.bin proprietary/firmware/ adb pull /system/etc/firmware/brf6300.bin proprietary/firmware/ - adb pull /system/etc/firmware/brf6350.bin proprietary/firmware/ + adb pull /system/etc/firmware/brf6350.bin proprietary/firmware/ \ No newline at end of file diff --git a/custom/10calibrate_screen b/custom/10calibrate_screen old mode 100644 new mode 100755 diff --git a/custom/backuptool.sh b/custom/backuptool.sh old mode 100644 new mode 100755 diff --git a/custom/compcache b/custom/compcache old mode 100644 new mode 100755 diff --git a/egl.cfg b/custom/egl.cfg similarity index 100% rename from egl.cfg rename to custom/egl.cfg diff --git a/custom/keychars/bahamas-keypad.kcm.bin b/custom/keychars/bahamas-keypad.kcm.bin new file mode 100644 index 0000000000000000000000000000000000000000..180374f3d03a5509390247bcabf38cd24d8cf0bf GIT binary patch literal 896 zcmYk3$x>5M6h(J<18G#0x$t;u5JIC68iVvmk93N(CKyo^Ma3=v~E`%bHjYW#uIETabRb|M+Ic#m^i zMjf7X?#Q@`_d0iFT*LdE7c#En{Z3p)JwD*H$+&?(bneNxiI;yVcLQGDx!kw#G0wL~ zTN?3k{3UH^!YA-7oz-83_$23lMYphSCXexbI#Mi%@G1N?y{%vDB~5d`H}tO3+)$dq z59mkAb30QaO0m*7UR%K=o^gtFk*V1m7-`QGKIA0m1XB}pH1eJqeAg+^1*Rt6 n#W?fK;e$?!PBAqxLnHDm;9bs$M)=1fKI$3eI|^4=Cn~rA>tti4 literal 0 HcmV?d00001 diff --git a/custom/keychars/qwerty.kcm.bin b/custom/keychars/qwerty.kcm.bin new file mode 100644 index 0000000000000000000000000000000000000000..4a7ef93b227cc5978c7b1248ea1eeea4361a357d GIT binary patch literal 896 zcmYk3*-{fx6h(LF2L@-}(WZe!X(p2pAQ(VI1`(OT2>}sBK_(}Vkbki(-~1;ZeatVo z&WThdtIn>wDt)`}J!g0ObZckxSSKsl#u`aEDxfZYwJds^J2L92Zyf(ReS-;z1~@^?;fzjvBY zr`EZlG>Pw!FLcHYr78S9*{Yf#i9h1aAILSGD}_(vyJVyiHlD$C}zJMQ-8T}5s@kRU-nbjXAEiKXS z&t$BhOj=sTzmQ4Q1!;T*|4J5^R|a3DbKgjNHcLIlPso0$Y(0F2pOS6*!AYg(_;<38 zwN-~Rs6iENkGh<^@=AsUyuOMdJp50hoG6dt4ONWc8%~KVF*WOfvFSQ1AP53s5J^O2ltBhXMhPN{A}F93H0E6_%N_5;l4V}O zb8kZxIdxCvR4PgLf0O;)vz@)|W966AHD!|en1H!{+~UbYr&UHd-Q_gMsGz%@VHuTl zkJBjQHl22wWZa>9on{$#=|1O;jC*vylaO(r9&p-ZRMC%|78%ua^h)F!I{N0wwe(Z2 zZyVdx(IfO*Y*SA^qj&Hng!Cxa{|+aifgYoGaa^$=PLI>?@j5ip6Wreiya`S8B)x}+ zpqZYcKjH@}3lj8m?*9|cLXw`Q_wi#Dxg%+Y{)`8ehNYg8H9_OV}FTF~i;othhl}c;$Pi)gqw>v}b0lLG<;zXFC zD{hdb!z*H?SZRc=yum1)bBegg*2EbYTR!7-#!2B6Ta)i`ox8P}q-~FzT&>L%z2Ova lfvt%>8G}C4wEa$!{5ouA=uYQ}j9EJRXPD#R0&RP`=08rYWd{HN literal 0 HcmV?d00001 diff --git a/custom/keylayout/AVRCP.kl b/custom/keylayout/AVRCP.kl new file mode 100644 index 0000000..d0eba10 --- /dev/null +++ b/custom/keylayout/AVRCP.kl @@ -0,0 +1,6 @@ +key 164 MEDIA_PLAY_PAUSE WAKE +key 128 MEDIA_STOP WAKE +key 163 MEDIA_NEXT WAKE +key 165 MEDIA_PREVIOUS WAKE +key 168 MEDIA_REWIND WAKE +key 159 MEDIA_FAST_FORWARD WAKE diff --git a/custom/keylayout/bahamas-keypad.kl b/custom/keylayout/bahamas-keypad.kl new file mode 100644 index 0000000..c986974 --- /dev/null +++ b/custom/keylayout/bahamas-keypad.kl @@ -0,0 +1,89 @@ +key 107 ENDCALL WAKE_DROPPED +key 158 BACK +key 139 MENU WAKE_DROPPED +key 231 CALL +key 102 HOME +key 217 SEARCH + +key 105 DPAD_LEFT +key 106 DPAD_RIGHT +key 108 DPAD_DOWN +key 103 DPAD_UP +key 232 DPAD_CENTER + +key 115 VOLUME_UP WAKE +key 114 VOLUME_DOWN WAKE + +##### useless ##### +# key 399 GRAVE +# key 2 1 +# key 3 2 +# key 4 3 +# key 5 4 +# key 6 5 +# key 7 6 +# key 8 7 +# key 9 8 +# key 10 9 +# key 11 0 +# key 230 SOFT_RIGHT WAKE +# key 60 SOFT_RIGHT WAKE +# key 62 ENDCALL WAKE_DROPPED +# key 229 MENU WAKE_DROPPED +# key 59 MENU WAKE_DROPPED +# key 228 POUND +# key 227 STAR +# key 61 CALL WAKE_DROPPED +# key 116 POWER WAKE +# key 211 FOCUS +# key 212 CAMERA +# +# key 16 Q +# key 17 W +# key 18 E +# key 19 R +# key 20 T +# key 21 Y +# key 22 U +# key 23 I +# key 24 O +# key 25 P +# key 26 LEFT_BRACKET +# key 27 RIGHT_BRACKET +# key 43 BACKSLASH +# +# key 30 A +# key 31 S +# key 32 D +# key 33 F +# key 34 G +# key 35 H +# key 36 J +# key 37 K +# key 38 L +# key 39 SEMICOLON +# key 40 APOSTROPHE +# key 14 DEL +# +# key 44 Z +# key 45 X +# key 46 C +# key 47 V +# key 48 B +# key 49 N +# key 50 M +# key 51 COMMA +# key 52 PERIOD +# key 53 SLASH +# key 28 ENTER +# +# key 56 ALT_LEFT +# key 42 SHIFT_LEFT +# key 15 TAB +# key 57 SPACE +# key 150 EXPLORER +# key 155 ENVELOPE +# +# key 12 MINUS +# key 13 EQUALS +# key 215 AT diff --git a/custom/keylayout/h2w_headset.kl b/custom/keylayout/h2w_headset.kl new file mode 100644 index 0000000..10e9fa4 --- /dev/null +++ b/custom/keylayout/h2w_headset.kl @@ -0,0 +1,9 @@ +key 107 ENDCALL WAKE_DROPPED +key 113 MUTE WAKE +key 114 VOLUME_DOWN WAKE +key 115 VOLUME_UP WAKE +key 163 MEDIA_NEXT WAKE +key 164 MEDIA_PLAY_PAUSE WAKE +key 165 MEDIA_PREVIOUS WAKE +key 226 HEADSETHOOK WAKE +key 231 CALL WAKE_DROPPED diff --git a/custom/keylayout/qwerty.kl b/custom/keylayout/qwerty.kl new file mode 100644 index 0000000..c525fdd --- /dev/null +++ b/custom/keylayout/qwerty.kl @@ -0,0 +1,89 @@ +key 399 GRAVE +key 2 1 +key 3 2 +key 4 3 +key 5 4 +key 6 5 +key 7 6 +key 8 7 +key 9 8 +key 10 9 +key 11 0 +key 158 BACK WAKE_DROPPED +key 230 SOFT_RIGHT WAKE +key 60 SOFT_RIGHT WAKE +key 107 ENDCALL WAKE_DROPPED +key 62 ENDCALL WAKE_DROPPED +key 229 MENU WAKE_DROPPED +key 139 MENU WAKE_DROPPED +key 59 MENU WAKE_DROPPED +key 127 SEARCH WAKE_DROPPED +key 217 SEARCH WAKE_DROPPED +key 228 POUND +key 227 STAR +key 231 CALL WAKE_DROPPED +key 61 CALL WAKE_DROPPED +key 232 DPAD_CENTER WAKE_DROPPED +key 108 DPAD_DOWN WAKE_DROPPED +key 103 DPAD_UP WAKE_DROPPED +key 102 HOME WAKE +key 105 DPAD_LEFT WAKE_DROPPED +key 106 DPAD_RIGHT WAKE_DROPPED +key 115 VOLUME_UP +key 114 VOLUME_DOWN +key 116 POWER WAKE +key 212 CAMERA + +key 16 Q +key 17 W +key 18 E +key 19 R +key 20 T +key 21 Y +key 22 U +key 23 I +key 24 O +key 25 P +key 26 LEFT_BRACKET +key 27 RIGHT_BRACKET +key 43 BACKSLASH + +key 30 A +key 31 S +key 32 D +key 33 F +key 34 G +key 35 H +key 36 J +key 37 K +key 38 L +key 39 SEMICOLON +key 40 APOSTROPHE +key 14 DEL + +key 44 Z +key 45 X +key 46 C +key 47 V +key 48 B +key 49 N +key 50 M +key 51 COMMA +key 52 PERIOD +key 53 SLASH +key 28 ENTER + +key 56 ALT_LEFT +key 100 ALT_RIGHT +key 42 SHIFT_LEFT +key 54 SHIFT_RIGHT +key 15 TAB +key 57 SPACE +key 150 EXPLORER +key 155 ENVELOPE + +key 12 MINUS +key 13 EQUALS +key 215 AT + + diff --git a/custom/rzscontrol b/custom/rzscontrol old mode 100644 new mode 100755 diff --git a/extract-files.sh b/extract-files.sh new file mode 100755 index 0000000..b2848df --- /dev/null +++ b/extract-files.sh @@ -0,0 +1,95 @@ +#!/bin/sh + +# Copyright (C) 2010 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# This file is generated by device/common/generate-blob-scripts.sh - DO NOT EDIT + +DEVICE=click +MANUFACTURER=htc + +mkdir -p ../../../vendor/$MANUFACTURER/$DEVICE/proprietary +mkdir -p ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/firmware +adb pull /system/app/HTCCalibrate.apk ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/HTCCalibrate.apk +adb pull /system/etc/AudioPara4.csv ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/AudioPara4.csv +adb pull /system/etc/AudioFilter.csv ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/AudioFilter.csv +adb pull /system/etc/AudioPreProcess.csv ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/AudioPreProcess.csv +adb pull /system/lib/libmmcamera.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libmmcamera.so +adb pull /system/lib/libmm-qcamera-tgt.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libmm-qcamera-tgt.so +adb pull /system/lib/libmmjpeg.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libmmjpeg.so +adb pull /system/lib/libaudioeq.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libaudioeq.so +adb pull /system/lib/libqcamera.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libqcamera.so +adb pull /system/lib/libmm-adspsvc.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libmm-adspsvc.so +adb pull /system/lib/libgps.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libgps.so +adb pull /system/lib/libOmxH264Dec.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libOmxH264Dec.so +adb pull /system/lib/libOmxMpeg4Dec.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libOmxMpeg4Dec.so +adb pull /system/lib/libOmxVidEnc.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libOmxVidEnc.so +adb pull /system/lib/libmm-adspsvc.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libmm-adspsvc.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/etc/wifi/Fw1251r1c.bin ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/firmware/Fw1251r1c.bin +adb pull /system/etc/firmware/brf6300.bin ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/firmware/brf6300.bin +adb pull /system/etc/firmware/brf6350.bin ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/firmware/brf6350.bin +adb pull /system/bin/akm8973 ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/akm8973 + +(cat << EOF) | sed s/__DEVICE__/$DEVICE/g | sed s/__MANUFACTURER__/$MANUFACTURER/g > ../../../vendor/$MANUFACTURER/$DEVICE/device-vendor-blobs.mk +# Copyright (C) 2010 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# This file is generated by device/__MANUFACTURER__/__DEVICE__/extract-files.sh - DO NOT EDIT + +# Prebuilt libraries that are needed to build open-source libraries +PRODUCT_COPY_FILES += \\ + vendor/__MANUFACTURER__/__DEVICE__/proprietary/libgps.so:obj/lib/libgps.so + +# proprietary firmware files +PRODUCT_COPY_FILES += \\ + vendor/__MANUFACTURER__/__DEVICE__/proprietary/firmware/Fw1251r1c.bin:system/etc/wifi/Fw1251r1c.bin \\ + vendor/__MANUFACTURER__/__DEVICE__/proprietary/firmware/brf6300.bin:system/etc/firmware/brf6300.bin \\ + vendor/__MANUFACTURER__/__DEVICE__/proprietary/firmware/brf6350.bin:system/etc/firmware/brf6350.bin + +# All the blobs necessary for click +PRODUCT_COPY_FILES += \\ + vendor/__MANUFACTURER__/__DEVICE__/proprietary/HTCCalibrate.apk:system/app/HTCCalibrate.apk \\ + vendor/__MANUFACTURER__/__DEVICE__/proprietary/AudioPara4.csv:system/etc/AudioPara4.csv \\ + vendor/__MANUFACTURER__/__DEVICE__/proprietary/AudioFilter.csv:system/etc/AudioFilter.csv \\ + vendor/__MANUFACTURER__/__DEVICE__/proprietary/AudioPreProcess.csv:system/etc/AudioPreProcess.csv \\ + vendor/__MANUFACTURER__/__DEVICE__/proprietary/libmmcamera.so:system/lib/libmmcamera.so \\ + vendor/__MANUFACTURER__/__DEVICE__/proprietary/libmm-qcamera-tgt.so:system/lib/libmm-qcamera-tgt.so \\ + vendor/__MANUFACTURER__/__DEVICE__/proprietary/libmmjpeg.so:system/lib/libmmjpeg.so \\ + vendor/__MANUFACTURER__/__DEVICE__/proprietary/libaudioeq.so:system/lib/libaudioeq.so \\ + vendor/__MANUFACTURER__/__DEVICE__/proprietary/libqcamera.so:system/lib/libqcamera.so \\ + vendor/__MANUFACTURER__/__DEVICE__/proprietary/libmm-adspsvc.so:system/lib/libmm-adspsvc.so \\ + vendor/__MANUFACTURER__/__DEVICE__/proprietary/libgps.so:system/lib/libgps.so \\ + vendor/__MANUFACTURER__/__DEVICE__/proprietary/libOmxH264Dec.so:system/lib/libOmxH264Dec.so \\ + vendor/__MANUFACTURER__/__DEVICE__/proprietary/libOmxMpeg4Dec.so:system/lib/libOmxMpeg4Dec.so \\ + vendor/__MANUFACTURER__/__DEVICE__/proprietary/libOmxVidEnc.so:system/lib/libOmxVidEnc.so \\ + vendor/__MANUFACTURER__/__DEVICE__/proprietary/libmm-adspsvc.so:system/lib/libmm-adspsvc.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/akm8973:system/bin/akm8973 +EOF + +./setup-makefiles.sh diff --git a/libcamera/exifwriter.c b/libcamera/exifwriter.c index 73016a5..4efcaa3 100644 --- a/libcamera/exifwriter.c +++ b/libcamera/exifwriter.c @@ -18,7 +18,7 @@ #define TAG_MODEL 0x0110 -float *float2degminsec( float deg ) +float *float2degminsec( float deg ) { float *res = malloc( sizeof(float)*3 ) ; res[0] = floorf( deg ) ; @@ -30,18 +30,18 @@ float *float2degminsec( float deg ) // -// original source from +// original source from // http://stackoverflow.com/questions/95727/how-to-convert-floats-to-human-readable-fractions // -char * float2rationnal( float src ) +char * float2rationnal( float src ) { long m[2][2] ; float x, startx ; long maxden = 1000 ; long ai ; - + startx = x = src ; - + /* initialize matrix */ m[0][0] = m[1][1] = 1; m[0][1] = m[1][0] = 0; @@ -58,29 +58,29 @@ char * float2rationnal( float src ) if(x==(float)ai) break; // AF: division by zero x = 1/(x - (float) ai); if(x>(float)0x7FFFFFFF) break; // AF: representation failure - } - + } + /* now remaining x is between 0 and 1/ai */ /* approx as either 0 or 1/m where m is max that will fit in maxden */ /* first try zero */ LOGV("%ld/%ld, error = %e\n", m[0][0], m[1][0], - startx - ((float) m[0][0] / (float) m[1][0])); + startx - ((float) m[0][0] / (float) m[1][0])); /* now try other possibility */ ai = (maxden - m[1][1]) / m[1][0]; m[0][0] = m[0][0] * ai + m[0][1]; m[1][0] = m[1][0] * ai + m[1][1]; LOGV("%ld/%ld, error = %e\n", m[0][0], m[1][0], - startx - ((float) m[0][0] / (float) m[1][0])); - + startx - ((float) m[0][0] / (float) m[1][0])); + char *res = (char *)malloc( 256 * sizeof(char) ) ; - + snprintf( res, 256, "%ld/%ld", m[0][0], m[1][0] ) ; return res ; } -char * coord2degminsec( float src ) +char * coord2degminsec( float src ) { char *res = (char *)malloc( 256 * sizeof(char) ) ; float *dms = float2degminsec( fabs(src) ) ; @@ -88,7 +88,7 @@ char * coord2degminsec( float src ) strcat( res , "," ) ; strcat( res , float2rationnal(dms[1]) ) ; strcat( res , "," ) ; - strcat( res , float2rationnal(dms[2]) ) ; + strcat( res , float2rationnal(dms[2]) ) ; free( dms ) ; return res ; } @@ -126,25 +126,25 @@ char * coord2degminsec( float src ) void writeExif( void *origData, void *destData , int origSize , uint32_t *resultSize, int orientation,camera_position_type *pt ) { const char *filename = "/data/temp.jpg" ; - + dump_to_file( filename, (uint8_t *)origData, origSize ) ; chmod( filename, S_IRWXU ) ; ResetJpgfile() ; - + memset(&ImageInfo, 0, sizeof(ImageInfo)); ImageInfo.FlashUsed = -1; ImageInfo.MeteringMode = -1; ImageInfo.Whitebalance = -1; - int gpsTag = 0 ; + int gpsTag = 0 ; if( pt != NULL ) { gpsTag = 6 ; } - - + + ExifElement_t *t = (ExifElement_t *)malloc( sizeof(ExifElement_t)*(3+gpsTag) ) ; - + ExifElement_t *it = t ; // Store file date/time. (*it).Tag = TAG_ORIENTATION ; @@ -158,8 +158,8 @@ void writeExif( void *origData, void *destData , int origSize , uint32_t *result } else { (*it).Value = "1" ; } - (*it).GpsTag = FALSE ; - + (*it).GpsTag = FALSE ; + it++; (*it).Tag = TAG_MAKE ; @@ -167,20 +167,20 @@ void writeExif( void *origData, void *destData , int origSize , uint32_t *result (*it).Value = "Samsung" ; (*it).DataLength = 8 ; (*it).GpsTag = FALSE ; - + it++ ; - + (*it).Tag = TAG_MODEL ; (*it).Format = FMT_STRING ; (*it).Value = "Galaxy with GAOSP" ; (*it).DataLength = 18 ; (*it).GpsTag = FALSE ; - - + + if( pt != NULL ) { - LOGD("pt->latitude == %f", pt->latitude ) ; - LOGD("pt->longitude == %f", pt->longitude ) ; - LOGD("pt->altitude == %d", pt->altitude ) ; + LOGD("pt->latitude == %f", pt->latitude ) ; + LOGD("pt->longitude == %f", pt->longitude ) ; + LOGD("pt->altitude == %d", pt->altitude ) ; it++ ; (*it).Tag = 0x01 ; @@ -191,11 +191,11 @@ void writeExif( void *origData, void *destData , int origSize , uint32_t *result (*it).Value = "S" ; } (*it).DataLength = 2 ; - (*it).GpsTag = TRUE ; - + (*it).GpsTag = TRUE ; + it++ ; char *mylat = coord2degminsec( pt->latitude ) ; - + (*it).Tag = 0x02 ; (*it).Format = FMT_URATIONAL ; (*it).Value = mylat ; @@ -212,19 +212,19 @@ void writeExif( void *origData, void *destData , int origSize , uint32_t *result (*it).Value = "W" ; } (*it).DataLength = 2 ; - (*it).GpsTag = TRUE ; - + (*it).GpsTag = TRUE ; + it++ ; char *mylong = coord2degminsec( (*pt).longitude ) ; - + (*it).Tag = 0x04 ; (*it).Format = FMT_URATIONAL ; (*it).Value = mylong ; (*it).DataLength = 3 ; - (*it).GpsTag = TRUE ; + (*it).GpsTag = TRUE ; free( mylong ) ; - + it++ ; (*it).Tag = 0x05 ; (*it).Format = FMT_USHORT ; @@ -234,19 +234,19 @@ void writeExif( void *origData, void *destData , int origSize , uint32_t *result (*it).Value = "1" ; } (*it).DataLength = 1 ; - (*it).GpsTag = TRUE ; - + (*it).GpsTag = TRUE ; + it++ ; char *myalt = float2rationnal( fabs( (*pt).altitude ) ) ; - + (*it).Tag = 0x06 ; (*it).Format = FMT_SRATIONAL ; (*it).Value = myalt ; (*it).DataLength = 1 ; (*it).GpsTag = TRUE ; - + free( myalt ) ; - + } { @@ -257,26 +257,26 @@ void writeExif( void *origData, void *destData , int origSize , uint32_t *result } } strncpy(ImageInfo.FileName, filename, PATH_MAX); - + ReadMode_t ReadMode; ReadMode = READ_METADATA; ReadMode |= READ_IMAGE; int res = ReadJpegFile(filename, (ReadMode_t)ReadMode ); - + create_EXIF( t, 3, gpsTag); - + WriteJpegFile(filename); - chmod( filename, S_IRWXU ) ; - DiscardData(); - - FILE *src ; - src = fopen( filename, "r") ; + chmod( filename, S_IRWXU ) ; + DiscardData(); - fseek( src, 0L, SEEK_END ) ; - (*resultSize) = ftell(src) ; - fseek( src, 0L, SEEK_SET ) ; + FILE *src ; + src = fopen( filename, "r") ; + + fseek( src, 0L, SEEK_END ) ; + (*resultSize) = ftell(src) ; + fseek( src, 0L, SEEK_SET ) ; + + int read = fread( destData, 1, (*resultSize), src ) ; - int read = fread( destData, 1, (*resultSize), src ) ; - unlink( filename ); } diff --git a/setup-makefiles.sh b/setup-makefiles.sh new file mode 100755 index 0000000..2dcd98f --- /dev/null +++ b/setup-makefiles.sh @@ -0,0 +1,101 @@ +#!/bin/sh + +# Copyright (C) 2010 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +DEVICE=click +MANUFACTURER=htc + +mkdir -p ../../../vendor/$MANUFACTURER/$DEVICE + +(cat << EOF) | sed s/__DEVICE__/$DEVICE/g | sed s/__MANUFACTURER__/$MANUFACTURER/g > ../../../vendor/$MANUFACTURER/$DEVICE/$DEVICE-vendor.mk +# Copyright (C) 2010 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# This file is generated by device/__MANUFACTURER__/__DEVICE__/setup-makefiles.sh + +# Live wallpaper packages +PRODUCT_PACKAGES := \\ + LiveWallpapers \\ + LiveWallpapersPicker \\ + MagicSmokeWallpapers \\ + VisualizationWallpapers \\ + librs_jni + +# Publish that we support the live wallpaper feature. +PRODUCT_COPY_FILES := \\ + packages/wallpapers/LivePicker/android.software.live_wallpaper.xml:/system/etc/permissions/android.software.live_wallpaper.xml + +# Pick up overlay for features that depend on non-open-source files +DEVICE_PACKAGE_OVERLAYS := vendor/__MANUFACTURER__/__DEVICE__/overlay + +\$(call inherit-product, vendor/__MANUFACTURER__/__DEVICE__/device-vendor-blobs.mk) +EOF + +(cat << EOF) | sed s/__DEVICE__/$DEVICE/g | sed s/__MANUFACTURER__/$MANUFACTURER/g > ../../../vendor/$MANUFACTURER/$DEVICE/BoardConfigVendor.mk +# Copyright (C) 2010 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# This file is generated by device/__MANUFACTURER__/__DEVICE__/setup-makefiles.sh + +USE_CAMERA_STUB := false +EOF + +mkdir -p ../../../vendor/$MANUFACTURER/$DEVICE/overlay/packages/apps/Launcher2/res/layout +(cat << EOF) | sed s/__DEVICE__/$DEVICE/g | sed s/__MANUFACTURER__/$MANUFACTURER/g > ../../../vendor/$MANUFACTURER/$DEVICE/overlay/packages/apps/Launcher2/res/layout/all_apps.xml + + + + + + + + + +EOF diff --git a/vendorsetup.sh b/vendorsetup.sh old mode 100644 new mode 100755