DEBRICK IMAGES - Hardbrick recovery plan

Lightn1ng

Senior Member
Mar 31, 2015
1,879
715
0
Washington, D.C.
With all the random qhsusb_bulk hardbricks coming around, I've decided to create a thread to share debrick.img files just in case. You do not need to create this, but if you ever need it, you'll be glad you did.

EXPLANATION:

If you ever HARDBRICK your phone, which can be caused by flashing an incompatible ROM, bad bootloader flash, or anything, your processor will fallback into a mode called USB_BULK mode. In this mode, it will await an SD card with a special image flashed to it, called debrick.img, and boot to that. Once booted from the SDcard, it will await a firmware flash from a computer (download mode.)
However, this image needs to be specific to the bootloader version the phone was running before the hardbrick occured. That's why I've created this thread: people on different bootloaders can share their debrick images.

HOW TO MAKE ONE:

Flash this in TWRP/FlashFire/SafeStrap
Your debrick.img (may be named something else, look for the .img at the end) will be in your external SD card and share it here please for others who may need it
BACK THIS UP EVERYWHERE. Google drive, dropbox, mediafire, everywhere. DO NOT loose this.

HOW TO USE ONE:

If you ever have the unfortunate luck of needing to use a debrick image, here's what to do:

-Download Win32DiskImager
-Put your microsd into your PC (yes you will need an adapter in some cases)
-Use Win32DiskImager to write the debrick.img to the SD card
-Take battery out of phone
-Put the SDcard into the phone and put the battery back in
-Do Vol Dn+Power+Home
-Your device should boot into Download Mode, and you should see "SDCARD MODE" at the top right
-Flash stock firmware using Odin

Downloads will be added to the 2nd post
 
Last edited:
  • Like
Reactions: budies3

al50

Senior Member
Apr 7, 2013
874
241
63
Down South
Great thread to start!! Question, if i'm running PB1 firmware/kernel but I haven't taken any OTA's passed OC4. Would my debrick img be of the OC4 bootloader? Or do I need to flash the OC4 firmware/kernel to where everything is of OC4? This question may help people who are unsure of what's what.
 

Lightn1ng

Senior Member
Mar 31, 2015
1,879
715
0
Washington, D.C.
Great thread to start!! Question, if i'm running PB1 firmware/kernel but I haven't taken any OTA's passed OC4. Would my debrick img be of the OC4 bootloader? Or do I need to flash the OC4 firmware/kernel to where everything is of OC4? This question may help people who are unsure of what's what.
It is completely based on bootloader version. You can use "Phone Info - Samsung" to confirm before creating an image.
 

sean19661

Senior Member
Feb 8, 2011
577
68
58
This is great would be nice if you could create Bod5 img for us who are still able to downgrade

Sent from my SM-G900V using Tapatalk
 

ben_pr

Member
Aug 8, 2015
5
0
0
Your debrick.img (may be named something else, look for the .img at the end) will be in your external SD card
Just for clarification, your script doesn't create a file ending in .img:

Code:
#Unbrick-Creator.zip\tools\Unbrick.sh: Line 5
mv /external_sd/Unbrick_Files/200MB.img.gz /external_sd/Unbrick_Files/Unbrick_IMG.gz;
 

Lightn1ng

Senior Member
Mar 31, 2015
1,879
715
0
Washington, D.C.
Just for clarification, your script doesn't create a file ending in .img:

Code:
#Unbrick-Creator.zip\tools\Unbrick.sh: Line 5
mv /external_sd/Unbrick_Files/200MB.img.gz /external_sd/Unbrick_Files/Unbrick_IMG.gz;
yes but if you use an archiving program like winrar to open it there is a file called 200mb.img inside and that is the debrick image
 

ben_pr

Member
Aug 8, 2015
5
0
0
yes but if you use an archiving program like winrar to open it there is a file called 200mb.img inside and that is the debrick image
The file inside the archive just takes the name of the archive and excludes the ".gz". Since your script renames the file from "200mb.img.gz" to "Unbrick_IMG.gz", the file within the archive is simply named "Unbrick_IMG" and does not have an extension.

I can change the name of the archive to "Unbrick_IMG.img.gz", then extracting it results in a ".img" as expected. However, with the script you posted, users will have to do this last step manually. You could either not change the name in the script, or have the script include the ".img" to save users this last step.
 

Lightn1ng

Senior Member
Mar 31, 2015
1,879
715
0
Washington, D.C.
The file inside the archive just takes the name of the archive and excludes the ".gz". Since your script renames the file from "200mb.img.gz" to "Unbrick_IMG.gz", the file within the archive is simply named "Unbrick_IMG" and does not have an extension.

