yashsingh1/xdaforums huggingface dataset:
[Moto G5S Plus Guides, News, & Discussion] NathanThern:
I think it would be good to add that little tidbit to the Original Post. The way it currently reads, no backup is recommended until Step 2 which is after unlocking the bootloader.. That just bit me in the butt, and I'm still waiting to see just how much my cloud backup will be able to restore.

On the other hand, It's my responsibility to back everything up BEFORE starting something like this, so ... NOT whining, just providing constructive feedback. Very grateful to shu006 and GeneticEngineer for the procedure.
[Moto G5S Plus Guides, News, & Discussion] NathanThern:
I just successfully rooted after I got the 8.1.0 system update. Some notes:

Unlocking the bootloader

Unlocking the bootloader factory reset my phone.

Back-up using: https://xdaforums.com/galaxy-nexus/general/guide-phone-backup-unlock-root-t1420351 before unlocking.

Since I didn't do this before I unlocked the bootloader, I have no idea how thorough a restore one gets using this method; I had to do a cloud restore.

TWRP

Get TWRP here: https://xdaforums.com/moto-g5s-plus/development/recovery-twrp-3-1-1-r7-t3694910

TWRP install using fastboot won't work. Instead, boot TWRP using

fastboot boot twrp-sanders-r20.img

TWRP can install itself to recovery and it will work ... as long as you just keep rebooting to fastboot and TWRP.

Every OS boot wiped out my TWRP install.

After my first cloud restore, I did use TWRP to create a full backup on the phone.

Installing Magisk

Get it here: https://xdaforums.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445

I tried this multiple times with minor variations:

- boot to fastboot

- boot to TWRP

- restor the system using TWRP (because the phone factory reset)

- reboot the OS and check everything out

- boot TWRP via fastboot again

- install magisk.zip via TWRP

- reboot OS and discover that phone has factory reset AGAIN

- my unlock pattern sometimes failed after a restore. I would clear the pattern using this procedure: https://forums.oneplus.com/threads/fix-wrong-pin-pattern-when-restoring-twrp-nandroid-backup.452384/

My minor variations involved changing

- whether I wiped data and/or dalvik/cache before magisk install

- changing when and if I deleted the unlock pattern files

- changing whether I installed TWRP to the recovery memory

Magisk install that worked

- boot to fastboot

- boot to TWRP - do all the next steps in TWRP without rebooting out of TWRP

- do not perform any wipe

- do not install TWRP to the recovery memory

- restore the system (because the phone factory reset)

- delete the unlock pattern files

- install magisk

- reboot OS straight out of TWRP (no going back to fastboot first)

YAY! Booted into properly restored OS and root checker shows I'm rooted.

BIG QUESTION MARK:

Since I didn't ever (successfully) install TWRP to the recovery area, is it even necessary to unlock the bootloader in order to root?

Edit ... 3 days later and not all was as I thought.

- First, TWRP was permanently installed at some point. I just didn't notice it.

- Second, I had a lot of OS issues post-root. Cell data and bluetooth and SD card all didn't work and rebooting and several other attempts to fix didn't work.

- Third, since I had TWRP installed, I went ahead and switched to Pixel Experience. So far everything has worked great, and the cloud restore got back just as much as it was able to get for the stock OS. Very happy with the end result. Had to update TWRP in order to root PE: https://xdaforums.com/showpost.php?p=79241725&postcount=296
[Moto G5S Plus Guides, News, & Discussion] AbhinavBaranwal:
About unlocking Bootloader

What if I just unlock my Bootloader from the developers option in my Moto g5s plus:D
[Moto G5S Plus Guides, News, & Discussion] therajatshahare:
Looks like you're newbie to all this. Sometimes twrp disappeared again and again because your phone is encrypted, so to solve this problems you just need to decrypt your phone.

To decrypt:

Flash twrp via fastboot then don't boot to system just go to wipe section and do “Format Data”, sometimes it shows error while formatting so just boot again to recovery via that twrp menu. Then do again format data. If done then don't reboot to system just flash magisk. Wipe Dalvik and then boot to system.

Done.

Note: Formatting will erase your all phone data so backup everything before doing.

You face so many problems in stock ROM after rooting it's because you restored your system backup again and again without taking care. It's messed up many configurations in your phone.
[Moto G5S Plus Guides, News, & Discussion] NathanThern:
Nope, not a newbie - just an infrequent dabbler, and I have a lot of other stuff going on (hence, 2 months until I saw your reply). The last time I rooted anything, it was Kindle Fires (1st or 2nd gen) and a Droid 4 (or was it a 3?); ages ago in the android world. I thought I had read up enough for my next go, but I didn't know anything about the encryption issues. Thanks for clarifying what was probably the root of all my issues.
[Moto G5S Plus Guides, News, & Discussion] neileshgiri:
downloading link not working!! :( .......... this website http://ww1.hostracon.com/ opening all time!!!!!!!!!!!!!
[Moto G5S Plus Guides, News, & Discussion] AztecRefreshed:
Minimal ADB

https://xdaforums.com/showthread.php?t=2317790

TWRP

https://androidfilehost.com/?w=files&flid=216298
[Moto G5S Plus Guides, News, & Discussion] zirico:
Hi all,

i want to inform you all for my moto g5s plus flash twrp works fine but with one more step. first flash recovery then i boot to recovery only with "fastboot boot twrp-*****.img" then wipe and then reboot into recovery. very nice guide. Thanks
[Moto G5S Plus Guides, News, & Discussion] swasahu11:
Ok, i just had a question, can we do this procedure if we don't have the USB debugging option ON as my phone is stuck in a reboot loop and there is no way to trun on USB debugging now or is there? Please suggest me a workaround as i need to take data backup and restart the phone. Thanks in advance.
[Moto G5S Plus Guides, News, & Discussion] Harryjovian:
I can't download any files from above mentioned download sections, these links redirect to some other websites please help..... I can't afford flagship phones, so at least i can do this rooting, please help
[Moto G5S Plus Guides, News, & Discussion] gadoled:
I got my bootloader unlocked successfully. Then went ahead to install the twrp recovery. I can not flash this due to below error

C:\Android\platform-tool29>fastboot flash recovery twrp-sanders-r20.img
(bootloader) is-logical:recovery: not found
Sending 'recovery' (14638 KB) OKAY [ 0.621s]
Writing 'recovery' (bootloader) Image not signed or corrupt
OKAY [ 0.189s]
Finished. Total time: 0.823s

Then I tried to download stock firmware and start over by installing stock ROM. However, I get this error

C:\Android\platform-tool29>fastboot flash partition gpt.bin
(bootloader) is-logical:partition: not found
Sending 'partition' (45 KB) OKAY [ 0.170s]
Writing 'partition' (bootloader) Validating 'gpt.default.xml'
(bootloader) Security version downgrade
(bootloader) Image primary_gpt failed validation
(bootloader) Preflash validation failed
(bootloader) Cancelling 'gpt.default.xml'
FAILED (remote: '')
fastboot: error: Command failed

I can't seems to resolve my problems :(. Could anyone please help :fingers-crossed:.

Highly appreciate your time and effort.
[Moto G5S Plus Guides, News, & Discussion] :
For Twrp - read posts 48-50... https://xdaforums.com/moto-g5s-plus...o-g5s-plus-t3673287/post74478784#post74478784

(It's been a while since I've installed twrp on this phone, but i think that error is normal...you just have to manually boot to recovery using vol dwn/pwr btn combo)

*also... https://xdaforums.com/search/thread/3673287?query=Image not signed or corrupt

good luck:good:
[Moto G5S Plus Guides, News, & Discussion] gadoled:
Thank you for your response.

I checked out the link provided unfortunately it didn't help me.

also when i boot/reboot the phone it goes to bootloader

won't let me link an image since I'm new

then I have this

won't let me link an image unfortunately

So I was also trying to restore to stock ROM. That haven't worked out. As of now I can't use my phone.

only this working

fastboot boot twrp-sanders-r20.img

I can do this any downloaded TWRP.

I have tried wiping and installing magisk, but is there anything there I can do to get back to stock or permanently flash TWRP

*** Please help ***

Thanks much in advance!

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

PS: I'm guessing I may have done a mistake with encryption, but I've wiped everything mentioned in the how to
[Moto G5S Plus Guides, News, & Discussion] :
Hmmm... Do you know what version firmware you flashed? Maybe try another version for your model.

Others had the same error, but sometimes they flashed a potter ROM into a sanders device... https://xdaforums.com/search/forum/6813?query=gpt failed validation

Try "fastboot getvar all" and make sure lines 3 & 4 say sanders to make sure that's not what happened.

Or try relocking your bootloader and seeing if that lets you flash stock firmware afterwards... https://xdaforums.com/moto-g5s-plus/development/relock-bootloader-moto-g5s-plus-t3681390

Sorry I don't have a better answer for you.

I hope you can figure it out :fingers-crossed:
[Moto G5S Plus Guides, News, & Discussion] gadoled:
Actually when I ran into problems one of the things I tried out was to restore it back to stock by using the same instructions referred to

my phone was all up to date (all ota updates were installed) by the time I tried to unlock and try to install TWRP

maybe I need a new (latest) firmware (stock rom with security updates) ???

Here is the return of getvar and I double checked it was sanders before I write (not potter)

version: 0.5
version-bootloader: moto-msm8953-C2.12
product: sanders
board: sanders
secure: yes
hwrev: P5
radio: 5
storage-type: emmc
emmc: 64GB SAMSUNG RC14MB RV=08 PV=07 FV=0000000000000007
ram: 4GB SAMSUNG LP3 DIE=8Gb M5=01 M6=05 M7=00 M8=5F
cpu: MSM8953
serialno: ZY322BZJK8
cid: 0x0032
channelid: 0x8d
uid: 05F08A1800000000000000000000
securestate: flashing_unlocked
iswarrantyvoid: yes
max-download-size: 534773760
reason: UTAG "bootmode" configured as fastboot
imei: 355666080569051
meid:
date: 09-29-2017
sku: XT1806
carrier_sku:
battid: SB18C15119
iccid:
cust_md5:
max-sparse-size: 268435456
current-time: "Sat Jan 31 17:31:44 UTC 1970"
ro.build.fingerprint[0]: motorola/sanders/sanders:8.1.0/OPS
ro.build.fingerprint[1]: 28.65-36-14/63857:user/release-key
ro.build.fingerprint[2]: s
poweroffalarm: 0
ro.build.version.full[0]: Blur_Version.28.271.12.sanders.re
ro.build.version.full[1]: tail.en.US
ro.build.version.qcom: LA.UM.6.6.r1-08600-89xx.0
version-baseband: M8953_52.61.07.98R SANDERS_NA_CUST
kernel.version[0]: Linux version 3.18.71-perf-gfde333e (hud
kernel.version[1]: soncm@ilclbld57) (gcc version 4.9.x 2015
kernel.version[2]: 0123 (prerelease) (GCC) ) #1 SMP PREEMPT
kernel.version[3]: Tue Aug 13 15:23:08 CDT 2019
sbl1.git: git=MBM-NG-VC2.12-0-g698fb2f
rpm.git: git=92e5e21-dirty
tz.git: git=d95e83f
devcfg.git: git=d95e83f
keymaster.git: git=d95e83f
cmnlib.git: git=d95e83f
cmnlib64.git: git=d95e83f
prov.git: git=d95e83f
aboot.git: git=MBM-NG-VC2.12-0-g07ff23c
frp-state: no protection (77)
ro.carrier: retus
current-slot:
slot-suffixes: _a
slot-count: 1
slot-successful:_a: INVALID
slot-successful:_b: INVALID
slot-bootable:_a: INVALID
slot-bootable:_b: INVALID
slot-retry-count:_a: unknown
slot-retry-count:_b: unknown

hope the support community can pick up on something to help me out. I'm also wondering if anybody else has run into same problem.

Appreciate your time
[Moto G5S Plus Guides, News, & Discussion] BadPlayer38:
Excelente, thanks for all ^^

Several 'tips':

- Search Magisk and TWRP in another page, because (currently) the links of this guide don't work.

- If you use Linux, open ADB folders as root and then, open the terminal in your ADB folder.
[Moto G5S Plus Guides, News, & Discussion] Manan44:
This is normal.
[Moto G5S Plus Guides, News, & Discussion] slow6brick:
I get the same thing over and over after flashing twrp. I select recovery and it says kernel failed to load or it show the open android logo with the words no command underneath.

Other things of interest are that on power on, it says ID:BAD KEY under the unlocked bootloader warning.

I can only get into TWRP by booting into it through ADB. Then TWRP itself cannot change/mount/wipe any partitions etc.

Any help?
[Moto G5S Plus Guides, News, & Discussion] slow6brick:
Kinda Fixed, BUT

So I have twrp installed but I cannot boot into it via the recovery method from the phone. I have to boot into TWRP via ADB using

fastboot boot twrp.img

Continued on and I have root. Weird. Rooted plenty of phones and this has never happened. Actually had to flash the original stock rom back to the phone and do over again to get here.
[Moto G5S Plus Guides, News, & Discussion] lufusol:
I also got stuck there. After flashing TWRP and getting the "not signed or corrupt" notification, I tried to reboot into recovery via the phone menu... it did not like this.

fastboot boot [twrp.img filename]

only got me as far as the TWRP loading screen "teamwin recovery project 3.1.1-0" and it's stuck there.

I pre-ordered this phone and it only arrived today, so I have it before most people in US (other than devs, reviewers and people who ordered it internationally). I assume it's going to take some trial and error to smooth this process out...

slow6brick, which version of TWRP were you able to boot into using the ADB command and did you get further than the loading screen?
[Moto G5S Plus Guides, News, & Discussion] Centurin:
I only got this phone today myself. Hopefully all the kinks with rooting get worked out soon
[Moto G5S Plus Guides, News, & Discussion] lufusol:
I should have probably mentioned that after I unlocked the bootloader, the next thing I did was flash the alternate logo.bin (hey, the tempting link was right there) I hope someone tries unlocking the bootloader and proceeding directly to flashing TWRP as instructed, to see if the result is any different. Getting stuck on TWRP is a stinker.
[Moto G5S Plus Guides, News, & Discussion] lufusol:
I tried flashing the sanders TWRP R2 from this post

It worked on my 64GB US XT1806! Hooray for the devs.. thank you
[Moto G5S Plus Guides, News, & Discussion] slow6brick:
3.1.1 from another download link. It is working and I have root for sure but can only load recovery from adb not the phone menu. When I try to load from the phone menu it says kernel failed to load.
[Moto G5S Plus Guides, News, & Discussion] Recrux:
I booted into twrp immediately after flashing and it worked fine for me. I haven't changed the unlocked warning logo.

It took a few minutes for twrp to boot up the first time too. I thought the phone had frozen at first.
[Moto G5S Plus Guides, News, & Discussion] lufusol:
Flash R2 from the link I posted. Then report back. Mine successfully enters recovery from the bootloader menu. I should hope yours will, too. This R2 version has a grayscale intro screen instead of blue.

Our problem was not that it got stuck or seemed to take a long time, it outright failed (with an error displayed) when attempting to load recovery from the bootloader menu. In fact you never left the bootloader menu, and could continue to use it after the attempt. This new R2 version (with the gray loading screen) only takes several seconds to bring me to a responsive touch menu. It asks for a password and you can cancel out of that, but then it complains that the encrypted system partition was not successfully decrypted (surprise).

FWIW I've no idea how to obtain my encryption/decryption password and seems that partition doesn't get backed up, making the whole backup pretty pointless.
[Moto G5S Plus Guides, News, & Discussion] Recrux:
I have not had the problem as you do with encryption. Using the r2 twrp and formatting /data the decryption worked perfectly and i can backup all partitions.
[Moto G5S Plus Guides, News, & Discussion] lufusol:
Well my real problem was not realizing the data partition comes encrypted by default and formatting it in TWRP removes the encryption. Solved.
[Moto G5S Plus Guides, News, & Discussion] slow6brick:
R2 working as should for me.

Thanks lufusol

Anyone have newest lineage running? Worth it over stock rom?
[Moto G5S Plus Guides, News, & Discussion] tk1278:
cant connect as fastboot

my device is not connecting as a fastboot device any solution?

it is connecting as an adb device just fine but not fastboot device when booted into bootloader
[Moto G5S Plus Guides, News, & Discussion] qngage12:
u mean, u cannot reboot via fastboot command? maybe trying a different TWRP image as i did...
[Moto G5S Plus Guides, News, & Discussion] electricpickle:
XT1806 TWRP questions

My faithful OnePlus One developed screen problems so I purchased the XT1806 (G5S Plus 64G) when it was released in the US. I have Cricket’s Advanced 20 gigabyte plan and the OnePlus One right from the start allowed Hotspot/Tethering without any modification. Of course I still rooted the OnePlus and changed ROMs often, ending with Linage. I’m somewhat familiar with the process but don’t have much experience beyond the OnePlus. The XT1806 allows Cricket to deactivate the Hotspot so I got the “Settings Database Editor” app which is supposed to be able to activate the hotspot but it fails and asks me to “Grant Write Secure Settings” via ADB shell. I can’t seem to do that unless the phone is rooted. I successfully unlocked the bootloader. I’m requesting help from the experts here with the proper steps to install TWRP (twrp-sanders-r2.img). Like others, when I flash TWRP via fastboot the first screen I get is the “unlock encryption” password request. If I cancel it goes to the recovery screen where I select “backup” and I did the default backup as well as an image backup. I rebooted the phone and copied the backup files to my Windows 10 PC and copied the folders (minus the “android” folder) to the PC as well. When I power off the phone and boot it with the VOL down + Power buttons it goes back to the fastboot menu and when I select Recovery it stops and says “invalid key” (or something like that). From what I’ve read in this thread that’s because I didn’t wipe data. My questions are these.

After I do the Wipe Data and reboot I’m starting over with the phone right? Will I be able to restore TWRP backup that was taken without encryption unlocked?

Should I use Magisk-v14 or SR3-Super SU to root the phone?

Sorry for the long post. I have 140 apps installed and I would like to avoid having to reinstall them. :eek:
[Moto G5S Plus Guides, News, & Discussion] yograjfire18:
For the encryption-You hav to wipe once and then reboot to twrp

i m using Magisk-v14 and its working f9

And abt yur 140 apps, most of them will be automatically intalled when u set up ur android using ur mail-id
[Moto G5S Plus Guides, News, & Discussion] lufusol:
I saw that the stock ROM had 50 apps preloaded and didn't even give it a chance. I've been running lineage OS 15 since I found that R2 of TWRP that got things working for me.

I haven't found a good replacement for the stock ROM camera. The LOS15 Camera app does indeed take photos at the wrong angle; everything comes out rotated. Beyond annoying. Open Camera is much too slow and laggy. I need to be able to take lots of rapid fire action shots with as much control over the timing as possible, so that doesn't work for me. I'm hoping for the stock g5s+ camera app to be dismembered and presented for custom ROM use. This has already been requested over in the g5s+ lineage OS 15 thread.
[Moto G5S Plus Guides, News, & Discussion] OllieRuf:
for some reason in my device manager under "other devices" it shows up as 'fastboot sanders S' and even if I remove the device it will still come back as that. I have tried installing the drivers for adb and fastboot but that didn't help either
[Moto G5S Plus Guides, News, & Discussion] winpooh:
Anyone know why magisk modules don't work with G5S Plus? Just curious, I've tried 14.3 and they don't work either, apparently something with the device itself?
[Moto G5S Plus Guides, News, & Discussion] Siddhu06:
Moto g5s plus bootloader unlock

Hello

I have tried to unlock the bootloader process.

When i tried to unlock the key, it says your device does not support bootloader unlock.

So could you please help me with this issue.

Thank you.
[Moto G5S Plus Guides, News, & Discussion] PSxUchiha:
This is great but I have been facing an issue.... I submitted the code which unlocks the bootloader at the Moto website but I still haven't received the email containing the code from them until now
[Moto G5S Plus Guides, News, & Discussion] JaxDagger:
PS C:\Program Files (x86)\Minimal ADB and Fastboot> fastboot flash recovery recovery.img

(bootloader) is-logical:recovery: not found

Sending 'recovery' (16794 KB) OKAY [ 0.650s]

Writing 'recovery' (bootloader) Image not signed or corrupt

OKAY [ 0.290s]

Finished. Total time: 0.970s

PS C:\Program Files (x86)\Minimal ADB and Fastboot> fastboot reboot recovery

Rebooting into recovery FAILED (remote: 'Unknown command')

fastboot: error: Command failed

PS C:\Program Files (x86)\Minimal ADB and Fastboot>

Im having some issues, I havent done this in a long time, but the links are all dead and i can only find "similar" TWRP links, like G5 Plus or basic G5S and was told to only use the specific one for this, i found a newer one for G5S plus bust im still having this issue, it doesn't reboot into anything just waits on the fastboot screen, can someone explain what im doing wrong or link me to the correct files because this is becoming a headache already xD
[Moto G5S Plus Guides, News, & Discussion] lokochris:
Bootloader unlock

(Replace stars with your unlock key)

[*]A warning screen will appear in command just retype the same command and hit enter.

[*]Type this code and your phone will reboot.

fastboot reboot

Hello friend, I did all the steps, but at the end of the process, I did not write "fastboot reboot" and disconnect the usb cable. Now only the white led turns on and the PC does not recognize it. Do you think the phone was ruined?:(:(
[Moto G5S Plus Guides, News, & Discussion] abc10028062:
Hello there, I've tried to unlock the bootloader of my phone, but it gives me an error stating 'unlock data unavailable' for the given command from motorola unlock bootloader website.

Could anyone help me with this problem.

I don't have enough budget to buy a new smartphone.

Please help me. ???
[Moto G5S Plus Guides, News, & Discussion] maraxion:
So new to this.

I have to do all this on a stock phone before flashing any of the android 10 OS on this forum?

And then use the same TWRP to install the new OS?

But in the end of the guide it says wipe data. So thats only resetting the stock room to standard, not wiping the room of the phone?
[Moto G5S Plus Guides, News, & Discussion] lokochris:
Bootloader unlock

you have entered the complete code?

Example:

0A40040192024205#4C4D355631323030373731363031303332323239#BD008A672BA4746C2CE02328A2AC0C39F951A3E5#1F532800020000000000000000000000

---------- Post added at 08:31 PM ---------- Previous post was at 08:28 PM ----------

you have entered the complete code?

example

0A40040192024205#4C4D355631323030373731363031303332323239#BD008A672BA4746C2CE02328A2AC0C39F951A3E5#1F532800020000000000000000000000
[Moto G5S Plus Guides, News, & Discussion] abc10028062:
Thanks for your reply.

I need to get the code if I type the command 'fastboot oem get_unlock_data' right? But it's showing an error stating ' bootloader; unlock data unavailable'....
[Moto G5S Plus Guides, News, & Discussion] mikee286:
Where can I get the proper working twrp recovery? The one linked in the original post takes me to a sketchy virus page
[Moto G5S Plus Guides, News, & Discussion] BSH1969:
The guide in the original post is now wrong for these reasons:

download locations are no longer valid

newer version of Magisk doesn't work that way anymore

I don't know how to get root on Moto G5S plus yet, but I'm sure there's a way.