yashsingh1/xdaforums huggingface dataset:
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] Recrux:
I am still getting the error that twrp image is not signed or corrupt. I have tried both the twrp image you have posted and neither work. Any idea what is the problem?

Bootloader is unlocked and adb commands work
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] Manan44:
I got the error but when I rebooted to recovery, TWRP was there man. That's how it worked for me
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] Recrux:
When I try to reboot to recovery it just shows a screen that says 'no command' with an Android symbol.

Edit nvm TWRP is installed now. However when I try to flash SuperSU or magisk both fail and say the boot image has been modified and I need to restore the stock boot image. Is there a stock boot image available?

I think this happened because I flashed a disable-verity script before formatting /data, now my stock boot image is modified and SuperSU can't flash

Edit2: after tinkering a lot, and flashing entire new stock rom and stock boot image, I cannot get SuperSU to flash. It always says unable to find extract ramdisk when I try to flash. It does this when encryption is disabled. When encryption is enabled, SuperSU flashes okay but root doesn't work.

I'm not really sure what to do at this point. Should I try relocking the bootloader and unlocking it?

Edit3 found stock boot image and was able to flash it and magisk, finally have root thank you everyone
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] Bunie89:
So i just keep getting red "Startup Failed" Text with the log saying "Error: Failed to load Kernel!"

I have an XT1806. Did i just doom my device? lol

EDIT: I'm able to boot into the image from fastboot but thats still somewhat inconvenient.

I know the device just recently launched so i guess patience is needed. :D
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] Manan44:
Unable to load kernel means your boot.img is corrupt. Flash a custom kernel to fix.
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] Recrux:
Has anyone had success with magisk hide? I am trying to get Snapchat to work but so far I haven't been successful.
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] praneethls4008@gmail.com:
PRANEETH

bro while i'm flashing twrp.img it gives me an error that the file is not signed or corrupted.....

Someone help me bro
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] yograjfire18:
It will, don't worry bro, recovery if flashed its just shown while flashing
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] lilcdroid:
I get a failed backup after trying to backup the System Image. I checked every box in TWRP to backup. If I skip the System Image, it backs up without error. What, or, did I mess up?, and how to fix if I messed something up.
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] yograjfire18:
Its beacuse of the size bro, your memory card is formatted with Fat32 format(That doesn't doesn't support transfer of files larger then 4GB)

And the system image if of larger size then 4

Even if u want to backup that too

then u have to fomrat memory card as exfat (don't format it as NTFS bcs TWRP won't identify NTFS formatted memory card)

OR

Simple way wihtout fomratting ur memory card

- backup ur system image in ur device storage

-then transfer it into ur pc

Note - if u plan to restore it later , still u hav to format ur memory as exfat
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] nd4spdbh:
FYI. there is no way to grab an original TWRP and restore it. If you restore without rooting it will not boot. Also if you do a factory data reset within the stock image and have any twrp installed, it bootloops to twrp.

Now if only there was a PROPER way to go back to stock and locked, as right now all the "stock" files are not signed properly.
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] yograjfire18:
But Mine doesn't bootloop,

I backed Up my original stock rom & i restore that and do a factory reset

It Start well, i m not having issue
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] nd4spdbh:
Flashed the r2 twrp, formatted data so it could be mounted (not encrypted), did a full backup. Pulled it off the phone. Flashed Magisk to root, realized it doesnt work well at all, went to restore the twrp and you have to allow it to modify the system, as soon as you do that it will NOT boot unless you root (which is what i didnt want to do)
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] yograjfire18:
then u should flash stock rom, may be that can solve this issue, bcs it was solved for me for my old moto e 2,it was booted to bootloader everytime i restarted, but solved after flashing

or

u can try to format data after restore
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] nd4spdbh:
tried formatting data. does not work. The only thing that worked was to flash the stock image via fastboot, which unfortunately was an older build than what shipped on my phone.
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] yograjfire18:
Which version do u have (latest)
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] nd4spdbh:
I HAD the -45 build (NPS26.116-45). But now I have to run the -26 build from here https://xdaforums.com/moto-g5s-plus/development/flash-official-firmware-moto-g5s-plus-t3681018
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] Loccy:
(this IS a reply to a post in this thread - apologies to interrupt all the TWRP discussion)

You, sir, are a steely eyed missile man. I've been looking for a kernel with the bug fixes required to support Magisk hide. I've tried most of the custom roms but none of them are reliable enough yet - plus, to be honest, there really isn't an awful lot wrong with the base stock rom. Your kernel means I can run all the apps I need and still be rooted.

Please start a discrete thread for this kernel. I even thought about doing it myself but didn't want to presume. The only reason I knew this kernel existed was through an off-hand comment in another thread. I then searched for all posts by GeneticEngineer in order to find it. It'd help people enormously if it had its own thread.

(we now return you to TWRP)
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] revengineer:
-45 posted here: https://xdaforums.com/showpost.php?p=74325160&postcount=33
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] Mîkòtø:
SuperSU only works on custom ROM if ur using stock with root SuperSU binary gets deleted on it's own after some times idk the reason but it might be encryption that gets in way check in setting if device is properly decrypted and on AEX ROM 7.1.2 SuperSU works totally fines everything works fine all but u gotta flash full or stock gapps or u might get so many bugs and errors
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] winpooh:
Works great! And incredible increase in battery life! Also Magisk modules are working properly :good:
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] Brycearuuni:
Can you use this kernel with a custom ROM? I'm new to rooting I installed AOSP ROM android 7.1.2 and rooted.
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] winpooh:
Not sure on that. It should if it's a AOSP based rom tho.
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] Brycearuuni:
Okay I guess its worth a shot. Can I back up my stock kernel?
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] winpooh:
I don't know if there's a way to back up a kernel or not. If you back up system in TWRP you can restore that if flashing this kernel messes stuff up. Probably would want to back up data as well so you don't lose your apps etc
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] lilcdroid:
Back up boot in twrp. Restore the backed up boot anytime. I've backed up the entire system, data, boot, recovery, ect... So i can restore parts separately if necessary.
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] Brycearuuni:
If you don't mind me asking, what are the best things to back up exactly? Can I back up everything on my device and do a full restore? I've tried once but it asked for my pin, and the pin I know was set was not working.... I'm relatively new to all this sorry.

---------- Post added at 07:09 AM ---------- Previous post was at 06:41 AM ----------

Installed on AOSP Extended ROM, works great.
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] lilcdroid:
I prefer to back up everything but cache in TWRP. (I save my backup to a 64GB external SD card in case of an accidental wipe off the internal sd) If I switch to another Rom and want to restore back, I do a factory reset to avoid any leftover items hanging around. Then I restore everything I had backed up in TWRP. My backups are usually around 10Gb, so make sure you have the storage.

As far as the pin, I use a pattern on the lock is well as the finger print and have never had a restore problem. You could always turn the pin of before a restore then activate it afterwards to avoid it all together. Hope this helps.
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] rv7284:
When i came to flash recovery it shows an error

Cannot load recovery.img

I have tried many times but it shows the same
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] lilcdroid:
Your using adb to flash it? The recovery.img is in the same folder as your fastboot/adb folder? Your on the bootloader screen of your device? Your used the proper terminology. "fastboot flash recovery TWRP-nameofversion.img"
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] gewe:
TWRP backup is frozen at 13% completed. The progress bar is still showing its animation.

I unlocked the bootloader, and then rebooted. Android came up with the language selection screen. I powered off, connected the phone to the PC, and booted into TWRP (not flashed yet):

fastboot boot twrp-3.1.1-sanders-r7.img

I did not let TWRP format /data.

Then I started a backup, selecting all partitions, so that I could always go back after flashing TWRP and Magisk.

Does anyone know why backup is stuck at 13%? Last log line says "Backing up System..."

I tapped "Cancel" after two hours. That stopped the progress bar animation, but not the backup itself.

BTW: I used TWRP from another thread, because the one in this thread freezes at the TWRP boot logo.

Edit: after two hours I killed the backup by powering down (the only way it seemed). On retry it froze at 21%.

Edit 2: Retried, this time backing up everything except system. No problem. I then tried to backup system. Frozen at 1%. What is the problem here?

Edit 3: Finally, a complete backup of system! Only one to go: system_image. But unfortunately that froze at 0%. Every subsequent try freezes at 1666MB (40%). The card has over 30GB free. I tried backup to USB-OTG, but that also froze.
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] Brycearuuni:
If I were you I would reflash stock ROM and restart. My phone had the same issue with the twrp in this thread, update to the r9 that was just released. After flashing stock I would consider just using a custom ROM as its worked best for me and I've had no issues. Aosp extended Oreo is pretty good.
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] revengineer:
Agreed, this one did not work for me either. r9 works great.
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] Draaaven:
after "fastboot flash recovery twrp-****.img" ... if i flash a ROM (aosp extended) and gapps, do i need to flash verity disabler zip o magisc for normal boot or not ? thanks
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] Brycearuuni:
I haven't, I'm on AOSP 5.0
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] rv7284:
It's done.... Thanks ?
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] gewe:
Upgrading to TWRP 3.1.1-r9 solved the problem. Thanks.

---------- Post added at 15:42 ---------- Previous post was at 15:03 ----------

Maybe a silly question, but I haven't found an answer so far. I never flashed a kernel, only a recovery or complete ROM. :o

