yashsingh1/xdaforums huggingface dataset:
[Moto G5 Guides, News, & Discussion] elenacoelho:
My pc don't recognize the phone and the screen only shows for 1 second and then goes black again. That's why I've tried this method.
[Moto G5 Guides, News, & Discussion] TheFixItMan:
If you followed all the instructions on the first post exactly when you insert the sdcard it will allow you to enter bootloader mode by pressing and holding Vol down and power button

From the bootloader menu you can then reflash the same or newer firmware that is currently on your phone

You must follow the guide exactly - ie use Linux and not an emulator etc and a large enough sd card

It doesn't matter if you use the large mmcblk0 or smaller one - they both do the same just the smaller one has data removed the is not required to enter bootloader

Note this guide will not fix damaged motherboards or any other damage you've done to your device beyond being able to fix gpt and bootloader partition
[Moto G5 Guides, News, & Discussion] Diego.g256:
Is there anyway to know if I flashed the sdcard properly?

After flashing it, the sdcard becomes unacessible (unknown partition type)

After inserting it on my phone and holding the volume down + power, nothing happens.

So I went to check the sdcard again.

Now there are several partitions (50+) in the sdcard. Is this the expected result (to the sdcard)? Just to be sure that I'm doing everything correctly.

thanks!
[Moto G5 Guides, News, & Discussion] TheFixItMan:
You will see all the partitions on the sdcard - as long as your sdcard is large enough it will have copied everything over

There is no other way of knowing if it created successfully without trying it

If it doesn't work then try a different sd card - recommended 64gb in size

If it still doesn't work then you may have damaged your device beyond simply being able to repartition (gpt) and reflashing the bootloader
[Moto G5 Guides, News, & Discussion] Ismailha3:
Finally i found the solution😍❤️

Just insert flashed sd card and remove the battery and connect to usb cable on pc and press volume- and power botton
[Moto G5 Guides, News, & Discussion] methuselah:
[MENTION=4728903]TheFixItMan[/MENTION] from where you have got these files?

. And what these files contain
[Moto G5 Guides, News, & Discussion] TheFixItMan:
From a working rooted moto g5

Mmcblk0 contains the internal partitions of the device

See this thread on how to create one

https://xdaforums.com/moto-g5s/how-to/guide-how-to-create-mmcblk0-img-device-t3803176/

Make sure the working phone has formatted data first & nothing personal on internal storage
[Moto G5 Guides, News, & Discussion] OkunionRingz:
Can I use my OTG Flash Drive instead of using a SD Card?
[Moto G5 Guides, News, & Discussion] TheFixItMan:
No as the otg drive won't be mounted at that stage as far as I'm aware
[Moto G5 Guides, News, & Discussion] OkunionRingz:
I see. Also, do I just extract the image file into my local storage or into the sdcard already?
[Moto G5 Guides, News, & Discussion] TheFixItMan:
Follow the instructions on the first post

Download the zip & unzip it so you have mmcblk0.img on your pc
[Moto G5 Guides, News, & Discussion] prakhar2772:
Can i do without sd card?

I there anyway without the sdcard? I don't have an Sd card and I have tried hard to find it. I don't have money to buy it right now! but I want to cure my hard bricked Motog5 XT1677. any help would be appreciated.
[Moto G5 Guides, News, & Discussion] TheFixItMan:
For this method you need an sdcard! I've already stated this and is part of the requirements on the 1st post

Feel free to research yourself if there are any other ways eg blankflash although at last check there is none for this device that work
[Moto G5 Guides, News, & Discussion] dgomesreal:
Hello! I downloaded the mmcblk0.img image on windows. Can I start Linux and open the terminal in the windows folder?
[Moto G5 Guides, News, & Discussion] TheFixItMan:
All the instructions are on the first post - please read them!

Especially the first part of the method
[Moto G5 Guides, News, & Discussion] dgomesreal:
Solved

Hi. I did it. But I still have the "baseband" error. But thanks!
[Moto G5 Guides, News, & Discussion] TheFixItMan:
This guide is to be able to flash gpt & bootloader on a hard bricked device so you can get into the bootloader to re-flash stock firmware - it will not solve baseband issues probably from a corrupt persist partition

I take it you don't have imei - you would need to flash the last rom you had imei and then backup persist & efs partition with twrp & then restore it on the rom you have no imei

