Create a gist now

Instantly share code, notes, and snippets.

A modified flash-all.sh from https://dl.google.com/dl/android/aosp/nakasi-jwr66v-factory-d341d356.tgz (the 4.3 factory image for the Nexus7) This has been modified not to wipe user data. Your bootloader MUST be unlocked. If you have to unlock your boot loader it will wipe your data making the use of this pointless....
#!/bin/sh
# Copyright 2012 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.
#
# MODIFIED BY James Finstrom for a no wipe flash.
# Please assume that I am not as smart as I think I am and backup
# I am not responsible for your use of this script.
# use this in conjunction with https://dl.google.com/dl/android/aosp/nakasi-jwr66v-factory-d341d356.tgz
#My boot loader is unlocked so I don't need this. If you do need this it will wipe your device
#fastboot oem unlock
fastboot erase boot
fastboot erase cache
fastboot erase recovery
fastboot erase system
#Google really wants to wipe your user data
#fastboot erase userdata
fastboot flash bootloader bootloader-grouper-4.23.img
fastboot reboot-bootloader
sleep 10
#the -w does well you guessed it wipes your data...
#fastboot -w update image-nakasi-jwr66v.zip
fastboot update image-nakasi-jwr66v.zip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment