SDK: generate system-image.zip in sdk_repo

Also:
- in the images_*_source.props, we can't have the platform
  version name (the human readable string). It's not a valid
  property of the XML.
- disable the included-abi in the platform.

Change-Id: I3db62fde5e436bbe8f8e69eb1495ca4e6b954ba2
diff --git a/build/tools/mk_sdk_repo_xml.sh b/build/tools/mk_sdk_repo_xml.sh
index 496ee6c..3220d45 100755
--- a/build/tools/mk_sdk_repo_xml.sh
+++ b/build/tools/mk_sdk_repo_xml.sh
@@ -6,7 +6,7 @@
 
 PROG_DIR=$(dirname $0)
 
-TYPES="tool platform-tool platform sample doc add-on"
+TYPES="tool platform-tool platform sample doc add-on system-image"
 OSES="linux macosx windows any linux-x86 darwin"
 
 TMP_DIR=$(mktemp -d -t sdkrepo.tmp.XXXXXXXX)
@@ -151,7 +151,7 @@
 
 while [[ -n "$1" ]]; do
   # Process archives.
-  # First we expect a type. For conveniency the type can be plural.
+  # First we expect a type. For convenience the type can be plural.
   TYPE=$(check_enum "${1%%s}" $TYPES)
   [[ -z $TYPE ]] && error "Unknown archive type '$1'."
   shift
diff --git a/build/tools/sdk_repo.mk b/build/tools/sdk_repo.mk
index c709502..c49eefb 100644
--- a/build/tools/sdk_repo.mk
+++ b/build/tools/sdk_repo.mk
@@ -67,7 +67,7 @@
 $(eval $(call mk-sdk-repo-pkg-1,windows,$(WIN_SDK_ZIP),platform-tools))
 
 SDK_REPO_DEPS += \
-		$(call sdk-repo-pkg-zip,windows,$(WIN_SDK_ZIP),tools) \
+	$(call sdk-repo-pkg-zip,windows,$(WIN_SDK_ZIP),tools) \
         $(call sdk-repo-pkg-zip,windows,$(WIN_SDK_ZIP),platform-tools)
 
 endif
@@ -82,6 +82,7 @@
 $(eval $(call mk-sdk-repo-pkg-1,$(HOST_OS),$(MAIN_SDK_ZIP),docs))
 $(eval $(call mk-sdk-repo-pkg-2,$(HOST_OS),$(MAIN_SDK_ZIP),platforms))
 $(eval $(call mk-sdk-repo-pkg-2,$(HOST_OS),$(MAIN_SDK_ZIP),samples))
+$(eval $(call mk-sdk-repo-pkg-2,$(HOST_OS),$(MAIN_SDK_ZIP),system-images))
 
 SDK_REPO_DEPS += \
 		$(call sdk-repo-pkg-zip,$(HOST_OS),$(MAIN_SDK_ZIP),tools) \
@@ -89,6 +90,7 @@
 		$(call sdk-repo-pkg-zip,$(HOST_OS),$(MAIN_SDK_ZIP),docs) \
 		$(call sdk-repo-pkg-zip,$(HOST_OS),$(MAIN_SDK_ZIP),platforms) \
 		$(call sdk-repo-pkg-zip,$(HOST_OS),$(MAIN_SDK_ZIP),samples) \
+		$(call sdk-repo-pkg-zip,$(HOST_OS),$(MAIN_SDK_ZIP),system-images)
 
 endif
 
diff --git a/sdk/images_armeabi-v7a_source.properties b/sdk/images_armeabi-v7a_source.properties
index 50d4054..aa7d1aa 100644
--- a/sdk/images_armeabi-v7a_source.properties
+++ b/sdk/images_armeabi-v7a_source.properties
@@ -1,7 +1,6 @@
 Pkg.Desc=Android SDK Platform 4.0
 Pkg.UserSrc=false
-Platform.Version=4.0
 Pkg.Revision=1
 AndroidVersion.ApiLevel=14
-SystemImage.Abi=armeabi-v7a
 #AndroidVersion.CodeName=
+SystemImage.Abi=armeabi-v7a
diff --git a/sdk/images_armeabi_source.properties b/sdk/images_armeabi_source.properties
index 06cf392..192ecde 100644
--- a/sdk/images_armeabi_source.properties
+++ b/sdk/images_armeabi_source.properties
@@ -1,7 +1,6 @@
 Pkg.Desc=Android SDK Platform 4.0
 Pkg.UserSrc=false
-Platform.Version=4.0
 Pkg.Revision=1
 AndroidVersion.ApiLevel=14
-SystemImage.Abi=armeabi
 #AndroidVersion.CodeName=
+SystemImage.Abi=armeabi
diff --git a/sdk/images_x86_source.properties b/sdk/images_x86_source.properties
index 199f5c5..caccb2d 100644
--- a/sdk/images_x86_source.properties
+++ b/sdk/images_x86_source.properties
@@ -1,7 +1,6 @@
 Pkg.Desc=Android SDK Platform 4.0
 Pkg.UserSrc=false
-Platform.Version=4.0
 Pkg.Revision=1
 AndroidVersion.ApiLevel=14
-SystemImage.Abi=x86
 #AndroidVersion.CodeName=
+SystemImage.Abi=x86
diff --git a/sdk/platform_source.properties b/sdk/platform_source.properties
index 356fc97..8d64c73 100644
--- a/sdk/platform_source.properties
+++ b/sdk/platform_source.properties
@@ -1,6 +1,6 @@
 Pkg.Desc=Android SDK Platform 4.0
 Pkg.UserSrc=false
-Platform.IncludedAbi=armeabi
+#Platform.IncludedAbi= #sys-img is not bundled in platform
 Platform.Version=4.0
 Pkg.Revision=1
 Layoutlib.Api=4