yashsingh1/xdaforums huggingface dataset:
[Moto G5 Plus Guides, News, & Discussion] irfanalinawaz:
Here it is most awaiting fastboot rom file...

https://drive.google.com/folderview?id=1NR--EZXzMCzbKT0GCBp3gKbp5TrU_ImE

POTTER_RETAIL_8.1.0_OPS28.85-13_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml

fastboot 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.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

if you ever played with your persist, its not fixing those persist who flashed other device persist to gain IMEI and VoLTE, safe for those who never played with their persist and for those who are having baseband with ending with capital R. Direct flashing via fastboot ending with no signals and also not imei if dont skip erase modemst1

erase modemst2.

Guide for those who are not on their own persist but with another persist able to use Signals with volte and using any custom or nougat or twrp rom

first take backup of your current working efs and persist on sd card or otg

Thn flash above rom via fastboot, dont skip anything, reboot system thn again go in fastboot menu

Flash twrp, thn in twrp only flash only FIRMWARE from SOAK Test 1 Aroma by [MENTION=7346927]NZedPred[/MENTION] ( https://www.androidfilehost.com/?fid=1322778262903990826 ), Thanks [MENTION=7346927]NZedPred[/MENTION] for his great work, now restore your efs and persist, roboot system.

If you want to lock bootloader thn follow these commands in fastboot

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 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 boot boot.img

fastboot oem lock

All of these worked for me as I was also not on my own persist.

everything working fine CAMERA, VOLTE, WIFI, FINGERPRINT, locked bootloader and unlocked also again with my key tht provided by moto, battery also charging faster, battery backup is also good.
[Moto G5 Plus Guides, News, & Discussion] roydhritiman:
Hey, will this work for hard bricked users? I've been using twrp flashable nougat stock ROMs since last year! Can't get back to full stock so!
[Moto G5 Plus Guides, News, & Discussion] david.gs.gm:
With ota instalation my radio say is off....with the fastboot And jumping erase modems... Rádio Will work?
[Moto G5 Plus Guides, News, & Discussion] LLegion:
Same quesrion but nomore but to try anyways
[Moto G5 Plus Guides, News, & Discussion] irfanalinawaz:
Radio will work if your Persist is intact, and you never flashed others persist to gain imei and volte otherwise there are no signal. I have tried all the methods but stll working on it, let see...hope.
[Moto G5 Plus Guides, News, & Discussion] david.gs.gm:
Tried put Oreo with one sim card only?

Another devices doing this work to get radio ?
[Moto G5 Plus Guides, News, & Discussion] irfanalinawaz:
I have tried something different I was able to gain network with volte but signals are not stable they coming and going, anyways it will take time, nothing is impossible here, I am also one from those who messed up thier Persist, and I am working on it.
[Moto G5 Plus Guides, News, & Discussion] livyansh:
help me out with an issue about retail or my software channel is retin should this version is good for me to install my build number is NPNS25.137-92-14 and I already got OTA update but my persists is not mine what should I do
[Moto G5 Plus Guides, News, & Discussion] rajeshkoshti:
This means TWRP flashable is on its way.:good:
[Moto G5 Plus Guides, News, & Discussion] irfanalinawaz:
These commands are not nessecery, ignore them and proceed. These commands will not affect any future ota or update.
[Moto G5 Plus Guides, News, & Discussion] irfanalinawaz:
Bro you need to avoid this to flash, right now there is not any solution for those who are not on their persist, you will end up with no signals. So wait, I am still working on it.
[Moto G5 Plus Guides, News, & Discussion] Cupcake 1.5:
We already have that from beta. The latest beta was same as official release.
[Moto G5 Plus Guides, News, & Discussion] antojamez:
After upgrading to oreo, download the Oreo flashable zip (Aroma) of SOAK1 and install only the firmware. And restore your efs after this step.

My phone is working perfectly with this, no network issues.
[Moto G5 Plus Guides, News, & Discussion] livyansh:
okay, bro, I am waiting just let me know whenever you find out any solution about VOLTE or no network issues
[Moto G5 Plus Guides, News, & Discussion] irfanalinawaz:
There are also many hidden issues after this method, wifi is getting slow while Bluetooth is active, if Bluetooth inactive thn also there are frequent wifi disconnection. Fingerprint also getting so slow while screen is off, I already tested it.
[Moto G5 Plus Guides, News, & Discussion] riyan65:
Hey I also got that errors after few time my device got hard bricked.
[Moto G5 Plus Guides, News, & Discussion] irfanalinawaz:
These commands are not responsible for hard bricks, may be there are another reason for hard bricks.
[Moto G5 Plus Guides, News, & Discussion] roydhritiman:
Asking again...

Will this work for hard bricked users? I've been using twrp flashable nougat stock ROMs since last year! Can't get back to full stock so!
[Moto G5 Plus Guides, News, & Discussion] irfanalinawaz:
First post your fastboot getvar here, then tell me what is the condition of your persist, imei, volte etc. Also from fatboot menu take a pic and post them also, and describe how you recovered your hard bricked device, then we can explain you. Thanks.
[Moto G5 Plus Guides, News, & Discussion] livyansh:
but I got the OTA update on my phone to download and I did that but I am the little bit afraid to install it just because of VOLTE and IMEI
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
And you don't want to unlock the bootloader again?

That would most probably solve the problem with the greyed out OEM setting.
[Moto G5 Plus Guides, News, & Discussion] Moondroid:
Well, I'm planning on trying it when I get a minute (busy Sunday, cookout and all that). Prepared for failure from what I've read on XDA, but it's worth a try. If I can manage to get it unlocked again, I'm sure I'll be able to fix the startup problem.
[Moto G5 Plus Guides, News, & Discussion] Moondroid:
Done. Unlocked, rooted, ran the fix from TWRP terminal and all is well. Quoting your post again so you'll be sure to get this. I really appreciate you responding on this. I guess I already knew what to do, but was just worn out from searching/reading/sweating. Sometimes a little moral support is the ticket. Have a great evening and week ahead.
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
That's good news! I'm really pleased that you could solve your problem with a little help from my side but hey, that's what XDA is all about.

Also it's often some kind of information overkill in reading all the stuff here that can make one doubtful.

Have a nice evening too and if there's anything I can do just PM me. Good luck!
[Moto G5 Plus Guides, News, & Discussion] Surplus:
Fixed my GPS, cheerio
[Moto G5 Plus Guides, News, & Discussion] hammad97:
It worked for my xt1686 Indian variant. Thank yo so much
[Moto G5 Plus Guides, News, & Discussion] JonathanR9:
Hello!

Hey I am new with the moto G5 Plus and I have a question. Well, I am trying to root my Moto G5 plus but before I do it I´d like to know if there is a way to put it back all normal (just in case I need it) so I am wondering, does this stock rom work for a Moto G5 Plus with android 8.1 , 32 GB storage and 2 GB of ram, software channel: Retus and model: XT1687?? I know it is not the best version however it´s the best I can get in my country lol.

And if it doesn´t, can anyone that has the same moto g version as mine provide me with the correct link where I can find that stock rom?

thank you very much in advance.
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
Hi welcome to the community!

You can't put one thing back: To root your device you have to unlock your bootloader on the Motorola website. You can lock it afterwards but the device will always show that it has been unlocked once.

There's a code for "never unlocked", one for "unlocked right now" and one for "has been unlocked in the past".

Everything else can be reversed by flashing a stock firmware (the one you were running when you rooted it or a newer one, never flash an older firmware, that will hardbrick your device!).

Signed Motorola firmwares can be found here, these are the ones for retus devices, OPS28-85 17-6-2 is the latest and last one:

https://mirrors.lolinet.com/firmware/moto/potter/official/RETUS/

If you need any help just PM me.

Here's are two tutorials how to root a Moto G5+:

https://xdaforums.com/g5-plus/how-to/how-to-root-moto-g5-plus-t3579659/post74673573

https://xdaforums.com/g5-plus/how-to/how-to-root-moto-g5-plus-t3579659/post75114774

(Don't use the linked firmwares, use the one from above)

I recommend the first tutorial. Make sure to use the latest TWRP and Magisk version, have the latest Motorola drivers installed and ADB+Fastboot.

Here is a post I made for someone who wants to flash stock which includes the latest needed versions:

https://xdaforums.com/g5-plus/how-to/fix-persist-resolve-imei0-explanation-t3825147/post80478329 (Don't use the linked firmwares but you can use the flashallO.bat because the number of sparechunk files is different in Oreo).

Good luck and happy flashing.
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
To ask the obvious: Have you removed all spaces etc, made one string out of the lines (in fact it should be 5 lines...) and inserted it on the field on the Motorola website that's meant for it?

When you're logged in it's here: https://motorola-global-portal.custhelp.com/app/standalone/bootloader/unlock-your-device-b

What output do you get?

Is your device maybe carrier locked?
[Moto G5 Plus Guides, News, & Discussion] JonathanR9:
Hey I don´t know what the **** I did lol but I was able to receive the code in my email but I swear to you that I tried the same so many times this yesterday and watched many videos even for 1st generation devices! and yes, I did remove all spaces before pasting the code in the Motorola website.

I don´t know if it was in this post but I read that someone ask if there is a limit on the amount of requests that Motorola receives and completes daily to unlock the bootloader... well I think that too because I have done the same thing this morning and it worked. I receive the code right away.
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
Cool. Good to hear it's working at last!
[Moto G5 Plus Guides, News, & Discussion] JonathanR9:
Thanks to you for helping me out.

I have another problem now. I have rooted my phone and I was watching a video to enable screencast on this Moto G and to do that, it is required to edit the build.prop... I grant super user permission, open the build.pro, edit it, but at the moment that I tried to save it it fails... It says that something like the changes will not apply or unable to save and basically it does not let me edit it. I have root access because I have titanium back up to freeze some apps, I have checked in root checker and I do have root access.. basically that's the only thing that does not let me do... I have tried to edit it with root explorer, root browser, es file explorer (i found it on google) and also with build.prop editor and it always fails to save it.

What do you thing is the issue?

I have stock rom 8.1 February patch, with latest TWRP and latest Magisk.

Thank you in advance.
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
That's because magisk is systemless root. It mirrors the whole system partition. So if you want to change things there you'll have to do that systemless too, best way would be with a magisk module.

There is good one by [MENTION=4667597]Didgeridoohan[/MENTION]: https://xdaforums.com/apps/magisk/module-magiskhide-props-config-t3789228/post76494810

The whole thing is a bit complex, here are some information about editing build.prop:

https://xdaforums.com/apps/magisk/mod-magisk-v1-universal-systemless-t3432382/post80104909

https://xdaforums.com/apps/magisk/mod-magisk-v1-universal-systemless-t3432382/post80527243

https://xdaforums.com/apps/magisk/mod-magisk-v1-universal-systemless-t3432382/post80527257

As you can see some people have success editing the build.prop in system with Root Explorer and mounting r/w. You can give that a shot too but the main goal of magisk is to not touch /system because of hiding root and passing safetynet. But it's worth a try, I change my bootanimation in system/media and have no problems in hiding root.

That's what the developer of magisk says about props:

https://topjohnwu.github.io/Magisk/details.html#resetprop

If you can't solve that problem ask in the magisk thread:

https://xdaforums.com/apps/magisk/mod-magisk-v1-universal-systemless-t3432382

Good luck.

Edit: You can edit the build.prop in the mirrored system partition that can be found here:

/sbin/.magisk/mirror/system
[Moto G5 Plus Guides, News, & Discussion] kash664:
Unable to lock Bootloader

I'm unable to lock the bootloader again as the following error comes in cmd prompt :

Check 'Allow OEM Unlock' in Settings.

When I go to developer options it says no need as bootloader is already unlocked. Please help. I am able to install stock and it works fine, receiving updates but bootloader is not getting relocked.
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
I don't know why someone wants to relock the bootloader again but here is how to do it:

https://xdaforums.com/g5-plus/how-to/how-to-lock-bootloader-potter-version-t3694952/post74301738

Use Motorola signed fastboot firmware for your region (only the same one you're running or a newer one, older firmware will hardbrick your device!):

https://mirrors.lolinet.com/firmware/moto/potter/official/

Be aware that the above tutorial is for Nougat firmwares which have only 4 sparechunk files.

Instead of the posted commands use these:

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

and to relock

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 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 boot.img
fastboot oem lock
[Moto G5 Plus Guides, News, & Discussion] JonathanR9:
Thank you! A you said, this process is really complex that it blew my mind! well I ended up editing the build.prop with TWRP and my phone connected to the computer, mounted system and changed it to read and write while connected, used command prompt from windows and entered some ADB commands to download the build.prop file to my computer and then edited with a program called Notepad++, and used other ADB commands to send it back to the system folder. What I wanted to do at the end is to be able to connect my phone to my smart TV with using the screen cast feature and it worked
[Moto G5 Plus Guides, News, & Discussion] rajpreet903:
Can anyone provide the video to install this properly....plzz
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
Follow this guide:

https://xdaforums.com/g5-plus/how-to/fix-persist-resolve-imei0-explanation-t3825147/post80478329
[Moto G5 Plus Guides, News, & Discussion] sdhadange:
Naugat
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
Yummy...but written with an o.
[Moto G5 Plus Guides, News, & Discussion] avi_p94:
I tried to root my phone moto G5+.

product/variant : potter XT1686

1st time I tried, in root checker app it shows me no proper rooted your phone.

again I start searching for options and I found the solutions on many sites.

I put it all the solutions and at the end, the error shows me that kernel is not on your phone. please repair with software upgrade assistant.

I downloaded software repair assistant, and when I connect my phone in fastboot it shows me "when the phone gets connected the menu will automatically be closed " but it was stuck there only.

but again 1 thing I didn't get it is that when I move in recovery mode and go for a reboot it shows me "no os is installed? are you sure want to reboot?" when I start rebooting it will come automatically to the main menu which comes when we press volume down + lock button.

so please suggest to me what should I do.?

I don't get, I m stuck here from last 7 days.

please please please help me.

Thanks for helping me in advance.
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
You have to provide some information about what you did.

Have you unlocked your bootloader on the Motorola site?

Flashed TWRP?

Flashed magisk?

First of all I would recommend to fastboot flash the latest firmware. Here you find everything you need:

https://xdaforums.com/g5-plus/how-to/fix-persist-resolve-imei0-explanation-t3825147/post80478329
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
Follow this guide :

https://xdaforums.com/g5-plus/how-to/fix-persist-resolve-imei0-explanation-t3825147/post80478329

Download the firmware for your location and do every step after the other.
[Moto G5 Plus Guides, News, & Discussion] avi_p94:
Moto g5+ root_stucked

Hi,

i followed the all steps till 8.

after excuting "flashallO.bat" ,my phone get stucked and i am not able to do anything on my phone.

so i pressed and hold down the power button key to start the phone.

so after that phone is started but it automatically went to that screen :

"your device has been unlocked and cant be trusted.

to learn more visiit :

motorola.com/unloackbootloader

ID:N/A

your device will be boot in 5 seconds."

and device is stucked here.

1) Download the 8.1.0_OPS28.85-17-6-2 firmware for your region (it's the last one for the Moto G5+ (potter), there won't be any updates anymore, so no risk of bootloader downgrading)

2) Install Mini ADB & Fastboot (best place is the root directory of C: or wherever your OS resides).

3) Extract the firmware to that ADB & Fastboot folder.

