FORUMS
Remove All Ads from XDA

[Guide] [Unbrick] How to revive a hard bricked Moto G5

7,224 posts
Thanks Meter: 3,800
 
By TheFixItMan, Senior Member on 10th April 2018, 07:16 PM
Post Reply Email Thread
This guide is for hard bricked Moto G5 Cedric
Hard bricked means a device which can not enter bootloader mode normally


This method has now been confirmed working

Works with XT1672 XT1670 XT1671 XT1676 (and most likely all others and if you ask if it will work on your version I will just copy & paste this to you!)

Download mmcblk0 image from Google Drive
Or
Download mmcblk0 image from Mega
Thanks to @jcbotelho for providing image

Requirements
Freshly formatted microSD card of at least 32gb (It needs to have at least 31.3gb free after formatting - if it displays as less you will need to buy a 64gb microSD card)
7zip
Linux mint live usb/dvd
USB card reader


Method
The BEST method to flash the sdcard with mmcbk0.img file is to use LINUX!
Windows user have no need to install Linux in pc, you can run Linux from a bootable usb-stick that is at least 8gb or a dvd

Do not run Linux as a virtual machine on Windows! Use the live USB/DVD

0) Put the Moto g5 on mains charge until you have finished flashing the sdcard so it's fully charged ready for the boot test!
1) Run Linux, preferably cinnamon or mate versions of Linux Mint
2) Insert the sdcard in pc or card reader and open "Disks" app
3) In "Disks" app select sdcard and you will see the sdcard partitions
4) Press "-" to delete the partition (delete all partitions if there is more than one)
5) Press "+" to create a new one and name it mmcblk0, set FAT(FAT32) file format and press "CREATE"
6) Press "Play" button to mount the sdcard, look to see what path the sdcard has (/dev/sd??) and then close the "Disks" app
7) Go to Desktop, open "Computer" and navigate to the location where the img file is extracted (mmcblk0.img)
8) Open the window where img file is with root (right click on window and select "open as root")
9) In root window open the Terminal (right click on window and select "open terminal")
no need to type "su" in terminal, it has root already (see notes if using Linux live usb/dvd)
10) Type in terminal the command written below and don't forget to eliminate that "1" from the sdcard path,
that "1" can make the difference between the phone booting or not!!!!!


Things to note
Linux Live dvd doesn't have open as root so just open in terminal and add sudo to the start of the commands
I've included this in the commands below

If you get a status error just remove status=progress from the terminal command below


Terminal comands
- if your sdcard is seen like " /dev/sdb1"
in terminal apply this command:
Code:
 
sudo dd bs=4M if=mmcblk0.img of=/dev/sdb status=progress oflag=sync
-if your sdcard is seen like " /dev/mmcblk0p1"
in terminal apply this command:
Code:
sudo dd bs=4M if=mmcblk0.img of=/dev/mmcblk0 status=progress oflag=sync
and the flashing process should start
When it finishes, test the sdcard in the phone and it should boot!

If you get a size error of the sdcard in terminal you have to change the sdcard and try again!

Thanks to @vaserbanix for the original version of this guide


Re-flash Stock Firmware
Once the phone is in bootloader mode you can flash stock firmware via fastboot
Note that in order to flash gpt the firmware MUST be the same or newer than the version currently on your phone

Firmware can be download from Here

Once you have firmware that is the same or newer than your current version you can remove the sd card and run these commands (assuming you have fastboot all setup on your pc)

If you get a security downgrade error when you try to flash gpt.bin or bootloader.img then the firmware you are trying to flash is too old!

Code:
 
fastboot oem fb_mode_set
fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash dsp adspso.bin
fastboot flash oem oem.img
fastboot flash system system.img_sparsechunk.0
fastboot flash system system.img_sparsechunk.1
fastboot flash system system.img_sparsechunk.2
fastboot flash system system.img_sparsechunk.3
fastboot flash system system.img_sparsechunk.4
fastboot flash system system.img_sparsechunk.5
fastboot flash system system.img_sparsechunk.6
fastboot flash system system.img_sparsechunk.7
fastboot flash system system.img_sparsechunk.8
fastboot flash modem NON-HLOS.bin
fastboot erase modemst1 
fastboot erase modemst2 
fastboot flash fsg fsg.mbn
fastboot erase cache 
fastboot erase userdata 
fastboot oem fb_mode_clear
fastboot reboot
The Following 21 Users Say Thank You to TheFixItMan For This Useful Post: [ View ] Gift TheFixItMan Ad-Free
 
 
10th April 2018, 09:26 PM |#2  
Exanneon's Avatar
Senior Member
Flag some city in some country on some planet
Thanks Meter: 70
 
