yashsingh1/xdaforums huggingface dataset:
[Moto G5 Plus Guides, News, & Discussion] IamRage7:
Download moto toolkit. It will help you to unlock bootloader + you can use it to root your device.

---------- Post added at 08:27 AM ---------- Previous post was at 08:22 AM ----------

https://drive.google.com/file/d/0By-NOo-lCyxBd3o2U3VDWTlNdGs/view here's the link for it
[Moto G5 Plus Guides, News, & Discussion] moozer:
Best option to root G5 plus? Will I lose all data?
[Moto G5 Plus Guides, News, & Discussion] jerryspring:
this is my getvar all

C:\Program Files\Minimal ADB and Fastboot>fastboot getvar all

(bootloader) slot-count: not found

(bootloader) slot-suffixes: not found

(bootloader) slot-suffixes: not found

(bootloader) version: 0.5

(bootloader) version-bootloader: moto-msm8953-C0.8C

(bootloader) product: potter

(bootloader) board: potter

(bootloader) secure: yes

(bootloader) hwrev: P3B

(bootloader) radio: 1

(bootloader) storage-type: emmc

(bootloader) emmc: 64GB SAMSUNG RC14MB RV=08 PV=07 FV=0000000000000007

(bootloader) ram: 4GB SAMSUNG LP3 DIE=8Gb M5=01 M6=05 M7=00 M8=5F

(bootloader) cpu: MSM8953

(bootloader) serialno: ZY224C8JC5

(bootloader) cid: 0x0032

(bootloader) channelid: 0x8d

(bootloader) uid: C4E5835000000000000000000000

(bootloader) securestate: oem_locked

(bootloader) iswarrantyvoid: no

(bootloader) max-download-size: 536870912

(bootloader) reason: Reboot mode set to fastboot

(bootloader) imei:

(bootloader) meid:

(bootloader) date: 08-05-2017

(bootloader) sku: XT1687

(bootloader) battid:

(bootloader) iccid:

(bootloader) cust_md5:

(bootloader) max-sparse-size: 268435456

(bootloader) current-time: "Thu Jan 1 23:41:39 UTC 1970"

(bootloader) ro.build.fingerprint[0]: motorola/potter/potter:7.0/NPNS25.

(bootloader) ro.build.fingerprint[1]: 137-93-10/12:user/release-keys

(bootloader) poweroffalarm: 0

(bootloader) ro.build.version.full[0]: Blur_Version.25.321.12.potter.ret

(bootloader) ro.build.version.full[1]: ail.en.US

(bootloader) ro.build.version.qcom: LA.UM.5.6.r1-01900-89xx.0

(bootloader) version-baseband: M8953_37.46.07.47R POTTER_NA_CUST

(bootloader) kernel.version[0]: Linux version 3.18.31-perf-g8599239 (hud

(bootloader) kernel.version[1]: soncm@ilclbld35) (gcc version 4.9 201501

(bootloader) kernel.version[2]: 23 (prerelease) (GCC) ) #1 SMP PREEMPT F

(bootloader) kernel.version[3]: ri Mar 30 01:29:10 CDT 2018

(bootloader) sbl1.git: git=MBM-NG-VC0.8C-0-g22013cf

(bootloader) rpm.git: git=202d600

(bootloader) tz.git: git=6c4172f-dirty

(bootloader) devcfg.git: git=6c4172f-dirty

(bootloader) keymaster.git: git=6c4172f-dirty

(bootloader) cmnlib.git: git=6c4172f-dirty

(bootloader) cmnlib64.git: git=6c4172f-dirty

(bootloader) prov.git: git=6c4172f-dirty

(bootloader) aboot.git: git=MBM-NG-VC0.8C-0-gcba6d5d

(bootloader) qe: qe 0/0

(bootloader) frp-state: no protection (0)

(bootloader) ro.carrier: retus

all: listed above

finished. total time: 0.312s

C:\Program Files\Minimal ADB and Fastboot>

---------- Post added at 09:55 AM ---------- Previous post was at 09:38 AM ----------

tool kit wont work on my pc. Creates error when launching. i went to unlock bl again on motorola site... says its not unlockable. sigh. check out my fastboot getvar.... notice the first two lines?
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
The first lines is just TWRP looking for more than one slot to install (like for example Pixel devices with two slots A and B). That's normal and appears with every new TWRP. No need to worry about it.

If Motorola states device is unlockable there's no way to unlock it. Maybe it's a Amazon ad version or the carrier doesn't allow bootloader unlocking.

Have you removed all spaces from the code you'll get after typing the unlock command

fastboot oem get_unlock_data

?
[Moto G5 Plus Guides, News, & Discussion] jerryspring:
i go to boot to fastboot and phone just reboots?

---------- Post added at 11:07 AM ---------- Previous post was at 11:05 AM ----------

i realized i had to delete the spaces in the string. lol. why does my phone just reboot when i access fastboot? says it will reboot in five seconds, and then reboots. thanks

---------- Post added at 11:10 AM ---------- Previous post was at 11:07 AM ----------

i flashed twrp and got this in cmd prompt

C:\Program Files\Minimal ADB and Fastboot>fas

otter.img

(bootloader) slot-count: not found

(bootloader) slot-suffixes: not found

(bootloader) slot-suffixes: not found

(bootloader) has-slot:recovery: not found

target reported max download size of 53687091

sending 'recovery' (16290 KB)...

OKAY [ 0.530s]

writing 'recovery'...

(bootloader) Image not signed or corrupt

OKAY [ 0.218s]

finished. total time: 0.749s

---------- Post added at 11:18 AM ---------- Previous post was at 11:10 AM ----------

do i click cancel on twrp screen for password?

edit. after trying to access twrp, i got the dead android no command. ugh

---------- Post added at 11:32 AM ---------- Previous post was at 11:18 AM ----------

then i got this after reflashing twrp for the second time

C:\Program Files\Minimal ADB and Fastboot>fastboot flash r

otter.img

(bootloader) slot-count: not found

(bootloader) slot-suffixes: not found

(bootloader) slot-suffixes: not found

(bootloader) has-slot:recovery: not found

target reported max download size of 536870912 bytes

sending 'recovery' (12358 KB)...

OKAY [ 0.390s]

writing 'recovery'...

(bootloader) Image not signed or corrupt

OKAY [ 0.187s]

finished. total time: 0.577s

C:\Program Files\Minimal ADB and Fastboot>fastboot reboot

(bootloader) slot-count: not found

(bootloader) slot-suffixes: not found

(bootloader) slot-suffixes: not found

rebooting...

---------- Post added at 11:33 AM ---------- Previous post was at 11:32 AM ----------

xt1687

---------- Post added at 12:39 PM ---------- Previous post was at 12:33 PM ----------

That getvar was before I even unlocked bl and flashed twrp

---------- Post added at 12:42 PM ---------- Previous post was at 12:39 PM ----------

Welp... I managed to unlock the bl... initially I was able to flash twrp 3.2...but when I booted to recovery again, I got the no command dead Android. What am I doing wrong?

---------- Post added at 12:22 PM ---------- Previous post was at 11:42 AM ----------

on the step to do the cancel in twrp, and factory reset. i must have thought i did it correctly, but didnt. reflashed twrp 3.1 and did the cancel and factory reset, then rebooted twrp in twrp. now i got magisk v16 installed. any roms you recommend.... especially a rom that allows hotspot and tethering? much appreciated guys and gals!!
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
I'm still on stock. This is the best stock ROM I ever had and I'm absolutely satisfied with just rooting it.

There are a couple of 64bit custom ROMs like Aosp Extended, Pixel Experience or Lineage 15.1. but all of them have bugs, some of them just smaller ones, some bigger ones. For example often the camera doesn't work as it should.

And it has to be said that a lot of users have massive problems when returning to stock (losing voLTE, 4G or even IMEI). If you want to try out a custom ROM be sure to have a nandroid backup, especially from ESP EFS partition.

I think that the bugs may be sorted out when the official Oreo from Lenovo arrives and the devs have a better source to build with. Maybe there will be a solution for these cruel issues after returning to stock too.

There's also a 7.1.2 based Aosp Extended ROM (4.6) which maybe safer to flash.

But if you ask me I recommend staying on stock.

I always flashed custom ROMs on my devices but this is the first one I don't feel the need to do so.

Maybe later when things got more safe and stable.
[Moto G5 Plus Guides, News, & Discussion] thedr34m13:
*EFS
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
Yeah, you're right, I will edit that.

There's a race I'm watching in TV, so my brain changed it to ESP ( Electronic Stability Control ) ;)
[Moto G5 Plus Guides, News, & Discussion] jerryspring:
Tyvm for insight. I want to be able to have a WiFi hotspot for transmission and receiving. Know any way to make that work? Also, do u have Xposed installed? And if so, what did u use? Thanks. Also, I know that Xposed has modules for wifi hotspot.
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
No, I don't use Xposed. WiFi hotspot is working well on stock and I believe on the most custom ROMs.

What special features do you want from a hotspot that aren't there?
[Moto G5 Plus Guides, News, & Discussion] jerryspring:
Just being able to transmit hotspot so that other devices can connect to it.

I also hear that with Xposed, u need to flash elemental kernel so that modules will work and avoid force closings. Does this still apply with magisk v16?
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
As I said I don't use Xposed so I can't say anything about Xposed modules.

I know that because of the F2FS data partition and a faulty kernel implementation (inability to mount images r/w) in some Moto devices magisk modules don't work, maybe you mix that up.

Workarounds would be flashing a kernel like ElementalX or (that's what I did) using the F2FS loopback bug workaround module:

https://xdaforums.com/apps/magisk/guide-magisk-official-version-including-t3577875/post71554247

You'll find the latest build in the magisk module section inside Magisk Manager.

Just flash it through TWRP, it moves magisk from data to cache. Works flawlessly.

That's not a magisk bug but a bug of Motorola.

And as I said above, hotspot works without problems in stock, depending custom ROMs you'll have to test it.
[Moto G5 Plus Guides, News, & Discussion] jerryspring:
I just use Xposed modules. I'm not a fan of magisk ones. That's why I asked.
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
Two totally different things. Don't mix up magisk and xposed. As I said I think the module issue is only present for magisk modules.
[Moto G5 Plus Guides, News, & Discussion] jerryspring:
Yea. I know. Now I have another issue. Dialer force closes when I dial a number. Then I get random reboots.
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
Sounds not good. Stock ROM? Install Google dialer if you haven't. If you have xposed installed this could be the culprit. Make a log of the FC and reboot.
[Moto G5 Plus Guides, News, & Discussion] jerryspring:
K. Thanks.

Tried various dialers still force closes
[Moto G5 Plus Guides, News, & Discussion] logic88:
I just realize that I don't have a clean stock ROM image to restore.

Whoops.

Is there an archive available somewhere? I have a US 4GB/64GB XT1687 running 7.0 (Build NPN25.137-33).

Thanks!
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
The first one should fit for you:

https://mirrors.lolinet.com/firmware/moto/potter/official/RETAIL/
[Moto G5 Plus Guides, News, & Discussion] Jrhotrod:
Hello all!

I've updated my rooting guide (link here) with info on [MENTION=5228676]VR25[/MENTION]'s Magisk module. It essentially works around the F2FS bug to allow installation of Magisk modules like normal.

I should have updated it with this info a long time ago, actually... I was just busy with school. But I'm always happy to help with anything regarding this device, so if you have a question just make a post/thread and mention me. I don't love PMs, but I'll answer them if there's nowhere fitting to ask your question - and I doubt that will happen.

And since the Oreo update is nearing us (the update for the G5S Plus was announced on Motorola's website and just as quickly deleted), everyone here can look forward to rooting instructions for 8.1 (yes, leaks indicate it will be 8.1!) I'll post here with either another full rooting guide or just an update to my original one - depends on how different the rooting process will be.

Cheers!
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
Good job, I used this guide as I bought my potter, very useful and understandable.

As you asked in your edit notes: I pass safety net with just the F2FS loopback bug module installed. No need for the safety net fix module.
[Moto G5 Plus Guides, News, & Discussion] aaronisham95:
Is there any way i can root using this method with the latest april 2018 security patch
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
Are you on april security patch or do you want to get there while rooting your device?

Both is possible, at least if you are on reteu/retus firmware (93-10) which is available here.

In that case just use that firmware for the process.

If you are already on 93-10 it's the same, just use that firmware. If you are from India/Brasil and running the 92-10 firmware you will have to look if there's a firmware available here. Don't downgrade your device, that can cause hardbricks and don't use another firmware as the one you're on (or a newer one). You'll find your build nr under settings - about phone.

Here's the

POTTER_NPNS25.137-93-10_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml

Again,only use it if you are on the 93' builds, if you flash it over a 92' you won't get OTA anymore.
[Moto G5 Plus Guides, News, & Discussion] munchy_cool:
made a video on how to install twrp and root in case anyone needs it.

[youtube]dWrYU-W1WKA[/youtube]
[Moto G5 Plus Guides, News, & Discussion] wastedige:
How come there's nothing for 137-93-14?

Update: Found it myself https://androidfilehost.com/?fid=5862345805528041809
[Moto G5 Plus Guides, News, & Discussion] wastedige:
Since this is meant to be a noob-friendly guide, it would be much better if OP mentions that users should pick their stock ROM ( https://xdaforums.com/g5-plus/development/twrp-flashable-stock-builds-t3813351 ) depending on which version they have installed, instead of linking to a specific version. It can cause confusion for noobs like myself for hours or even mess up their phone because they picked the wrong version.
[Moto G5 Plus Guides, News, & Discussion] Jrhotrod:
Good point. I will update the guide with a notice.
[Moto G5 Plus Guides, News, & Discussion] Abhinand PS:
But magisk is not installing:(
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
You have to provide more information if you want someone to help you. Stock ROM version? Magisk version? What happens when you try to flash the magisk.zip? Also there are magisk logs and recovery logs you should post. If this is only related to magisk you should post it in the magisk support thread:

https://xdaforums.com/apps/magisk/mod-magisk-v1-universal-systemless-t3432382
[Moto G5 Plus Guides, News, & Discussion] TargetedNuke:
Is this safe to try on NPNS25. 137-93-14? Also, any good ways to unlock the bootloader without data loss, or at least good backup methods? All help appreciated!
[Moto G5 Plus Guides, News, & Discussion] psychopac:
Bootloader unlock will wipe your data, backup your files from internal storage to your sdcard or computer.

To backup your ROM, you'll need a TWRP recovery.
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
No bootloader unlock without loss of internal data. That's the price you have to pay. For rooting you just need a custom recovery (TWRP) as [MENTION=4843039]psychopac[/MENTION] said. After flashing it via Fastboot (fastboot flash recovery name-of-recovery.img) you're able to flash Magisk 16 and the loopback bug module with TWRP. You can use a custom kernel like Extended instead of the loopback bug module if you prefer that.
[Moto G5 Plus Guides, News, & Discussion] TargetedNuke:
Thanks! This is a huge help! Probably going to try to root mine soon.
[Moto G5 Plus Guides, News, & Discussion] Jrhotrod:
I have updated my rooting guide for official Oreo 8.1! Link here: https://xdaforums.com/g5-plus/how-to/how-to-root-moto-g5-plus-t3579659/post74673573

Changelog:

-Magisk modules work without the F2FS module

-SafetyNet passes with no modules required

-Not a change, but worth noting that the rooting method is the same for both Oreo and Nougat.

For now, I have not been able to find any official firmware for the update, but I'll update the post with the link when I find it.

I also haven't been able to test if unrooting with the Magisk ZIP works normally, but I'd guess it's fine since the kernel has apparently been fixed up. Xposed for Oreo (still in beta phase I believe) is untested as well for the time being.

If anyone figures this stuff out before me, tag me in your post and I'll add the info to my guide.

Cheers :)
[Moto G5 Plus Guides, News, & Discussion] stark1296:
Why to select "keep system read only"?
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
I used the option to have system r/w and it's working well. Imo it's just a security hint so that you don't tamper /system by mistake.
[Moto G5 Plus Guides, News, & Discussion] stark1296:
Thanks for reply.

If I keep system read only, can I edit app data in system folders or I have to allow read write system for that?
[Moto G5 Plus Guides, News, & Discussion] Jrhotrod:
You'll have to allow system R/W.

[MENTION=5237901]Wolfcity[/MENTION] is correct in the regard that it's a security precaution to make sure noobs don't mess up and bork themselves. However, if you enable R/W and don't flash Magisk then verity will fail and your phone won't boot. So it's also a backup in the event that you don't end up rooting for some reason.
[Moto G5 Plus Guides, News, & Discussion] stark1296:
If I allow system r/w and follow all other steps as per your rooting guide including flashing magisk (I'm on stock 8.1) will it be alright?
[Moto G5 Plus Guides, News, & Discussion] stark1296:
Thanks for the help everyone (@Jrhotrod and [MENTION=5237901]Wolfcity[/MENTION] ) I just successfully completed the rooting procedure on my Moto g5 plus with system r/w.

Thanks once again!
[Moto G5 Plus Guides, News, & Discussion] Yeshu_bablu:
hello! thanks for the detailed procedure. Please give a way to flash twrp on stock oreo. I used the commands "adb fastboot reboot" and "fastboot flash recovery". Ive used other custom roms, just wanted to see the stock oreo. I lost my twrp after flashing stock oreo. Any ideas"?
[Moto G5 Plus Guides, News, & Discussion] Jrhotrod:
If you lost TWRP after flashing stock Oreo, then it likely overwrote the recovery image. Simply return to fastboot and run the command "fastboot flash recovery [filename]" and you should be set. :good:
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
And don't forget to boot into TWRP first before you boot into system, that should help to not lose the custom recovery again. If you want to root your device flash Magisk right after booting back to TWRP.
[Moto G5 Plus Guides, News, & Discussion] agustinsaavedra1:
Can i do this tutorial if iam full stock in android oreo recently updated by ota and flash any custom rom without any problems?
[Moto G5 Plus Guides, News, & Discussion] Yeshu_bablu:
Please see the screenshot I tagged with this so that you can understand my problem in detail. Please help me. I'm a noob.
[Moto G5 Plus Guides, News, & Discussion] Yeshu_bablu:
Please help me out. My problem is in detail in the screenshot. Noob here. Thank you
[Moto G5 Plus Guides, News, & Discussion] bakedpatato:
You don't need to install the dm-verity disabler...the whole point of Magisk is that it's a systemless root. Just don't swipe the "edit system" prompt and then install Magisk 11.6.I don't know why root doesn't work in Magisk 12,I'll submit a request later to his github to take a look.
[Moto G5 Plus Guides, News, & Discussion] Dahenjo:
I can confirm that the no-verity-opt-encrypt-5.1.zip wasn't needed in gaining root. Otherwise I followed the OP's procedure and have both AdAway and Root Explorer working as they should thus far.
[Moto G5 Plus Guides, News, & Discussion] EnragedPopsicle:
Any updates on getting root hide to work? Anyone had any luck so far?
[Moto G5 Plus Guides, News, & Discussion] mchype:
Does this work for all versions? Or is this just one specific model?

Wondering more specifically about the XT1687 (U.S.) variant... I am very much looking to get this phone, but want to make sure root is working with the US variant before purchase.
[Moto G5 Plus Guides, News, & Discussion] willsolo:
I have Moto g5 plus xt1687 in my hand, and the build number is listed on page 1 of this thread.

I am using it in the US!

I have paid apps that do not work on a no root system, I have to root.
[Moto G5 Plus Guides, News, & Discussion] mchype:
So... your phone is rooted with the methods on page 1?

The XT1687 is not specifically mentioned anywhere but my post and now yours.... I'm just looking for verification that root works on the phone...

Also, have you unlocked the bootloader without issue in order to root?
[Moto G5 Plus Guides, News, & Discussion] willsolo:
No I have not rooted it yet! Or unlocked bootloader, but I will try soon, time to do it.

I will post her when I get it done.

I have the Amazon ads version, and will root it when I get time hopefully.

I will keep in touch here.
[Moto G5 Plus Guides, News, & Discussion] mchype:
bad news.... the Amazon Ads version can't be unlocked, thus can't be rooted. Apparently already been tried.

That's why I've held off, but if I pull the trigger, I'll be getting the normal version.
[Moto G5 Plus Guides, News, & Discussion] willsolo:
What I meant was the OS build number of

NPN25 137-33 is listed above the downloads link on the first page.

This is same # my phone has!

Will work on trying to root this weekend.
[Moto G5 Plus Guides, News, & Discussion] abeloman:
Build number doesn't have anything to do with root... I'm afraid that Amazon version isn't unlockable

Enviado desde mi Moto G (5) Plus mediante Tapatalk
[Moto G5 Plus Guides, News, & Discussion] willsolo:
We will run the test to find out soon, hopefully get it done! I have 3 backup phones just in case.
[Moto G5 Plus Guides, News, & Discussion] willsolo:
You are correct I just tried, Moto say NO! Wish I spend $60 without ads!

There has to be a way????
[Moto G5 Plus Guides, News, & Discussion] abeloman:
I told you... (:

That's the deal buying from Amazon, this way they make sure you're not able to change firmware or root to remove ads

Enviado desde mi Moto G (5) Plus mediante Tapatalk
[Moto G5 Plus Guides, News, & Discussion] mchype:
No kidding; I really was thinking about pulling the trigger on that deal... but I knew there was going to be a catch, and it definitely appears that the catch is a locked bootloader, also meaning no root; sadly.

But... that's where they're going to make up their lost $60.
[Moto G5 Plus Guides, News, & Discussion] fAIyaZ:
SuperSu rooting method

Ok Here is the procedure for how to root Moto G5 Plus with SuperSu(systemless) along with fixing Magisk modules installation and upgradation.​

First you have to unlock your BOOTLOADER, dwld TWRP and Custom patched kernel and wlan_custom from here:-http://cloud.vache-android.com/Moto/potter/

Now steps.

1.If you have previously have magisk su uninstall it via zip provided at Magisk XDA thread.

2.Flash TWRP IMG file via fastboot flash recovery command. And reboot into recovery or system.

3.Flash boot.img via twrp or with fastboot​ command.

4.Boot into system.

5.Flash the file wlan_custom from TWRP.

6.Flash SuperSu file from here http://download.chainfire.eu/1021/SuperSU/SR3-SuperSU-v2.79-SR3-20170114223742.zip

7.And done. Bingo Ur now rooted systemless.

If you wanted to use magisk with working modules just skip the part of SuperSu flashing and instead flash Magisk latest zip.

All the credits goes to [MENTION=1829889]vache[/MENTION] for working on this and providing us Patched TWRP AND KERNEL.

Note/request:-Youtubers you are free to do a video on this but please do not mirror the link of dwld and also do not forget​ to mention the Developer in your video.

Peace :good:

XDA is always our first place for everything custom. But for instant communication we have created Telegram group. You can join us there. Telegram.me/MotoG5Plus
[Moto G5 Plus Guides, News, & Discussion] supastaroy:
Thank you all for your hard work:good:
[Moto G5 Plus Guides, News, & Discussion] 22sumit:
stable twrp?

Is this the official twrp version in your link? Since the unofficial twrp needs factory reset of the data.