summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Baptiste Queru <jbq@google.com>2012-06-26 09:37:01 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2012-06-26 09:37:01 -0700
commit106927eae4983cc28a699745eac305f1e48d890a (patch)
tree96b25e63d89cf1d493bf3b6be587dd525d4a7748
parent0840ed5176f0cf0a3b3bd53f1699dc8c94503d5a (diff)
parent9ceee5613b0474e97d0992550344ac02143206fa (diff)
downloaddevice_common-106927eae4983cc28a699745eac305f1e48d890a.zip
device_common-106927eae4983cc28a699745eac305f1e48d890a.tar.gz
device_common-106927eae4983cc28a699745eac305f1e48d890a.tar.bz2
am 9ceee561: Factory images: erase all partitions.
* commit '9ceee5613b0474e97d0992550344ac02143206fa': Factory images: erase all partitions.
-rw-r--r--clear-factory-images-variables.sh3
-rw-r--r--generate-factory-images-common.sh12
2 files changed, 15 insertions, 0 deletions
diff --git a/clear-factory-images-variables.sh b/clear-factory-images-variables.sh
index 312f195..e0c6758 100644
--- a/clear-factory-images-variables.sh
+++ b/clear-factory-images-variables.sh
@@ -17,8 +17,11 @@ unset BOOTLOADERFILE
unset BOOTLOADERSRC
unset BUILD
unset CDMARADIO
+unset DEVICE
+unset ERASE
unset PRODUCT
unset RADIO
unset RADIOSRC
+unset SLEEPDURATION
unset SRCPREFIX
unset VERSION
diff --git a/generate-factory-images-common.sh b/generate-factory-images-common.sh
index 5d06a09..a82e3d2 100644
--- a/generate-factory-images-common.sh
+++ b/generate-factory-images-common.sh
@@ -70,6 +70,18 @@ cat > tmp/$PRODUCT-$VERSION/flash-all.sh << EOF
# See the License for the specific language governing permissions and
# limitations under the License.
+EOF
+if test "$ERASEALL" = "true"
+then
+cat >> tmp/$PRODUCT-$VERSION/flash-all.sh << EOF
+fastboot erase boot
+fastboot erase cache
+fastboot erase recovery
+fastboot erase system
+fastboot erase userdata
+EOF
+fi
+cat >> tmp/$PRODUCT-$VERSION/flash-all.sh << EOF
fastboot flash bootloader bootloader-$DEVICE-$BOOTLOADER.img
fastboot reboot-bootloader
sleep $SLEEPDURATION