leo: fixed media_profiles, added ppp files, and fixed keylayout

This commit is contained in:
Arif Ali 2011-11-24 18:49:51 +00:00
parent 65dbcc5639
commit 300eda6ad9
6 changed files with 396 additions and 158 deletions

6
leo.mk
View File

@ -95,6 +95,12 @@ PRODUCT_COPY_FILES += \
PRODUCT_COPY_FILES += \
device/htc/leo/prebuilt/apns-conf.xml:system/etc/apns-conf.xml
# 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/options:system/etc/ppp/options
# kernel modules
PRODUCT_COPY_FILES += \
device/htc/leo/prebuilt/modules/bcm4329.ko:system/lib/modules/bcm4329.ko \

View File

@ -1,93 +1,86 @@
key 102 HOME WAKE_DROPPED
key 139 MENU WAKE_DROPPED
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 231 CALL WAKE_DROPPED
key 230 SOFT_RIGHT WAKE
key 60 SOFT_RIGHT WAKE
key 107 ENDCALL WAKE_DROPPED
key 116 POWER 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 WAKE_DROPPED
key 228 POUND
key 227 STAR
key 231 CALL WAKE_DROPPED
key 61 CALL WAKE_DROPPED
key 232 DPAD_CENTER WAKE_DROPPED
key 108 DPAD_DOWN WAKE_DROPPED
key 103 DPAD_UP WAKE_DROPPED
key 102 HOME WAKE
key 105 DPAD_LEFT WAKE_DROPPED
key 106 DPAD_RIGHT WAKE_DROPPED
key 115 VOLUME_UP WAKE
key 114 VOLUME_DOWN WAKE
key 116 POWER WAKE
key 211 FOCUS
key 212 CAMERA
key 16 Q
key 17 W
key 18 E
key 19 R
key 20 T
key 21 Y
key 22 U
key 23 I
key 24 O
key 25 P
key 26 LEFT_BRACKET
key 27 RIGHT_BRACKET
key 43 BACKSLASH
# key 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
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

View File

@ -25,6 +25,7 @@
<!ATTLIST EncoderProfile quality (high|low) #REQUIRED>
<!ATTLIST EncoderProfile fileFormat (mp4|3gp) #REQUIRED>
<!ATTLIST EncoderProfile duration (30|60) #REQUIRED>
<!ATTLIST EncoderProfile cameraId (0|1) #REQUIRED>
<!ELEMENT Video EMPTY>
<!ATTLIST Video codec (h264|h263|m4v) #REQUIRED>
<!ATTLIST Video bitRate CDATA #REQUIRED>
@ -41,7 +42,6 @@
<!ELEMENT ImageDecoding EMPTY>
<!ATTLIST ImageDecoding memCap CDATA #REQUIRED>
<!ELEMENT Camera EMPTY>
<!ATTLIST Camera previewFrameRate CDATA #REQUIRED>
<!ELEMENT EncoderOutputFileFormat EMPTY>
<!ATTLIST EncoderOutputFileFormat name (mp4|3gp) #REQUIRED>
<!ELEMENT VideoEncoderCap EMPTY>
@ -70,6 +70,15 @@
<!ELEMENT AudioDecoderCap EMPTY>
<!ATTLIST AudioDecoderCap name (wma) #REQUIRED>
<!ATTLIST AudioDecoderCap enabled (true|false) #REQUIRED>
<!ELEMENT VideoEditorCap EMPTY>
<!ATTLIST VideoEditorCap maxInputFrameWidth CDATA #REQUIRED>
<!ATTLIST VideoEditorCap maxInputFrameHeight CDATA #REQUIRED>
<!ATTLIST VideoEditorCap maxOutputFrameWidth CDATA #REQUIRED>
<!ATTLIST VideoEditorCap maxOutputFrameHeight CDATA #REQUIRED>
<!ELEMENT ExportVideoProfile EMPTY>
<!ATTLIST ExportVideoProfile name (h264|h263|m4v) #REQUIRED>
<!ATTLIST ExportVideoProfile profile CDATA #REQUIRED>
<!ATTLIST ExportVideoProfile level CDATA #REQUIRED>
]>
<!--
This file is used to declare the multimedia profiles and capabilities
@ -78,87 +87,241 @@
<MediaSettings>
<!-- Each camcorder profile defines a set of predefined configuration parameters -->
<CamcorderProfiles cameraId="0">
<!--
<EncoderProfile quality="hd" fileFormat="mp4" duration="60">
<EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
<Video codec="m4v"
bitRate="6000000"
width="1280"
height="720"
frameRate="24" />
<Audio codec="aac"
bitRate="96000"
sampleRate="16000"
channels="1" />
</EncoderProfile>
-->
<EncoderProfile quality="high" fileFormat="mp4" duration="60">
<Video codec="h264"
bitRate="3000000"
width="720"
height="480"
frameRate="24" />
<Audio codec="aac"
bitRate="96000"
sampleRate="16000"
channels="1" />
</EncoderProfile>
<EncoderProfile quality="low" fileFormat="3gp" duration="30">
<Video codec="h263"
bitRate="256000"
width="176"
height="144"
bitRate="128000"
width="320"
height="240"
frameRate="15" />
<Audio codec="amrnb"
bitRate="12200"
sampleRate="8000"
channels="1" />
</EncoderProfile>
<ImageEncoding quality="90" />
<EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="192000"
width="176"
height="144"
frameRate="30" />
<!-- audio setting is ignored -->
<Audio codec="amrnb"
bitRate="12200"
sampleRate="8000"
channels="1" />
</EncoderProfile>
<ImageEncoding quality="95" />
<ImageEncoding quality="80" />
<ImageEncoding quality="70" />
<ImageDecoding memCap="20000000" />
</CamcorderProfiles>
<CamcorderProfiles cameraId="1">
<EncoderProfile quality="high" fileFormat="mp4" duration="60">
<Video codec="h264"
bitRate="2000000"
width="640"
height="480"
frameRate="24" />
<Audio codec="aac"
bitRate="96000"
sampleRate="16000"
channels="1" />
</EncoderProfile>
<EncoderProfile quality="low" fileFormat="3gp" duration="30">
<Video codec="h263"
bitRate="256000"
width="176"
height="144"
<EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
<Video codec="m4v"
bitRate="128000"
width="320"
height="240"
frameRate="15" />
<Audio codec="amrnb"
bitRate="12200"
sampleRate="8000"
channels="1" />
</EncoderProfile>
<ImageEncoding quality="90" />
<EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="192000"
width="176"
height="144"
frameRate="30" />
<!-- audio setting is ignored -->
<Audio codec="amrnb"
bitRate="12200"
sampleRate="8000"
channels="1" />
</EncoderProfile>
<ImageEncoding quality="95" />
<ImageEncoding quality="80" />
<ImageEncoding quality="70" />
<ImageDecoding memCap="20000000" />
<ImageDecoding memCap="10000000" />
</CamcorderProfiles>
<CamcorderProfiles cameraId="2">
<EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
<Video codec="m4v"
bitRate="128000"
width="320"
height="240"
frameRate="15" />
<Audio codec="amrnb"
bitRate="12200"
sampleRate="8000"
channels="1" />
</EncoderProfile>
<EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="192000"
width="176"
height="144"
frameRate="30" />
<!-- audio setting is ignored -->
<Audio codec="amrnb"
bitRate="12200"
sampleRate="8000"
channels="1" />
</EncoderProfile>
<ImageEncoding quality="95" />
<ImageEncoding quality="80" />
<ImageEncoding quality="70" />
<ImageDecoding memCap="20000000" />
</CamcorderProfiles>
<CamcorderProfiles cameraId="3">
<EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
<Video codec="m4v"
bitRate="128000"
width="320"
height="240"
frameRate="15" />
<Audio codec="amrnb"
bitRate="12200"
sampleRate="8000"
channels="1" />
</EncoderProfile>
<EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="192000"
width="176"
height="144"
frameRate="30" />
<!-- audio setting is ignored -->
<Audio codec="amrnb"
bitRate="12200"
sampleRate="8000"
channels="1" />
</EncoderProfile>
<ImageEncoding quality="95" />
<ImageEncoding quality="80" />
<ImageEncoding quality="70" />
<ImageDecoding memCap="20000000" />
</CamcorderProfiles>
<CamcorderProfiles cameraId="4">
<EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
<Video codec="m4v"
bitRate="128000"
width="320"
height="240"
frameRate="15" />
<Audio codec="amrnb"
bitRate="12200"
sampleRate="8000"
channels="1" />
</EncoderProfile>
<EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="192000"
width="176"
height="144"
frameRate="30" />
<!-- audio setting is ignored -->
<Audio codec="amrnb"
bitRate="12200"
sampleRate="8000"
channels="1" />
</EncoderProfile>
<ImageEncoding quality="95" />
<ImageEncoding quality="80" />
<ImageEncoding quality="70" />
<ImageDecoding memCap="20000000" />
</CamcorderProfiles>
<CamcorderProfiles cameraId="5">
<EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
<Video codec="m4v"
bitRate="128000"
width="320"
height="240"
frameRate="15" />
<Audio codec="amrnb"
bitRate="12200"
sampleRate="8000"
channels="1" />
</EncoderProfile>
<EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="192000"
width="176"
height="144"
frameRate="30" />
<!-- audio setting is ignored -->
<Audio codec="amrnb"
bitRate="12200"
sampleRate="8000"
channels="1" />
</EncoderProfile>
<ImageEncoding quality="95" />
<ImageEncoding quality="80" />
<ImageEncoding quality="70" />
<ImageDecoding memCap="20000000" />
</CamcorderProfiles>
<CamcorderProfiles cameraId="6">
<EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
<Video codec="m4v"
bitRate="128000"
width="320"
height="240"
frameRate="15" />
<Audio codec="amrnb"
bitRate="12200"
sampleRate="8000"
channels="1" />
</EncoderProfile>
<EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
<Video codec="h264"
bitRate="192000"
width="176"
height="144"
frameRate="30" />
<!-- audio setting is ignored -->
<Audio codec="amrnb"
bitRate="12200"
sampleRate="8000"
channels="1" />
</EncoderProfile>
<ImageEncoding quality="95" />
<ImageEncoding quality="80" />
<ImageEncoding quality="70" />
<ImageDecoding memCap="20000000" />
<Camera previewFrameRate="0" />
</CamcorderProfiles>
<EncoderOutputFileFormat name="3gp" />
@ -170,26 +333,26 @@
or query the capabilities of the codec at all if it is disabled
-->
<VideoEncoderCap name="h264" enabled="true"
minBitRate="64000" maxBitRate="6000000"
minFrameWidth="176" maxFrameWidth="800"
minFrameHeight="144" maxFrameHeight="480"
minFrameRate="1" maxFrameRate="30" />
minBitRate="64000" maxBitRate="192000"
minFrameWidth="176" maxFrameWidth="320"
minFrameHeight="144" maxFrameHeight="240"
minFrameRate="15" maxFrameRate="30" />
<VideoEncoderCap name="h263" enabled="true"
minBitRate="64000" maxBitRate="6000000"
minFrameWidth="176" maxFrameWidth="800"
minFrameHeight="144" maxFrameHeight="480"
minFrameRate="1" maxFrameRate="30" />
minBitRate="64000" maxBitRate="192000"
minFrameWidth="176" maxFrameWidth="320"
minFrameHeight="144" maxFrameHeight="240"
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" />
minBitRate="64000" maxBitRate="192000"
minFrameWidth="176" maxFrameWidth="320"
minFrameHeight="144" maxFrameHeight="240"
minFrameRate="15" maxFrameRate="30" />
<AudioEncoderCap name="aac" enabled="true"
minBitRate="8192" maxBitRate="96000"
minSampleRate="8000" maxSampleRate="16000"
minBitRate="8000" maxBitRate="96000"
minSampleRate="8000" maxSampleRate="48000"
minChannels="1" maxChannels="1" />
<AudioEncoderCap name="amrwb" enabled="true"
@ -211,4 +374,27 @@
-->
<VideoDecoderCap name="wmv" enabled="false"/>
<AudioDecoderCap name="wma" enabled="false"/>
<VideoEditorCap maxInputFrameWidth="320"
maxInputFrameHeight="240" maxOutputFrameWidth="320"
maxOutputFrameHeight="240"/>
<!--
The VideoEditor Export codec profile and level values
correspond to the values in OMX_Video.h.
E.g. for h264, profile value 1 means OMX_VIDEO_AVCProfileBaseline
and level 4096 means OMX_VIDEO_AVCLevel41.
Please note that the values are in decimal.
These values are for video encoder.
-->
<!--
Codec = h.264, Baseline profile, level 4.1
-->
<ExportVideoProfile name="h264" profile= "1" level="512"/>
<!--
Codec = h.263, Baseline profile, level 0
-->
<ExportVideoProfile name="h263" profile= "1" level="1"/>
<!--
Codec = mpeg4, Simple profile, level 3
-->
<ExportVideoProfile name="m4v" profile= "1" level="16"/>
</MediaSettings>

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

@ -0,0 +1,3 @@
#!/bin/sh
/bin/rm /etc/ppp/ppp0.pid

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

@ -0,0 +1,48 @@
#!/system/bin/sh
#/bin/touch /etc/ppp/ppp0.pid
#/bin/chmod 777 /etc/ppp/ppp0.pid
case $1 in
ppp1)
iptables --flush;
iptables --table nat --flush;
iptables --delete-chain;
iptables --table nat --append POSTROUTING --out-interface ppp0 -j MASQUERADE;
iptables --append FORWARD --in-interface ppp1 -j ACCEPT;
echo 0 > /proc/sys/net/ipv4/ip_forward;
echo 1 > /proc/sys/net/ipv4/ip_forward;
;;
ppp0)
echo "ip-up fired" > /tmp/ppp.log
# /system/bin/setprop "net.interfaces.defaultroute" "gprs"
;;
esac
# Use interface name if linkname is not available
NAME=${LINKNAME:-$1}
/system/bin/touch /etc/ppp/ppp0.pid
/system/bin/chmod 777 /etc/ppp/ppp0.pid
/system/bin/echo $(pidof pppd) > /etc/ppp/ppp0.pid
echo "nameserver $DNS1" > /etc/ppp/resolv.conf
echo "nameserver $DNS2" >> /etc/ppp/resolv.conf
/system/bin/setprop "net.$NAME.dns1" "$DNS1"
/system/bin/setprop "net.$NAME.dns2" "$DNS2"
/system/bin/setprop "net.$NAME.local-ip" "$IPLOCAL"
/system/bin/setprop "net.$NAME.remote-ip" "$IPREMOTE"
/system/bin/setprop "net.dns1" "$DNS1"
/system/bin/setprop "net.dns2" "$DNS2"
modem_log()
{
/bin/echo -e "${@}" >> /tmp/ppp.log
}
modem_log "Connection attempt SUCCESSFUL!"
modem_log "Phone IP: `/bin/ifconfig ppp0 | /bin/grep 'inet addr:' | /bin/cut -d':' -f2 | /bin/cut -d' ' -f1`"
modem_log "Subnet : `/bin/ifconfig ppp0 | /bin/grep 'inet addr:' | /bin/cut -d':' -f4 | /bin/cut -d' ' -f1`"
modem_log "P-t-P : `/bin/ifconfig ppp0 | /bin/grep 'inet addr:' | /bin/cut -d':' -f3 | /bin/cut -d' ' -f1`"
modem_log "Done!"
sleep 1
/system/bin/setprop "net.dns1" "$DNS1"
/system/bin/setprop "net.dns2" "$DNS2"

2
prebuilt/ppp/options Executable file
View File

@ -0,0 +1,2 @@
defaultroute
usepeerdns