How do I flash this kernel? Do I let TWRP flash Extreme-Plus-Kernel-test.zip, or only one of the files inside it?

Do I have to reinstall Magisk (or anything else) after flashing this kernel?
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] aow1980:
You should flash the magisk unistaller first in twrp. Then flash the kernel zip and magisk zip again.

When you flash magisk it modifies the boot.img . So I found flashing the uninstaller first to make sure boot.img is back to stock first helps out.
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] Harsh raj sah:
[(bootloader) slot-count: not found

(bootloader) slot-suffixes: not found

(bootloader) slot-suffixes: not found

(bootloader) has-slot:recovery: not found]

I am facing this problem while flashing twrp image

how to fix this problem please tell the solution as soon as possible , i will be very thankful to you.....
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] Phazmos:
How are you trying to flash it?
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] Harsh raj sah:
I am flashing with latest version of adb

I am using following command prompt :

fastboot devices

fastbbot flash recovery twrp-3.1.1-sanders.img
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] THERAJ12:
Is there a separate thread on this Kernel? I searched but was not able to find would be nice to see the progress on custom kernel for this phone I haven't found others. Thanks
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] Phazmos:
And fastboot devices did show your device?
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] Harsh raj sah:
C:\Users\Patanjali\Desktop\platform-tools-latest-windows\platform-tools>fastboot devices

ZY322BC83N FASTBOOT
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] Phazmos:
Well, I did a little looking around and this isn't uncommon, but most say it flashed anyway. Did you boot to twrp after flashing it? It may get overwritten of you don't. Oh, it is unlocked correct?
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] Harsh raj sah:
Following was the command prompt :

C:\Users\Patanjali\Desktop\platform-tools-latest-windows\platform-tools>fastboot flash recovery twrp-3.1.1-sanders.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' (10236 KB)...

OKAY [ 0.340s]

writing 'recovery'...

(bootloader) Image not signed or corrupt

OKAY [ 0.247s]

finished. total time: 0.603s

I have booted to recovey but i have seen no twrp recovery , there was a Android logo and below the Android logo it was written "no command" ....
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] Phazmos:
Sounds like something went wrong somewhere. Might be a good idea to flash a stock image and start again. I had to go around a couple times before I got everything right (this is my first moto device since my droidx, only had nexus devices in between, and things are a lot easier on a nexus). I wish you the best of luck, I'm sure you'll get it eventually!
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] CheckYourScreen:
Try the one from here: https://xdaforums.com/moto-g5s-plus/development/recovery-twrp-3-1-1-r7-t3694910
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] Harsh raj sah:
I have flashed the stock ROM but problem remains what to do now ? :crying:
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] Phazmos:
Only thing I can suggest now is try the v9 twrp build from here. It was the only 1 that worked as expected for me. I should note that I have the us version of this device.

https://xdaforums.com/moto-g5s-plus/development/recovery-twrp-3-1-1-r7-t3694910
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] Harsh raj sah:
Ok i will try
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] Phazmos:
Hope it works for ya! Fingers crossed!
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] Harsh raj sah:
C:\Users\Patanjali\Desktop\platform-tools-latest-windows\platform-tools>fastboot flash recovery twrp-sanders-r9.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' (12306 KB)...

OKAY [ 0.578s]

writing 'recovery'...

(bootloader) Image not signed or corrupt

OKAY [ 0.188s]

finished. total time: 0.781s

Again same message occurred .... What to do now ???? Please tell
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] Phazmos:
Fact check

Device is unlocked - you see the "device is unlocked and can't be trusted" screen with normal boot?

Has the img file been renamed at all? Ie did you add .img to file name.

Running the cmd window as admin?

Outside of that, all I can think of is using different adb/fastboot drivers. I loaded them years ago and never updated them - never had a need to. Think I got them from Google, but it was 5+ years ago.

Sorry friend, but I'm grasping at straws. It worked for me, it should work for you.
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] SynisterWolf:
make sure you have the latest platform tools from google.

https://developer.android.com/studio/releases/platform-tools.html
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] Akkikuntal:
Hey i couldn't unlock my bootloader because my device is not detecting in fastboot, i followed all the steps carefully. But i dont know what to do now!!
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] Harsh raj sah:
Thankyou Phazmos , CheckYourScreen and SynisterWolf

I have installed latest version of adb and flashed the twrp it was a successful attempt after flashing the recovery img 8 - 9 times , thanks to all who have supported me....

But in command prompt when i flashed it was written as "(bootloader) not signed or corrupt " - is it normal or not though it flashed recovery on my device successfully..

