Merge branch 'tmp-branch' into HEAD
* tmp-branch:
FP2-90: european language support
FP2-84: remove the default build id
FP2-84: remove the default build id
FP2-033: Make OTA packages rollback-compatible
FP2-15: create Product ID for FP2 project
Conflicts:
core/build_id.mk
Change-Id: I521971c0df9567eadb9f29efaca7781012ad2fa8
diff --git a/core/Makefile b/core/Makefile
index a0938c3..a2183e1 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -1505,7 +1505,7 @@
$(INTERNAL_OTA_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE) $(DISTTOOLS)
@echo "Package OTA: $@"
$(hide) MKBOOTIMG=$(MKBOOTIMG) \
- ./build/tools/releasetools/ota_from_target_files -v \
+ ./build/tools/releasetools/ota_from_target_files -v -n \
--block \
-p $(HOST_OUT) \
-k $(KEY_CERT_PAIR) \
diff --git a/core/build_id.mk b/core/build_id.mk
index e59357b..5b02d98 100644
--- a/core/build_id.mk
+++ b/core/build_id.mk
@@ -18,4 +18,4 @@
# (like "CRB01"). It must be a single word, and is
# capitalized by convention.
-export BUILD_ID=LMY47D
+export BUILD_ID=FP2
diff --git a/envsetup.sh b/envsetup.sh
old mode 100644
new mode 100755
index d80e95c..ae628cf
--- a/envsetup.sh
+++ b/envsetup.sh
@@ -336,6 +336,29 @@
#
function chooseproduct()
{
+# Find the list of all products by looking for all AndroidProducts.mk files under the
+# device/, vendor/ and build/target/product/ directories and look for the format
+# LOCAL_DIR/<ProductSpecificFile.mk> and extract the name ProductSpecificFile from it.
+# This will give the list of all products that can be built using choosecombo
+ local -a prodlist
+
+# Find all AndroidProducts.mk files under the dirs device/, build/target/ and vendor/
+# Extract lines containing .mk from them
+# Extract lines containing LOCAL_DIR
+# Extract the name of the product specific file
+
+
+ prodlist=(`/usr/bin/find device/fairphone_devices device/qcom/msm8974 -name AndroidProducts.mk 2>/dev/null | \
+ xargs grep -h \.mk| grep LOCAL_DIR| cut -d'/' -f2|cut -d' ' -f1|sort|uniq|cut -d'.' -f1`)
+
+ local index=1
+ local p
+ echo "Product choices are:"
+ for p in ${prodlist[@]}
+ do
+ echo " $index. $p"
+ let "index = $index + 1"
+ done
if [ "x$TARGET_PRODUCT" != x ] ; then
default_value=$TARGET_PRODUCT
else
@@ -354,9 +377,16 @@
ANSWER=$1
fi
- if [ -z "$ANSWER" ] ; then
- export TARGET_PRODUCT=$default_value
- else
+ if [ -z "$ANSWER" ] ; then
+ export TARGET_PRODUCT=$default_value
+ elif (echo -n $ANSWER | grep -q -e "^[0-9][0-9]*$") ; then
+ local poo=`echo -n $ANSWER`
+ if [ $poo -le ${#prodlist[@]} ] ; then
+ export TARGET_PRODUCT=${prodlist[$(($ANSWER-1))]}
+ else
+ echo "** Bad product selection: $ANSWER"
+ fi
+ else
if check_product $ANSWER
then
export TARGET_PRODUCT=$ANSWER
diff --git a/target/product/locales_full.mk b/target/product/locales_full.mk
index 3a90d2b..7c5e2a5 100644
--- a/target/product/locales_full.mk
+++ b/target/product/locales_full.mk
@@ -1,3 +1,3 @@
-PRODUCT_LOCALES := en_US cs_CZ da_DK de_AT de_CH de_DE de_LI el_GR en_AU en_CA en_GB en_NZ en_SG eo_EU es_ES fr_CA fr_CH fr_BE fr_FR it_CH it_IT ja_JP ko_KR nb_NO nl_BE nl_NL pl_PL pt_PT ru_RU sv_SE tr_TR zh_CN zh_HK zh_TW am_ET hi_IN
+PRODUCT_LOCALES := en_US cs_CZ da_DK de_AT de_CH de_DE de_LI el_GR en_GB eo_EU fr_CA fr_CH fr_BE fr_FR it_CH it_IT nb_NO es_ES et_EE nl_NL pl_PL pt_PT ru_RU sv_SE tr_TR bg_BG ca_ES fi_FI hr_HR hu_HU lt_LT lv_LV ro_RO sk_SK sl_SI sr_RS uk_UA en_XA si_LK is_IS mk_MK eu_ES gl_ES nl_BE
-$(call inherit-product, build/target/product/languages_full.mk)
+#$(call inherit-product, build/target/product/languages_full.mk)