Merge "one: Add Geeksphone ONE product" into froyo
diff --git a/CHANGELOG.mkdn b/CHANGELOG.mkdn
index 8f46b21..1f39fa2 100644
--- a/CHANGELOG.mkdn
+++ b/CHANGELOG.mkdn
@@ -15,8 +15,7 @@
 * Droid: Koush
 * Dream/Sapphire: Cyanogen
 * Hero: Lox (GSM), Darchstar (CDMA)
-* Desire: Kali-, Defer
-* DesireC: Kali-, Defer
+* Desire (GSM/CDMA): Kali-, Defer
 * Incredible: Koush
 * Espresso (Slide): Wes Garner, Chris Soyars, Cyanogen
 * Supersonic (EVO): Cyanogen, toastcfh
@@ -24,6 +23,17 @@
 * Legend: Alexander Hofbauer
 * Vision: Cyanogen
 
+Translators:
+------------
+* German: Matthias Büchner, Alexander Hofbauer, Sebastian K (DerSeppel)
+* Italian: Eugenio Ziliotto, Giulio Cervera
+* Japanese: Takuo Kitame
+* French: Sébastien Vaucher, David Girault
+* Chinese: comercy
+* Russian: Oleg Krikun
+* Portuguese: Eduardo Martins
+* Spanish: PeRiJeY
+
 CHANGELOG
 ---------
 ### 6.1.0
@@ -66,7 +76,8 @@
 * Common: Enabled Sound Recorder app
 * Common: Bluetooth OBEX performance boost - Sony
 * Common: Updated Terminal Emulator app - Jack Palevich
-* N1/Bravo/Supersonic: FM Radio support - MIUI - http://miui.com (graphics from Fitsnugly and HaXzAmaTiC)
+* Common: Updated headset drawables - blunden
+* N1/Bravo/Supersonic: FM Radio support - MIUI - http://miui.com (graphics from Fitsnugly, HaXzAmaTiC, and blunden)
 * N1/DS - Kernel 2.6.35 based on Pershoot's repository
 * DS: Updated hardware drivers from official release
 * DS: CompCache sizes can be adjusted through CMParts - Wes Garner
@@ -108,7 +119,6 @@
 * Common: Enhanced accelerometer settings - Jonas Larsson
 * Common: A2DP bugfixes - Glenn Maynard
 * Common: Browser fullscreen mode and other enhancements - Wysie
-* Common: Translations: Takuo Kitame, Matthias Büchner, Eug89, comercy
 * Common: Major build system enhancements by Chris Soyars & Koush
 * Common: Long press volume buttons to skip songs - Jon Boekenoogen
 * Common: Accelerated ARMv7 JPEG and PNG decoding - Qualcomm