If that doesn't work you'll have to repair persist permissions (there's a guide somewhere) but what ever you do don't flash someone else's persist partition on your device!

Anyway this is off topic so no further help will be given
[Moto G5 Guides, News, & Discussion] eagledipesh:
Hello, I have moto g 2014, xt1068 model titan, can someone point me if blankflashfile exists for my device?

Or

Steps to create blankflashfile / mmcblk0 IMG file??

Thank you
[Moto G5 Guides, News, & Discussion] riyan65:
Wrong thread- this thread is for moto g5(Cedric)

Ask in the moto g 2014 thread for unbrick advice for your device.
[Moto G5 Guides, News, & Discussion] TheFixItMan:
Try this

https://xdaforums.com/moto-g/help/how-to-revive-hard-bricked-moto-g-t2833798

In future please post in your own device forum - we don't own your device and have no knowledge of it or if anything we suggest will work
[Moto G5 Guides, News, & Discussion] eagledipesh:
I had already tried that link and thats why i was looking at other forums, anyways thanks for pointing out, cheers!!
[Moto G5 Guides, News, & Discussion] TheFixItMan:
I don't know if these files are any different but you can try these ones

https://allfreeperks.blogspot.com/2015/09/unbrick-how-to-unbrick-and-repair-moto.html?m=1

As long as you can get into the bootloader screen (fastboot mode) you'll be able to flash firmware

If these don't work I won't be able to help
[Moto G5 Guides, News, & Discussion] eagledipesh:
Thanks but this also didnt work, I had manually deleted the System partition to increase its size, but the couldn't format the partition to ext4, seems the phone cant be revived now
[Moto G5 Guides, News, & Discussion] TheFixItMan:
Can you still get into the bootloader (fastboot mode)

If so all you need to is flash gpt & bootloader to repartition the device

If you get security downgrade errors then the firmware you are trying to flash is too old

If you get pre flash validation errors (that are not security downgrade) or you can't get into the bootloader I won't be able to help you as I don't own your device
[Moto G5 Guides, News, & Discussion] prakhar2772:
Unknown USB DEVICE DESCRIPTOR REQUEST FAILED

I did all you say and a big THANKS! that my MotoG5 ( XT1677) got unbricked after a hard long time. BUT when I tried to connect my device to Relock my bootloader by going to fastboot mode, my device manager shows Unknown USB Device( Device Descriptor Request Failed ) . I have tried almost every fix given on youtube but nothing worked. The

minimal ADB and fastboot

cmd window shows {waiting for any device}

That's why I am unable to do any further fix for my phone. I want to- 1) relock my bootloader 2) Fix my IMEI 3) Install signed Stock ROM.

Please fix as I am in urgent need for anyfix. I feel Unsatisfied everytime. Thanks in advance.
[Moto G5 Guides, News, & Discussion] TheFixItMan:
Please delete your quote of the entire first post - it's against xda rules

I assume you have installed the Motorola USB drivers and are using a known working USB cable

https://support.motorola.com/us/en/drivers

I'd advise against relocking the bootloader - if it goes wrong you will never be able to reflash stock firmware & your device will be dead without specialist hardware to re-image

If you really want to (and I don't see why you would) see this thread

https://xdaforums.com/g5/help/how-to-revert-moto-g5-xt1670-to-stock-t4183425

As with flashing stock firmware the instructions are on 1st post

With imei flash the last rom you had imei - if it's restored make a backup of efs and persist with twrp

If you loose imei again you can restore these backups

If you can't restore by this method your persist partition maybe damaged - there is a guide somewhere where you can correct the permissions of the persist partitions but it's complicated and not guaranteed to work. What ever you do don't flash someone else's persist partition as each is unique to a device & if you do you will destroy your device permanently
[Moto G5 Guides, News, & Discussion] prakhar2772:
Hey! thanx for replying.

Yes I am using Motorola USB drivers. Should I delete them? or what is the perfect drivers for this?

I am stuck on USB Device Descriptor Failed Error (code43) in Device manager.

my device is not detected in minimal adb and fastboot cmd
[Moto G5 Guides, News, & Discussion] TheFixItMan:
You can try uninstalling them - right click on the Unknown USB Device (Device Descriptor Request Failed) and uninstall drivers

Restart pc

Reinstall moto drivers

Try a different USB cable USB port or even a different pc if available

Other than that I can't suggest anything else
[Moto G5 Guides, News, & Discussion] prakhar2772:
I will try with different pc is the only way left now I think :D

Is there anyway the flashing of firmware can be done on Linux ?
[Moto G5 Guides, News, & Discussion] TheFixItMan:
Yes - There's a few ways depending on your distribution

First just try

sudo apt-get install -y adb

sudo apt-get install -y fastboot

If not manually download it

Download the android sdk for your Linux distro

Open the terminal and the commands are same as on first post

You either have to navigate the terminal to where fastboot is or add the location to bash so you can use fastboot from any location

sudo gedit .bashrc

Add the following line changing the location

export PATH=${PATH}:/home/YOUR-USERNAME/path/to/adborfastboot

Restart terminal for the changes to take effect
[Moto G5 Guides, News, & Discussion] eagledipesh:
I get this, I was on LineageOS 17.1 before the phone bricked

.\qboot.exe blank-flash

opening device: \\.\COM3

OKAY [ 0.537s]

greeting device for command mode

OKAY [ 0.003s]

identifying device

...serial = 0x7AB1659

...chip-id = 0x800 (MSM8226)

...chip-rev = 0x0

...sv-sbl = 0x0

OKAY [ 0.010s]

finding files

...programmer = programmer.mbn

...singleimage = singleimage.bin

OKAY [ 0.007s]

validating files

OKAY [ 0.401s]

switching to download mode

OKAY [ 0.002s]

greeting device for image downloading

OKAY [ 0.002s]

sending programmer

OKAY [ 0.014s]

flashing singleimage

FAILED (blank-flash:sdl-transfer-image:sdl-hello:error sending packet)

blankflash (3)\blankflash>pause

Press any key to continue . . .
[Moto G5 Guides, News, & Discussion] TheFixItMan:
But can you get into the bootloader?

Turn the phone off/pull battery & reinsert

Hold volume down and with it held also hold power button button

Do you get the bootloader menu?

If yes flash gpt via fastboot commands and the rest of stock firmware

If no than I can't help you as it sounds like the blank flash files for your device are out of date & I don't own your device
[Moto G5 Guides, News, & Discussion] eagledipesh:
Ohh ok, no I can't get into bootloader, I will leave it then and bid good bye to moto g.... Gone it is

I was on LineageOS 17 so may be I need system bin for that also since I tried deleting the system partition I guess its not able to find that partition
[Moto G5 Guides, News, & Discussion] prakhar2772:
There are two problems- 1) I can get into bootloader but the adb fastboot is not recognising the device saying it is malfunctioned. ( Tried and tested every

possible way to recognise it). Still seems to me as a mobile software problem.

2) the bootloader only works when I keep my sdcard inside the moto g5. whenever i remove it i am unable to load the

bootloader.

---------- Post added at 11:17 AM ---------- Previous post was at 11:15 AM ----------

Bro first please go to first page of this post and follow all the steps given.. U will definaetely go to bootloader easily.
[Moto G5 Guides, News, & Discussion] TheFixItMan:
1 - most likely either a USB cable issue or a driver issue on your pc

2 - The sdcard allows a hard bricked device to enter bootloader. You will only be able to access the bootloader without the sdcard once you have flashed gpt & bootloader from stock firmware

This person doesn't have a moto g5
[Moto G5 Guides, News, & Discussion] eagledipesh:
How can I get blank mmcblk0.img for my device, can I ask someone who already has the phone to extract on moto g 2 forum? I have 16 and 32 GB SD card, I want to give it a try...
[Moto G5 Guides, News, & Discussion] prakhar2772:
I have tried with different cable and different PC's to check this issue. But same problem remain in every situation. The phone only charges. Can this be the problem of mmcblk0.img file? Maybe the file is not for my model. Is this possible?
[Moto G5 Guides, News, & Discussion] TheFixItMan:
It works with every varient I know of - see first post for confirmed
[Moto G5 Guides, News, & Discussion] TheFixItMan:
See

https://xdaforums.com/moto-g5s/how-to/guide-how-to-create-mmcblk0-img-device-t3803176/amp/

Make sure the device used to pull the image has formatted data first
[Moto G5 Guides, News, & Discussion] prakhar2772:
Mine is XT1677 variant, which is not listed in the first post. Do u have a link which can specify a mmcblk0 file for XT 1677 variant. It seems like there is problem with image in my variant. I want to try an other image file specific for XT1677 variant. I dont have any friend who has this phone.
[Moto G5 Guides, News, & Discussion] TheFixItMan:
I've just gone through the thread and found someone with your varient that says it works so I added it to the first post of confirmed working

Here is the post

So it's definitely an issue either with USB port cable pc drivers or you have damaged your phone in some other way for which this method of unbrick is not designed for
[Moto G5 Guides, News, & Discussion] RishabhDhiman:
Hi Prakshar2772 i have successfully flashed the phone using the image. You need to make sure these things first

1. Your Memory card size is of the same size or of the larger size then device size.

2. You are not extracting the file. You need to use dd only because extraction does not creates partition but dd create the file partition as specified in the img file.

3. You are naming the sdcard correct and you are using sdcard no OTG will work.