I can change the name of the archive to "Unbrick_IMG.img.gz", then extracting it results in a ".img" as expected. However, with the script you posted, users will have to do this last step manually. You could either not change the name in the script, or have the script include the ".img" to save users this last step.
the non-extended extracted "UNBRICK_IMG" is the image file and simply adding .img to it will allow it to be flashed
 

ben_pr

Member
Aug 8, 2015
5
0
0
the non-extended extracted "UNBRICK_IMG" is the image file and simply adding .img to it will allow it to be flashed
Yes, sorry, but the reason I'm pointing this out is so that you might update the original post to accurately reflect the process.

HOW TO MAKE ONE:

Flash this in TWRP/FlashFire/SafeStrap
Your debrick.img (may be named something else, look for the .img at the end) will be in your external SD card and share it here please for others who may need it
BACK THIS UP EVERYWHERE. Google drive, dropbox, mediafire, everywhere. DO NOT loose this.
People shouldn't be looking for a file ending in ".img", and they will also need to extract then rename "Unbrick_IMG.gz". Ideally, whoever created the Unbrick-Creator.zip should just fix the script inside and update the link. I'm not sure why the zipped file gets renamed at all, nor why the original image is called "200mb.img" instead of the expected "debrick.img".

The script could just look like this:
Code:
#!/sbin/sh
mkdir -p /external_sd/Unbrick_Files/;

# Changing name of image from 200MB.img to debrick.img
# dd if=/dev/block/mmcblk0 of=/external_sd/Unbrick_Files/200MB.img bs=4096 count=50000; # Original
dd if=/dev/block/mmcblk0 of=/external_sd/Unbrick_Files/debrick.img bs=4096 count=50000; # Modified

busybox gzip /external_sd/Unbrick_Files/*;

# Removing the rename command
# mv /external_sd/Unbrick_Files/200MB.img.gz /external_sd/Unbrick_Files/Unbrick_IMG.gz;

chmod -R 777 /external_sd/Unbrick_Files
Then, to get the image file, the user simply needs to connect their phone, navigate to the "Unbrick_Files" folder, copy "debrick.img.gz" to their computer, and unzip the archive.
 

Lightn1ng

Senior Member
Mar 31, 2015
1,879
715
0
Washington, D.C.
Yes, sorry, but the reason I'm pointing this out is so that you might update the original post to accurately reflect the process.



People shouldn't be looking for a file ending in ".img", and they will also need to extract then rename "Unbrick_IMG.gz". Ideally, whoever created the Unbrick-Creator.zip should just fix the script inside and update the link. I'm not sure why the zipped file gets renamed at all, nor why the original image is called "200mb.img" instead of the expected "debrick.img".

The script could just look like this:
Code:
#!/sbin/sh
mkdir -p /external_sd/Unbrick_Files/;

# Changing name of image from 200MB.img to debrick.img
# dd if=/dev/block/mmcblk0 of=/external_sd/Unbrick_Files/200MB.img bs=4096 count=50000; # Original
dd if=/dev/block/mmcblk0 of=/external_sd/Unbrick_Files/debrick.img bs=4096 count=50000; # Modified

busybox gzip /external_sd/Unbrick_Files/*;

# Removing the rename command
# mv /external_sd/Unbrick_Files/200MB.img.gz /external_sd/Unbrick_Files/Unbrick_IMG.gz;

chmod -R 777 /external_sd/Unbrick_Files
Then, to get the image file, the user simply needs to connect their phone, navigate to the "Unbrick_Files" folder, copy "debrick.img.gz" to their computer, and unzip the archive.
Good point. I will update the OP later. This is not my package btw :p
 
A

akaplo

Guest
Could someone who has updated to the PD1 bootloader post an unbrick.img for that please?

I attempted to update; flashed the PD1 stock ROM and bootloader in muniz_ri's updated thread and ended up in a soft brick, so I decided to try a full stock PB1 reset, but something went horribly wrong and I'm currently in a hard brick state.

Since something must've gone wrong halfway through, I suspect I'm still holding onto the PD1 bootloader. I've tried the process with the PB1 unbrick.img provided earlier in this thread, but sadly it didn't do anything. Thanks for all the hard work!
 
Last edited:

Lightn1ng

Senior Member
Mar 31, 2015
1,879
715
0
Washington, D.C.
Could someone who has updated to the PD1 bootloader post an unbrick.img for that please?

I attempted to update; flashed the PD1 stock ROM and bootloader in muniz_ri's updated thread and ended up in a soft brick, so I decided to try a full stock PB1 reset, but something went horribly wrong and I'm currently in a hard brick state.

Since something must've gone wrong halfway through, I suspect I'm still holding onto the PD1 bootloader. I've tried the process with the PB1 unbrick.img provided earlier in this thread, but sadly it didn't do anything. Thanks for all the hard work!
"I've tried this process" is not specific enough. Please tell me EXACTLY what you did or I can't help.