it builds at least. now fix a few things!

This commit is contained in:
milaq 2012-04-30 20:17:42 +02:00
parent cd9dd3a992
commit 63d8dcb801
5 changed files with 51 additions and 124 deletions

26
leo.mk
View File

@ -36,7 +36,8 @@ PRODUCT_LOCALES := en
# General properties
PRODUCT_PROPERTY_OVERRIDES += \
ro.sf.lcd_density=240 \
rild.libpath=/system/lib/libhtc_ril.so \
rild.libpath=/system/lib/libhtc_ril_wrapper.so \
rild.libargs=-d /dev/smd0 \
ro.ril.ecc.HTC-ELL=92,93,94 \
ro.ril.ecc.HTC-WWE=999 \
ro.ril.enable.a52.HTC-ITA=1 \
@ -51,13 +52,23 @@ PRODUCT_PROPERTY_OVERRIDES += \
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
ro.ril.emc.mode=2 \
wifi.interface=wlan0 \
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
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=3
# Set default_france.acdb to audio_ctl driver if the ro.cid is HTC__203
PRODUCT_PROPERTY_OVERRIDES += ro.ril.enable.prl.recognition=1
# Reduce wifi scan. Better batery life
PRODUCT_PROPERTY_OVERRIDES += \
@ -96,7 +107,7 @@ PRODUCT_COPY_FILES += \
PRODUCT_PACKAGES += \
sensors.htcleo \
lights.htcleo \
gps.htcleo \
gps.htcleo
# Audio
PRODUCT_PACKAGES += \
@ -131,7 +142,7 @@ PRODUCT_PACKAGES += \
libhtc_ril_wrapper
# Omx cli test apps
PRODUCT_PACKAGES := \
PRODUCT_PACKAGES += \
libmm-omxcore \
mm-vdec-omx-test \
liblasic \
@ -186,11 +197,6 @@ PRODUCT_COPY_FILES += \
device/htc/leo/prebuilt/keylayout/htcleo-keypad.kcm.bin:system/usr/keychars/htcleo-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
# Touchscreen
PRODUCT_COPY_FILES += \
device/htc/leo/prebuilt/htcleo-touchscreen.idc:system/usr/idc/htcleo-touchscreen.idc

View File

@ -1,3 +1,10 @@
#!/bin/sh
#!/system/bin/sh
/bin/rm /etc/ppp/ppp0.pid
/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

View File

@ -1,48 +1,24 @@
#!/system/bin/sh
#/bin/touch /etc/ppp/ppp0.pid
#/bin/chmod 777 /etc/ppp/ppp0.pid
#author: cedesmith
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
PATH=/sbin:/system/sbin:/system/bin:/system/xbin
# Use interface name if linkname is not available
NAME=${LINKNAME:-$1}
setprop net.ppp0.dns1 $DNS1
setprop net.ppp0.dns2 $DNS2
/system/bin/touch /etc/ppp/ppp0.pid
/system/bin/chmod 777 /etc/ppp/ppp0.pid
/system/bin/echo $(pidof pppd) > /etc/ppp/ppp0.pid
#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
/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: `/system/xbin/ifconfig ppp0 | /system/xbin/grep 'inet addr:' | /system/xbin/cut -d':' -f2 | /system/xbin/cut -d' ' -f1`"
modem_log "Subnet : `/system/xbin/ifconfig ppp0 | /system/xbin/grep 'inet addr:' | /system/xbin/cut -d':' -f4 | /system/xbin/cut -d' ' -f1`"
modem_log "P-t-P : `/system/xbin/ifconfig ppp0 | /system/xbin/grep 'inet addr:' | /system/xbin/cut -d':' -f3 | /system/xbin/cut -d' ' -f1`"
modem_log "Done!"
sleep 1
/system/bin/setprop "net.dns1" "$DNS1"
/system/bin/setprop "net.dns2" "$DNS2"
# Tweak kernel low memory handling
echo 8 8 > /proc/sys/vm/lowmem_reserve_ratio
echo 8192 > /proc/sys/vm/min_free_kbytes

View File

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

View File

@ -1,72 +0,0 @@
#
# system.prop for leo
#
# RIL specific configuration
rild.libpath=/system/lib/libhtc_ril_wrapper.so
rild.libargs=-d /dev/smd0 nand_init
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.ril.enable.managed.roaming=1
ro.ril.oem.nosim.ecclist=911,112,113,115,117,999,000,08,118,120,122,110,119,995
ro.ril.emc.mode=2
# Time between scans in seconds. Keep it high to minimize battery drain.
# This only affects the case in which there are remembered access points,
# but none are in range.
wifi.interface=eth0
wifi.supplicant_scan_interval=15
# Default network type.
# 0 => WCDMA preferred.
ro.telephony.default_network=0
# Turn on checkjni for non-user builds.
ro.kernel.android.checkjni=1
# Set device insecure for non-user builds.
ro.secure=0
# Allow mock locations by default for non user builds
ro.allow.mock.location=1
# density in DPI of the LCD of this board. This is used to scale the UI
# appropriately. If this property is not defined, the default value is 240 dpi.
ro.sf.lcd_density=240
# All the interfaces which can use data on
#mobiledata.interfaces=rmnet0,rmnet1,rmnet2,ppp0
# This is a high density device with more memory, so larger vm heaps for it.
dalvik.vm.heapsize=32m
# leo have huge 250Mb unwritable system and small 50Mb cache .
dalvik.vm.dexopt-data-only=1
# The OpenGL ES API level that is natively supported by this device.
# This is a 16.16 fixed point number
ro.opengles.version=131072
ro.media.dec.jpeg.memcap=20000000
# AGPS options
ro.ril.def.agps.mode=2
# Show the correct dBm value
ro.telephony.ril.v3=1
# Disable HWAccel for now
ro.config.disable_hw_accel=true
# USB Mounting
persist.sys.usb.config=mass_storage,adb