yashsingh1/xdaforums huggingface dataset:
[Moto G4 Plus Guides, News, & Discussion] Adarsh balu:
I need some help to unroot phh superuser from my moto g4 plus... I have already installed ex kernel and phh works fine...But i need to change to SuperSU...

Anyone please give a step by step instructions for this....

Thanks
[Moto G4 Plus Guides, News, & Discussion] newwill_225:
i receive this message

target reported max download size of 536870912 bytes

sending 'recovery' (12496 KB)...

OKAY [ 0.391s]

writing 'recovery'...

(bootloader) Image not signed or corrupt

what can I do to solve this and flash twrp with success?
[Moto G4 Plus Guides, News, & Discussion] echo92:
That's a normal error - flashing TWRP reports that error because, I imagine, it's not been cryptographically signed.

Once it's flashed and reported [OKAY], reboot back into recovery (not system) - you should reboot back into your new TWRP recovery. Once you've entered the TWRP recovery, the custom recovery should stick and you may reboot as normal. If you reboot to your system after flashing TWRP, your stock recovery will overwrite the custom recovery - rebooting to recovery after flashing prevents that overwrite.
[Moto G4 Plus Guides, News, & Discussion] newwill_225:
sure man, that's exactly what happened XD now I've tested again and it works perfect. :)

Thanks 4 ur reply.
[Moto G4 Plus Guides, News, & Discussion] cerberusss:
Noob question here, I don't want to root stock android, I want to flash a custom rom, can I directly flash a rom after step 4? Thanks in advance.
[Moto G4 Plus Guides, News, & Discussion] echo92:
That's perfectly okay, you don't need to root to flash a custom ROM, just an unlocked bootloader and a custom recovery - just a few things:

You may wish to flash a newer TWRP version than that mentioned in the first post. You could flash shrep's TWRP versions (I find 3.0.3 n4 or 3.1.0 works well - https://xdaforums.com/moto-g4-plus/development/recovery-twrp-3-0-2-r3-moto-g4-g4-plus-t3494337), or the official 3.1 TWRP update (from https://dl.twrp.me/athene/) or oadam11's TWRP (https://xdaforums.com/showpost.php?p=70939009&postcount=2)

When downloading the custom ROM, use a file manager like Amaze File Explorer to check the md5 checksum and file size against that reported on the download page. Although the file size might be reported differently, the md5 should match - this will reduce the chances of a corrupted download.

Check with the custom ROM opening post what Google apps (Gapps) package you need to flash too, since most custom ROMs do not come pre-bundled with the core Google Apps.

Custom ROMs generally mandate you wipe your system, Dalvik, data and cache prior to installation. Back up your data as necessary. If you wish, make a backup of your Nougat installation before you wipe your device, so if anything happens, you can reboot back to your TWRP Nougat backup. Normally, internal storage - where your TWRP backups, photos and downloads for example, shouldn't be wiped, but you may wish to move your backups off your device (e.g. to a SD card, or your computer).

Good luck!
[Moto G4 Plus Guides, News, & Discussion] Knasttker:
I am needing a root solution to root my Android phone
[Moto G4 Plus Guides, News, & Discussion] Jeevan jeev:
Today I got new update..it is March security patch I think so..I have rooted my XT1643 and have installed twrp in it...how can I install the new update ..by the way I have extracted the download update from \cache...help me!!
[Moto G4 Plus Guides, News, & Discussion] echo92:
Generally, you'll have to unroot and reflash recovery (effectively going back to stock, else the OTA will not flash - bootloader status doesn't matter). Unroot using your root manager's recommended method, then reflash the stock recovery image in TWRP or adb (you can find images on shrep's website https://moto.shreps.fr/?dir=Moto G4 (athene)/recovery, or extract the recovery image from the stock fastboot ROM https://xdaforums.com/moto-g4-plus/how-to/moto-g4-plus-xt1640-43-athene-npj25-93-t3549369 - probably best to use the fastboot recovery image as it's more recent).

Then if you reboot into recovery and flash the captured OTA, or reboot from the notification, it may flash. You may however encounter an error 7 during flashing, in which case you may have to reflash the stock fastboot ROM. Of course, this will wipe your data and device, so back up.

If you need the OTA file, a copy is here https://xdaforums.com/moto-g4-plus/how-to/official-moto-g4-plus-ota-update-build-t3584982 and that is the March security update.

Oh, if you wish to keep TWRP, you may wish to have a look at Revivor, which is an optimised stock ROM with the March update: https://xdaforums.com/moto-g4-plus/development/rom-npjs25-93-14-4-deodexed-debloated-t3587180
[Moto G4 Plus Guides, News, & Discussion] toppits:
[MENTION=7566844]Jeevan jeev[/MENTION]

When the Nougat OTA Update came I was running Stock MM, rooted. I didn't want to lose my data and found a way. I'll try to do the some for the next OTA update as well, but can't promise that it works, though I kind of followed this tutorial, more or less.

You'd need the Stock ROM that you are running right now and extract it. Then via fastboot flash the following files: logo.bin, boot.img, recovery.img and all the system.img_sparsechunk.0 till .7

I didn't unroot or anything else before, just flashed those files via fastboot, rebooted, let the system download OTA and install it. Afterwards I rooted with ElementalX Kernel and SuperSU.

I plan to do that as soon as I get the OTA update, till then I can't guarantee anything, so if you try it, be sure to do a Backup with TWRP in case anything goes wrong.
[Moto G4 Plus Guides, News, & Discussion] NeroCZA:
I cant get any nougat root method to work on my moto g4 Id really like to root it. I hate these update alerts on marshmallow
[Moto G4 Plus Guides, News, & Discussion] echo92:
What device have you got? What's happened when you've tried to root Nougat before?

Have you tried this guide (when you've updated to Nougat)? https://xdaforums.com/moto-g4-plus/how-to/guide-root-moto-g4-plus-supersu-android-t3587918
[Moto G4 Plus Guides, News, & Discussion] dayyyvid:
It's not working for me

I keep getting this error:

(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' (12552 KB)...

OKAY [ 0.399s]

writing 'recovery'...

(bootloader) Image recovery failed validation

(bootloader) Preflash validation failed

FAILED (remote failure)

finished. total time: 0.420s

Is there any fix or workaround? I've been looking for a couple of days now
[Moto G4 Plus Guides, News, & Discussion] echo92:
What recovery file are you trying to flash, on what device and on what OS (what build of android)?
[Moto G4 Plus Guides, News, & Discussion] dayyyvid:
I'm trying to flash TWRP 3.1.0-0-athene for the regular Moto G4 on Nougat NPJ25.93-14. I know I have to flash ElementalX as well, but I'm stuck trying to install TWRP
[Moto G4 Plus Guides, News, & Discussion] echo92:
Hmm, TWRP 3.1 athene should work (downloaded from https://dl.twrp.me/athene/, I trust?). You may wish to download another copy just to check your TWRP downloaded okay.

Just checking, but have you unlocked your bootloader by setting OEM unlock in Developer Options, then submitting the unlock code to Motorola and entering the reply (as per this post https://xdaforums.com/showpost.php?p=67031801&postcount=2)? You'll have that 'your device cannot be trusted' warning when you boot if you've got an unlocked bootloader. Of course, this unlocking of your bootloader will void whatever warranty you may still have.
[Moto G4 Plus Guides, News, & Discussion] just_magikkal:
okay, now I remember why I didn't have this rooted before.

every time I try to boot normally after flashing superuser.zip, it powers off. Not sure what's going on.
[Moto G4 Plus Guides, News, & Discussion] Mistercraft38:
The chainfire SuperSU doesn't work?
[Moto G4 Plus Guides, News, & Discussion] toppits:
doesn't*

Yes, it does. https://xdaforums.com/moto-g4-plus/...b-friendly-t3526598/post71265934#post71265934
[Moto G4 Plus Guides, News, & Discussion] amitmishra960:
stuck on black screen after flashing phh's SuperUser what to do ? pls reply soon..
[Moto G4 Plus Guides, News, & Discussion] ClemBen32:
Ok !

It works thank you !
[Moto G4 Plus Guides, News, & Discussion] higgadron:
Anybdy plzzzz.. get me the stock kernal of Moto G4 Plus Please , I dont have the stock kernal back up , and i flashed ElementalX kernal , cuz i have no idea ,how can i do a backup of stock kernal without rooting ,

【 XT1643 Varient With 7.0 Nougat】

Thanking you..
[Moto G4 Plus Guides, News, & Discussion] amitmishra960:
Its hanging alot after root... Whats the reason and how to fix it? Pls help...
[Moto G4 Plus Guides, News, & Discussion] echo92:
I'm going to ask for more info, so we can help you better:

What device are you running?

What stock ROM have you got?

Is this a clean flash of the stock ROM (i.e. flashing the stock ROM with data and cache wipes)?

Is your system, without any modifications, stable?

What TWRP and custom kernel did you flash?

After flashing TWRP and the custom kernel, is your system stable and are you able to boot?

Which root manager are you using (and if it's phh superuser as in your previous post, did you apply the edits as mentioned in the first post)?
[Moto G4 Plus Guides, News, & Discussion] amitmishra960:
Completely followed all steps.. flashed elemental X kernal.. phh superuser apply edit.. phone start normly.. bt some times its hangig when i use whatsapp or any other application..
[Moto G4 Plus Guides, News, & Discussion] echo92:
Hmm, I'm wondering, do you have these hangs if you use SuperSU or magisk instead of phh superuser? You've not flashed any other root managers previously?

Though I've not tried this, a way to change root managers may be:

1) Uninstall the phh Superuser app (via the Play Store)

2) Reboot to TWRP, back up your existing system (make a note that this backup still has phh superuser, it's just in case you need a backup to restore).

2a)You may wish to use the unSU script in TWRP to remove phh Superuser, but as stated, you'll need to flash a stock boot image to remove traces of the root https://xdaforums.com/showpost.php?p=63615067

3)Flash your stock boot.img backup (to remove the rest of phh superuser root) - if you don't have one, my post above has a link to stock boot images that can be flashed in TWRP.

3a) You may elect to wipe caches/Dalvik at this point and reboot to check if your system is okay. Your system should be unrooted at this point.

4)Flash ElementalX 1.04 again.

5)Flash either SuperSU 2.79 SR3 beta or Magisk v12 (SuperSU 2.80 and 2.81 appear to have some root issues at the moment): https://xdaforums.com/apps/supersu/2014-09-02-supersu-v2-05-t2868133 for SuperSU, https://xdaforums.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445 for Magisk.

A few notes:

These uninstall instructions were expanded from those mentioned in the phh superuser thread (e.g. https://xdaforums.com/showpost.php?p=71600498&postcount=2385)

Though the process is convoluted, you'll want a clean system without the previous root before flashing a new root manager, else it's likely you'll run into issues if traces of the old root still exist.

As always, back up your data if you can. This method shouldn't go near your data, but as with flashing anything to do with the system, just be careful.

I had a look in the phhsuperuser topic and didn't see mention of hanging with apps or with Whatsapp. I don't know if you could verify the config file is properly altered, but as I understand it the options given in this opening post give you a lot of freedom.
[Moto G4 Plus Guides, News, & Discussion] Dzerk':
Help

Does it work in Resurrection Remix rom?
[Moto G4 Plus Guides, News, & Discussion] echo92:
If you mean using this method to root on Resurrection Remix, you don't need to use this method as the kernel that comes with RR is suitable for rooting. With RR, since the current build is rootless, you'll need to download a root manager such as SuperSU or magisk. The respective pages for each manager are linked in the RR opening post.

Once you've downloaded the manager, follow the instructions for either manager to obtain root (e.g. for SuperSU v2.79 SR3, boot to TWRP, back up your boot partition, then flash the Super SU zip. Reboot) once rebooted, you should have root.

Of course, don't switch between root managers without uninstalling the old root first, else you'll run into issues.
[Moto G4 Plus Guides, News, & Discussion] sureshkadiri:
How to root Nougat on Moto G4 Plus NPJS25.93-14-4 ?

please someone tell me how to root Nougat on Moto G4 Plus NPJS25.93-14-4 ?

Android security patch level 1st March,2017.
[Moto G4 Plus Guides, News, & Discussion] SoNic67:
When I had root with phh Superuser my phone locked up on me. I am using SuperSU (v2.82 flashable zip) and have no issues.

PS: I have tried the updated SuperSU 2.80 and lost root. Chainfire released a corrected 2.82 and that fixed the problem.
[Moto G4 Plus Guides, News, & Discussion] subhash.stylockz:
after rooting my device is not switched on having 69% battery also

i used twrp 3.0.2.0 and super su on above discription plz give me a suitable solution
[Moto G4 Plus Guides, News, & Discussion] silentkiller0210:
not working!!!!

Can't root my G4 Plus (NPJS25.93-14-4). Says "signature not found or corrupted":crying::crying:

---------- Post added at 01:02 PM ---------- Previous post was at 12:58 PM ----------

Umm... can u please give me ur build no.? well i wanna know. on which build it worked
[Moto G4 Plus Guides, News, & Discussion] echo92:
Did you flash ElementalX kernel? Rooting on Nougat on Moto G4 devices, you must flash a custom kernel (else the anti root security will prevent you booting on the stock Motorola kernel). Rooting methods for Marshmallow don't work.

If you didn't, try copying ElementalX 1.04 (stock) https://xdaforums.com/moto-g4-plus/development/kernel-elementalx-g4-0-01-t3424836 to your device (either from a SD card or use 'adb push' commands

then reboot to TWRP, and then flash the kernel, then SuperSU (you'll want SuperSU v2.79 SR3 or 2.82).

If that doesn't work, you may have to reflash your stock ROM or restore your TWRP backup (you did make a backup before flashing, right?)

This may be a long shot, but instead of re-flashing your stock ROM, you may be able to just reflash the stock kernel in TWRP to remove SuperSU from your system, which may allow you to boot. Here's a link for stock kernels, make sure you flash the right one for your system: https://xdaforums.com/showpost.php?p=72378739&postcount=262

---------- Post added at 10:34 AM ---------- Previous post was at 10:31 AM ----------

I've rooted on NPJ25.93-14 (Dec 2016) and NPJ25.93-14.4 (March 2017) without issue: I used this guide https://xdaforums.com/moto-g4-plus/how-to/guide-root-moto-g4-plus-supersu-android-t3587918 Similar to the guide listed at the top of the page, except it uses SuperSU for rooting. Here's my procedure for how I flashed SuperSU or magisk onto my device: https://xdaforums.com/showpost.php?p=72496111&postcount=270

At what point are you getting signature not found or corrupted? Have you re-downloaded all the key files required (TWRP if you need recovery, ElementalX and SuperSU) and checked they've downloaded okay?
[Moto G4 Plus Guides, News, & Discussion] Smo0chy:
Hi, could you guys please help me to root my moto g4 plus, I have tried but no luck.

Thanks!!
[Moto G4 Plus Guides, News, & Discussion] toppits:
Yes, we can help you.
[Moto G4 Plus Guides, News, & Discussion] Smo0chy:
Please help me, I have tried step gives on net, I have been unlocked the bootloader installed twrp but not able to root, I think I am doing something wrong.
[Moto G4 Plus Guides, News, & Discussion] echo92:
Which steps are you following to root, and where is it going wrong?

If you're on Nougat, as in the opening post, you must flash a custom kernel, such as ElementalX before rooting. Rooting with the stock Motorola kernel under Nougat on our devices may trigger the anti-root protections and your device may fail to boot.

For more details and for rooting with SuperSU or magisk, you may wish to look at the guides I posted above in post 274, or check these posts: https://xdaforums.com/moto-g4-plus/how-to/guide-root-moto-g4-plus-supersu-android-t3587918 https://xdaforums.com/showpost.php?p=72496111&postcount=270
[Moto G4 Plus Guides, News, & Discussion] Smo0chy:
Hi, i have unlocked boot leader, then installed twrp, after installation i tried to root my mobile (as I was not aware that I need to flash kernel first) and i lost boot image then I installed Lineage but couldn't root it.

After reading the post i came to know that kernel needs to be flash so i did and then i flash supersu.

When I restart my device and installed root checker it's saying rooting not done and supersu saying SU binary occupied.
[Moto G4 Plus Guides, News, & Discussion] Smo0chy:
I just checked again now root checker saying that root is properly installed on this device but supersu is still stacked on "SU BINARY OCCUPIED"
[Moto G4 Plus Guides, News, & Discussion] echo92:
Can I just clarify - are you on LineageOS or on the stock (Motorola) Nougat ROM still?

If you're still on the stock ROM, sounds like you've got another root manager on your device (or traces of one) that's interfering with SuperSU. I'd suggest unrooting SuperSU (through the SuperSU app's unroot procedure), then flash a clean stock (Motorola) kernel - files and instructions are here https://xdaforums.com/showpost.php?p=72378739&postcount=262

This then will give you a system (unrooted for the moment) with a clean stock kernel, we want this because it removes any previous root managers that may be conflicting with SuperSU (root managers like SuperSU and magisk can alter the ramdisk part of your kernel, which I think isn't affected if you try to flash ElementalX, so may cause issues with root!)

Now that you have a clean stock kernel, test your system is booting. If so, then:

1)Boot to TWRP and back up your existing system (including the boot partition, with your clean stock kernel).

2)Flash ElementalX, wipe cache/Dalvik. Reboot.

3)Once you've checked your system is booting okay, reboot to TWRP.

4)Flash SuperSU (2.82 SR1 or 2.82, preferably)

5 Reboot.

You should have root without issue then on the stock ROM with SuperSU.

If you're on LineageOS, LineageOS does not come pre-rooted anymore. You must flash SuperSU, magisk or the su-arm-addon to obtain root (though from the sounds of it, you tried and it didn't work...?)
[Moto G4 Plus Guides, News, & Discussion] Ganu231:
Can i flash magisk instead ph su zip
[Moto G4 Plus Guides, News, & Discussion] kevinarol:
Hi, This procedure works with Vegito Kernel?
[Moto G4 Plus Guides, News, & Discussion] echo92:
Yes, magisk v13 works on my rooted XT1642 running NPJS25.93-14.4 (March 2017 security update). However, if you're on stock Nougat - any build - you must flash a custom kernel (preferably ElementalX) before attempting to root. You may wish to consult this post for more details https://xdaforums.com/showpost.php?p=72496111&postcount=270 For flashing magisk, ensure you do not have phh or SuperSU on your device (or uninstalled them and restored your untouched stock kernel), else having (traces of) multiple root managers may cause root issues.

---------- Post added at 11:44 AM ---------- Previous post was at 11:39 AM ----------

Should do, since vegito, like ElementalX, shouldn't have any of the security measures that affect root. Flash vegito instead of Elemental X in the procedure. Just be aware that vegito is a SE-Linux permissive kernel, and thus is more relaxed on security - all that means is be careful about where you install apps from.

So: flash TWRP

Backup your system

Flash vegito, reboot to system (check it's all working)

Reboot to TWRP

Flash your root manager of choice (SuperSU, magisk or phh. Do not change root managers without uninstalling and flashing a clean kernel from your backup).
[Moto G4 Plus Guides, News, & Discussion] Ganu231:
I have june security patch . i am on nought that means i firstly have to flash TWRP then a custom kernal then finally magisk.... I am right , aren't I ?
[Moto G4 Plus Guides, News, & Discussion] echo92:
Which ROM are you using? The procedure in this thread and the post I linked are for the Motorola stock ROM, which is only up to the March 2017 patch (as far as I know).
[Moto G4 Plus Guides, News, & Discussion] Ganu231:
It was a posted by mistakenly :confused:
[Moto G4 Plus Guides, News, & Discussion] Ganu231:
Which is best kernal vegito or elementalX in case of more no of governor and I/O schedulers..?
[Moto G4 Plus Guides, News, & Discussion] Smo0chy:
I have lost stock, now I am on lineage.

Can you please suggest if i can get stock rom...
[Moto G4 Plus Guides, News, & Discussion] Handonam:
So i followed these steps, and forgot to backup before flashing superuser. I wanted to install Magisk so i can install certain picky apps. anyone got stock boot.img and recovery.img for NPJ25.93-14-4 so i can go back to and start again?

And, if i want to go the route of installing apps (say snapchat or pokemon GO), is Magisk all I need, or is it installed before/after phh's superuser? Or does it not work like that?

Thanks!

Edit: looks like I might have found one. I hope this is good? https://xdaforums.com/moto-g4-plus/how-to/fxz-flashable-stock-npjs25-93-14-4-t3623010
[Moto G4 Plus Guides, News, & Discussion] echo92:
The link you've found goes to a TWRP flashable of the stock ROM - it works, though it'll flash a fresh copy of the entire stock ROM, which might not be what you're going for.

If you've still got TWRP, you could try the following to revert and flash magisk (I've not tried this, though others appear to have with success). As far as I know, magisk comes with its own root and thus does not need phh superuser or SuperSU (and may fail if those are still active or traces of them are still around). For pokemon GO and snapchat, the magisk hide function (which hides magisk and root from various detection methods) may be sufficient to allow you to install/run those apps, though that might change.

1)Download unSU from here: https://xdaforums.com/showpost.php?p=63615067

2)Download a stock kernel from here: https://xdaforums.com/showpost.php?p=72378739&postcount=262 Make sure you've got the right kernel!

3)Reboot to TWRP and backup your entire system.

4)Flash unSU (to remove phh superuser)

4a)Then flash the clean NPJS25.93-14-4 kernel to the boot partition (to remove traces of phh)

5)Wipe cache, Dalvik, then reboot to system.

6)Verify you have a working system.

7)Reboot to TWRP and back up your boot partition (containing your clean stock kernel).

8)Flash ElementalX, wipe cache/Dalvik again, and reboot, again verify your system is functioning.

9)Download magisk v13 (latest build as of writing is c4377ed): https://xdaforums.com/apps/magisk/beta-magisk-v13-0-0980cb6-t3618589

10)Reboot to TWRP and flash magisk. Reboot.

You should now have magisk root and also the ability to hide apps from root detection, so they should work :) If at any point your system fails to boot, you can revert back to the backup you made in 3)
[Moto G4 Plus Guides, News, & Discussion] echo92:
https://xdaforums.com/moto-g4-plus/how-to/stock-rom-npjs25-93-14-4-march-1-t3608138 for the NPJS25.93-14-4 fastboot stock ROM. Use this if you want to go back to completely stock (including stock recovery), suitable for OTA updates.

You could also try this TWRP flashable of the NPJS25.93-14-4 stock ROM (https://xdaforums.com/moto-g4-plus/how-to/fxz-flashable-stock-npjs25-93-14-4-t3623010) I've tested it on my device and it works (though it's a XT1642) so back up your LineageOS ROM first in TWRP. Bear in mind that, though you'll be back to near stock (and should be able to root with ElementalX and your root manager), you won't be able to install OTA updates as you don't have a stock recovery.
[Moto G4 Plus Guides, News, & Discussion] Ganu231:
Enable to unlock bootloader...it says " your device does not qualify for unlocking the bootloader " i have cid 0x0032. Plz help me. Thnx in advance