4) Download my "flashallO.bat" and move it to that folder too.It removes the need for you to manually flash all partitions, just double-click it and it'll run all the commands for you.

5) Download and install Motorola device drivers.The program is called "Motorola Device Manager".

6) Reboot your phone to the bootloader. To do this, turn it off, then hold down the power and volume down buttons until you see a bugdroid undergoing open-heart surgery.

7) Connect the phone to your PC with your USB cable. Type

Code:

fastboot devices

to check if your device is connected. A serial number should be shown.

8) Run the flashallO.bat script. (Caution: This will wipe your device completely!) It will take some time to flash, just be patient and don't worry.

If the command window appears for a brief moment and then disappears, the device drivers may not be installed correctly. You can ask me in that case, there are some special drivers that may solve that.

9) Once the command window closes, it should have completed the flashing process and you are safe to press the power key on the phone to start Android. Just make sure that the text near the buttons reads "START".

PLEASE SUGGEST ME FURTHER STEPS.

---------- Post added at 05:43 PM ---------- Previous post was at 05:20 PM ----------

should i followed the other steps for rooting or wait ..??

---------- Post added at 06:07 PM ---------- Previous post was at 05:43 PM ----------

Hi,

I followed all the steps of rooting.

but after that i m stucked in same screen :

" your device has been unlocked and cant be trusted.

to learn more visiit :

motorola.com/unloackbootloader

ID:N/A

your device will be boot in 5 seconds. "
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
Ok, before trying to root your device you have to complete the firmware flash. When the flashing process stopped in between it would be important to know at what step it stopped and why.

So provide a log (or a screenshot) which command is the one to fail.

Maybe don't use the flashallO.bat , instead of it write every command per hand and post here when and why the procedure fails, like

fastboot erase modemst1 - press Enter
fastboot erase modemst2 - press Enter
fastboot flash dsp adspso.bin -press Enter
fastboot flash logo logo.bin

-press Enter

and so on. (All commands in the flashallO.bat!)

I think you have tried to flash the wrong firmware before, so maybe it's a problem of downgrading.
[Moto G5 Plus Guides, News, & Discussion] avi_p94:
I used

"XT1686_POTTER_RETIN_8.1.0_OPS28.85-17-6-2_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml"

this firmware and other motorola softwares and mini ADB is is given by you in link.

and before when i start rooting my phone 1st time :

===== [ CEDRIC_AMZIN_NPP25.137-33_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml

Magisk-v20.4

lazyflasher-no-verity-opt-encrypt

Arrow-v8.1-z2_plus-OFFICIAL-20180827

Magisk-v19.3

twrp-3.3.1-0-potter.img

twrp-3.3.0-0-potter.img

UPDATE-SuperSU-v2.82-20170528234214

4a2a191.diff ]========= used this files (and i dont know what happened to my phone after using t his files )

Please share your comments.
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
The first set of commands is working, the first failure appears when flashing boot.img, after that all commands fail with unknown error.

The Motorola drivers are installed?

Maybe try the Lenovo Motorola Smart Assistant:

https://support.lenovo.com/de/de/downloads/ds101291

https://support.lenovo.com/us/en/solutions/HT102605