:D
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] Phazmos:
Nothing to worry about. Now go have some fun!
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] Harsh raj sah:
Will rooting my system will abort ota updates ?
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] Phazmos:
Usually any changes to system will kill otas. But since moto seems to be very very slow with updates (this shipped with 7.1.1 and 8.1 is just around the corner), you're better off getting updated with custom roms built from aosp sources.
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] Mr.Mac1994:
failed to load kernel

I'm encountering the same problem.

I found a custom kernel id like to use but don't see how I'm supposed to flash the .zip when I've yet to boot into recovery

fastboot will only let me flash .img files via command promt or am i wrong?

first post. id greatly appreciate some guidance
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] Phazmos:
First - why can't ya boot to twrp

Second - you can try extracting the boot.img file from the zip. No guarantees though if the kernel modifies ramdisc
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] Mr.Mac1994:
To my understanding I flashed Twrp just fine everything was confirmed in the log. When the phone didn't auto restart I manually chose recovery mode, and went to boot only to receive that error about the kernel.

is there any risk in trying to flash just that kernel .img?

would it be wiser to just restart the process?
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] Phazmos:
Honestly, if you're having trouble with twrp - start over. Get that going properly first. You're gonna have to anyway, and things are a lot easier with it. Besides, if that's messed up, you may have other issues, and they may be serious.

Twrp - you using the r9 version found somewhere here? That was the only 1 that worked as expected for me.
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] ksigit:
you can boot on-the-fly to twrp from fastboot, the command is:

fastboot boot recovery your-twrp-image.img

it should boot into twrp without flashing it
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] Mr.Mac1994:
So I ended up flashing stock and starting over again and everything went smoothly.

Im now running lineageOS 15.0, micro Gapps, Magisk and amirzaidi's Launcher 3. Im so impressed with this phone and Oreo.

I appreciate the replies.
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] EzeMaxtor:
Works in Xt1800 model? Plz
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] Phazmos:
Glad to see it worked out. Now you've got a good base to start the adventures. And you get your first thanx for heeding good advice. Enjoy!
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] Kminttech:
When I flashed the recovery it seemed to flash fine but when I tried to boot into it fastboot came back up with a message that "Start Up Failed" and the reason listed was "Error: failed to load kernel!" I can still boot my phone normally but can't access recovery. I saw someone else mention a similar problem but I did not see a solution has anyone had this and fixed it or have a suggestion?
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] BSDADON:
Don't know if you fixed it or not but I had the same problem. Ended up flashing this version and it worked

https://xdaforums.com/moto-g5s-plus/development/recovery-twrp-3-1-1-r7-t3694910
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] QkiZMR:
I found bug in this version of TWRP. I made image of system partition on data partition, 4GB file. When I try to restore it I have an error that file has 0 size. I can use dd command to restore partition but it should work normally in TWRP. It's not matter of file system.

Wysłane z mojego Moto G (5S) Plus przy użyciu Tapatalka
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] Mr Sabeer:
Hello guys help me i just unlocked bootloader but when i try to flash twrp it says that its not signer or corrupt please help me how can i fix this issue?
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] Phazmos:
It's not an issue, it should instal. Disregard the error.
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] Mr Sabeer:
If i flashed other stock rom will it be fixed or no option? I jusf bought this phone yesterday only i need root access quick as possible
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] Phazmos:
If ya want root - flash su from twrp. Nothing to fix
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] Mr Sabeer:
Problem is not able to flash twrp lol and u post same instead of solution
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] Phazmos:
If you can't install twrp, you have other issues, and with no information, you'll get no help.

Best of luck to ya
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] :
You've already been given the answer tho: disregard the error - twrp flashed fine. Boot into to twrp through fastboot or do it manually with the buttons.

BTW, this twrp is newer...

https://xdaforums.com/moto-g5s-plus/development/recovery-twrp-3-1-1-r7-t3694910
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] Mr Sabeer:
That's also not working tried that too, same error not signed or corrupt
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] :
DUDE. Can you read? The error is bogus. The file is still flashed. Reboot into twrp and get on with it.
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] Mr Sabeer:
Not working too
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] :
And? I guess it's hopeless dude. Good luck to you. Peace.
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] Mr Sabeer:
Help me bro im here unlocked bootloader thanks for quick replies, i was used moto g3 before thers no problem i faced tl flash anything but this one is so strange
[Moto G5S Plus ROMs, Kernels, Recoveries, & Other D] :
I don't know why you're stuck bro. If you follow this guide the next step after bootloader unlock is to fastboot flash your twrp file, rt? https://xdaforums.com/moto-g5s-plus/development/root-moto-g5s-plus-t3673287

*what fastboot command are you using? For ex, to flash this recovery( https://androidfilehost.com/?fid=889964283620777591 )type: fastboot flash recovery twrp-sanders-r16.img

...& then just reboot to recovery, make a backup, and install root zip.