[GUIDE] Flashing Stock Factory img.

gargleblarg

Senior Member
Aug 31, 2014
165
126
0
This should help you get back to stock. I was stuck in a bootloop after making a change to the System folder and pieced these steps together, I've simplified the guide with some helpful tips from @pbanj and @mac796.
Please use this at your own risk.

This guide assumes you have a phone with an unlocked bootloader and a PC with usb drivers, adb, and fastboot.
I would never recommend downgrading, ie: if you are sporting the Q beta, don't try to go back to Pie.

-[url]https://developers.google.com/android/images#sargo[/URL] is the place you snag your factory image. Sargo is for the 3a, make sure you choose the correct image

-Check the SHA-256 checksum. (It will save you one day)

-Unzip the folder

-Place your phone in fastboot mode (Vol Dwn + Power)

-Connect your phone to your PC

-Open Command Prompt

-Make sure your phone is connected by typing:
Code:
fastboot devices
-Open your recently unzipped file and find the "flash-all.bat". (If you want to preserve internal data, remove the "-w" by editing the batch file)

-Double click "flash-all.bat".

-BE PATIENT. Don't touch it until your command prompt says "Press any key to exit..."

I'm no expert, feel free to PM for changes or recommendations.
 
Last edited:

mac796

Senior Member
Aug 20, 2014
1,235
397
83
Long Beach
Yep just double click the batch file, I would remove the-w first. Only reason you would need to wipe it completely is if you got the corrupt system message. Other than that, I wouldn't wipe internal
 
  • Like
Reactions: gargleblarg

gargleblarg

Senior Member
Aug 31, 2014
165
126
0
This is for people with unlocked bootloader. How about for people on T-Mobile with locked bootloader like myself. Is there anyway I can go back to stock (pie)?
I assume you are stuck until you are able to unlock the bootloader.
 
Last edited:

Idiyeet

Member
May 20, 2019
24
3
0
Can you unlock the bootloader on the T-Mobile variant of the 3A if it is a purchased device and not financed? Or do I have to unlock the SIM or what..?
 

mac796

Senior Member
Aug 20, 2014
1,235
397
83
Long Beach
Is it possible to re-lock the bootloader after flashing the Factory Image? I have to sent it back in RMA
Yeah just reverse the steps you did when you unlocked it. Make sure your On stock before you do it. I've sent a few phones back to Google for warranty and I've never worried about locking the bootloader back up

Edit. I want to say the first one I sent back I locked until people told me it didn't matter
 
  • Like
Reactions: capitanouncino

tcshaddix

New member
Aug 30, 2019
4
0
0
So I double click on the batch file and get this bit about archive does not contain 'boot.sig' or 'recovery.img' towards the bottom, is that supposed to be there, or is there a reason it's not seeing the files?

"target reported max download size of 268435456 bytes
sending 'bootloader' (8349 KB)...
OKAY [ 0.314s]
writing 'bootloader'...
(bootloader) Flashing Pack version b4s4-0.1-5653622
(bootloader) Flashing partition table for Lun = 0
(bootloader) Flashing partition xbl_a
(bootloader) Flashing partition xbl_config_a
(bootloader) Flashing partition tz_a
(bootloader) Flashing partition aop_a
(bootloader) Flashing partition hyp_a
(bootloader) Flashing partition keymaster_a
(bootloader) Flashing partition cmnlib_a
(bootloader) Flashing partition cmnlib64_a
(bootloader) Flashing partition abl_a
(bootloader) Flashing partition devcfg_a
(bootloader) Flashing partition qupfw_a
(bootloader) Flashing partition storsec_a
OKAY [ 0.546s]
finished. total time: 0.862s
rebooting into bootloader...
OKAY [ 0.049s]
finished. total time: 0.050s
target reported max download size of 268435456 bytes
sending 'radio' (72988 KB)...
OKAY [ 1.985s]
writing 'radio'...
(bootloader) Flashing Pack version SSD:g670-00011-190411-B-5457439
(bootloader) Flashing partition modem_a
OKAY [ 0.555s]
finished. total time: 2.541s
rebooting into bootloader...
OKAY [ 0.050s]
finished. total time: 0.050s
target reported max download size of 268435456 bytes
archive does not contain 'boot.sig'
archive does not contain 'recovery.img'
failed to allocate -1904684752 bytes
error: update package missing system.img
Press any key to exit..."
 

Archangel

Recognized Themer
Jul 14, 2010
6,639
14,174
263
Reno, NV
Make sure you are extracting the factory image zip into a folder then extract the image zip into the same folder. That folder has the files you need

So I double click on the batch file and get this bit about archive does not contain 'boot.sig' or 'recovery.img' towards the bottom, is that supposed to be there, or is there a reason it's not seeing the files?

"target reported max download size of 268435456 bytes
sending 'bootloader' (8349 KB)...
OKAY [ 0.314s]
writing 'bootloader'...
(bootloader) Flashing Pack version b4s4-0.1-5653622
(bootloader) Flashing partition table for Lun = 0
(bootloader) Flashing partition xbl_a
(bootloader) Flashing partition xbl_config_a
(bootloader) Flashing partition tz_a
(bootloader) Flashing partition aop_a
(bootloader) Flashing partition hyp_a
(bootloader) Flashing partition keymaster_a
(bootloader) Flashing partition cmnlib_a
(bootloader) Flashing partition cmnlib64_a
(bootloader) Flashing partition abl_a
(bootloader) Flashing partition devcfg_a
(bootloader) Flashing partition qupfw_a
(bootloader) Flashing partition storsec_a
OKAY [ 0.546s]
finished. total time: 0.862s
rebooting into bootloader...
OKAY [ 0.049s]
finished. total time: 0.050s
target reported max download size of 268435456 bytes
sending 'radio' (72988 KB)...
OKAY [ 1.985s]
writing 'radio'...
(bootloader) Flashing Pack version SSD:g670-00011-190411-B-5457439
(bootloader) Flashing partition modem_a
OKAY [ 0.555s]
finished. total time: 2.541s
rebooting into bootloader...
OKAY [ 0.050s]
finished. total time: 0.050s
target reported max download size of 268435456 bytes
archive does not contain 'boot.sig'
archive does not contain 'recovery.img'
failed to allocate -1904684752 bytes
error: update package missing system.img
Press any key to exit..."
 

tcshaddix

New member
Aug 30, 2019
4
0
0
Make sure you are extracting the factory image zip into a folder then extract the image zip into the same folder. That folder has the files you need
Same thing happens after extracting them into the same folder. Not sure why it doesn't seem to see a file right next to the flash file.