Flash 4.3 WITHOUT losing losing data

Search This thread

Raghav Sood

Senior Member
Aug 4, 2012
63
100
New Delhi
www.appaholics.in
READ THE WARNING

READ THE ENTIRE POST

DETAILED INSTRUCTIONS AFTER FILE

I am not responsible for bricked devices, firings due to the alarm not going of, thermonuclear war caused by a missed phone call or anything that goes wrong because of this. Try at your own risk (it'll work if you do it right)

I just finished flashing the 4.3 Factory images without losing user data.

I was previously running 4.2.2 Stock unrooted, with an unlocked bootloader.

You can do this simply by taking the .sh or .bat file they provide and removing the
Code:
-w
flag from the
Code:
fastboot update
command

This is my modified flash-all.sh for a mac:

Code:
#!/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.

fastboot flash bootloader bootloader-mako-makoz20i.img
fastboot reboot-bootloader
sleep 5
fastboot flash radio radio-mako-m9615a-cefwmazm-2.0.1700.84.img
fastboot reboot-bootloader
sleep 5
fastboot update image-occam-jwr66v.zip

Prerequisites:

1. Download the file for flashing from here.
2. Make sure your bootloader is unlocked. If it is not, you will have to unlock it which WILL WIPE YOUR DEVICE. Wait for the OTA or make a backup somewhere if you like your data. If you want to unlock the bootloader use:

Code:
fastboot oem unlock

Detailed steps:

1. Extract the downloaded tgz. You should have the following files: bootloader-mako-makoz20i.img, flash-all.bat, flash-all.sh, flash-base.sh, image-occam-jwr66v.zip and radio-mako-m9615a-cefwmazm-2.0.1700.84.img.
2. Depending on your platform open either the flash-all.bat (Windows) or the flash-all.sh (UNIX/Linux/Mac) file in a text editor, and remove the -w flag from the last line.
3. Open a terminal, connect your device, enable USB Debugging and then:

Code:
adb reboot bootloader
sh flash-all.sh

JqMa6cJl.jpg
RNwbHqYl.png
WmjuGULl.jpg



WARNING: This will probably not work if you're running custom recoveries and/or custom ROMs. Having a rooted stock ROM should not be a problem, though you will almost definitely lose root
 
Last edited:

Triune

Senior Member
Jul 3, 2007
57
5
I just finished flashing the 4.3 Factory images without losing user data.

I was previously running 4.2.2 Stock unrooted, with an unlocked bootloader.

You can do this simply by taking the .sh or .bat file they provide and removing the
Code:
-w
flag from the
Code:
fastboot update
command

WARNING: This will probably not work if you're running custom recoveries and/or custom ROMs. Having a rooted stock ROM should not be a problem, though you will almost definitely lose root

I am sorry for the noob question, but I keep getting an "installation aborted" message when trying to flash the factory image. It's a .tgz file and in the past, i've only flashed .zip's. How do I flash that file?

Thanks
 

Raghav Sood

Senior Member
Aug 4, 2012
63
100
New Delhi
www.appaholics.in
I am sorry for the noob question, but I keep getting an "installation aborted" message when trying to flash the factory image. It's a .tgz file and in the past, i've only flashed .zip's. How do I flash that file?

Thanks

You'll have to ensure a couple of things:

Extract the tgz. You'll end up with a bunch of img, sh, zip and bat files. Depending on whether you're on Windows or Mac or Linux, you're going to want to run the flash-all.sh or flash-all.bat file. DO NOT RUN IT RIGHT AWAY. First edit it as shown in the Opening Post.

Also make sure that fastboot is in your PATH variable (you'll get an error saying fastboot is not a command if it isn't)
 

RASTAVIPER

Senior Member
May 2, 2011
3,798
833
I am sorry for the noob question, but I keep getting an "installation aborted" message when trying to flash the factory image. It's a .tgz file and in the past, i've only flashed .zip's. How do I flash that file?

Thanks
After unzipping with 7zip for example, you should have available
image-occam-jwr66v.zip

and other files like bootloader-mako-makoz20i.img and radio-mako-m9615a-cefwmazm-2.0.1700.84.img
 
  • Like
Reactions: Raghav Sood

Infinite104

Member
Apr 10, 2011
45
9
You'll have to ensure a couple of things:

Extract the tgz. You'll end up with a bunch of img, sh, zip and bat files. Depending on whether you're on Windows or Mac or Linux, you're going to want to run the flash-all.sh or flash-all.bat file. DO NOT RUN IT RIGHT AWAY. First edit it as shown in the Opening Post.

Also make sure that fastboot is in your PATH variable (you'll get an error saying fastboot is not a command if it isn't)

What do you exactly mean with make fastboot variable? I keep getting the fastboot error.
 

Triune

Senior Member
Jul 3, 2007
57
5
After unzipping with 7zip for example, you should have available
image-occam-jwr66v.zip

and other files like bootloader-mako-makoz20i.img and radio-mako-m9615a-cefwmazm-2.0.1700.84.img

I've extracted, but what i'm not understanding up to this point is how to flash it. Do you re-zip it then flash it through the stock recovery?
 

vickpick

Senior Member
May 2, 2011
380
85
Just a heads up, you have to unzip twice before u get to flash.bat

TGZ, then TAR.

---------- Post added at 09:38 PM ---------- Previous post was at 09:37 PM ----------

I've extracted, but what i'm not understanding up to this point is how to flash it. Do you re-zip it then flash it through the stock recovery?

no, you copy all the files into the fastboot folder (iincluding modified bat or sh), then run the bat or sh
Oh and phone should be in download mode and connected.

you don't use the recovery, just press your power down and power and connect when the black screen comes up.
 

Triune

Senior Member
Jul 3, 2007
57
5
Just a heads up, you have to unzip twice before u get to flash.bat

TGZ, then TAR.

---------- Post added at 09:38 PM ---------- Previous post was at 09:37 PM ----------



no, you copy all the files into the fastboot folder (iincluding modified bat or sh), then run the bat or sh
Oh and phone should be in download mode and connected.

you don't use the recovery, just press your power down and power and connect when the black screen comes up.

That's the difference, i'm in a mac. I don't have a fastboot folder. I wish Google would just release flashable zips. Smh
 

RASTAVIPER

Senior Member
May 2, 2011
3,798
833
I've extracted, but what i'm not understanding up to this point is how to flash it. Do you re-zip it then flash it through the stock recovery?
Check this:
- YOU MUST HAVE ADB & USB Driver for the device (I used the SDK file from google and PDAnet)
- ENABLE USB Debugging via Developer settings (press the build button 7 times to activate it the "settings --> about phone --> Build Number"

- Launch command prompt (start --> run --> "cmd")
- type in command prompt "cd directory where you have the adb & fast boot" for example here is mine "cd C:\Users\sdk\platform-tools"

- Type in the command prompt each step one at a time
"fastboot flash bootloader bootloader-mako-makoz20i.img"
"fastboot reboot-bootloader"
"fastboot flash radio radio-mako-m9615a-cefwmazm-2.0.1700.84.img"
"fastboot reboot-bootloader"
"fastboot update image-occam-jwr66v.zip"
 
  • Like
Reactions: philipepi

bioyuki

Senior Member
Dec 30, 2011
103
16
Will this work if we're on a stock 4.2.2 ROM but with LTE changes (older radio, edited build.prop and soc file?)
 

f.us

Senior Member
Feb 8, 2013
111
42
That's the difference, i'm in a mac. I don't have a fastboot folder. I wish Google would just release flashable zips. Smh

On a mac you should also have fastboot-mac in addition to fastboot.
Replace fastboot in the description with fastboot-mac and you shouldn't get any error messages
 

javier13javier

Senior Member
Nov 14, 2011
51
13
Check this:
- YOU MUST HAVE ADB & USB Driver for the device (I used the SDK file from google and PDAnet)
- ENABLE USB Debugging via Developer settings (press the build button 7 times to activate it the "settings --> about phone --> Build Number"

- Launch command prompt (start --> run --> "cmd")
- type in command prompt "cd directory where you have the adb & fast boot" for example here is mine "cd C:\Users\sdk\platform-tools"

- Type in the command prompt each step one at a time
"fastboot flash bootloader bootloader-mako-makoz20i.img"
"fastboot reboot-bootloader"
"fastboot flash radio radio-mako-m9615a-cefwmazm-2.0.1700.84.img"
"fastboot reboot-bootloader"
"fastboot update image-occam-jwr66v.zip"
Thats the same of deleting the -w and run the .bat on windows.

EDIT: Ok guys, this will work for windows (you have to install adb on your computer and have bootloader unlocked)
1- Remove the -w from the bat (with any editor), that came with the zip.
2- On cmd put adb reboot bootloader
3- Run the modified bat that dont have the -w, just wait and you will have 4.3.

Proof:
slh.png
 
Last edited:

noahk423

Senior Member
Sep 4, 2011
566
199
For me I had a custom recovery installed and custom rom, so at first I didn't wipe data. It did not boot. So I flashed twrp, and wiped data, not personal data though, and it booted.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 11
    READ THE WARNING

    READ THE ENTIRE POST

    DETAILED INSTRUCTIONS AFTER FILE

    I am not responsible for bricked devices, firings due to the alarm not going of, thermonuclear war caused by a missed phone call or anything that goes wrong because of this. Try at your own risk (it'll work if you do it right)

    I just finished flashing the 4.3 Factory images without losing user data.

    I was previously running 4.2.2 Stock unrooted, with an unlocked bootloader.

    You can do this simply by taking the .sh or .bat file they provide and removing the
    Code:
    -w
    flag from the
    Code:
    fastboot update
    command

    This is my modified flash-all.sh for a mac:

    Code:
    #!/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.
    
    fastboot flash bootloader bootloader-mako-makoz20i.img
    fastboot reboot-bootloader
    sleep 5
    fastboot flash radio radio-mako-m9615a-cefwmazm-2.0.1700.84.img
    fastboot reboot-bootloader
    sleep 5
    fastboot update image-occam-jwr66v.zip

    Prerequisites:

    1. Download the file for flashing from here.
    2. Make sure your bootloader is unlocked. If it is not, you will have to unlock it which WILL WIPE YOUR DEVICE. Wait for the OTA or make a backup somewhere if you like your data. If you want to unlock the bootloader use:

    Code:
    fastboot oem unlock

    Detailed steps:

    1. Extract the downloaded tgz. You should have the following files: bootloader-mako-makoz20i.img, flash-all.bat, flash-all.sh, flash-base.sh, image-occam-jwr66v.zip and radio-mako-m9615a-cefwmazm-2.0.1700.84.img.
    2. Depending on your platform open either the flash-all.bat (Windows) or the flash-all.sh (UNIX/Linux/Mac) file in a text editor, and remove the -w flag from the last line.
    3. Open a terminal, connect your device, enable USB Debugging and then:

    Code:
    adb reboot bootloader
    sh flash-all.sh

    JqMa6cJl.jpg
    RNwbHqYl.png
    WmjuGULl.jpg



    WARNING: This will probably not work if you're running custom recoveries and/or custom ROMs. Having a rooted stock ROM should not be a problem, though you will almost definitely lose root
    1
    Is the headphone output fixed? Does it sound louder than before?

    There doesn't seem to be any difference to me, but I have fairly crappy headphones.
    1
    Please make a tutorial more specific :)

    Editing the OP with more detailed instructions now
    1
    I am sorry for the noob question, but I keep getting an "installation aborted" message when trying to flash the factory image. It's a .tgz file and in the past, i've only flashed .zip's. How do I flash that file?

    Thanks
    After unzipping with 7zip for example, you should have available
    image-occam-jwr66v.zip

    and other files like bootloader-mako-makoz20i.img and radio-mako-m9615a-cefwmazm-2.0.1700.84.img
    1
    What do you exactly mean with make fastboot variable? I keep getting the fastboot error.

    fastboot is part of the developer tools, and Google assumes you have it in your PATH. The Cyanogen Wiki has a great page on how to set that up here