diff --git a/extract-gapps-files b/extract-gapps-files
new file mode 100755
index 0000000..ef99e52
--- /dev/null
+++ b/extract-gapps-files
@@ -0,0 +1,30 @@
+#!/bin/bash
+#
+# Extract gapps files from downloaded zip file.
+#
+# Just a replacement for get-google-files script.
+#
+
+usage() {
+    cat << EOF
+Usage: $0 <path-to-gapp-zip-file>
+EOF
+}
+
+if [ $# -lt 1 ]; then
+    usage
+    exit 1
+fi
+
+GAPPS="$1"
+
+cd `dirname $0`
+
+mkdir -p proprietary
+mkdir tmp
+
+unzip -q -o -d tmp $GAPPS
+
+find tmp/system -type f -exec mv -v -f {} proprietary/ \;
+
+rm -rf tmp
diff --git a/get-google-files b/get-google-files
index ddd8d5d..3b4c822 100755
--- a/get-google-files
+++ b/get-google-files
@@ -13,7 +13,7 @@
 
 def download(version):
     try:
-        os.makedirs("proprietary")
+        os.makedirs(os.path.join(os.path.dirname(__file__), "proprietary"))
     except:
         pass
     if len(MIRRORS) > 1:
diff --git a/overlay/heroc/packages/apps/Gallery3D/res/values/config.xml b/overlay/heroc/packages/apps/Gallery3D/res/values/config.xml
index 819a044..2e332f5 100644
--- a/overlay/heroc/packages/apps/Gallery3D/res/values/config.xml
+++ b/overlay/heroc/packages/apps/Gallery3D/res/values/config.xml
@@ -16,7 +16,6 @@
 
 <resources>
 
-    <bool name="reload_on_orientation_change">true</bool>
     <integer name="max_resolution">1024</integer>
     <integer name="max_resolution_screennail">512</integer>
 
diff --git a/prebuilt/common/etc/apns-conf.xml b/prebuilt/common/etc/apns-conf.xml
index bc30983..8521162 100644
--- a/prebuilt/common/etc/apns-conf.xml
+++ b/prebuilt/common/etc/apns-conf.xml
@@ -999,8 +999,8 @@
   <apn carrier="Vodafone QA MMS" mcc="427" mnc="02" apn="vodafone.com.qa" mmsc="http://mms.vodafone.com.qa/mmsc" mmsproxy="10.101.97.102" mmsport="80" type="mms" />
   <apn carrier="Vodafone QA" mcc="427" mnc="02" apn="web.vodafone.com.qa" type="default,supl" />
   <apn carrier="MTS UZ" mcc="434" mnc="07" apn="net.mts.uz" user="mts" password="mts" type="default,supl" />
-  <apn carrier="mopera" mcc="440" mnc="10" apn="mopera.net" type="default,supl,mms" />
-  <apn carrier="NTT Docomo" mcc="440" mnc="10" apn="mpr2.bizho.net" type="default,supl,mms" />
+  <apn carrier="NTT Docomo(bizho)" mcc="440" mnc="10" apn="mpr2.bizho.net" type="default,supl,mms" />
+  <apn carrier="NTT Docomo(mopera)" mcc="440" mnc="10" apn="mopera.net" type="default,supl,mms" />
   <apn carrier="Softbank(open)" mcc="440" mnc="20" apn="open.softbank.ne.jp" user="opensoftbank" password="ebMNuX1FIHg9d3DA" mmsc="http://mms/" mmsproxy="mmsopen.softbank.ne.jp" mmsport="8080" type="default,supl,mms" />
   <apn carrier="Softbank(smile.world)" mcc="440" mnc="20" apn="smile.world" user="dna1trop" password="so2t3k3m2a" mmsc="http://mms/" mmsproxy="smilemms.softbank.ne.jp" mmsport="8080" type="default,supl,mms" />
   <apn carrier="SKT3G" mcc="450" mnc="05" apn="web.sktelecom.com" mmsc="http://omms.nate.com:9082/oma_mms" mmsproxy="smart.nate.com" mmsport="9093" type="default,supl,mms" />
diff --git a/products/cyanogen_bravo.mk b/products/cyanogen_bravo.mk
index 9089bdd..ef535df 100644
--- a/products/cyanogen_bravo.mk
+++ b/products/cyanogen_bravo.mk
@@ -17,6 +17,11 @@
 PRODUCT_MANUFACTURER := HTC
 PRODUCT_BUILD_PROP_OVERRIDES += BUILD_ID=FRF91 BUILD_DISPLAY_ID=FRG83 PRODUCT_NAME=htc_bravo BUILD_FINGERPRINT=htc_wwe/htc_bravo/bravo/bravo:2.2/FRF91/226611:user/release-keys TARGET_BUILD_TYPE=userdebug BUILD_VERSION_TAGS=release-keys PRIVATE_BUILD_DESC="2.10.405.2 CL226611 release-keys"
 
+# Build kernel
+PRODUCT_SPECIFIC_DEFINES += TARGET_PREBUILT_KERNEL=
+PRODUCT_SPECIFIC_DEFINES += TARGET_KERNEL_DIR=kernel-msm
+PRODUCT_SPECIFIC_DEFINES += TARGET_KERNEL_CONFIG=cyanogen_bravo_defconfig
+
 # Include the Torch and FM apps
 PRODUCT_PACKAGES += \
     Torch \
diff --git a/products/cyanogen_bravoc.mk b/products/cyanogen_bravoc.mk
index a43c0dc..5acdb64 100644
--- a/products/cyanogen_bravoc.mk
+++ b/products/cyanogen_bravoc.mk
@@ -14,6 +14,11 @@
 PRODUCT_MANUFACTURER := HTC
 PRODUCT_BUILD_PROP_OVERRIDES += BUILD_ID=FRF91 BUILD_DISPLAY_ID=FRG83 PRODUCT_NAME=htc_bravo BUILD_FINGERPRINT=htc_wwe/htc_bravo/bravo/bravo:2.2/FRF91/226611:user/release-keys TARGET_BUILD_TYPE=userdebug BUILD_VERSION_TAGS=release-keys PRIVATE_BUILD_DESC="2.10.405.2 CL226611 release-keys"
 
+# Build kernel
+PRODUCT_SPECIFIC_DEFINES += TARGET_PREBUILT_KERNEL=
+PRODUCT_SPECIFIC_DEFINES += TARGET_KERNEL_DIR=kernel-msm
+PRODUCT_SPECIFIC_DEFINES += TARGET_KERNEL_CONFIG=cyanogen_bravoc_defconfig
+
 # Include the Torch app
 PRODUCT_PACKAGES += Torch
 
diff --git a/products/cyanogen_inc.mk b/products/cyanogen_inc.mk
index 93789de..547c4f0 100644
--- a/products/cyanogen_inc.mk
+++ b/products/cyanogen_inc.mk
@@ -18,6 +18,12 @@
 # Extra Passion overlay
 PRODUCT_PACKAGE_OVERLAYS += vendor/cyanogen/overlay/inc
 
+# Include the FM Radio
+PRODUCT_PACKAGES += FM
+# Include the Flashlight/Torch
+PRODUCT_PACKAGES += Torch
+
+
 #
 # Set ro.modversion
 #
diff --git a/tools/squisher b/tools/squisher
index 9629fa8..2f2c1a8 100755
--- a/tools/squisher
+++ b/tools/squisher
@@ -9,9 +9,13 @@
 then
    OUT_TARGET_HOST=linux-x86
    MD5=md5sum
+   XARGS="xargs --max-args=1 --max-procs `grep 'processor' /proc/cpuinfo|wc -l`"
+   SED=sed
 else
    OUT_TARGET_HOST=darwin-x86
    MD5=md5
+   XARGS="xargs -n 1 -P `sysctl hw.ncpu | awk '{print $2}'`"
+   SED=gsed
 fi
 
 if [ -z "$OUT" -o ! -d "$OUT" ]; then
@@ -76,7 +80,7 @@
 cd $REPACK/ota/system/framework
 $OPTICHARGER framework-res.apk
 cd $REPACK/ota/system/app
-find ./ -name \*.apk | xargs  --max-args=1 --max-procs=`grep 'processor' /proc/cpuinfo | wc -l`  $OPTICHARGER
+find ./ -name \*.apk | $XARGS $OPTICHARGER
 )
 
 
@@ -105,12 +109,12 @@
 	chmod 444 $REPACK/ota/system/xbin/xbin.sqf
 
 	# Remove xbin stuff and fix up updater-script
-	sed -i -e's,system/xbin/su,system/bin/su,g' -e'/xbin/d' $updater
+	$SED -i -e's,system/xbin/su,system/bin/su,g' -e'/xbin/d' $updater
 fi
 
 
 # Fix build.prop
-sed -i \
+$SED -i \
 	-e '/ro\.kernel\.android\.checkjni/d' \
 	-e '/ro\.build\.type/s/eng/user/' \
 	$REPACK/ota/system/build.prop