Good evening,
first I apologize for my English, sometimes I write sometimes, for the technical terms I use the translator. I have a problem with my Motorola G5 and I try to explain it here trusting in a help
I found in my taxi a Motorola G5 XT1672, despite having brought it with me for several days in the taxi to make me contact, the owner (Brazilian) did not feel. After about a month I decided to keep it. It's a shame to throw it.
Not being very practical of phones I thought that with a reset I would put everything back instead I messed up everything since it has the protection of Google account. The USB debugging was not enabled, so any attempt to communicate with the device is not successful.
I thought then that by running a firmware flash I could restore it and finally use it but just do not know which way to start.
Thanks for the help
Kingfaber
Find the correct firmware for your device and then you use fastboot to flash it
Once you have fastboot installed & setup on. your pc & you have the correct firmware the commands are
Code:
fastboot oem fb_mode_set
fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img (skip this one to avoid hard bricking)
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 modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot erase cache
fastboot erase userdata
fastboot erase customize
fastboot erase clogo
fastboot oem fb_mode_clear
fastboot reboot
Guys I have found a way to get the imei back in stock
i can confirm that we can return to stock ;-D
without loosing IMEI
Reflash a 32bits TWRP recovery
wipe DATA
reboot to bootloader
use this command to flash stock ROM:
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.o
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 modem NON-HLOS.bin
fastboot flash fsg fsg.mbn
fastboot erase cache
fastboot erase userdata
fastboot erase customize
fastboot erase clogo
fastboot reboot
fastboot oem fb_mode_clear
Don't run those commands (IMEI = 0)
fastboot erase modemst1
fastboot erase modemst2
After that you can boot the stock rom.
If you want to relock the boot loader, use this:
fastboot oem lock
fastboot oem lock
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 boot boot.img
fastboot oem lock
Reboot.done
I have tried this and was successfully got back imei on stock
riyan65 said:
Guys I have found a way to get the imei back in stock
i can confirm that we can return to stock ;-D
without loosing IMEI
Reflash a 32bits TWRP recovery
wipe DATA
reboot to bootloader
use this command to flash stock ROM:
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.o
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 modem NON-HLOS.bin
fastboot flash fsg fsg.mbn
fastboot erase cache
fastboot erase userdata
fastboot erase customize
fastboot erase clogo
fastboot reboot
fastboot oem fb_mode_clear
Don't run those commands (IMEI = 0)
fastboot erase modemst1
fastboot erase modemst2
After that you can boot the stock rom.
If you want to relock the boot loader, use this:
fastboot oem lock
fastboot oem lock
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 boot boot.img
fastboot oem lock
Reboot.done
I have tried this and was successfully got back imei on stock
Click to expand...
Click to collapse
After OTA upsate the IMEI will become 0
Thanks, I hope someone tries this and confirms it's working.
Yes, it has worked for my device
Bar0ns600 said:
After OTA upsate the IMEI will become 0
Click to expand...
Click to collapse
No ota update is available.i have checked that
riyan65 said:
No ota update is available.i have checked that
Click to expand...
Click to collapse
Yeah available but if you actually install it I think it will make the IMEI 0 after the IMEI being fine :/
If u have kept a back up of efs in custom rom and restore it in stock then I'm won't get lost after update.
To get 4g/LTE service on stock.
First get a custom rom then go to fastboot mode and run these commands
Fastboot erase modemst1
Fastboot erase modemst2
And reboot to rom then u will get LTE in custom rom.
Using Twrp 64x bit make a back up of efs.
Then flash the stock rom with standard fastboot method without using the above mentioned code.
At this moment,after reboot u may get back Imei and LTE.if LTE is not available then restore efs through Twrp 64x bits.
riyan65 said:
If u have kept a back up of efs in custom rom and restore it in stock then I'm won't get lost after update.
Click to expand...
Click to collapse
You will have to install twrp for each update! ??
Just install all updates and then install Twrp to get the Imei back.it is just waste of time to install Twrp after every update.
Hi,
I'll already done that but after OTA i loose IMEI
Don't use OTA for updates, use adb to update your device in stock recovery. Then install Twrp 64x and restore efs.
It seem like many of are not getting imei after doing this also.let me explain you in a clear way
Step1:-run on a custom rom such as lineage,aosp...
(Note:-if you have 4g/LTE in custom rom then skip step2)
Step2:-turn off your phone and get into bootloader and run the following commands
Fastboot erase modemst1
Fastboot erase modemst2
Step3:-make a back up of efs in Twrp 64x bits(save the efs in external memory so it will not get erased) and erase data,cache only
Step4:-now flash 32xbits Twrp then
Step5:-flash stock rom using following commands
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.o
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 modem NON-HLOS.bin
fastboot flash fsg fsg.mbn
fastboot erase cache
fastboot erase userdata
fastboot erase customize
fastboot erase clogo
fastboot reboot
fastboot oem fb_mode_clear
Step6:-now reboot your phone
Step7:-you will get the Imei and 4g/LTE
Step8:-don't use OTA, use adb you can download updates from here
https://drive.google.com/drive/mobile/folders/1BkpfHvgQ477NViLYvzgv88Fgq3SSt5Py?usp=sharing
Step9:-reboot to stock recovery and select apply update from adb
Step10:-run the following command to apply update
Adb sideload filename.zip
Step11:-In may security patch you may lose imei
Step12:-now install Twrp 64x bits and restore efs from it which you have make it before
Step13:-reboot your device.done
Now you will get the Imei,4g/LTE and latest update.
Let me know if it works for you.
riyan65 said:
Guys I have found a way to get the imei back in stock
i can confirm that we can return to stock ;-D
without loosing IMEI
Reflash a 32bits TWRP recovery
wipe DATA
reboot to bootloader
use this command to flash stock ROM:
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.o
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 modem NON-HLOS.bin
fastboot flash fsg fsg.mbn
fastboot erase cache
fastboot erase userdata
fastboot erase customize
fastboot erase clogo
fastboot reboot
fastboot oem fb_mode_clear
Don't run those commands (IMEI = 0)
fastboot erase modemst1
fastboot erase modemst2
After that you can boot the stock rom.
If you want to relock the boot loader, use this:
fastboot oem lock
fastboot oem lock
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 boot boot.img
fastboot oem lock
Reboot.done
I have tried this and was successfully got back imei on stock
Click to expand...
Click to collapse
After doing ur procedure I didn't get any network bro it showing no network only
Did you restore the efs???
Help me bro
Hello, 1 day ago I was with the firehound rom without any problem, only that in some applications the stock camera did not work, I decided to return to the stock as usual, but, this time I start without a signal, my imei became 0, please help me recover my imei bro, my copy of efs was lost.
First go back to custom rom and then make a back up of efs then follow the above commands.
riyan65 said:
First go back to custom rom and then make a back up of efs then follow the above commands.
Click to expand...
Click to collapse
Ready bro, I do that, I have signal in stock ROM again but only 3g, is a great advance ?, do you know how i get 4g again?
Oshecy777 said:
Ready bro, I do that, I have signal in stock ROM again but only 3g, is a great advance ?, do you know how i get 4g again?
Click to expand...
Click to collapse
You can't get 4g back... If you knew what you were doing before this wouldn't even happen
Bar0ns600 said:
You can't get 4g back... If you knew what you were doing before this wouldn't even happen
Click to expand...
Click to collapse
Omfg really? My moto g5 become's a brick.
I know that dude, is the first time something like this happens to me, I had a backup of my stock but unfortunately I lost it if you do not believe I would not be here, and it's very strange, because when I returned to the stock rom via adb I started with a signal except that I started without signal and IMEI.
But now is working the 3g in stock ROM.
Hi, I have bricked my phone when I tried to flash my stockboot en recovery img files. What happens is that everytime I reboot the phone, it automatically reboots to the bootloader. I can access twrp.
I tried to flash stock firmware myself, but I flashed XT1921-3 instead of XT1922-3 because I couldnt find the right version. Nothing changed. I also tried to flash a GSI ROM and nothing changes there as well. Can someone help me out?
I managed to get my hands
You will have to pass the last stock in 9.0 for your G6 play, I did it in mine and I go back I was with an equal problem
i am used this version for my cellphone XT1922-5_ALJETER_RETBR_9.0_PPP29.55-25_cid50_subsidy-DEFAULT_regulatory-XT1922-5-BRAZIL-MANAUS_CFC you used similar version
in fastboot my solucion
fastboot getvar max-sparse-size
fastboot oem fb_mode_set
fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img
fastboot flash modem NON-HLOS.bin
fastboot flash fsg fsg.mbn
fastboot erase modemst1
fastboot erase modemst2
fastboot flash dsp adspso.bin
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.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 vendor vendor.img
fastboot flash oem oem.img
fastboot erase cache
fastboot erase userdata
fastboot erase DDR
fastboot oem fb_mode_clear
Worked like a charm for my Xt1922-3 RETEU.
After running into some issues with my custom ROM, I decided to flash back the Stock firmware on my Moto G5S. In that process I also tried to relock my bootloader but I ran into some issues that I couldnt find an answer to on the Internet.
The first issue was that I couldnt flash the gpt.bin (not exactly sure what it is) and got the error message that it was a downgrade which wasnt possible. The flashing of the other files went without problems at all and also the phone booted sucessfully. So does that gpt.bin matter when flashing the Stock Rom or can I just ignore it?
I doubt that because when I try to run oem lock it gives back an error and says that I had to check "Allow OEM-Unlock" in Developer settings which isn't possible because obviously the bootloader is already unlocked and so it is greyed out.
So what did I do wrong and how do I lock my bootloader again?
DOWNLOAD OREO ROM AND TRY THIS
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 system system.img_sparsechunk.9
fastboot flash modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot erase cache
fastboot erase userdata
fastboot erase customize
fastboot erase clogo
fastboot oem fb_mode_clear
fastboot oem lock
fastboot oem lock
fastboot reboot
That is basically what i already tried except of the two lines erase customize and erase clogo. But I'm getting permission denied errors with these and my bootloader still wont lock.
Is there any way to widen the permissions you have in the bootloader?
I was suppose to relock my bootloader, looked on YouTube and Google for answers. And tried this set of commands in the Cmd:
fastboot oem lock
fastboot oem lock
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 boot boot.img
fastboot oem lock
At the commands "flash oem oem.img" down to "fastboot flash system system.img_sparsechunk.4", it says that it failed at the end. I tried three times, still the same thing, so I got desperate to fix the issue and looked on google how to relock bootloader again.
And I just found another set of commands from a website to start off the process:
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 erase customize
fastboot erase clogo
fastboot oem fb_mode_clear
fastboot reboot
At the end, my phone just ends up dead, I tried turning on back to fastboot mode, it didn't worked. i tried turing it on like how we usually turn it on, same results. I tried charging the phone, the same nothingness we see when our phones are off, and I know that I charged my phone before attempting to relock bootloader.
And I think I just bricked my phone.
Edit: I'm using a Moto G5 [cedric]
Never try and relock the bootloader once you have unlocked it - there is just no point as if you don't do it right you will destroy your device & if you do lock the bootloader without flashing the firmware correctly you may never be able to flash the correct firmware or do it properly again (without specialist equipment)
The first set of instructions you did would never work as for this device there are 9 sparsechunks 0-8
The second set of instructions would not have locked your bootloader but would have just re-flashed stock firmware
The chances are you either flashed the wrong firmware or you tried to flash old firmware and corrupted your gpt & bootloader
If you can't get into your bootloader then follow my guide below step by step exactly - however you may only be only to re-flash firmware if your device is bootloader unlocked as you may get validation errors when trying to reflash gpt & bootloader
https://forum.xda-developers.com/g5/how-to/rooted-moto-g5-run-morning-post-image-t3776012