yashsingh1/xdaforums huggingface dataset:
[Moto G5 Plus Guides, News, & Discussion] eemgee:
Guys I'm stuck!

I'm trying to back stock up.....

Unlocked bootloader ✓

Booted twrp ✓

Ticked to boxes for what I need to backup ✓

Then it gets stuck on updating partition details (left 8t for over a hour)

I don't know what I'm missing!?! I don't have to flash magisk before backup do I?
[Moto G5 Plus Guides, News, & Discussion] cidlc:
Does anyone have latest stock firmware for XT1687 RETUS??
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
You have to flash TWRP, it's not possible to do a nandroid backup with only booted into potter TWRP.
[Moto G5 Plus Guides, News, & Discussion] eemgee:
Ah thank you! I wish someone said that ages ago. :good:
[Moto G5 Plus Guides, News, & Discussion] SixPathsSageLorde:
Please help me!!

hello xda developers.....i rooted my g5 plus and tried to install the oreo pixel exp rom but failed....so i unrooted it and flashed te stock rom....the brasil one....my phone beacame a fresh one...when i tried to install the soft update thru ota...while installing the phone turned off.....it would not turn on no matter what i do....i gave the phone outside for repair....i don't know what they did...but they turned it on again...now my phone only has the twrp screen and every option with no OS......im trying to unroot it again but it wont....the bootloader is unlocked...when i try to install magisk 15.3 i get this error....PLEASE restore stock boot image...system updater error 1........

WHAT Should i do??.....how do i install the stock boot image...i just want my phone to start!!......

Pls devs pls HELPP!!!
[Moto G5 Plus Guides, News, & Discussion] SixPathsSageLorde:
No sim card detected

I managed to install lineage 14.1 on my g5 plus but it could not detect the sim...also flashed another rom-rr,but same result...I heard that flashing custom ROMs make your phone lose your imei no..Is it possible to recover it back??Thanks
[Moto G5 Plus Guides, News, & Discussion] eemgee:
I feel a bit daft asking because I should be able to find the answer.

Do I have to flash magisk or do something else to make twrp stick and not keep reverting to stock recovery?
[Moto G5 Plus Guides, News, & Discussion] psychopac:
I don't think you have to flash anything to keep TWRP installed in your phone. Once you flash TWRP with the fastboot command "fastboot flash recovery TWRP.img" it permanently replaces stock with itself
[Moto G5 Plus Guides, News, & Discussion] eemgee:
I couldn't get it to stick until I flashed magisk.

Strange...
[Moto G5 Plus Guides, News, & Discussion] psychopac:
That's strange
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
What device? If your data partition is f2fs formatted issues with TWRP are possible.
[Moto G5 Plus Guides, News, & Discussion] eemgee:
XT1685 but it's funny you mention positions.

When I was stock if I went to format userdata in fastboot it always give a unable to format raw position error.
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
Tried this one? https://xdaforums.com/apps/magisk/guide-magisk-official-version-including-t3577875

Fixed all TWRP issues for me (non sticking settings etc) and made magisk work flawlessly.

Moves magisk from data (f2fs) to cache (ext4) partition so no need to reformat data.
[Moto G5 Plus Guides, News, & Discussion] CobraBoyFR:
Hey there !

I'm wondering because I haven't unlock or flash a new ROM since last year and I forget how to do that : If I unlock, flash, and root my G5+ because I'm upset waiting for the upcoming update, how can I get the incoming OREO update when it's released ? I remember that on my G3, it needed requierements but I can't remember them.
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
After rooting and flashing TWRP you have to return to full stock again to receive OTA. Look for your firmware (there are several sources posted, for example here or here), install Minimal ADB & Fastboot and the needed Motorola drivers on your PC, extract the firmware into your adb & fastboot folder, put this flashall.bat into the same folder, bring your device in fastboot mode, open a cmd prompt in your adb & fastboot folder and type

fastboot devices

If your serial number appears start the flashall.bat and let it do it´s work. After that you are on stock again and can receive OTA.
[Moto G5 Plus Guides, News, & Discussion] CobraBoyFR:
Perfect mate, thanks :)
[Moto G5 Plus Guides, News, & Discussion] kkn14:
Whats the best way to backup everything unrooted/locked bootloader on stock rom?

I dont want to lose anything at all and I want to root/unlock bootloader and perhaps shift to 64 bit rom for Gcam
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
Unlock your bootloader.

Make a nandroid backup with TWRP.

Unlocking will wipe your phone. Save your pictures/music to PC.
[Moto G5 Plus Guides, News, & Discussion] Sardus87:
Hi all,

is it mandatory to perform encrypt/magisk procedure or can i just unlock the phone and then flash twrp and custom rom?
[Moto G5 Plus Guides, News, & Discussion] kkn14:
Thank you for your reply

Any chance of saving settings, home screen layouts etc? before unlocking I mean

Music and photos are on SD card so no worries about that
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
No. Unlocking the bootloader wipes the device. No way around that. If you use Nova launcher you can back up your home screen but that's it.
[Moto G5 Plus Guides, News, & Discussion] kkn14:
Does root make alot of difference with regards to camera mods etc?

Or should I wait for Oreo instead unrooted
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
That depends on what you want. For me a good sound is very important so I needed magisk to flash things like Viper or Dolby Atmos. Also Adaway was a reason. I don't use camera mods, I'm ok with the stock camera. So you have to decide if you want to wait, it seems Oreo is not coming in the near future.

If it arrives I flash my stock rom, take the OTA's and flash magisk again. No big deal.
[Moto G5 Plus Guides, News, & Discussion] vismaiy:
For me root made a lot of difference! In stock ROM I always had the error of cannot connect to the camera. I searched a lot and found out that many people face this issue using stock ROM.

Then I rooted my phone and installed elementalx kernel and flashed chromatix mod. Now I get zero errors with the camera. Can't comment on the photo quality though.
[Moto G5 Plus Guides, News, & Discussion] Smeagal192:
I think you got that the wrong way, camera cannot connect "when rooted", unrooting or flashing another kernel fixes the issue.

Answering the other guy, personally think stock rom so good found no reason to change, but then I read every post in g5plus forum and everyone has some problem with different roms, its whether you can live with them ;)
[Moto G5 Plus Guides, News, & Discussion] vismaiy:
I get what you are saying, but that camera cannot connect error was there when I was *not rooted*.
[Moto G5 Plus Guides, News, & Discussion] kkn14:
I just want stuff like HDR+ (Pixel),fix camera quality given the excellent hardware

I do face the infamous "Please restart camera" issue very very often

Too frustrating

Im thinking of switching to Mi A1, my dad uses one and I rooted it and stuff,no problems at all

But I love Moto gestures etc
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
Never had any issues regarding camera, neither rooted nor unrooted. But I've heard you can get better quality with Google camera, potter has API 2 and there are some nice ports out there so it may be true. I don't take too much photos and for me stock quality is ok. But when you have problems anyway it's worth a shot to unlock and root with magisk. You can always flash back stock again for taking OTA.

I had a Xiaomi device too and was not very impressed, the whole quality of a Moto is higher imo. But that's your choice, the Mi A1 seems to be a nice device. But I have to say the Moto G 5+ is one of the best devices I ever owned regarding stock ROM, features, performance and especially battery.
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
Don't crosspost. I answered you in the other rooting thread
[Moto G5 Plus Guides, News, & Discussion] Dyscalculic:
I have a question about my US Retail Moto XT1687 64 GB 4 GB RAM from Best Buy.

I unlocked BL long time ago when I originally purchased it. Then rooted with systemless Magisk. Along the way the root stopped working and I didn't care. Been taking the security patch updates ever since and am on the April 2018 security patch with Android 7.0 NPNS25.137-93-10 build.

I just got back on to xda to try and relock the bootloader. Nothing fancy, shmancy. I see reports of people's IMEI/ VOLTE/ LTE disappearing. Is that only for those downgrading from an OREO rom? Or is that a general issue flashing stock rom thru fastboot?

I read through a few threads, some are dated, and most seem to mention that they have been able to recover from the IMEI/ LTE issue but not been able to relock bootloader. It used to be easier than that I thought, but given that the stock rom needs to be reflashed, perhaps that's a struggle with relocking bootloader?

Another thread here says to backup EFS and Persistent, before flashing stock rom and that should avoid the IMEI/ LTE issue.

My question is, how can I relock the bootloader if someone can list down the outlining steps and precautions, please?

Apologies that I am using this thread, but I didn't think opening up a new thread was warranted. Please advise if otherwise and I will take care of it.
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
Why do you want to relock the bootloader?

It doesn't matter for OTA updates and you won't get the "device was never unlocked state" again.

Anyway, loosing IMEI or LTE is an issue that appears if you reflash stock after being on a 64bit custom ROM so no need to be afraid of this when you want to relock a stock ROM and you never have been on such a custom ROM.

It's not clear for me how you lost root but when you were able to install OTA security patches aftrerwards there seem to be no more traces of magisk anymore, if that would be the case I would strongly recommend flashing full stock ROM again.

How did you lose it?

For locking the BL you need something like Minimal ADB & Fastboot and the same firmware you are running.

Extract that firmware into your fastboot folder on your PC, bring your device in fastboot mode, plug it in via USB and type the following commands:

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

There's also a thread about the procedure:

https://xdaforums.com/g5-plus/how-to/lock-bootloader-moto-g5-plus-indian-t3638835

Naturally you need another firmware than the one mentioned in that thread, this NPNS25.137-93-10 firmware should work for you:

https://drive.google.com/file/d/16Bfp3nVfvKMURAeKagOaOImX-lvJrYBF/view?usp=drivesdk

As you have to flash full stock after this if you want to receive future OTA it may be not a bad idea to do this before relocking BL too to avoid any magisk related issues.

Good luck!

Edit: Don't forget to take a full nandroid incl. EFS before you start!
[Moto G5 Plus Guides, News, & Discussion] Dyscalculic:
Holy world Batman. I was hoping for some pointers, but you basically gave me the whole process. Wow, thanks for it all.

I should have explained. I'm kind of tired of BL and Rooting and the maintenance that comes along. Still love the technical learning I get here, but no longer getting the time.

My main reason was TiBP data backup for a couple of my crucial apps that have since gone cloud, or allow my data transferred over when using Pixel Data Transfer Tool.

From now on, I want all integrity intact on my phones for Netflix and Google Pay.

Also, I'm selling this phone eventually.

Now, everything seems clear but just so I don't get it wrong, the full Nandroid should be through the TWRP recovery and the EFS and Persistent backups should be how a thread here about "EFS and Persistent" explains, correct? And how come there are 3 instances of the lock command in your instructions. Finally, about the not getting "never unlocked" state, will secure apps like Netflix and Google Pay play nice after relocking you think?

As for your question, I really couldn't observe why the root didn't last. I hadn't even taken a security update back then. It remained rooted barely a week or two and poof, TiBP auto backups started telling me they couldn't acquire root.

Soon thereafter, I didn't even miss root. I tried to think hard and long about what i did to lose it but couldn't figure out. The security updates were done after the fact cause I stopped caring for the lost root.
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
You're welcome, I'm always happy if someone explains the stuff to me and so do I. My motto is if you don't help you don't deserve help.

For your nandroid you don't need to backup persist seperatly so you can use the official TWRP and just back up EFS. You can follow the mentioned thread about backing up EFS and persist but as you've never been on a 64bit Oreo custom ROM you should be good to go with a full nandroid backup made with official TWRP which includes EFS, system, OEM, data,boot and logo.

About the fastboot commands: I think the second

fastboot oem lock at the beginning could be superfluous but I didn't relock my BL until now on this device so I'm not sure about it. Normally you need one command at the beginning and one at the end.

The "never unlocked" state is only significant for things like warranty, it has no effect on Google pay or Netflix so no worries about that.

So as you were able to receive and install OTA there should be no problem.

It's up to you if you go the route

- make a full nandroid

- fastboot flash stock ROM

- relock bootloader

- fastboot flash stock ROM again

to be on the safe side or just

- make a full nandroid

- relock bootloader

- fastboot flash stock ROM
[Moto G5 Plus Guides, News, & Discussion] Dyscalculic:
Success!!

Happy to report success. Status shows OEM LOCKED and OFFICIAL SOFTWARE.

Followed the safe steps without skipping anything. The nandroid backup made it to 100% but got stuck at the final updating partitions details step. I held down the power button to get out of that and proceeded anyway even if the backup made was not going to be useful, as it was supposedly a straight forward process to follow.

I read up on the thing and it may have over-complicated the matter, cause if I boot into TWRP, getting the full backup can be hit or miss on this phone. I had to flash the TWRP, it would have required me to go ahead with SuperSU and all, which was really unnecessary. Fearing complications, or worse, a hardbrick - I didn't go the whole thirteen yards.

As for the repetitive fastboot oem lock command, I realized and noticed that is how fastboot is designed. It specifically asks to enter the command again the first instance, and after the second instance, it says to flash the original image and the re-run the oem lock command. So it is supposed to be run 3 times and supposedly mass-copy-paste friendly for the command prompt.

Lo and behold, all done.

I will certainly miss rooting and TWRP.

Thanks again for all the help. Posting here so others can benefit.
[Moto G5 Plus Guides, News, & Discussion] rayudu123:
I have xt1686 model..when i tried to get unlock data with fastboot oem get_unlock_data, it shows that unlock data unavailable..i have contacted to Motorola forums for solution, they suggested me to service my device, i did service my device 4 times till now..but the problem has not resolved..please help me to unlock bootloader of my mobile

Thanks in advance
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
No way without the Motorola unlock code.
[Moto G5 Plus Guides, News, & Discussion] Noobieroot:
is there any guide to install the soak test android oreo for moto g5 plus like there is one for g5s plus

i found the link for g5s+

https://xdaforums.com/moto-g5s-plus/how-to/stockoreo-rooted-users-upgrade-to-t3807835
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
TWRP flashable soak test build:

https://xdaforums.com/g5-plus/development/oreo-twrp-flashable-stock-builds-coming-t3830482
[Moto G5 Plus Guides, News, & Discussion] Itsmejithu:
oreo bootloader unlock

Sir I have upgraded to oreo and my build number is opsOPS28.85-13 . I likes to unlock bootloader . When I go through the forum everything is written for stock or for custom roms. Is it ok to follow the normal procedure? or should I need to do something in particular?
[Moto G5 Plus Guides, News, & Discussion] Robbieb65:
Fix Brick Moto g5 plus

Hey buddy - No Worries Man!! Install rsd lite on your computer, download official rom zip, connect phone to computer, open RSD LITE, go to the location where you saved the ROM, click on it, click install...
[Moto G5 Plus Guides, News, & Discussion] Scarecrow.:
Hey!

Just wanted to know if it's possible to just unlock bootloader and remain on stock with TWRP as default recovery.. No rooting?(that will ensure I receive official OTA'S right?)

Thanks!

Cheers:laugh:
[Moto G5 Plus Guides, News, & Discussion] psychopac:
From what I've heard, you can stay stock with TWRP and still be able to receive OTAs but TWRP won't flash it for some reason. You'll only be able to download the OTAs as the only time an update will check the system modifications will be when you're trying to install an OTA from a non-stock recovery
[Moto G5 Plus Guides, News, & Discussion] Scarecrow.:
Hey,

I have a RetIN device... But I ended up installing the RetUS October patch(85-17-2)... Want to revert to 85-13 line...was wondering if it's necessary to take a backup of EFS and persist?was thinking of just unlocking and installing this stock via fastboot...I'm currently on stock,never rooted or unlocked..

Thanks.

Cheers!:laugh:
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
It wasn't necessary for me when I flashed Oreo 85-13.3 but I made a backup and I would recommend to do so, just in case. TWRP 3.2.3.1 has the option to backup persist and efs

Take care of the bootloader, if you downgrade your device may get bricked. If you're not sure you can skip the lines

fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img

when flashing.
[Moto G5 Plus Guides, News, & Discussion] Scarecrow.:
Thanks a lot!:laugh:
[Moto G5 Plus Guides, News, & Discussion] eduardobastier93:
Thx, this is useful.
[Moto G5 Plus Guides, News, & Discussion] FLASH+HACK:
Hello Friends, I Have A Problem And I Need Your Knowledge And Help You Will See: I Have Oreo 8.1 Factory Stock, I Have Wanted To Unlock The Bootloader But When I Want To Do It Does Not Leave Me Because My PC Does Not Recognize My Device Just Charges It, Already Activate USB Debugging , the unlock of OEM and already tried with another port and USB cables but still does not recognize the PC and without appearing, any suggestions and solutions? , it is error Of the stock system?
[Moto G5 Plus Guides, News, & Discussion] NicoKlius:
Hello comminuty I have a big problem, i have OREO 8.1 Stock (unlock booloarder), but when i flash Recovery TWRP 3.3.0 i can enter on it, but when i reboot and I try to enter to recovery , the device enter to the Stock Recovery, What can I do to not lose the Custom recovery? thx!!!!!
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
After flashing TWRP boot into it once again, not to system. That should make it stick.
[Moto G5 Plus Guides, News, & Discussion] user1100100:
Seeking Help: Cannot flash custom rom in recovery mode.

