summaryrefslogtreecommitdiffstats
path: root/generate-factory-images-common.sh
diff options
context:
space:
mode:
Diffstat (limited to 'generate-factory-images-common.sh')
-rw-r--r--generate-factory-images-common.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/generate-factory-images-common.sh b/generate-factory-images-common.sh
index 3e07e3e..b7c959f 100644
--- a/generate-factory-images-common.sh
+++ b/generate-factory-images-common.sh
@@ -97,6 +97,12 @@ cat > tmp/$PRODUCT-$VERSION/flash-all.sh << EOF
# limitations under the License.
EOF
+if test "$UNLOCKBOOTLOADER" = "true"
+then
+cat >> tmp/$PRODUCT-$VERSION/flash-all.sh << EOF
+fastboot oem unlock
+EOF
+fi
if test "$ERASEALL" = "true"
then
cat >> tmp/$PRODUCT-$VERSION/flash-all.sh << EOF
@@ -166,6 +172,12 @@ cat > tmp/$PRODUCT-$VERSION/flash-all.bat << EOF
PATH=%PATH%;"%SYSTEMROOT%\System32"
EOF
+if test "$UNLOCKBOOTLOADER" = "true"
+then
+cat >> tmp/$PRODUCT-$VERSION/flash-all.bat << EOF
+fastboot oem unlock
+EOF
+fi
if test "$ERASEALL" = "true"
then
cat >> tmp/$PRODUCT-$VERSION/flash-all.bat << EOF