197 Commits

Author SHA1 Message Date
851c107eec update to latest cmhtcleo kernel and modules 2012-12-27 13:31:58 +00:00
0ccc9b2302 update cm.mk for jellybean 2012-12-26 20:29:19 +00:00
cf6e0e5b4d goomanager: update to 2.1.2 2012-10-26 14:57:14 +02:00
da9e4d279b don't include the vendor in PRODUCT_MODEL 2012-10-09 17:52:41 +03:00
3a2de899f6 add dependencies 2012-10-09 15:48:28 +02:00
16912711c9 use reasonable values for 480p 2012-09-05 12:24:57 +03:00
b2a8f584d4 Merge pull request #8 from marc1706/ics_lights
Rework of lights library
2012-07-22 02:35:49 -07:00
345a305b8e lights: replace alternating leds with hardware supported feature
Now the led will blink with the same color as the current charging
state.
2012-07-21 23:45:24 +02:00
19546e569a enable webGL 2012-07-06 19:19:47 +03:00
51633f29bc add own lunch combo 2012-06-19 02:53:04 +02:00
f41347ec66 update goomanager to 2.1.1 2012-06-19 00:00:41 +02:00
12ae926fcb lights: Add ability for dual leds and correct battery state
Show correct battery state:
Android displays the battery as full even though it's only at 90%.
With this patch a posix thread will be started that'll make sure
the LED is amber even if android sets it to green if the battery
is not full yet.

Add ability for dual leds:
The Leo has only native support for shortly flashing the green
and amber led. With this patch the device will always have the LED
on and shortly switch to the other LED color if there is a
notification while the device is plugged in.
2012-06-17 22:06:21 +02:00
293e564c25 build with mdpi support again 2012-06-11 16:23:37 +03:00
8b0d4e4f2d support inline kernel building 2012-06-11 01:33:43 +02:00
3dae885c92 squisher: update to new naming convention 2012-06-08 16:21:29 +03:00
143e21812e mkfile: build live wallpaper support 2012-06-06 11:46:33 +03:00
da46bfc7d4 assets: hdpi is preferred, not both mdpi and hdpi 2012-06-06 11:41:18 +03:00
382313d39e add initscript required for usb tethering 2012-06-05 23:37:53 +02:00
12cc46d8d4 delete ppp earlier 2012-06-05 18:07:32 +03:00
90aa4930ff lets use heads and tails 2012-06-05 16:33:27 +02:00
03bd44d0d1 update releasetools to create unified updater-script 2012-06-05 14:45:52 +02:00
7d83230817 mount system rw again to handle late init stuff 2012-06-05 13:00:55 +03:00
aed09e0ff6 only do ppp stuff if /system/ppp exists 2012-06-05 12:45:47 +03:00
1ce4222d93 update prebuilt kernel 2012-06-04 19:14:53 +02:00
c65823004b ramdisk: mount system and root read-only again (this is the default way)
add usb tether support
2012-06-04 18:40:30 +02:00
9be1ae0764 update touchscreen config to include kbd 2012-06-04 18:35:20 +02:00
51247e3fce init: fix device hot rebooting over and over again 2012-06-01 17:24:29 +03:00
95e25fcd57 update GooManager to latest version 2012-05-31 01:37:20 +02:00
1c8e504531 touchscreen: fix multitouch beeing jumpy sometimes 2012-05-31 02:24:05 +03:00
2869db565f navbar: increase size a tad 2012-05-30 03:00:51 +03:00
07f54240ae update prebuilt kernel
include tytungs usb tether fix
2012-05-22 22:36:28 +02:00
98d2dd68a7 include GooManager 2012-05-22 22:23:52 +02:00
45fe4ccd9f include goo.im specific build props
(goomanager not yet included)
2012-05-22 20:01:31 +02:00
2e5dddbbea no need to apply global cflags since patchset 5 (http://review.cyanogenmod.com/#/c/16028/) 2012-05-21 15:57:59 +03:00
00768d1ee6 update default props 2012-05-21 15:15:14 +03:00
73eba3748d fix gpu performance regression (flags only, depends on a frameworks_base commit) 2012-05-20 17:39:25 +03:00
eb896cbe30 mount system and data with no access stamps
remove cache hacks (cache partition is largely unused with dexopt.dataonly)
2012-05-16 14:04:24 +02:00
8d61bfe4e8 update touchscreen configuration 2012-05-16 12:48:04 +03:00
27b696566a dont set dithering defaults 2012-05-14 20:56:49 +03:00
b065ed5302 update prebuilt kernel - ricks kgsl 3.8 backports 2012-05-14 01:31:21 +02:00
529240b4b3 fix massive cpu load on gps on; dont build librpc-qcom, depend on vendor-blobs instead 2012-05-13 02:20:26 +02:00
7a44cb754d update prebuilt kernel - include ricks latest msm backports 2012-05-13 02:03:36 +02:00
0dc5cf2e4a mkfile: fix typo - build libOmxVenc from source 2012-05-11 18:40:58 +02:00
9eac659fe9 tidy up main mkfile 2012-05-11 19:04:28 +03:00
cbcc74aa4a build Torch.apk explicitly 2012-05-11 13:18:35 +03:00
3d18fb100a overlay: awkwardly has_dock_settings belongs into bools.xml (SHOULD reside in config.xml btw) 2012-05-11 11:51:47 +02:00
8b03e43b68 update prebuilt kernel to tytung_HWA_r2.1 2012-05-10 12:27:12 +02:00
b72398bae5 update fingerprint for 4.0.4 2012-05-10 12:19:55 +02:00
23271631bc overlay: correct settings overlay (should fix led flash via notification bar) 2012-05-10 12:03:25 +02:00
553c496c53 tether: use generic interface 2012-05-09 19:25:40 +03:00
4fabc5f096 disable dithering by default - doesnt improve image quality much atm 2012-05-09 14:14:46 +03:00
e0e6c8d9d1 overlay: remove a few unnecessary defaults 2012-05-09 14:13:17 +03:00
2f18e958a7 overlay: tweak some stuff 2012-05-09 14:10:15 +03:00
99cd9c4b3f overlay: add a few tethering props 2012-05-08 15:10:00 +03:00
927b5e0ab1 use correct wifi interface for tethering
little dalvik tweak in build
allow larger systemimage (because cm is adding more and more crap like cmwallpapers)
2012-05-07 15:16:24 +02:00
f6027dbf2b apply a few tweaks to build.prop 2012-05-07 13:39:29 +03:00
2927516c9e update recovery kernel 2012-05-07 11:25:46 +02:00
e55149cfe9 update media profiles for new camera hal by rapmv78 2012-05-06 21:02:36 +02:00
bc4c27d1d6 use ics_hwa_r2 kernel built by tytung 2012-05-06 19:50:33 +02:00
a9446b445b change wifi interface name from eth0 to wlan0 2012-05-04 13:05:30 +02:00
49132af064 kernel: fix bootlogo
(by securecrt)
2012-05-04 10:48:43 +02:00
c268b9506c update prebuilt kernel
audio fixed by rick1995
2012-05-04 10:48:42 +02:00
28dde25cfb reformatted system.prop...
...to ensure better softbuttons property visibility in build.prop
2012-05-04 10:48:42 +02:00
30c76cbce7 changed dpi value beack to standard 240
softbuttons disabled by default (can be enabled via build.prop)
use new recovery kernel to circumvent chunk count error (again!)
2012-05-04 10:48:42 +02:00
d1c76fbfd3 update prebuilt kernel to tytung HWA
(compiled by rick1995)
also revert to the default recovery kernel
2012-05-04 10:48:42 +02:00
1015e8cbab make a multidpi build
allows the user to choose a dpi value < 192 while maintaining high-res assets at 240dpi
add a bit of mb but will be compensated with gapps-light
(standard dpi of 160 will be changed back to 240 once out of testing)
2012-05-04 10:48:42 +02:00
deaea83d48 add missing ril props 2012-05-04 10:48:38 +02:00
b76a73da21 keep crapTTS, so the user can still use it and d/l voice data to sd 2012-05-03 12:38:22 +03:00
e5df97ebe2 keep home in mem; better way to include navbar 2012-05-02 23:02:41 +02:00
a2355571a1 remove picotts too. saves a chunk of diskspace and everybody hates it 2012-05-02 23:01:34 +02:00
712a9ace4c try it with full alpha comp
make a mdpi build with softbuttons while in testing (will be revisited)
2012-05-02 19:17:38 +02:00
b6d75cc885 add GPSSHIM compilation to generate gps.htcleo.so 2012-05-02 18:49:56 +02:00
32e41eeab3 readd libgps and use qcom librpc to fix gps 2012-05-02 18:05:22 +02:00
64d90a036f fix default wallpaper 2012-05-02 16:46:29 +02:00
59f9fc5eca workaround: gsm stuff not included - do it in leo_eu manually 2012-05-02 17:10:41 +03:00
766ec076b3 remove libgps
readd cache initscript and remove cache hacks from initrd
add softbuttons prop to build.prop
integrate apps removal in squisher
2012-05-02 15:50:47 +02:00
0ec3a6e7f8 include mic_level initscript 2012-05-02 14:02:43 +02:00
faedc5f62c fix wlan, change lowest brightness level, fix dimensions, include apps removal script 2012-05-02 13:57:40 +02:00
7caf73dac6 further cleanup, ppp is default now (fast and stable under ics) 2012-05-02 01:12:59 +02:00
2c1fceee53 hopefully fix a few things 2012-05-02 00:00:57 +02:00
257b31aa05 a few props more, still crashing on simscreen 2012-05-01 21:32:50 +02:00
f286ad8281 fix whitespace in leo.mk
new bootlogo
fix dalvik cache symlinking
2012-05-01 19:51:04 +02:00
4a9a660ec5 fix my sloppiness 2012-05-01 16:03:24 +02:00
0356f7fa02 restructure ramdisk 2012-05-01 16:01:01 +02:00
09b41f87a1 move rild args to system.prop
update kernel - also for recovery (to fix chunk build error - will be revisited)
2012-05-01 14:24:55 +02:00
63d8dcb801 it builds at least. now fix a few things! 2012-04-30 20:17:42 +02:00
cd9dd3a992 merge from bravo base (not yet ready) 2012-04-30 16:27:12 +02:00
7044b6c96f more overlay stuff 2012-04-30 15:18:58 +02:00
93829c3a05 clean up a bit 2012-04-30 14:59:38 +02:00
b1764ae37b leo: remove postrecoveryboot from AndroidBoard, grab the LOCALE change from gb 2012-03-05 09:57:09 +00:00
d5fcb98819 update kernel to tytung_r1 2012-02-26 00:29:52 +00:00
5a41154e96 add postrecoveryboot 2012-02-24 23:46:44 +00:00
ef15e68d30 leo: don't require the usb legacy anymore 2012-01-16 13:51:17 +00:00
9102bfd44b leo: usb mounting 2012-01-13 09:30:17 +00:00
bd38193cf2 leo: fix some lib compilation stuff 2012-01-03 22:10:23 +00:00
6cc5434624 leo: add back config_usesLegacyUsbDeviceManager into framework overlay, now that it is committed into CM 2012-01-03 10:07:43 +00:00
b59a6387d2 leo: camera HAL lib 2012-01-03 02:14:48 +00:00
121b01ffde leo: removed things that I didn't need before 2012-01-03 01:05:09 +00:00
9ca6b7be94 leo: prep for legacy usb 2011-12-31 11:23:28 +00:00
18bf388dbf leo: fixed typo part 2 2011-12-31 04:06:46 +00:00
7ebb7abdc8 leo: fixed typo 2011-12-31 04:05:27 +00:00
1b1100acfa leo: organise the leo.mk a bit (credits drewis) 2011-12-31 03:37:51 +00:00
bce8d9ac96 leo: what actually compiles for the QCOM_HARDWARE 2011-12-31 03:33:05 +00:00
75b6aa8c92 leo: add stuff so that the qs8k stuff compiles 2011-12-31 02:12:11 +00:00
be58162e10 leo: fix build for 4.0.3 2011-12-30 20:03:43 +00:00
63995b33cf leo: updated more
* changed a few permissions
* moved init.d
* made sure that the usb mass storage will work
* maybe multi-touch will now work
2011-12-30 01:14:05 +00:00
a7d327542c leo: updated prebuilt kernel to tytung ICS beta8 2011-12-29 01:22:50 +00:00
e588095f2c leo: some updates
* Added init.htcleo.usb.rc into init.htcleo.rc
* Added CMSettings
* minor changes to squisher.sh script
2011-12-28 14:08:03 +00:00
2da2a4ce0e leo: a few things modified 2011-12-21 00:35:36 +00:00
8d36a30dae leo: fix typo for 02cachesd file 2011-12-16 09:33:54 +00:00
cd6be1ef2c leo: fix permission for 02cachesd, so that market downloads work 2011-12-16 09:19:12 +00:00
bb761dab4b leo: fix market download issue 2011-12-16 01:40:29 +00:00
e9ef797d1c leo: fix bootup to run the init.d scripts 2011-12-16 01:15:42 +00:00
20a718b2b3 leo: fix ppp issues; no longer require 97ppp file, all in the init.htcleo.rc 2011-12-15 02:49:00 +00:00
461c608cf1 leo: removed ~BOARD_USES_QCOM_HARDWARE until compilation can be fixed for gralloc 2011-12-15 00:28:20 +00:00
ce27891e46 leo: fix minor typo 2011-12-14 23:07:32 +00:00
1797b70acc leo: add back libgps compilation 2011-12-14 22:59:18 +00:00
6a49611c1f leo: fix librpc build so that gps works 2011-12-14 19:08:47 +00:00
2476e568a1 leo: fix permissions in init.d 2011-12-14 10:32:27 +00:00
4ec8a0d662 fix permissions in /etc/init.d 2011-12-14 00:21:15 +00:00
fcf3210639 remove opengl_renderer 2011-12-12 17:52:48 +00:00
b521a67530 leo: a few fixes from bravo (credits drewis) 2011-12-12 01:57:29 +00:00
28787caa53 leo: add releasetools back in, and make it compatible with new cm, and update squisher script to master file, changed another typo from cyanogen to cm 2011-12-12 01:00:07 +00:00
e2c83e5560 leo: ppp is better than rmnet in ICS, so hardcode it in, and fix add 97ppp into leo.mk 2011-12-12 00:09:11 +00:00
187fb04949 fixed ua-profile for mms, no such thing as Leo 2011-12-11 21:36:31 +00:00
4f5d042f93 leo: libgps doesn't compile, so going to prebuilt 2011-12-11 18:37:16 +00:00
284508a489 leo: fix HW Accel 2011-12-11 17:49:15 +00:00
4185cc2dd0 leo: dynamically add all modules in the prebuilt/modules folder 2011-12-08 01:38:50 +00:00
7e4dfde617 leo: fix 2011-12-06 00:09:38 +00:00
e14246d3be leo: fix data issues 2011-12-05 21:58:19 +00:00
60bfa7ed79 revert hw hack 2011-12-05 03:09:53 +00:00
3d87e3d063 leo: fix keys 2011-12-05 03:03:42 +00:00
8674d6b090 leo: fix partition size for system to 190 2011-12-05 00:58:04 +00:00
87f563f5ac leo: add egl.cfg 2011-12-04 23:29:44 +00:00
fb1cffbd0c leo: many mods, overlay, fixed up cm.mk and BoardConfig 2011-12-04 23:15:48 +00:00
324c805817 leo: a few changes 2011-12-03 22:35:09 +00:00
df53021b77 add the modules into leo.mk 2011-11-29 00:30:00 +00:00
7f7bf3cd04 added PRODUCT_BRAND 2011-11-28 23:46:12 +00:00
6e90ce118e updated cm.mk 2011-11-28 23:40:14 +00:00
163bc16744 removed nls_utf8 module 2011-11-28 23:16:31 +00:00
0d30b3813b updated kernel to tytung_r14 with mic fix 2011-11-28 23:14:31 +00:00
157bba5a40 leo: update more
* remove apns
* remove init.rc
* added cm.mk
* removed copybit from leo.mk
2011-11-28 14:57:39 +00:00
da8c01f7da added logo.rle 2011-11-27 03:27:11 +00:00
bf4f81aaa3 add cm config, re-add htc/common 2011-11-27 03:11:24 +00:00
df286aae14 leo: fixed a few rild, and ppp stuff 2011-11-27 02:51:25 +00:00
35c45913a1 leo: added back the tetherign devices amd releasetool for prep work 2011-11-26 17:02:18 +00:00
18933fcff1 Added htc_ril_wrapper to proprietary-files.txt 2011-11-25 02:19:24 +00:00
0947609130 change ril to use htc_ril_wrapper 2011-11-25 02:18:25 +00:00
cfd2114a3c leo: PPP only, renamed the idc file for touchscreen to make it work 2011-11-25 02:16:34 +00:00
9d427fc953 some further mods 2011-11-24 19:15:17 +00:00
300eda6ad9 leo: fixed media_profiles, added ppp files, and fixed keylayout 2011-11-24 18:49:51 +00:00
65dbcc5639 fixed touchscreen params, credits tytung 2011-11-24 18:23:00 +00:00
70259989da leo: add touchscreen, and move media,touchscreen file to prebuilt 2011-11-24 15:31:16 +00:00
9e9ed055c5 leo: doh! typo in config.xml for Phone app 2011-11-24 11:03:43 +00:00
b450e70b09 leo: change system size as ICS is bigger,a nd comments in for other sizes 2011-11-24 10:59:29 +00:00
9754efc326 libhtc_ril_wrapper doesn't compile, so hashing out for the time being 2011-11-24 10:28:41 +00:00
895c03220c fix makefile try 2 2011-11-24 10:25:59 +00:00
f4dc9b802f fix makefile 2011-11-24 10:03:56 +00:00
5015f01c1e more updates with fixes 2011-11-24 09:46:32 +00:00
9c5e553797 revert media_profiles form before, add gps support, add correct apns 2011-11-24 03:45:11 +00:00
84ce83dbd5 leo update: thanks to drewis,tytung 2011-11-23 23:54:26 +00:00
46b629b06e add back propriatary files 2011-11-22 15:32:38 +00:00
55fae4ac7a modified egl.conf 2011-11-22 02:31:44 +00:00
53bc356dce some fixes 2011-11-22 01:47:41 +00:00
16b5c1fa03 removed vold, gps and sensors from propritary 2011-11-21 22:59:18 +00:00
853a7ce4ca remove USE_OPENGL_RENDERER, didn't really need it 2011-11-21 17:49:04 +00:00
dc831972df added class main to all the services 2011-11-20 20:42:14 +00:00
278feeff34 leo: not to use opengl 2011-11-20 20:31:34 +00:00
03d2a5f7a7 first ICS mods that compiled and booted 2011-11-20 20:19:09 +00:00
e50fb919fd Merge branch 'gingerbread' of git://github.com/CyanogenMod/android_device_htc_leo into gingerbread 2011-11-15 01:30:10 +00:00
e1797ab279 leo: updated proprietary file extraction
Change-Id: Icf9b637ab964d69a0790cfb2e1c19636ff390e7f
2011-11-02 00:23:33 +00:00
1e181a1427 leo: removed libmm-omxcore.so 2011-10-31 22:43:29 +00:00
05743f46f0 leo: fix some proprietary files 2011-10-31 22:31:21 +00:00
afda0ec08e leo: fix some proprietary files 2011-10-31 21:47:31 +00:00
8b6688039d leo: added copy-files.sh 2011-10-30 23:39:36 +00:00
0d86e57b0b leo: more unzip/extract files update to use propritory-files.txt 2011-10-25 22:46:59 +01:00
fced698315 leo: Use a smarter method for extracting proprietary files
Change-Id: I94748f25bbeed32c321c1029908c981504c21de1
2011-10-25 21:11:15 +01:00
832646070d leo: oops accidently added the echo command 2011-10-25 21:05:00 +01:00
ea830913b9 leo: Use a smarter method for extracting proprietary files 2011-10-25 20:35:17 +01:00
98364a4494 leo: update to latest
* use device_htc_7x30-recovery for recovery
* fixed postrecoveryboot
* amended media_profiles.xml

Change-Id: I37bec28702aaa55155bfdb8a1a95d63b4bf45eb6
2011-10-25 13:50:02 +01:00
d5f9c47789 leo: fix recovery to include it properly from device_htc_7x30-recovery 2011-10-25 13:38:30 +01:00
f49e29bf84 leo: fix postrecoveryboot.sh 2011-10-24 22:21:16 +02:00
c5bc75241d leo: update to add recovery offmode charging 2011-10-24 21:17:20 +01:00
e829ba64be fix compile issue due to offmode charging in recobery 2011-10-24 15:16:21 +01:00
765f5cc47d leo: touch-foxus not in main yet, and therefore this in does not compile 2011-10-18 15:58:56 +01:00
3a1eed1381 leo: update media_profiles.xml from AmerCanAndroid 2011-10-18 09:39:31 +01:00
e65656ca7a leo: fix recovery compile issue 2011-10-17 03:03:32 +01:00
d421b05c0d leo: updated postrecoveryboot.sh with comments if we want dynamic change of recovery.fstab for sd-ext 2011-10-16 20:40:56 +01:00
40364b7f71 leo: updated work
* removed btld service from init.htcleo.rc
* updated modules, that had never been done before
* Added the LICENSE for the wrapper

Change-Id: I449a6be198610220c42721de91bbac798cc29a81
2011-10-16 20:38:01 +01:00
452d319c9a leo: added ueventd.htcleo.rc 2011-10-16 13:22:55 +01:00
13798da15e Merge "leo: update code" into gingerbread 2011-10-15 16:11:55 +04:00
4bdea2329c Merge "leo: Support new touch to focus overlay" into gingerbread 2011-10-15 16:08:01 +04:00
09a19f5d7c leo: removed btld again 2011-10-13 19:14:51 +01:00
77ea40b3e8 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
2011-10-12 11:46:10 +01:00
a6b56391f1 leo: fix bluetooth, and some minor tweaks 2011-10-11 23:10:56 +01:00
69ecd93377 leo: removed the btld service 2011-10-08 11:51:57 +01:00
0515d0fe93 leo: Support new touch to focus overlay
Change-Id: Ic9449cfdf7fd0be4296ab1cf0133eaeda9d77ae2
2011-09-26 04:20:09 +00:00
107 changed files with 3734 additions and 1159 deletions

4
Android.mk Executable file → Normal file
View File

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

7
AndroidBoard.mk Executable file → Normal file
View File

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

0
AndroidProducts.mk Executable file → Normal file
View File

View File

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

2
README
View File

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

7
cm.dependencies Normal file
View File

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

21
cm.mk Normal file
View File

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

47
copy-files.sh Executable file
View File

@ -0,0 +1,47 @@
#!/bin/sh
# Copyright (C) 2010 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
DEVICE=leo
MANUFACTURER=htc
STAGESYS=~/cm-$DEVICE/system
if [ "$1" = "pull" ]; then
if [ -s "$STAGESYS" ]; then
rm -R ~/cm-$DEVICE
fi
mkdir ~/cm-$DEVICE
mkdir $STAGESYS
mkdir $STAGESYS/bin
mkdir $STAGESYS/lib
mkdir $STAGESYS/etc
adb pull /system/bin $STAGESYS/bin
adb pull /system/lib $STAGESYS/lib
adb pull /system/etc $STAGESYS/etc
fi
OUTDIR=../../../vendor/$MANUFACTURER/$DEVICE
BASE=$OUTDIR/proprietary
rm -rf $BASE/*
for FILE in `cat proprietary-files.txt | grep -v ^# | grep -v ^$`; do
DIR=`dirname $FILE`
if [ ! -d $BASE/$DIR ]; then
mkdir -p $BASE/$DIR
fi
cp $STAGESYS/$FILE $BASE/$FILE
done
./setup-makefiles.sh

View File

@ -19,86 +19,15 @@
DEVICE=leo
MANUFACTURER=htc
mkdir -p ../../../vendor/$MANUFACTURER/$DEVICE/proprietary
adb pull /system/bin/akmd ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/akmd
chmod 755 ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/akmd
adb pull /system/bin/parse_radio_log ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/parse_radio_log
chmod 755 ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/parse_radio_log
adb pull /system/etc/AudioBTID.csv ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/AudioBTID.csv
adb pull /system/etc/AdieHWCodecSetting.csv ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/AdieHWCodecSetting.csv
adb pull /system/etc/firmware/BCM4329B1_002.002.023.0360.0362.hcd ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/BCM4329B1_002.002.023.0360.0362.hcd
adb pull /system/etc/firmware/BCM4329B1_002.002.023.0436.0439.hcd ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/BCM4329B1_002.002.023.0436.0439.hcd
adb pull /system/etc/firmware/BCM4329B1_002.002.023.0436.0439.hcd ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/BCM4329B1_002.002.023.0436.0439.hcd
adb pull /system/etc/firmware/BCM4329B1_002.002.023.0511.0538.hcd ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/BCM4329B1_002.002.023.0511.0538.hcd
adb pull /system/etc/firmware/bcm4329.hcd ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/bcm4329.hcd
adb pull /system/etc/firmware/htcleo.acdb ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/htcleo.acdb
adb pull /system/etc/firmware/default.acdb ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/default.acdb
adb pull /system/etc/firmware/yamato_pfp.fw ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/yamato_pfp.fw
adb pull /system/etc/firmware/yamato_pm4.fw ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/yamato_pm4.fw
adb pull /system/lib/egl/libEGL_adreno200.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libEGL_adreno200.so
adb pull /system/lib/egl/libGLESv1_CM_adreno200.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libGLESv1_CM_adreno200.so
adb pull /system/lib/egl/libGLESv2_adreno200.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libGLESv2_adreno200.so
adb pull /system/lib/egl/libq3dtools_adreno200.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libq3dtools_adreno200.so
adb pull /system/lib/libcamera.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libcamera.so
adb pull /system/lib/libgsl.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libgsl.so
adb pull /system/lib/libhtc_acoustic.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libhtc_acoustic.so
adb pull /system/lib/libhtc_ril.so ../../../vendor/$MANUFACTURER/$DEVICE/proprietary/libhtc_ril.so
adb pull /system/lib/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
BASE=../../../vendor/$MANUFACTURER/$DEVICE/proprietary
rm -rf $BASE/*
(cat << EOF) | sed s/__DEVICE__/$DEVICE/g | sed s/__MANUFACTURER__/$MANUFACTURER/g > ../../../vendor/$MANUFACTURER/$DEVICE/device-vendor-blobs.mk
# Copyright (C) 2010 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# This file is generated by device/__MANUFACTURER__/__DEVICE__/extract-files.sh - DO NOT EDIT
# Prebuilt libraries that are needed to build open-source libraries
PRODUCT_COPY_FILES := \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libcamera.so:obj/lib/libcamera.so
# All the blobs necessary for leo
PRODUCT_COPY_FILES += \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/akmd:system/bin/akmd \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/parse_radio_log:system/bin/parse_radio_log \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/AudioBTID.csv:system/etc/AudioBTID.csv \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/AdieHWCodecSetting.csv:system/etc/AdieHWCodecSetting.csv \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/bcm4329.hcd:system/etc/firmware/bcm4329.hcd \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/BCM4329B1_002.002.023.0360.0362.hcd:system/etc/firmware/BCM4329B1_002.002.023.0360.0362.hcd \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/BCM4329B1_002.002.023.0436.0439.hcd:system/etc/firmware/BCM4329B1_002.002.023.0436.0439.hcd \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/BCM4329B1_002.002.023.0511.0538.hcd:system/etc/firmware/BCM4329B1_002.002.023.0511.0538.hcd \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/htcleo.acdb:system/etc/firmware/htcleo.acdb \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/bcm4329.hcd:system/etc/firmware/bcm4329.hcd \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/htcleo.acdb:system/etc/firmware/htcleo.acdb \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/default.acdb:system/etc/firmware/default.acdb \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/yamato_pfp.fw:system/etc/firmware/yamato_pfp.fw \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/yamato_pm4.fw:system/etc/firmware/yamato_pm4.fw \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libEGL_adreno200.so:system/lib/egl/libEGL_adreno200.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libGLESv1_CM_adreno200.so:system/lib/egl/libGLESv1_CM_adreno200.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libGLESv2_adreno200.so:system/lib/egl/libGLESv2_adreno200.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libq3dtools_adreno200.so:system/lib/egl/libq3dtools_adreno200.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libcamera.so:system/lib/libcamera.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libgsl.so:system/lib/libgsl.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libhtc_acoustic.so:system/lib/libhtc_acoustic.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/libhtc_ril.so:system/lib/libhtc_ril.so \\
vendor/__MANUFACTURER__/__DEVICE__/proprietary/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/sensors.bravo.so:system/lib/hw/sensors.bravo.so \\
EOF
for FILE in `cat proprietary-files.txt | grep -v ^# | grep -v ^$`; do
DIR=`dirname $FILE`
if [ ! -d $BASE/$DIR ]; then
mkdir -p $BASE/$DIR
fi
adb pull /system/$FILE $BASE/$FILE
done
./setup-makefiles.sh

5
full_leo.mk Executable file → Normal file
View File

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

0
generic_leo.mk Executable file → Normal file
View File

14
goo.mk Normal file
View File

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

169
include/linux/android_pmem.h Executable file
View File

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

45
include/linux/genlock.h Executable file
View File

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

463
include/linux/msm_kgsl.h Executable file
View File

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

93
include/linux/msm_mdp.h Executable file
View File

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

241
include/linux/msm_q6vdec.h Executable file
View File

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

331
include/linux/msm_q6venc.h Executable file
View File

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

364
leo.mk Executable file → Normal file
View File

@ -1,122 +1,242 @@
#
# Copyright (C) 2009 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#
# This is the product configuration for a generic GSM leo,
# not specialized for any geography.
#
## (1) First, the most specific values, i.e. the aspects that are specific to GSM
PRODUCT_COPY_FILES += \
device/htc/leo/prebuilt/init.htcleo.rc:root/init.htcleo.rc \
# we have enough storage space to hold precise GC data
PRODUCT_TAGS += dalvik.gc.type-precise
## (2) Also get non-open-source GSM-specific aspects if available
$(call inherit-product-if-exists, vendor/htc/leo/leo-vendor.mk)
DEVICE_PACKAGE_OVERLAYS += device/htc/leo/overlay
PRODUCT_COPY_FILES += \
frameworks/base/data/etc/handheld_core_hardware.xml:system/etc/permissions/handheld_core_hardware.xml \
frameworks/base/data/etc/android.hardware.camera.flash-autofocus.xml:system/etc/permissions/android.hardware.camera.flash-autofocus.xml \
frameworks/base/data/etc/android.hardware.telephony.gsm.xml:system/etc/permissions/android.hardware.telephony.gsm.xml \
frameworks/base/data/etc/android.hardware.location.gps.xml:system/etc/permissions/android.hardware.location.gps.xml \
frameworks/base/data/etc/android.hardware.wifi.xml:system/etc/permissions/android.hardware.wifi.xml \
frameworks/base/data/etc/android.hardware.sensor.proximity.xml:system/etc/permissions/android.hardware.sensor.proximity.xml \
frameworks/base/data/etc/android.hardware.sensor.light.xml:system/etc/permissions/android.hardware.sensor.light.xml \
frameworks/base/data/etc/android.software.sip.voip.xml:system/etc/permissions/android.software.sip.voip.xml \
frameworks/base/data/etc/android.hardware.touchscreen.multitouch.xml:system/etc/permissions/android.hardware.touchscreen.multitouch.xml
# media config xml file
PRODUCT_COPY_FILES += \
device/htc/leo/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 \
lights.htcleo \
librs_jni \
gralloc.qsd8k \
copybit.qsd8k \
leo-reference-ril \
gps.htcleo \
libgps \
libhtc_ril_wrapper
# leo uses high-density artwork where available
PRODUCT_LOCALES := hdpi
PRODUCT_COPY_FILES += \
device/htc/leo/prebuilt/vold.fstab:system/etc/vold.fstab
# Keylayouts
PRODUCT_COPY_FILES += \
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/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
PRODUCT_COPY_FILES += \
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/prebuilt/kernel:boot/zImage \
ifeq ($(TARGET_PREBUILT_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/prebuilt/gps.conf:system/etc/gps.conf
PRODUCT_COPY_FILES += \
$(LOCAL_KERNEL):kernel
# media profiles and capabilities spec
$(call inherit-product, device/htc/leo/media_a1026.mk)
# stuff common to all HTC phones
$(call inherit-product, device/htc/common/common.mk)
PRODUCT_NAME := htc_leo
PRODUCT_DEVICE := leo
#
# Copyright (C) 2009 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
PRODUCT_COPY_FILES += \
device/htc/leo/prebuilt/init.htcleo.rc:root/init.htcleo.rc \
device/htc/leo/prebuilt/init.htcleo.usb.rc:root/init.htcleo.usb.rc \
device/htc/leo/prebuilt/ueventd.htcleo.rc:root/ueventd.htcleo.rc \
device/htc/leo/prebuilt/logo.rle:root/logo.rle \
# Add the postrecoveryboot.sh so that the recovery.fstab can be changed
PRODUCT_COPY_FILES += \
device/htc/leo/postrecoveryboot.sh:recovery/root/sbin/postrecoveryboot.sh
# we have enough storage space to hold precise GC data
PRODUCT_TAGS += dalvik.gc.type-precise
## (2) Also get non-open-source GSM-specific aspects if available
$(call inherit-product-if-exists, vendor/htc/leo/leo-vendor.mk)
DEVICE_PACKAGE_OVERLAYS += device/htc/leo/overlay
PRODUCT_LOCALES := en
# General properties
PRODUCT_PROPERTY_OVERRIDES += \
ro.sf.lcd_density=240 \
ro.ril.ecc.HTC-ELL=92,93,94 \
ro.ril.ecc.HTC-WWE=999 \
ro.ril.enable.a52.HTC-ITA=1 \
ro.ril.enable.a53.HTC-ITA=1 \
ro.ril.enable.a52=0 \
ro.ril.enable.a53=1 \
ro.ril.enable.dtm=1 \
ro.ril.gprsclass=12 \
ro.ril.hsdpa.category=8 \
ro.ril.hsupa.category=5 \
ro.ril.hsxpa=2 \
ro.ril.enable.prl.recognition=1 \
ro.telephony.ril.v3=signalstrength \
ro.ril.def.agps.mode=2 \
ro.ril.enable.managed.roaming=1 \
ro.ril.oem.nosim.ecclist=911,112,999,000,08,118,120,122,110,119,995 \
ro.ril.emc.mode=2 \
mobiledata.interfaces=rmnet0,rmnet1,rmnet2,ppp0
PRODUCT_PROPERTY_OVERRIDES += \
media.a1026.nsForVoiceRec=0 \
media.a1026.enableA1026=1 \
ro.media.dec.jpeg.memcap=20000000 \
ro.opengles.version=131072
# Default network type.
# 0 => /* GSM/WCDMA (WCDMA preferred) */
# 3 => /* GSM/WCDMA (auto mode, according to PRL) */
PRODUCT_PROPERTY_OVERRIDES += ro.telephony.default_network=0
PRODUCT_PROPERTY_OVERRIDES += \
wifi.interface=wlan0 \
ro.ril.disable.power.collapse=0 \
wifi.supplicant_scan_interval=60
# Improve touch responsiveness
PRODUCT_PROPERTY_OVERRIDES += \
Debug.performance.tuning=1 \
Video.accelerate.hw=1
# Fix black screen after call
PRODUCT_PROPERTY_OVERRIDES += \
ro.lge.proximity.delay=10 \
mot.proximity.delay=10
PRODUCT_COPY_FILES += \
frameworks/base/data/etc/handheld_core_hardware.xml:system/etc/permissions/handheld_core_hardware.xml \
frameworks/base/data/etc/android.hardware.camera.flash-autofocus.xml:system/etc/permissions/android.hardware.camera.flash-autofocus.xml \
frameworks/base/data/etc/android.hardware.telephony.gsm.xml:system/etc/permissions/android.hardware.telephony.gsm.xml \
frameworks/base/data/etc/android.hardware.location.gps.xml:system/etc/permissions/android.hardware.location.gps.xml \
frameworks/base/data/etc/android.hardware.wifi.xml:system/etc/permissions/android.hardware.wifi.xml \
frameworks/base/data/etc/android.hardware.sensor.proximity.xml:system/etc/permissions/android.hardware.sensor.proximity.xml \
frameworks/base/data/etc/android.hardware.sensor.light.xml:system/etc/permissions/android.hardware.sensor.light.xml \
frameworks/base/data/etc/android.software.sip.voip.xml:system/etc/permissions/android.software.sip.voip.xml \
frameworks/base/data/etc/android.hardware.touchscreen.multitouch.xml:system/etc/permissions/android.hardware.touchscreen.multitouch.xml \
frameworks/base/data/etc/android.hardware.usb.accessory.xml:system/etc/permissions/android.hardware.usb.accessory.xml \
frameworks/base/data/etc/android.hardware.sensor.accelerometer.xml:system/etc/permissions/android.hardware.sensor.accelerometer.xml \
frameworks/base/data/etc/android.hardware.sensor.compass.xml:system/etc/permissions/android.hardware.sensor.compass.xml
# media config xml file
PRODUCT_COPY_FILES += \
device/htc/leo/prebuilt/media_profiles.xml:system/etc/media_profiles.xml
# This file is used to install the enable RMNET and corresponding modules which dont get activated by normal module script, mount cache so that downloads work correctly
PRODUCT_COPY_FILES += \
device/htc/leo/prebuilt/init.d/01modules:system/etc/init.d/01modules \
device/htc/leo/prebuilt/init.d/02usb_tethering:system/etc/init.d/02usb_tethering \
device/htc/leo/prebuilt/init.d/10mic_level:system/etc/init.d/10mic_level \
device/htc/leo/prebuilt/init.d/97ppp:system/etc/init.d/97ppp
# Sensors
PRODUCT_PACKAGES += \
sensors.htcleo \
lights.htcleo \
gps.htcleo
# Audio
PRODUCT_PACKAGES += \
audio.a2dp.default \
audio.primary.qsd8k \
audio_policy.qsd8k \
libaudioutils
# GPU
PRODUCT_PACKAGES += \
copybit.qsd8k \
gralloc.qsd8k \
hwcomposer.default \
hwcomposer.qsd8k \
liboverlay \
libgenlock \
libmemalloc \
libtilerenderer \
libQcomUI
# Omx
PRODUCT_PACKAGES += \
libmm-omxcore \
libOmxCore \
libOmxVdec \
libOmxVidEnc \
libstagefrighthw
# Omx cli test apps
#PRODUCT_PACKAGES += \
# liblasic \
# mm-vdec-omx-test \
# ast-mm-vdec-omx-test \
# mm-venc-omx-test
# htcleo misc
PRODUCT_PACKAGES += \
camera.qsd8k \
leo-reference-ril \
libgps \
libhtc_ril_wrapper
PRODUCT_PACKAGES += \
Stk \
Camera \
Torch \
librs_jni \
Launcher2
# strict mode
ADDITIONAL_DEFAULT_PROPERTIES += persist.sys.strictmode.disable=true
# make fallback to mdpi possible
# e.g. for maintaining crisp assets on 160dpi
PRODUCT_AAPT_CONFIG := normal hdpi mdpi
PRODUCT_AAPT_PREF_CONFIG := hdpi mdpi
PRODUCT_PROPERTY_OVERRIDES += \
debug.sf.hw=1 \
debug.composition.type=mdp \
dalvik.vm.dexopt-flags=m=y \
dalvik.vm.checkjni=false \
dalvik.vm.heapsize=128m \
dalvik.vm.heapgrowthlimit=48m \
dalvik.vm.heapstartsize=5m \
dalvik.vm.dexopt-data-only=1 \
dalvik.vm.verify-bytecode=false \
dalvik.vm.lockprof.threshold=500 \
windowsmgr.max_events_per_sec=120
# Force launcher/apps into memory
PRODUCT_PROPERTY_OVERRIDES += \
ro.HOME_APP_ADJ=1 \
ro.PERCEPTIBLE_APP_ADJ=0
# HardwareRenderer properties
# dirty_regions: "false" to disable partial invalidates, override if enabletr=true
PRODUCT_PROPERTY_OVERRIDES += \
hwui.render_dirty_regions=false \
hwui.disable_vsync=true \
hwui.print_config=choice \
debug.enabletr=false
# Force 2 buffers - gralloc defaults to 3 and we only have 2
PRODUCT_PROPERTY_OVERRIDES += \
debug.gr.numframebuffers=2
# disable jni check
PRODUCT_PROPERTY_OVERRIDES += \
ro.kernel.android.checkjni=0 \
dalvik.vm.checkjni=0
# Set usb type
PRODUCT_PROPERTY_OVERRIDES += \
persist.sys.usb.config=mass_storage \
persist.service.adb.enable=1
PRODUCT_COPY_FILES += \
device/htc/leo/prebuilt/vold.fstab:system/etc/vold.fstab
# Keylayouts
PRODUCT_COPY_FILES += \
device/htc/leo/prebuilt/keylayout/htcleo-keypad.kl:system/usr/keylayout/htcleo-keypad.kl \
device/htc/leo/prebuilt/keylayout/htcleo-keypad.kcm:system/usr/keychars/htcleo-keypad.kcm \
device/htc/leo/prebuilt/keylayout/h2w_headset.kl:system/usr/keylayout/h2w_headset.kl
# Touchscreen
PRODUCT_COPY_FILES += \
device/htc/leo/prebuilt/htcleo-touchscreen.idc:system/usr/idc/htcleo-touchscreen.idc
# PPP files
PRODUCT_COPY_FILES += \
device/htc/leo/prebuilt/ppp/ip-up:system/etc/ppp/ip-up \
device/htc/leo/prebuilt/ppp/ip-down:system/etc/ppp/ip-down \
device/htc/leo/prebuilt/ppp/ppp:system/ppp \
device/htc/leo/prebuilt/ppp/options:system/etc/ppp/options
# The gps config appropriate for this device
PRODUCT_COPY_FILES += \
device/htc/leo/prebuilt/gps.conf:system/etc/gps.conf
# stuff common to all HTC phones
$(call inherit-product, device/htc/common/common.mk)
# goo.im stuff
$(call inherit-product, device/htc/leo/goo.mk)
PRODUCT_NAME := htc_leo
PRODUCT_DEVICE := leo

0
leo_as.mk Executable file → Normal file
View File

9
leo_eu.mk Executable file → Normal file
View File

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

0
leo_us.mk Executable file → Normal file
View File

0
libhtc_ril_wrapper/Android.mk Executable file → Normal file
View File

0
libhtc_ril_wrapper/MODULE_LICENSE_APACHE2 Executable file → Normal file
View File

0
libhtc_ril_wrapper/NOTICE Executable file → Normal file
View File

0
libhtc_ril_wrapper/libhtc_ril_wrapper.c Executable file → Normal file
View File

View File

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

View File

@ -1,30 +0,0 @@
#
# Copyright (C) 2009 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#
# This file describes the use of the A1026 chip by the media
# framework using system properties.
#
# Note: The property key and value has some length
# limit as defined by PROPERTY_KEY_MAX and
# PROPERTY_VALUE_MAX, respectively
#
# WARNING: We may not use system properties for specifying
# media capabilities and profiles in the future
#
PRODUCT_PROPERTY_OVERRIDES += \
media.a1026.nsForVoiceRec = 0 \
media.a1026.enableA1026 = 1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 291 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 KiB

View File

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

View File

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

View File

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

View File

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
**
** Copyright 2011, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License")
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<!-- The <device> element should contain one or more <storage> elements.
Exactly one of these should have the attribute primary="true".
This storage will be the primary external storage and should have mountPoint="/mnt/sdcard".
Each storage should have both a mountPoint and storageDescription attribute.
The following attributes are optional:
primary: (boolean) this storage is the primary external storage
removable: (boolean) this is removable storage (for example, a real SD card)
emulated: (boolean) the storage is emulated via the FUSE sdcard daemon
mtpReserve: (integer) number of megabytes of storage MTP should reserve for free storage
(used for emulated storage that is shared with system's data partition)
A storage should not have both emulated and removable set to true
-->
<StorageList xmlns:android="http://schemas.android.com/apk/res/android">
<storage android:mountPoint="/mnt/sdcard"
android:storageDescription="@string/storage_sd_card"
android:primary="true"
android:removable="true"
android:allowMassStorage="true" />
</StorageList>

View File

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

View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
** Copyright 2011, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<!-- These resources are around just to allow their values to be customized
for different hardware and product builds. -->
<resources>
<!-- Control whether status bar should distinguish HSPA data icon form UMTS
data icon on devices -->
<bool name="config_hspa_data_distinguishable">true</bool>
</resources>

View File

@ -1,21 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/**
* Copyright (c) 2009, The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->
<resources>
<bool name="def_expect_ime_autopop">true</bool>
</resources>

View File

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

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 411 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 316 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 429 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 222 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 201 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
* Copyright (C) 2009 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
-->
<resources>
<string-array name="wallpapers" translatable="false">
<item>wallpaper_street_lights</item>
<item>wallpaper_stream</item>
<item>wallpaper_phasebeam</item>
<item>wallpaper_pulse</item>
<item>wallpaper_nexusrain</item>
<item>wallpaper_stars</item>
<item>wallpaper_canyon</item>
<item>wallpaper_grass</item>
<item>wallpaper_zanzibar</item>
<item>wallpaper_cloud</item>
<item>wallpaper_monumentvalley</item>
<item>wallpaper_mountains</item>
<item>wallpaper_sunset</item>
<item>wallpaper_goldengate</item>
<item>wallpaper_shuttle</item>
</string-array>
</resources>

View File

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

View File

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

View File

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

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

@ -1,23 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2009 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>
<!-- Whether or not there is a notification led that is too intrusive to be pulsing
constantly -->
<bool name="has_intrusive_led">true</bool>
<!-- Whether or not the dock settings are to be displayed for this device when docked -->
<bool name="has_dock_settings">true</bool>
</resources>
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2009 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources>
<!-- Whether or not the dock settings are to be displayed for this device when docked -->
<bool name="has_dock_settings">true</bool>
</resources>

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2012 The CyanogenMod Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources xmlns:xliff="urnasis:names:tc:xliff:document:1.2 ">
<!-- LED Flashlight -->
<bool name="has_led_flash">true</bool>
</resources>

View File

@ -5,3 +5,12 @@ 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

BIN
prebuilt/GooManager.apk Normal file

Binary file not shown.

30
prebuilt/egl.cfg Executable file → Normal file
View File

@ -1,2 +1,32 @@
#
# Copyright (C) 2009 The Android Open-Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# One line per configuration, of the form:
#
# D I TAG
#
# D: display (0: default)
# I: implementation (0: software, 1: hardware)
# TAG: a unique tag
#
# The library name loaded by EGL is constructed as (in that order):
#
# /system/lib/egl/libGLES_$TAG.so
# /system/lib/egl/lib{EGL|GLESv1_CM|GLESv2}_$TAG.so
#
0 0 android
0 1 adreno200

Binary file not shown.

53
prebuilt/htcleo-touchscreen.idc Executable file
View File

@ -0,0 +1,53 @@
# Copyright (C) 2011 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Input Device Calibration File for the htcleo touch screen.
#
# Basic Parameters
touch.deviceType = touchScreen
touch.orientationAware = 1
# Size
touch.size.calibration = default
touch.size.scale = 10
touch.size.bias = 160
touch.size.isSummed = 1
# Pressure
# Driver reports signal strength as pressure.
#
# A normal thumb touch while touching the back of the device
# typically registers about 100 signal strength units although
# this value is highly variable and is sensitive to contact area,
# manner of contact and environmental conditions. We set the
# scale so that a normal touch with good signal strength will be
# reported as having a pressure somewhere in the vicinity of 1.0,
# a featherlight touch will be below 1.0 and a heavy or large touch
# will be above 1.0. We don't expect these values to be accurate.
touch.pressure.calibration = amplitude
touch.pressure.scale = 0.01
# Orientation
touch.orientation.calibration = none
# Keyboard
keyboard.layout = htcleo-keypad
keyboard.characterMap = Virtual
keyboard.orientationAware = 1
keyboard.builtIn = 0
device.internal = 1

0
prebuilt/01modules → prebuilt/init.d/01modules Normal file → Executable file
View File

View File

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

17
prebuilt/init.d/10mic_level Executable file
View File

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

20
prebuilt/init.d/97ppp Executable file
View File

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

View File

@ -1,33 +1,34 @@
on init
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
import init.htcleo.usb.rc
write /proc/sys/kernel/sched_min_granularity_ns 100000
on early-init
export SD_EXT_DIRECTORY /sd-ext
mkdir /sd-ext 0771 system system
export EXTERNAL_STORAGE /mnt/sdcard
mkdir /mnt/sdcard 0000 system system
# for backwards compatibility
symlink /mnt/sdcard /sdcard
on fs
mount yaffs2 mtd@system /system remount
mount rootfs rootfs / rw remount
# 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
mount yaffs2 mtd@system /system remount noatime nodiratime
mount yaffs2 mtd@userdata /data remount nosuid nodev noatime nodiratime
on post-fs-data
mkdir /data/misc/wifi 0770 wifi wifi
mkdir /data/misc/wifi/sockets 0770 wifi wifi
mkdir /data/misc/dhcp 0770 dhcp dhcp
chown dhcp dhcp /data/misc/dhcp
setprop vold.post_fs_data_done 1
on boot
mount debugfs /sys/kernel/debug /sys/kernel/debug
# bluetooth power up/down interface
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
chmod 0660 /sys/class/rfkill/rfkill0/state
chown bluetooth bluetooth /dev/ttyHS0
chmod 0600 /dev/ttyHS0
# bluetooth MAC address programming
chown bluetooth bluetooth /sys/module/board_htcleo/parameters/bdaddr
@ -36,61 +37,144 @@ on boot
# 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
# 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
# ===============================
# begin of permissions for htcleo
# ===============================
# flashlight
chown system camera /sys/devices/platform/flashlight.0/leds/flashlight/brightness
chmod 0660 /sys/devices/platform/flashlight.0/leds/flashlight/brightness
chmod 0666 /sys/devices/platform/flashlight.0/leds/flashlight/max_brightness
# 720p cam support
symlink /dev/msm_camera/control0 /dev/msm_camera/control1
symlink /dev/msm_camera/frame0 /dev/msm_camera/frame1
symlink /dev/msm_camera/config0 /dev/msm_camera/config1
# ICS camera
chmod 0777 /dev/msm_camera/config0
chmod 0777 /dev/msm_camera/config1
chmod 0777 /dev/msm_camera/control0
chmod 0777 /dev/msm_camera/control1
chmod 0777 /dev/msm_camera/frame0
chmod 0777 /dev/msm_camera/frame1
chmod 0777 /dev/graphics/fb0
# allow net_raw to have access to /dev/socket directory
chown root net_raw /dev/socket
chmod 0775 /dev/socket
# allow system to modify cpufreq control files
chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
chown root system /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
chown root system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chown root system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
# for wireless modem
chown system system /sys/module/serial/parameters/modem_enabled
chown system.system /dev/cpu_dma_latency
chown system system /dev/smd0
chown system system /dev/smd1
chown system system /dev/smd9
chown system system /dev/smd27
chown system system /dev/ttyHSUSB0
# others
chown radio system /sys/camera_led_status/led_ril_status
chown system system /sys/camera_led_status/led_wimax_status
chown system system /sys/camera_led_status/led_hotspot_status
chown media system /sys/android_camera/cam_mode
chown radio radio /sys/module/pm/parameters/idle_sleep_mode
chmod 0666 /dev/rfkill
#chmod 0666 /dev/q6venc
chmod 0666 /proc/cmdline
chmod 666 /dev/input/event0
chmod 666 /dev/input/event1
chmod 666 /dev/input/event2
chmod 666 /dev/input/event3
chmod 666 /dev/input/event4
chmod 666 /dev/input/event5
chmod 666 /dev/input/event6
chmod 666 /dev/uinput
chmod 666 /dev/msm_qcelp_in
chmod 666 /dev/msm_aac_in
chmod 666 /dev/msm_audio_ctl
chmod 666 /dev/msm_audio_route
chmod 666 /dev/msm_mp3
chmod 666 /dev/msm_pcm_in
chmod 666 /dev/msm_pcm_out
chmod 666 /dev/qmi0
chmod 666 /dev/qmi1
chmod 666 /dev/qmi2
chmod 666 /etc/bluez/audio.conf
chmod 666 /etc/bluez/hcid.conf
chmod 666 /etc/bluez/input.conf
chmod 0777 /dev/smd0
chmod 0777 /dev/smd1
chmod 0777 /dev/smd27
chmod 0777 /dev/msm_camera
chmod 0777 /dev/akm8973_aot
chmod 0777 /dev/akm8973_daemon
chmod 0777 /dev/cpu_dma_latency
chmod 0777 /dev/lightsensor
chmod 0777 /dev/bma150
chmod 0777 /dev/kgsl
chmod 0777 /dev/cm3602
chmod 0777 /dev/htc-acoustic
#chmod 0777 /dev/vfe
#chmod 0777 /dev/camera
#chmod 0777 /dev/compass
# Wireless properties
setprop net.dns1 8.8.8.8
setprop net.dns2 8.8.4.4
# =============================
# end of permissions for htcleo
# =============================
# enable the GPS
setprop ro.ril.def.agps.mode 2
# Add permissions for camera access
chmod 0666 /dev/msm_camera/config0
chmod 0666 /dev/msm_camera/control0
chmod 0666 /dev/msm_camera/frame0
chmod 0666 /dev/graphics/fb0
# performance tweaks for flash
write /sys/block/mtdblock0/bdi/read_ahead_kb 4
write /sys/block/mtdblock1/bdi/read_ahead_kb 4
write /sys/block/mtdblock2/bdi/read_ahead_kb 4
write /sys/block/mtdblock3/bdi/read_ahead_kb 4
write /sys/block/mtdblock4/bdi/read_ahead_kb 4
write /sys/block/mtdblock5/bdi/read_ahead_kb 4
# for wireless modem
chown system system /sys/module/serial/parameters/modem_enabled
chown system system /dev/ttyHSUSB0
chown system system /dev/smd9
# Power Management
chown media media /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 245000
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 998400
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ondemand
write /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate 40000
# KSM defaults
# write /sys/kernel/mm/ksm/sleep_millisecs 1500
write /sys/kernel/mm/ksm/sleep_millisecs 3000
write /sys/kernel/mm/ksm/pages_to_scan 256
# enable KSM
write /sys/kernel/mm/ksm/run 1
# Wakelock debug
write /sys/module/wakelock/parameters/debug_mask 7
@ -103,150 +187,56 @@ on boot
# 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
#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 \
--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
class main
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
-Dwext -iwlan0 -c/data/misc/wifi/wpa_supplicant.conf
# we will start as root and wpa_supplicant will switch to user wifi
# after setting up the capabilities required for WEXT
# user wifi
# group wifi inet keystore
class main
socket wpa_wlan0 dgram 660 wifi wifi
disabled
oneshot
service iprenew_eth0 /system/bin/dhcpcd -n
service dhcpcd_wlan0 /system/bin/dhcpcd -ABKL
class main
disabled
oneshot
# for USB internet sharing
service udhcpd /system/bin/udhcpd
service dhcpcd_bnep0 /system/bin/dhcpcd -ABKL
class main
disabled
oneshot
# Execute files in /etc/init.d before booting
service sysinit /system/bin/logwrapper /system/xbin/busybox run-parts /system/etc/init.d
service iprenew_wlan0 /system/bin/dhcpcd -n
class main
disabled
oneshot
service iprenew_bnep0 /system/bin/dhcpcd -n
class main
disabled
oneshot
# bugreport is triggered by the KEY_VOLUMEUP and BTN_MOUSE keycodes
service bugreport /system/bin/dumpstate -d -v -o /sdcard/bugreports/bugreport
class main
disabled
oneshot
keycodes 115 272
service hciattach /system/bin/brcm_patchram_plus --enable_hci --enable_lpm \
--baudrate 3000000 --patchram /etc/firmware/bcm4329.hcd /dev/ttyHS0
class main
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
service dspcrashd /system/bin/dspcrashd

View File

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

View File

@ -1 +0,0 @@
init.htcleo.rc

BIN
prebuilt/kernel Executable file → Normal file

Binary file not shown.

View File

@ -0,0 +1,544 @@
# Copyright (C) 2010 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Key character map for a built-in generic virtual keyboard primarily used
# for instrumentation and testing purposes.
#
type FULL
### Basic QWERTY keys ###
key A {
label: 'A'
base: 'a'
shift, capslock: 'A'
ctrl, alt, meta: none
}
key B {
label: 'B'
base: 'b'
shift, capslock: 'B'
ctrl, alt, meta: none
}
key C {
label: 'C'
base: 'c'
shift, capslock: 'C'
alt: '\u00e7'
shift+alt: '\u00c7'
ctrl, meta: none
}
key D {
label: 'D'
base: 'd'
shift, capslock: 'D'
ctrl, alt, meta: none
}
key E {
label: 'E'
base: 'e'
shift, capslock: 'E'
alt: '\u0301'
ctrl, meta: none
}
key F {
label: 'F'
base: 'f'
shift, capslock: 'F'
ctrl, alt, meta: none
}
key G {
label: 'G'
base: 'g'
shift, capslock: 'G'
ctrl, alt, meta: none
}
key H {
label: 'H'
base: 'h'
shift, capslock: 'H'
ctrl, alt, meta: none
}
key I {
label: 'I'
base: 'i'
shift, capslock: 'I'
alt: '\u0302'
ctrl, meta: none
}
key J {
label: 'J'
base: 'j'
shift, capslock: 'J'
ctrl, alt, meta: none
}
key K {
label: 'K'
base: 'k'
shift, capslock: 'K'
ctrl, alt, meta: none
}
key L {
label: 'L'
base: 'l'
shift, capslock: 'L'
ctrl, alt, meta: none
}
key M {
label: 'M'
base: 'm'
shift, capslock: 'M'
ctrl, alt, meta: none
}
key N {
label: 'N'
base: 'n'
shift, capslock: 'N'
alt: '\u0303'
ctrl, meta: none
}
key O {
label: 'O'
base: 'o'
shift, capslock: 'O'
ctrl, alt, meta: none
}
key P {
label: 'P'
base: 'p'
shift, capslock: 'P'
ctrl, alt, meta: none
}
key Q {
label: 'Q'
base: 'q'
shift, capslock: 'Q'
ctrl, alt, meta: none
}
key R {
label: 'R'
base: 'r'
shift, capslock: 'R'
ctrl, alt, meta: none
}
key S {
label: 'S'
base: 's'
shift, capslock: 'S'
alt: '\u00df'
ctrl, meta: none
}
key T {
label: 'T'
base: 't'
shift, capslock: 'T'
ctrl, alt, meta: none
}
key U {
label: 'U'
base: 'u'
shift, capslock: 'U'
alt: '\u0308'
ctrl, meta: none
}
key V {
label: 'V'
base: 'v'
shift, capslock: 'V'
ctrl, alt, meta: none
}
key W {
label: 'W'
base: 'w'
shift, capslock: 'W'
ctrl, alt, meta: none
}
key X {
label: 'X'
base: 'x'
shift, capslock: 'X'
ctrl, alt, meta: none
}
key Y {
label: 'Y'
base: 'y'
shift, capslock: 'Y'
ctrl, alt, meta: none
}
key Z {
label: 'Z'
base: 'z'
shift, capslock: 'Z'
ctrl, alt, meta: none
}
key 0 {
label, number: '0'
base: '0'
shift: ')'
ctrl, alt, meta: none
}
key 1 {
label, number: '1'
base: '1'
shift: '!'
ctrl, alt, meta: none
}
key 2 {
label, number: '2'
base: '2'
shift: '@'
ctrl, alt, meta: none
}
key 3 {
label, number: '3'
base: '3'
shift: '#'
ctrl, alt, meta: none
}
key 4 {
label, number: '4'
base: '4'
shift: '$'
ctrl, alt, meta: none
}
key 5 {
label, number: '5'
base: '5'
shift: '%'
ctrl, alt, meta: none
}
key 6 {
label, number: '6'
base: '6'
shift: '^'
ctrl, alt, meta: none
alt+shift: '\u0302'
}
key 7 {
label, number: '7'
base: '7'
shift: '&'
ctrl, alt, meta: none
}
key 8 {
label, number: '8'
base: '8'
shift: '*'
ctrl, alt, meta: none
}
key 9 {
label, number: '9'
base: '9'
shift: '('
ctrl, alt, meta: none
}
key SPACE {
label: ' '
base: ' '
ctrl, alt: none
meta: fallback SEARCH
}
key ENTER {
label: '\n'
base: '\n'
ctrl, alt, meta: none
}
key TAB {
label: '\t'
base: '\t'
ctrl, alt: none
meta: fallback APP_SWITCH
}
key COMMA {
label, number: ','
base: ','
shift: '<'
ctrl, alt, meta: none
}
key PERIOD {
label, number: '.'
base: '.'
shift: '>'
ctrl, alt, meta: none
}
key SLASH {
label, number: '/'
base: '/'
shift: '?'
ctrl, alt, meta: none
}
key GRAVE {
label, number: '`'
base: '`'
shift: '~'
alt: '\u0300'
alt+shift: '\u0303'
ctrl, meta: none
}
key MINUS {
label, number: '-'
base: '-'
shift: '_'
ctrl, alt, meta: none
}
key EQUALS {
label, number: '='
base: '='
shift: '+'
ctrl, alt, meta: none
}
key LEFT_BRACKET {
label, number: '['
base: '['
shift: '{'
ctrl, alt, meta: none
}
key RIGHT_BRACKET {
label, number: ']'
base: ']'
shift: '}'
ctrl, alt, meta: none
}
key BACKSLASH {
label, number: '\\'
base: '\\'
shift: '|'
ctrl, alt, meta: none
}
key SEMICOLON {
label, number: ';'
base: ';'
shift: ':'
ctrl, alt, meta: none
}
key APOSTROPHE {
label, number: '\''
base: '\''
shift: '"'
ctrl, alt, meta: none
}
### Numeric keypad ###
key NUMPAD_0 {
label, number: '0'
base: fallback INSERT
numlock: '0'
ctrl, alt, meta: none
}
key NUMPAD_1 {
label, number: '1'
base: fallback MOVE_END
numlock: '1'
ctrl, alt, meta: none
}
key NUMPAD_2 {
label, number: '2'
base: fallback DPAD_DOWN
numlock: '2'
ctrl, alt, meta: none
}
key NUMPAD_3 {
label, number: '3'
base: fallback PAGE_DOWN
numlock: '3'
ctrl, alt, meta: none
}
key NUMPAD_4 {
label, number: '4'
base: fallback DPAD_LEFT
numlock: '4'
ctrl, alt, meta: none
}
key NUMPAD_5 {
label, number: '5'
base: fallback DPAD_CENTER
numlock: '5'
ctrl, alt, meta: none
}
key NUMPAD_6 {
label, number: '6'
base: fallback DPAD_RIGHT
numlock: '6'
ctrl, alt, meta: none
}
key NUMPAD_7 {
label, number: '7'
base: fallback MOVE_HOME
numlock: '7'
ctrl, alt, meta: none
}
key NUMPAD_8 {
label, number: '8'
base: fallback DPAD_UP
numlock: '8'
ctrl, alt, meta: none
}
key NUMPAD_9 {
label, number: '9'
base: fallback PAGE_UP
numlock: '9'
ctrl, alt, meta: none
}
key NUMPAD_LEFT_PAREN {
label, number: '('
base: '('
ctrl, alt, meta: none
}
key NUMPAD_RIGHT_PAREN {
label, number: ')'
base: ')'
ctrl, alt, meta: none
}
key NUMPAD_DIVIDE {
label, number: '/'
base: '/'
ctrl, alt, meta: none
}
key NUMPAD_MULTIPLY {
label, number: '*'
base: '*'
ctrl, alt, meta: none
}
key NUMPAD_SUBTRACT {
label, number: '-'
base: '-'
ctrl, alt, meta: none
}
key NUMPAD_ADD {
label, number: '+'
base: '+'
ctrl, alt, meta: none
}
key NUMPAD_DOT {
label, number: '.'
base: fallback FORWARD_DEL
numlock: '.'
ctrl, alt, meta: none
}
key NUMPAD_COMMA {
label, number: ','
base: ','
ctrl, alt, meta: none
}
key NUMPAD_EQUALS {
label, number: '='
base: '='
ctrl, alt, meta: none
}
key NUMPAD_ENTER {
label: '\n'
base: '\n' fallback ENTER
ctrl, alt, meta: none fallback ENTER
}
### Special keys on phones ###
key AT {
label, number: '@'
base: '@'
}
key STAR {
label, number: '*'
base: '*'
}
key POUND {
label, number: '#'
base: '#'
}
key PLUS {
label, number: '+'
base: '+'
}
### Non-printing keys ###
key ESCAPE {
base: fallback BACK
meta: fallback HOME
alt: fallback MENU
}

View File

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

View File

@ -1,93 +0,0 @@
key 102 HOME WAKE_DROPPED
key 139 MENU WAKE_DROPPED
key 158 BACK WAKE_DROPPED
key 231 CALL WAKE_DROPPED
key 107 ENDCALL WAKE_DROPPED
key 116 POWER WAKE_DROPPED
key 115 VOLUME_UP WAKE
key 114 VOLUME_DOWN WAKE
# key 399 GRAVE
# key 2 1
# key 3 2
# key 4 3
# key 5 4
# key 6 5
# key 7 6
# key 8 7
# key 9 8
# key 10 9
# key 11 0
# key 158 BACK WAKE_DROPPED
# key 230 SOFT_RIGHT WAKE
# key 60 SOFT_RIGHT WAKE
# key 61 CALL WAKE_DROPPED
# key 62 ENDCALL WAKE_DROPPED
# key 229 MENU WAKE_DROPPED
# key 59 MENU WAKE_DROPPED
# key 139 MENU WAKE_DROPPED
# key 127 SEARCH WAKE_DROPPED
# key 217 SEARCH
# key 228 POUND
# key 227 STAR
#
# key 108 DPAD_DOWN WAKE_DROPPED
# key 103 DPAD_UP WAKE_DROPPED
# key 102 HOME WAKE
# key 105 DPAD_LEFT WAKE_DROPPED
# key 106 DPAD_RIGHT WAKE_DROPPED
# key 211 FOCUS
# key 212 CAMERA
#
# key 16 Q
# key 17 W
# key 18 E
# key 19 R
# key 20 T
# key 21 Y
# key 22 U
# key 23 I
# key 24 O
# key 25 P
# key 26 LEFT_BRACKET
# key 27 RIGHT_BRACKET
# key 43 BACKSLASH
#
# key 30 A
# key 31 S
# key 32 D
# key 33 F
# key 34 G
# key 35 H
# key 36 J
# key 37 K
# key 38 L
# key 39 SEMICOLON
# key 40 APOSTROPHE
# key 14 DEL
#
# key 44 Z
# key 45 X
# key 46 C
# key 47 V
# key 48 B
# key 49 N
# key 50 M
# key 51 COMMA
# key 52 PERIOD
# key 53 SLASH
# key 28 ENTER
#
# key 56 ALT_LEFT
# key 42 SHIFT_LEFT
# key 15 TAB
# key 57 SPACE
# key 150 EXPLORER
# key 155 ENVELOPE
#
# key 12 MINUS
# key 13 EQUALS
# key 215 AT

BIN
prebuilt/logo.rle Executable file

Binary file not shown.

View File

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

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

10
prebuilt/ppp/ip-down Executable file
View File

@ -0,0 +1,10 @@
#!/system/bin/sh
/bin/rm /etc/ppp/ppp0.pid
# Delete the symbolic link created by ip-up
/bin/rm /etc/resolv.conf
# Tweak kernel low memory handling (revert to the original values)
echo 32 32 > /proc/sys/vm/lowmem_reserve_ratio
echo 2039 > /proc/sys/vm/min_free_kbytes

24
prebuilt/ppp/ip-up Executable file
View File

@ -0,0 +1,24 @@
#!/system/bin/sh
#author: cedesmith
PATH=/sbin:/system/sbin:/system/bin:/system/xbin
setprop net.ppp0.dns1 $DNS1
setprop net.ppp0.dns2 $DNS2
#added by tytung
/bin/touch /etc/ppp/ppp0.pid
/bin/chmod 777 /etc/ppp/ppp0.pid
# Create link for resolv.conf (generated by pppd)
ln -s /etc/ppp/resolv.conf /etc/resolv.conf
echo "nameserver $DNS1" > /etc/ppp/resolv.conf
echo "nameserver $DNS2" >> /etc/ppp/resolv.conf
# Tweak kernel low memory handling
echo 8 8 > /proc/sys/vm/lowmem_reserve_ratio
echo 8192 > /proc/sys/vm/min_free_kbytes

12
prebuilt/ppp/options Normal file
View File

@ -0,0 +1,12 @@
noauth
defaultroute
usepeerdns
ipcp-accept-remote
ipcp-accept-local
holdoff 3
noaccomp
noccp
nobsdcomp
nodeflate
nopcomp
novjccomp

0
prebuilt/ppp/ppp Executable file
View File

0
prebuilt/recovery_kernel Normal file → Executable file
View File

View File

@ -1,2 +1,11 @@
mtd@misc 0460 radio diag
# the genlock client device node is world writable/readable.
/dev/genlock 0666 system graphics
# gpu driver for adreno200 is globally accessible
/dev/kgsl-3d0 0666 system graphics
# camera - just make sure its all writeable
/dev/msm_camera/* 0666 system camera
/dev/graphics/fb* 0666 system graphics

0
prebuilt/vold.fstab Executable file → Normal file
View File

26
proprietary-files.txt Normal file
View File

@ -0,0 +1,26 @@
bin/akmd
bin/vold
bin/parse_radio_log
etc/AudioBTID.csv
etc/AdieHWCodecSetting.csv
etc/firmware/BCM4329B1_002.002.023.0360.0362.hcd
etc/firmware/BCM4329B1_002.002.023.0436.0439.hcd
etc/firmware/BCM4329B1_002.002.023.0511.0538.hcd
etc/firmware/bcm4329.hcd
etc/firmware/default.acdb
etc/firmware/yamato_pfp.fw
etc/firmware/yamato_pm4.fw
lib/egl/libEGL_adreno200.so
lib/egl/libGLESv1_CM_adreno200.so
lib/egl/libGLESv2_adreno200.so
lib/egl/libq3dtools_adreno200.so
lib/libaudio.so
lib/libcamera.so
lib/libgsl.so
lib/libhtc_acoustic.so
lib/libhtc_ril.so
lib/libhtc_ril_wrapper.so
lib/liboemcamera.so
lib/libOmxVdec.so
lib/libOmxVidEnc.so
lib/libOmxCore.so

30
releasetools/bootloader.sh Executable file
View File

@ -0,0 +1,30 @@
#!/bin/sh
#
# Copyright (C) 2012 the cmhtcleo team
#
echo "updater-script: Making Compatible Update script"
cd $REPACK/ota/META-INF/com/google/android
awk '{if (match($0,"0.200000, 10")) exit; print > "head"}' updater-script
awk '/0.200000, 10/ {p=1}; p==1 {print > "tail"}' updater-script
rm -rf updater-script
cat head > updater-script
rm -rf head
echo 'package_extract_file("checksys.sh","/tmp/checksys.sh");' >> updater-script
echo 'set_perm(0, 0, 755, "/tmp/checksys.sh");' >> updater-script
echo 'run_program("/tmp/checksys.sh");' >> updater-script
echo 'if file_getprop("/tmp/nfo.prop","clk") == "true" then' >> updater-script
echo ' ui_print("cLK detected, using ppp for data connections");' >> updater-script
echo 'else' >> updater-script
echo ' ui_print("MAGLDR detected, using rmnet for data connections");' >> updater-script
echo ' delete("/system/ppp");' >> updater-script
echo 'endif;' >> updater-script
cat tail >> updater-script
rm -rf tail
echo "updater-script: copying checksys.sh"
cp $ANDROID_BUILD_TOP/device/htc/leo/releasetools/checksys.sh $REPACK/ota

11
releasetools/checksys.sh Executable file
View File

@ -0,0 +1,11 @@
#!/sbin/sh
# checksys.sh
output=`grep -i "clk" /proc/cmdline`
if [ -n "$output" ]
then
echo "clk=true" > /tmp/nfo.prop
else
echo "clk=null" > /tmp/nfo.prop
fi

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