Hi Forums,

First attempt at flashing Moto G5 Plus XT1687 USA with custom ROM.

Current Android Ver.: 8.1

I definitely unlocked root of the device.

It always boots to Motorola message, "Your device has been unlocked and can't be trusted."

And then it will start up and load Android 8.1

I installed Official TWRP from Google Play but when I run it, I receive error message, "Package Installer keeps stopping."

When I try to boot into recovery mode, I receive a "No Command" screen message and see the Android lying down with the red triangle "!" sign popping out its stomach.

So then I push the power button and the Volume + buttons at the same time, and then release the Volume + button to get past the "No Command" screen.

I then have access to the recovery mode and try to choose -

- apply update from sdcard

I then get the following error messages:

- couldn't mount /sdcard

-couldn't mount /data/media/0

E: error opening /data/media/0 : No such file or directory.

I definitely have a formatted microsd card in the device and downloaded the latest havoc android 10 zip file from 7/26/2020 to the sdcard.

So, I'm stuck and I'm doing the same thing over and over and cannot get anywhere.

I would definitely appreciate your guidance and help.

Thank you for reading.
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
If I understand you correctly you're trying to flash a custom ROM from stock recovery. That isn't possible. Download latest TWRP from here: https://eu.dl.twrp.me/potter/

paste to your ADB and Fastboot folder on your PC

and flash it in fastboot

fastboot devices

(to check the connection, it should return a serial number) and

fastboot flash recovery "name-of-recovery.img"

where "name-of-recovery.img" stands for the original name.

If you don't rename it it would be

fastboot flash recovery twrp-3.4.0-0-potter.img

After that boot directly back to recovery (no reboot to system in between) to make TWRP stick.

Then install your custom ROM like it's recommended by the developer (clean flash).
[Moto G5 Plus Guides, News, & Discussion] boringtech:
After unlocking my device, an XT2075-3, I tried:

fastboot flash recovery twrp-3.5.0_9-0-potter.img

but I now get

No valid operating system could be found
The device will not boot

Perhaps my device has an A/B partition scheme and fastboot went wrong.

I am using fastboot version 30.0.5 from Linux. Any help appreciated.

has an A/B partition scheme. So now when I boot I get
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
You're in the wrong forum and used the wrong TWRP build (I don't think there's an official TWRP for your device).

This is for Moto G5 Plus, you're device is a Moto G 5g Plus.

Check this forum for your device:

https://xdaforums.com/f/moto-g-5g-plus-questions-answers.11143/
[Moto G5 Plus Guides, News, & Discussion] boringtech:
Thank you for the pointer @Wolfcity, I reposted it there.
[Moto G5 Plus Guides, News, & Discussion] Venkatesh18:
Hi guys,

After installing custom rom build with latest twrp, when i tried to reboot to system from twrp goes into twrp again..

only way to get into the system is to reboot to bootloader then boot to system,

after boot into system, when I reboot the device it goes again into twrp instead booting into system.

Please let me know if any resolutions, looking forward to it :)

or If you guys able to provide me the steps to go back to stock rom, that would be helpful too. thankyou
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
You're in a thread that is a tutorial to flash stock firmware so just go to OP and follow the steps.

I replied to your double posting here:

https://xdaforums.com/t/unofficial-twrp-3-1-1-0-moto-g5-plus-potter.3576575/post-85362685
[Huawei P10 Questions & Answers] Ahzriaz:
Hi all,

I like the screen image quality compared to the p9 lite. However when looking at it from a slight angle (short viewing distance, brightness high) I can clearly see diagonal lines. I'm quite sure it isn't the digitizer grid (as i know how that looks and under very bright light can see it to)

It looks like it is the pixel grid but I have seen phones with lower pixel density and at these i can't see anything similar.

Can't be the only one noticing this, what is your experience?

See pictures (around text Iphone 7) to see the lines...
[Huawei P10 Questions & Answers] frgo:
Can't see anything special about the screen. Actually I'm quite surprised with the lcd quality coming from samsung's amoled. Maybe huawei is cheating with displays too :D

What about plastic "screen protector", did you remove it?