Reconcile with ics-mr1-release

Change-Id: I59976252335ee94a0733882cce81648017f410bf
diff --git a/factory-images/generate-factory-images-package.sh b/factory-images/generate-factory-images-package.sh
new file mode 100755
index 0000000..ef5751e
--- /dev/null
+++ b/factory-images/generate-factory-images-package.sh
@@ -0,0 +1,80 @@
+#!/bin/sh
+
+# 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.
+
+# 223971 = ITL41D
+# 235179 = ICL53F
+
+PRODUCT=mysid
+DEVICE=toro
+BUILD=235179
+VERSION=icl53f
+BOOTLOADER=primekk15
+RADIO=i515.ek02
+CDMARADIO=i515.ek05
+
+rm -rf tmp
+mkdir -p tmp/$PRODUCT-$VERSION
+unzip -d tmp signed-$PRODUCT-target_files-$BUILD.zip RADIO/radio.img RADIO/bootloader.img
+if test "$CDMARADIO" != ""
+then
+  unzip -d tmp signed-$PRODUCT-target_files-$BUILD.zip RADIO/radio-cdma.img
+fi
+cp signed-$PRODUCT-img-$BUILD.zip tmp/$PRODUCT-$VERSION/image-$PRODUCT-$VERSION.zip
+cp tmp/RADIO/bootloader.img tmp/$PRODUCT-$VERSION/bootloader-$DEVICE-$BOOTLOADER.img
+cp tmp/RADIO/radio.img tmp/$PRODUCT-$VERSION/radio-$DEVICE-$RADIO.img
+if test "$CDMARADIO" != ""
+then
+  cp tmp/RADIO/radio-cdma.img tmp/$PRODUCT-$VERSION/radio-cdma-$DEVICE-$CDMARADIO.img
+fi
+cat > tmp/$PRODUCT-$VERSION/flash-all.sh << EOF
+#!/bin/sh
+
+# 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.
+
+fastboot flash bootloader bootloader-$DEVICE-$BOOTLOADER.img
+fastboot reboot-bootloader
+sleep 5
+fastboot flash radio radio-$DEVICE-$RADIO.img
+fastboot reboot-bootloader
+sleep 5
+EOF
+if test "$CDMARADIO" != ""
+then
+cat >> tmp/$PRODUCT-$VERSION/flash-all.sh << EOF
+fastboot flash radio-cdma radio-cdma-$DEVICE-$CDMARADIO.img
+fastboot reboot-bootloader
+sleep 5
+EOF
+fi
+cat >> tmp/$PRODUCT-$VERSION/flash-all.sh << EOF
+fastboot -w update image-$PRODUCT-$VERSION.zip
+EOF
+chmod a+x tmp/$PRODUCT-$VERSION/flash-all.sh
+(cd tmp ; tar zcvf ../$PRODUCT-$VERSION-factory.tgz $PRODUCT-$VERSION)
+mv $PRODUCT-$VERSION-factory.tgz $PRODUCT-$VERSION-factory-$(sha1sum < $PRODUCT-$VERSION-factory.tgz | cut -b -8).tgz
+rm -rf tmp
diff --git a/self-extractors/generate-packages.sh b/self-extractors/generate-packages.sh
index 8907879..f245db9 100755
--- a/self-extractors/generate-packages.sh
+++ b/self-extractors/generate-packages.sh
@@ -18,19 +18,28 @@
 # 201178 = IRL10B
 # 213821 = ICL26
 # 221202 = ICL39
-ZIP=mysid-ota-221202.zip
-BUILD=icl39
+# 236517 = IML70C
+# 237179 = IML73
+# 237867 = IML74B
+# 238432 = IML74E
+# 238649 = IML74G
+# 239410 = IML74K
+# 243892 = IMM06
+ZIP=mysid-ota-243892.zip
+BUILD=imm06
 ROOTDEVICE=toro
 DEVICE=toro
 MANUFACTURER=samsung
+VARIANT=vzw
 
-for COMPANY in broadcom csr imgtec invensense nxp samsung ti
+for COMPANY in broadcom csr imgtec invensense nxp samsung_$VARIANT ti
 do
   echo Processing files from $COMPANY
   rm -rf tmp
   FILEDIR=tmp/vendor/$COMPANY/$DEVICE/proprietary
   mkdir -p $FILEDIR
   mkdir -p tmp/vendor/$MANUFACTURER/$ROOTDEVICE
+  mkdir -p tmp/vendor/$MANUFACTURER/${ROOTDEVICE}_$VARIANT
   case $COMPANY in
   broadcom)
     TO_EXTRACT="\
@@ -70,7 +79,25 @@
             system/vendor/firmware/libpn544_fw.so \
             "
     ;;
-  samsung)
+  samsung_spr)
+    TO_EXTRACT="\
+            system/app/BIP.apk \
+            system/app/IMSFramework.apk \
+            system/app/RTN.apk \
+            system/app/SDM.apk \
+            system/app/SPG.apk \
+            system/app/SyncMLSvc.apk \
+            system/bin/fRom \
+            system/lib/lib_gsd4t.so \
+            system/lib/libsecril-client.so \
+            system/lib/libsyncml_core.so \
+            system/lib/libsyncml_port.so \
+            system/vendor/lib/libims_jni.so \
+            system/vendor/lib/libims.so \
+            system/vendor/lib/libsec-ril_lte.so \
+            "
+    ;;
+  samsung_vzw)
     TO_EXTRACT="\
             system/app/BIP.apk \
             system/app/IMSFramework.apk \
@@ -116,6 +143,7 @@
   cp -R $COMPANY/staging/* tmp/vendor/$COMPANY/$DEVICE || echo \ \ \ \ Error copying makefiles
   echo \ \ Setting up shared makefiles
   cp -R root/* tmp/vendor/$MANUFACTURER/$ROOTDEVICE || echo \ \ \ \ Error copying makefiles
+  cp -R root_$VARIANT/* tmp/vendor/$MANUFACTURER/${ROOTDEVICE}_$VARIANT || echo \ \ \ \ Error copying makefiles
   echo \ \ Generating self-extracting script
   SCRIPT=extract-$COMPANY-$DEVICE.sh
   cat PROLOGUE > tmp/$SCRIPT || echo \ \ \ \ Error generating script
diff --git a/self-extractors/root/device-vendor.mk b/self-extractors/root_spr/device-vendor.mk
similarity index 93%
copy from self-extractors/root/device-vendor.mk
copy to self-extractors/root_spr/device-vendor.mk
index 74d9a7b..45170c6 100644
--- a/self-extractors/root/device-vendor.mk
+++ b/self-extractors/root_spr/device-vendor.mk
@@ -19,5 +19,5 @@
 $(call inherit-product-if-exists, vendor/imgtec/$(LOCAL_STEM))
 $(call inherit-product-if-exists, vendor/invensense/$(LOCAL_STEM))
 $(call inherit-product-if-exists, vendor/nxp/$(LOCAL_STEM))
-$(call inherit-product-if-exists, vendor/samsung/$(LOCAL_STEM))
+$(call inherit-product-if-exists, vendor/samsung_spr/$(LOCAL_STEM))
 $(call inherit-product-if-exists, vendor/ti/$(LOCAL_STEM))
diff --git a/self-extractors/root/device-vendor.mk b/self-extractors/root_vzw/device-vendor.mk
similarity index 93%
rename from self-extractors/root/device-vendor.mk
rename to self-extractors/root_vzw/device-vendor.mk
index 74d9a7b..88f4f83 100644
--- a/self-extractors/root/device-vendor.mk
+++ b/self-extractors/root_vzw/device-vendor.mk
@@ -19,5 +19,5 @@
 $(call inherit-product-if-exists, vendor/imgtec/$(LOCAL_STEM))
 $(call inherit-product-if-exists, vendor/invensense/$(LOCAL_STEM))
 $(call inherit-product-if-exists, vendor/nxp/$(LOCAL_STEM))
-$(call inherit-product-if-exists, vendor/samsung/$(LOCAL_STEM))
+$(call inherit-product-if-exists, vendor/samsung_vzw/$(LOCAL_STEM))
 $(call inherit-product-if-exists, vendor/ti/$(LOCAL_STEM))
diff --git a/self-extractors/samsung/staging/reassemble-apks.sh b/self-extractors/samsung/staging/reassemble-apks.sh
deleted file mode 100755
index 7f4e9fd..0000000
--- a/self-extractors/samsung/staging/reassemble-apks.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-# 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.
-
-(cd vendor/samsung/toro/proprietary/BIP.apk.parts ; zip -r ../BIP.unsigned.apk .)
-java -jar $(find out/host -name signapk.jar) build/target/product/security/platform.x509.pem build/target/product/security/platform.pk8 vendor/samsung/toro/proprietary/BIP.unsigned.apk vendor/samsung/toro/proprietary/BIP.apk
-(cd vendor/samsung/toro/proprietary/IMSFramework.apk.parts ; zip -r ../IMSFramework.unsigned.apk .)
-java -jar $(find out/host -name signapk.jar) build/target/product/security/platform.x509.pem build/target/product/security/platform.pk8 vendor/samsung/toro/proprietary/IMSFramework.unsigned.apk vendor/samsung/toro/proprietary/IMSFramework.apk
-(cd vendor/samsung/toro/proprietary/SDM.apk.parts ; zip -r ../SDM.unsigned.apk .)
-java -jar $(find out/host -name signapk.jar) build/target/product/security/platform.x509.pem build/target/product/security/platform.pk8 vendor/samsung/toro/proprietary/SDM.unsigned.apk vendor/samsung/toro/proprietary/SDM.apk
-(cd vendor/samsung/toro/proprietary/SyncMLSvc.apk.parts ; zip -r ../SyncMLSvc.unsigned.apk .)
-java -jar $(find out/host -name signapk.jar) build/target/product/security/platform.x509.pem build/target/product/security/platform.pk8 vendor/samsung/toro/proprietary/SyncMLSvc.unsigned.apk vendor/samsung/toro/proprietary/SyncMLSvc.apk
diff --git a/self-extractors/samsung/COPYRIGHT b/self-extractors/samsung_spr/COPYRIGHT
similarity index 100%
rename from self-extractors/samsung/COPYRIGHT
rename to self-extractors/samsung_spr/COPYRIGHT
diff --git a/self-extractors/samsung/LICENSE b/self-extractors/samsung_spr/LICENSE
similarity index 100%
rename from self-extractors/samsung/LICENSE
rename to self-extractors/samsung_spr/LICENSE
diff --git a/self-extractors/samsung/staging/BoardConfigToro.mk b/self-extractors/samsung_spr/staging/BoardConfigToro.mk
similarity index 100%
rename from self-extractors/samsung/staging/BoardConfigToro.mk
rename to self-extractors/samsung_spr/staging/BoardConfigToro.mk
diff --git a/self-extractors/samsung/staging/device-toro.mk b/self-extractors/samsung_spr/staging/device-toro.mk
similarity index 96%
rename from self-extractors/samsung/staging/device-toro.mk
rename to self-extractors/samsung_spr/staging/device-toro.mk
index 7e449c7..ae24936 100644
--- a/self-extractors/samsung/staging/device-toro.mk
+++ b/self-extractors/samsung_spr/staging/device-toro.mk
@@ -12,7 +12,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-LOCAL_PATH := vendor/samsung/toro
+LOCAL_PATH := vendor/samsung_spr/toro
 
 # Samsung blob(s) necessary for toro hardware
 PRODUCT_COPY_FILES += \
diff --git a/self-extractors/samsung/staging/proprietary/Android.mk b/self-extractors/samsung_spr/staging/proprietary/Android.mk
similarity index 100%
rename from self-extractors/samsung/staging/proprietary/Android.mk
rename to self-extractors/samsung_spr/staging/proprietary/Android.mk
diff --git a/self-extractors/samsung_spr/staging/reassemble-apks.sh b/self-extractors/samsung_spr/staging/reassemble-apks.sh
new file mode 100755
index 0000000..953043d
--- /dev/null
+++ b/self-extractors/samsung_spr/staging/reassemble-apks.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+# 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.
+
+(cd vendor/samsung_spr/toro/proprietary/BIP.apk.parts ; zip -r ../BIP.unsigned.apk .)
+java -jar $(find out/host -name signapk.jar) build/target/product/security/platform.x509.pem build/target/product/security/platform.pk8 vendor/samsung_spr/toro/proprietary/BIP.unsigned.apk vendor/samsung_spr/toro/proprietary/BIP.apk
+(cd vendor/samsung_spr/toro/proprietary/IMSFramework.apk.parts ; zip -r ../IMSFramework.unsigned.apk .)
+java -jar $(find out/host -name signapk.jar) build/target/product/security/platform.x509.pem build/target/product/security/platform.pk8 vendor/samsung_spr/toro/proprietary/IMSFramework.unsigned.apk vendor/samsung_spr/toro/proprietary/IMSFramework.apk
+(cd vendor/samsung_spr/toro/proprietary/SDM.apk.parts ; zip -r ../SDM.unsigned.apk .)
+java -jar $(find out/host -name signapk.jar) build/target/product/security/platform.x509.pem build/target/product/security/platform.pk8 vendor/samsung_spr/toro/proprietary/SDM.unsigned.apk vendor/samsung_spr/toro/proprietary/SDM.apk
+(cd vendor/samsung_spr/toro/proprietary/SyncMLSvc.apk.parts ; zip -r ../SyncMLSvc.unsigned.apk .)
+java -jar $(find out/host -name signapk.jar) build/target/product/security/platform.x509.pem build/target/product/security/platform.pk8 vendor/samsung_spr/toro/proprietary/SyncMLSvc.unsigned.apk vendor/samsung_spr/toro/proprietary/SyncMLSvc.apk
diff --git a/self-extractors/samsung/COPYRIGHT b/self-extractors/samsung_vzw/COPYRIGHT
similarity index 100%
copy from self-extractors/samsung/COPYRIGHT
copy to self-extractors/samsung_vzw/COPYRIGHT
diff --git a/self-extractors/samsung/LICENSE b/self-extractors/samsung_vzw/LICENSE
similarity index 100%
copy from self-extractors/samsung/LICENSE
copy to self-extractors/samsung_vzw/LICENSE
diff --git a/self-extractors/samsung/staging/BoardConfigToro.mk b/self-extractors/samsung_vzw/staging/BoardConfigToro.mk
similarity index 100%
copy from self-extractors/samsung/staging/BoardConfigToro.mk
copy to self-extractors/samsung_vzw/staging/BoardConfigToro.mk
diff --git a/self-extractors/samsung/staging/device-toro.mk b/self-extractors/samsung_vzw/staging/device-toro.mk
similarity index 96%
copy from self-extractors/samsung/staging/device-toro.mk
copy to self-extractors/samsung_vzw/staging/device-toro.mk
index 7e449c7..2f548c9 100644
--- a/self-extractors/samsung/staging/device-toro.mk
+++ b/self-extractors/samsung_vzw/staging/device-toro.mk
@@ -12,7 +12,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-LOCAL_PATH := vendor/samsung/toro
+LOCAL_PATH := vendor/samsung_vzw/toro
 
 # Samsung blob(s) necessary for toro hardware
 PRODUCT_COPY_FILES += \
diff --git a/self-extractors/samsung/staging/proprietary/Android.mk b/self-extractors/samsung_vzw/staging/proprietary/Android.mk
similarity index 100%
copy from self-extractors/samsung/staging/proprietary/Android.mk
copy to self-extractors/samsung_vzw/staging/proprietary/Android.mk
diff --git a/self-extractors/samsung_vzw/staging/reassemble-apks.sh b/self-extractors/samsung_vzw/staging/reassemble-apks.sh
new file mode 100755
index 0000000..45c2dd1
--- /dev/null
+++ b/self-extractors/samsung_vzw/staging/reassemble-apks.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+# 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.
+
+(cd vendor/samsung_vzw/toro/proprietary/BIP.apk.parts ; zip -r ../BIP.unsigned.apk .)
+java -jar $(find out/host -name signapk.jar) build/target/product/security/platform.x509.pem build/target/product/security/platform.pk8 vendor/samsung_vzw/toro/proprietary/BIP.unsigned.apk vendor/samsung_vzw/toro/proprietary/BIP.apk
+(cd vendor/samsung_vzw/toro/proprietary/IMSFramework.apk.parts ; zip -r ../IMSFramework.unsigned.apk .)
+java -jar $(find out/host -name signapk.jar) build/target/product/security/platform.x509.pem build/target/product/security/platform.pk8 vendor/samsung_vzw/toro/proprietary/IMSFramework.unsigned.apk vendor/samsung_vzw/toro/proprietary/IMSFramework.apk
+(cd vendor/samsung_vzw/toro/proprietary/SDM.apk.parts ; zip -r ../SDM.unsigned.apk .)
+java -jar $(find out/host -name signapk.jar) build/target/product/security/platform.x509.pem build/target/product/security/platform.pk8 vendor/samsung_vzw/toro/proprietary/SDM.unsigned.apk vendor/samsung_vzw/toro/proprietary/SDM.apk
+(cd vendor/samsung_vzw/toro/proprietary/SyncMLSvc.apk.parts ; zip -r ../SyncMLSvc.unsigned.apk .)
+java -jar $(find out/host -name signapk.jar) build/target/product/security/platform.x509.pem build/target/product/security/platform.pk8 vendor/samsung_vzw/toro/proprietary/SyncMLSvc.unsigned.apk vendor/samsung_vzw/toro/proprietary/SyncMLSvc.apk