For further assistance contact me via PM. I will be happy to help you.
[Moto G5 Guides, News, & Discussion] iiPostMaster:
I flashed an Android 10 RETUS image and now my phone is looping the "Your device has been unlocked and can't be trusted. ID: bad key Your device will boot in 5 seconds."

Is there any way I can fix this? I copied every command from the flashfile.xml into ADB commands and used ADB to flash everything, but it didn't work the first time, so then I erased misc, and when that didn't work I did "fastboot erase all" then reflashed.

I didn't actually brick my device before doing this. Do I need to wipe everything properly and flash again, and if so, how can i wipe everything?
[Moto G5 Guides, News, & Discussion] sd_shadow:
What does getvar all say?

fastboot getvar all
[Moto G5 Guides, News, & Discussion] TheFixItMan:
Everything you need is on the first post

All the commands to flash stock firmware properly are on the first post.

Why on earth would you do fastboot erase all? You have probably permanently damaged your device unless you have a backup of all your partitions and imei - these are unique to your phone.

I'm sorry but unless you follow the instructions as outlined on the first post please don't post saying things don't work as I've taken time to write everything out step by step format for you to follow.

Your device has been unlocked and can't be trusted. ID: bad key just means your bootloader is unlocked and using stock rom

Flash stock rom as outlined on the first post however since you have erased all partitions in your phone the chance of you having imei or a working phone at the end is slim
[Moto G5 Guides, News, & Discussion] prakhar2772:
After FLASHING STOCK ROM of OREO official. I lost my network. IMEI is shown properly and also SIM card is detected properly but my phone is unable to register on any netwrok. PLease help.
[Moto G5 Guides, News, & Discussion] TheFixItMan:
Nothing to do with a hard brick

Flash the last rom that worked and backup persist and efs in twrp and restore them if you have issues

Please post in Q&A if you have further issues unrelated to the guide on the first post
[Moto G5 Guides, News, & Discussion] prakhar2772:
I am getting security downgrade error even after downloading the latest firmware from the given link. Is a newer firmware avaialbale somewhere else for XT1677????
[Moto G5 Guides, News, & Discussion] TheFixItMan:
As stated on the first post you must use a firmware that is the same or newer than what is already installed

The following firmware is the latest available for this device (generic retail) at time of writing

https://mirrors.lolinet.com/firmware/moto/cedric/official/RETAIL/CEDRIC_RETAIL_8.1.0_OPP28.85-19-4-2_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml.zip
[Moto G5 Guides, News, & Discussion] miklav:
Has anyone got this to work using Rufus to flash the SDcard? I'm not having luck at the moment and haven't been able to try via a Linux USB flasging method as the very old ASUS transformer I have access to doesn't seem to like loading the Linux installs I've got hold of to date (it seems to have a 64 bit CPU but a 32 bit UEFI which seems to be a problem). Cheers.
[Moto G5 Guides, News, & Discussion] TheFixItMan:
The instructions on the 1st post are there for a reason - this is how to it

It won't work via Windows

And you can load Linux on any machine if you have set the bios to load correctly - try burning it as mbr and then setting your bios to mbr or legacy. (You will need to change it back to uefi to boot windows) However uefi is what modern machines and images use & I don't know if the images support mbr.

You can also try this 32bit version if your machine is only 32bit

Linux Mint 19.3 "Tricia" - Linux Mint

Linux Mint is an elegant, easy to use, up to date and comfortable desktop operating system.

www.linuxmint.com
[Moto G5 Guides, News, & Discussion] miklav:
Thanks for the prompt response. I had tried that version of Linux too with no luck. Looks like I need to go read up on getting Linux working first before on this old machine before I can attempt the recovery.
[Moto G5 Guides, News, & Discussion] miklav:
FYI. After finally getting a Linux usb stick to work (64 bit mint, with an added 32bit boot file dropped in to the iso), I was able to flash the SD card and unbrick. Thanks! Sadly, in the process I accidentally wiped partitions in the SD in my Transformer that holds Windows (Doh!). So I'm off to sort out a Windows recovery now (using the Linux usb)!
[Moto G5 Guides, News, & Discussion] prakhar2772:
Can't Get network, even after Latest ROM... Please help Please PLease
[Moto G5 Guides, News, & Discussion] TheFixItMan:
This has nothing to do with the guide on the first post

Flash the last rom you had imei

Use twrp to backup persist and efs & restore on other roms

Can't help you any other way if you have damaged these partitions as they are unique to your device
[Moto G5 Guides, News, & Discussion] elbeto005:
Hi, I'm new ... but I wanted to ask you if you have any idea if this method works with Motorola G5s Plus (XT1800). Or where can I find that info ... thanks
[Moto G5 Guides, News, & Discussion] sd_shadow:
https://xdaforums.com/search/862197...c[child_nodes]=1&c[nodes][0]=6211&o=relevance
[Moto G5 Guides, News, & Discussion] TheFixItMan:
I've no idea as I don't own your device - you would need an image from an identical working device to test

Or you need to find a working blank flash file

Also don't quote the entire first post!

Your phone forum is located here

https://xdaforums.com/c/moto-g5s-plus.6811/
[Moto G5 Guides, News, & Discussion] Lighto97:
i wish there was a way to flash with 8 gb sd card or working blank flash for thiss device, when get a sd card and a adapator do format i will try that out as it seems to be the only working solution for cedric

and g5 plus got lucky with moto z2 play blank flash i wonder if cedric can work with another blank flash file

after trying with the blank flash files i got no sucess after hours of trying to use it

guess ill need a sd card AND an adaptor
[Moto G5 Guides, News, & Discussion] Lighto97:
right now im trying to flash with linux mint and a 16gb sd card. my sd card path is dev/sdc1 i put the command as

sudo dd bs=4M if=mmcblk0.img of=/dev/sdc status=progress oflag=sync

its correct?
[Moto G5 Guides, News, & Discussion] Lighto97:
Well. First ir did nota worked with Rufus with Win 10 driver signature turnês off Aldo compatibity mode with Win 7 . I used the smaller image. After two hours of wait and patience flashing with Linux live usb drive It worked like a charm(xt1672) Thanks for everyon envolved
[Moto G5 Guides, News, & Discussion] TheFixItMan:
That's why the instructions on the first post states to use Linux and has full instructions and not to use Windows!

Glad you got it working
[Moto G5 Guides, News, & Discussion] Lighto97:
curious that some users says to get success with rufus. seems to be a specific version and win 7 is required with drive signature enforcement turned off. good that the image just have to be the same or similar model no need to be same bootloader version.
[Moto G5 Guides, News, & Discussion] TheFixItMan:
No one will have success with Rufus with this image

You can use Rufus to create your live Linux USB/DVD but not for copying the image to sdcard
[Moto G5 Guides, News, & Discussion] dpw_:
everything worked up to the fastboot part (i.e. phone now boots to the fastboot screen, but the commands fail).

I think I have somehow wrecked the partition table and some of the cached data. ON the main fastboot screen it says:

Product/Vairant: cedric 0000000000000 16GB P5
...
oem_locked
...

fastboot oem fb_mode_set returns:

FAILED (remote failure)
finished. total time: 0.011s

fastboot flash partition gpt.bin:

target reported max download size of 536870912 bytes
sending 'partition' (45 KB)...
OKAY [ 0.006s]
writing 'partition'...
(bootloader) Validating 'gpt.default.xml'
(bootloader) Image primary_gpt failed validation
(bootloader) Preflash validation failed
(bootloader) Cancelling 'gpt.default.xml'
FAILED (remote failure)
finished. total time: 0.083s

any ideas?
[Moto G5 Guides, News, & Discussion] TheFixItMan:
Did you brick your phone trying to relock the bootloader? Something which you should never do.

It states you have oem locked - if your bootloader is locked after you previously unlocked it you will never be able to validate gpt or bootloader

Are you able to flash to either

1 - flash the rest of the firmware and boot the phone with the sdcard still inserted (choose start phone normally from bootloader menu)

2 - unlock the bootloader using

fastboot unlock YourUnlockCode

If the answer is no to both the above you may need a motherboard replacement
[Moto G5 Guides, News, & Discussion] Shakingaj:
Just a note to say thanks to TheFixItMan, and to be extra careful when flashing mmcblk0 with your drive in linux. If you are not paying enough attention you brick your laptop like I did this morning. Installed over the top of my mint partition, now it resembles swiss cheese.

Total User Error.

Now to clean up that clusterfuck....:-)
[Moto G5 Guides, News, & Discussion] nift4:
Please do fastboot getvar all and check if the CID is 0xDEAD. If that is the case, only Motorola or authorized(!) service centers can fix your device. Why authorized, you may ask: you erased the bootloader keys.
[Moto G5 Guides, News, & Discussion] HukUchiha:
Just in case someone needs this, I can confirm the 16GB image (refered as smaller one in the tutorial) is working to recover XT1675, I've done this using my Arch Linux system and the "dd" command line utility, just like the tutorial says (the tutorial recommends Linux Mint, but of course you can chose you favourite flavor). Thanks to everyone for this guide.