Donate to Me
More
I might consider doing this if you explained what this loader.img is?
Is it something one would flash to recover their G5?
10th April 2018, 11:18 PM |#3  
TheFixItMan's Avatar
OP Senior Member
Flag London
Thanks Meter: 3,800
 
More
Quote:
Originally Posted by Exanneon

I might consider doing this if you explained what this loader.img is?
Is it something one would flash to recover their G5?

Potentially - its used to boot off the sd card so those with a bricked phone can access the bootloader through booting it off their sd card & then flash the firmware via fastboot

See
https://www.aryk.tech/2017/02/how-to...droid.html?m=1
11th April 2018, 12:48 AM |#4  
takoa's Avatar
Senior Member
Flag mAdRiD
Thanks Meter: 7
 
More
I hope the solution is achieved soon
11th April 2018, 01:59 AM |#5  
Junior Member
Thanks Meter: 30
 
More
Here you go:
https://cloud.wdata.de/index.php/s/JK2by8YBQCSrsof

Device Info:
Cedric XT1676 Retail
LineageOS 14.1
TWRP 3.2.1 (32bit)
The Following 2 Users Say Thank You to staffe For This Useful Post: [ View ] Gift staffe Ad-Free
11th April 2018, 10:35 AM |#6  
TheFixItMan's Avatar
OP Senior Member
Flag London
Thanks Meter: 3,800
 
More
Quote:
Originally Posted by staffe

Here you go:
https://cloud.wdata.de/index.php/s/JK2by8YBQCSrsof

Device Info:
Cedric XT1676 Retail
LineageOS 14.1
TWRP 3.2.1 (32bit)

Thanks for uploading it
11th April 2018, 01:27 PM |#7  
takoa's Avatar
Senior Member
Flag mAdRiD
Thanks Meter: 7
 
More
Hello, I followed all the steps of the link, using a 16gb card and the file here hung and nothing, the phone does not start.
In my case it is an xt1676 which only turns on the led and blinks when I connect it to the pc by usb or the wall charger.
11th April 2018, 01:31 PM |#8  
TheFixItMan's Avatar
OP Senior Member
Flag London
Thanks Meter: 3,800
 
More
Quote:
Originally Posted by takoa

Hello, I followed all the steps of the link, using a 16gb card and the file here hung and nothing, the phone does not start.
In my case it is an xt1676 which only turns on the led and blinks when I connect it to the pc by usb or the wall charger.

I take it the programme wrote the loader image successfully to sdcard

So either the person who uploaded the Loader.img interrupted the extract & so its corrupted or this phone can't boot off the sd card with this method

It does say it may take a while to boot but who knows
11th April 2018, 01:35 PM |#9  
TheFixItMan's Avatar
OP Senior Member
Flag London
Thanks Meter: 3,800
 
More
If anyone else can upload a Loader.img using the methods in the first post so there's a comparison please do
11th April 2018, 01:57 PM |#10  
takoa's Avatar
Senior Member
Flag mAdRiD
Thanks Meter: 7
 
More
Yeah right.
What is strange to me, although maybe it is, is the size of the file hung here, 165 mb.
the 16gb card is formatted in fat32, is it correct?
Does the DiskImageRev2 program automatically create the card to be bootable?
Why install the qualcomm drivers if the phone does not have to be connected to the PC? It is assumed that the phone will boot in bootloader mode and there only need the adb / fastboot controllers.
I do not mind to keep trying since the phone I give for lost at the moment.
Can someone return to the first post with an xt1676?
Thank you.
11th April 2018, 02:51 PM |#11  
Member
India
Thanks Meter: 9
 
More
Quote:
Originally Posted by TheFixItMan

I'm trying to work on a solution for guys with a hard bricked moto g5 but as I no longer own this device anymore I need someone to provide the following

Requirements
Rooted moto g5
Busybox installed
Terminal emulator installed

What I need
In terminal emulator type su and grant superuser access
Then type

Code:
dd if=/dev/block/mmcblk0 of=/sdcard/Loader.img bs=1024 count=168960
Wait for the command prompt to return (it may take a few mins)
Post the Loader.img file created on the root of sdcard here

https://drive.google.com/file/d/1H2Q...iuIH1m-vE/view

Device : XT1677
Post Reply Subscribe to Thread

Tags
cedric, hard brick, moto g5, moto g5 hard bricked, unbrick

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes