yashsingh1/xdaforums huggingface dataset:
[Moto G5 Plus Questions & Answers] riggerman0421:
Flash a custom rom in TWRP or reflash stock with fastboot.
[Moto G5 Plus Questions & Answers] s_beckett:
Custom rom

Where can I find the custom rom for moto g5 plus xt1687? Thanks
[Moto G5 Plus Questions & Answers] manos78:
Hi,

If you install the ElementalX custom kernel v1.02 then you fix the error.

Futhermore, with this kernel you don't need the "no-verity-patch"... as I advise that this patch writes the SYSTEM partition... so you lost the option for OTAs.

Here the thread to download this custom kernel:

http://xdaforums.com/g5-plus/development/kernel-elementalx-1-00-moto-g5-plus-t3614211

Regards!
[Moto G5 Plus Questions & Answers] s_beckett:
ElementaX

I installed LineageOS and then ElementalX and when I reboot it takes me back to TWRP. Are my steps wrong? The bigger question is why am I getting the "/system could not be mounted" when I installed magisk v14 so remain unrooted??. I followed the steps carefully. What is a clear path out of this mess? Very frustrating. Any assistance is appreciated.
[Moto G5 Plus Questions & Answers] manos78:
Hi,

I'm on stock, so if you use LineageOS, then this is my recomendation:

- Reinstall Lineage and check that all works (remeber to do "wipe cache" after install it and before boot it).

- Then install the ElementalX-los version, and reboot. Check that all works.

- Finally, after a full reboot install Magisk v14.0.

If the error of mount in Magisk continues, ask [MENTION=4684315]flar2[/MENTION] to fix the "los" version like the Stock-1.02.

Regards.
[Moto G5 Plus Questions & Answers] s_beckett:
Some success

I was able to install magisk v14, then I installed PureNexus and the suggested gapps. When I reboot I kept going back to TWRP but if I go to the bootloader I am able to start the PureNexus OS without issue (no decrypt error). When I do a root check it indicates I am not rooted. What should I do in the proper order? Should I install no-verity-opt-encrypt-5.1. and "Magisk-v14 again without causing a problem, is that the solution? How many times can you reinstall that those files. Thank for your help.
[Moto G5 Plus Questions & Answers] manos78:
Sorry?

Magisk will need to be installed after then ROM and the Kernel.

Futhermore, if you use the proper kernel, you don't need to install the "no-verity-opt-encrypt-5.1".

Please, do it in this order:

1) Install PureNexus or your preferable ROM.

2) Boot and check it (don't configure, only a simple check).

3) Reboot to TWRP and install the ZIP of the custom kernel (I recomend ElementalX).

4) Boot and check it (again don't configure).

5) Reboot to TWRP and re-format the "Data" partition (select "f2fs" if it has another filesystem)... this will disable the "encryption enforcement" (as it formats withtout encryption and the kernel disables the enforcement).

6) Boot and configure.

7) Reboot to TWRP and install Magisk v14.

8) Boot and check MagiskManager, you're now rooted.

9) If you like install Xposed for Magisk and configure it.

That's all!
[Moto G5 Plus Questions & Answers] s_beckett:
First off really appreciate your help and patience with me. Followed your guidelines have root and PureNexus is working ok. One last issue that persists. Every time I reboot it goes directly to TWRP. I have to go to the bootloader and start the OS that way. How can I get it to boot directly into the OS? Thanks again.
[Moto G5 Plus Questions & Answers] manos78:
This is because your bootloader thinks that it need to boot to the "recovery". So, try this:

1) Wipe cache.

2) Do a full power-off from the ROM.
[Moto G5 Plus Questions & Answers] s_beckett:
Unfortunately this did not work. Are there any other options?
[Moto G5 Plus Questions & Answers] washoq:
Enter into bootloader mode, connect your phone to the PC and type "fastboot continue" command in ADB.
[Moto G5 Plus Questions & Answers] s_beckett:
I have found success! I wiped the drive in TWRP and install Stoneware v67 then installed magisk v14 and the boot process is now directly to the OS and it is rooted. I did not load a custom ROM but it is working fine. Frankly, I really do not understand which ROM needs a custom one or not and wish there were clear instruction on this matter as there are so many ROMs and some did not install or work well when I tried them. In any event, I appreciate your ongoing assistance and patience with me.
[Moto G5 Plus Questions & Answers] manos78:
Great!

The behaviour you have observed is because at some point the "reboot cause" (the trigger that launch the recovery at every boot) isn't cleared or is everytime set incorrectly. If you found a method for clear the cause, then you can continue... :D
[Moto G5 Plus Questions & Answers] NODE06:
So I ran into some issues installing LOS15 and flashed back to stock using POTTER_NPN25.137-35_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml.

Being paranoid I am concerned about the errors I have gotten, mainly because if the ROM messed with my system and I cannot replace it, well, who know what nefarious actions might be taking place.

I have booted the system and it works fine, but again, just being cautious.

Here are the errors:

[B]fastboot flash partition gpt.bin[/B]
sending 'partition' (45 KB)...
OKAY [ 0.005s]
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 failure)
finished. total time: 0.074s

[B]fastboot flash bootloader bootloader.img[/B]
sending 'bootloader' (5115 KB)...
OKAY [ 0.233s]
writing 'bootloader'...
(bootloader) Validating 'bootloader.default.xml'
(bootloader) Security version downgrade
(bootloader) Image aboot failed validation
(bootloader) Preflash validation failed
(bootloader) Cancelling 'bootloader.default.xml'
FAILED (remote failure)
finished. total time: 0.510s

[B]sudo fastboot flash boot boot.img [/B]
ending 'boot' (16384 KB)...
OKAY [ 0.771s]
writing 'boot'...
(bootloader) Image signed with key bad key
OKAY [ 0.442s]
finished. total time: 1.213s

[B]sudo fastboot flash recovery recovery.img [/B]
target reported max download size of 536870912 bytes
sending 'recovery' (20580 KB)...
OKAY [ 0.973s]
writing 'recovery'...
(bootloader) Image signed with key bad key
OKAY [ 0.532s]
[B]
sudo fastboot erase customize[/B]
erasing 'customize'...
(bootloader) Permission denied
FAILED (remote failure)
finished. total time: 0.003s

[B]sudo fastboot erase clogo [/B]
erasing 'clogo'...
(bootloader) Permission denied
FAILED (remote failure)
finished. total time: 0.003s
[Moto G5 Plus Questions & Answers] InsaneNexuS:
Is your moto g5 plus reteu?
[Moto G5 Plus Questions & Answers] NODE06:
I guess you meant retail? Yeah, it is retail. No amazon ads.
[Moto G5 Plus Questions & Answers] InsaneNexuS:
Well I need to know if it was reteu software channel. Otherwise it wont work for you. Maybe because your not flashing the right files? Mine was RETEU, which means its a european model.
[Moto G5 Plus Questions & Answers] NODE06:
No, not European. US Version. At least I bought it on Amazon in the US.

I want to add that I have flashed the stock before and did not get these errors. It only happened after I flashed LOS15.
[Moto G5 Plus Questions & Answers] InsaneNexuS:
Well then you need to find the right firmware for you US model. And start with locking the bootloader. And flash every line one by one (copy paste). Dont copy all of them and paste them otherwise it wont work. You really have to do it one by one.

Bootloader relock commands:

fastboot oem lock

fastboot oem lock

fastboot flash oem oem.img

fastboot flash system system.img_sparsechunk.0

fastboot flash system system.img_sparsechunk.1

fastboot flash system system.img_sparsechunk.2

fastboot flash system system.img_sparsechunk.3

fastboot flash system system.img_sparsechunk.4

fastboot flash boot boot.img

fastboot oem lock

After you locked the bootloader start flashing the firmware. Use this site to find the right firmware:https://firmware.center/firmware/Motorola/Moto G5 Plus/Stock/

I gues you should try the one that says RETAIL in the name.

---------- Post added at 23:01 ---------- Previous post was at 22:59 ----------

Well if you have done it before then I guess I don't really know what the problem is :(
[Moto G5 Plus Questions & Answers] NODE06:
Here's what happened putting in that code:

sudo fastboot oem lock
[sudo] password for user:
...
(bootloader) WARNING: This command erases all user data.
(bootloader) Please re-run this command to continue.
OKAY [ 0.002s]
finished. total time: 0.002s
sudo fastboot oem lock
...
(bootloader) Flash valid Android images now
(bootloader) Then re-run this command to lock
OKAY [ 0.012s]
finished. total time: 0.012s
sudo fastboot flash oem oem.img
target reported max download size of 536870912 bytes
sending 'oem' (75638 KB)...
OKAY [ 3.432s]
writing 'oem'...
(bootloader) Security version downgrade
(bootloader) Image o failed validation
(bootloader) Invalid signed image
(bootloader) Preflash validation failed
FAILED (remote failure)
finished. total time: 3.499s

I guess I would just like to know why this is happening. like what does "(bootloader) Security version downgrade" even mean?
[Moto G5 Plus Questions & Answers] acejavelin:
Your are downgrading, trying to flash a version of firmware that is older than what is installed already.

You either need a newer factory image, or are using the incorrect one. "Preflash validation failed" is basically saying the digitial signature doesn't match what is already there or is older than what you have currently.

Exactly what image are you flashing and what is the output of "fastboot getvar all" except mask out the IMEI number(s).
[Moto G5 Plus Questions & Answers] NODE06:
Yeah, I thought that was the issue. I guess I just kind of fracked my phone then because I installed Lineage 15.0 which uses Android O. I guess there will not be a newer firmware image anytime soon.

The flash back to stock works but I would rather have everything original. This code is with Resurrection ROM. Will be glad if you can explain any of it!

(bootloader) version: 0.5
(bootloader) version-bootloader: moto-msm8953-C0.8A(*)
(bootloader) product: potter
(bootloader) board: potter
(bootloader) secure: yes
(bootloader) hwrev: P3B
(bootloader) radio: 1
(bootloader) storage-type: emmc
(bootloader) emmc: 32GB SAMSUNG QX13MB RV=08 PV=07 FV=0000000000000007
(bootloader) ram: 2GB SAMSUNG LP3 DIE=8Gb M5=01 M6=05 M7=00 M8=1F
(bootloader) cpu: MSM8953
(bootloader) serialno: ZY224538B8
(bootloader) cid: 0x0032
(bootloader) channelid: 0x8a
(bootloader) uid: 7C6B3F8100000000000000000000
(bootloader) securestate: flashing_unlocked
(bootloader) iswarrantyvoid: yes
(bootloader) max-download-size: 536870912
(bootloader) reason: Volume down key pressed
(bootloader) imei:
(bootloader) meid:
(bootloader) date: 05-18-2017
(bootloader) sku: XT1687
(bootloader) battid:
(bootloader) iccid:
(bootloader) cust_md5:
(bootloader) max-sparse-size: 268435456
(bootloader) current-time: "Thu Jan 1 3:41:43 UTC 1970"
(bootloader) ro.build.fingerprint[0]: motorola/potter/potter:7.0/NPN25.1
(bootloader) ro.build.fingerprint[1]: 37-35/37:user/release-keys
(bootloader) poweroffalarm: 0
(bootloader) ro.build.version.full[0]: Blur_Version.25.11.37.potter.reta
(bootloader) ro.build.version.full[1]: il.en.US
(bootloader) ro.build.version.qcom: LA.UM.5.6.r1-01900-89xx.0
(bootloader) version-baseband: M8953_02.03.07.08R POTTER_NA_CUST
(bootloader) kernel.version[0]: Linux version 3.18.31-perf-g6508460 (hud
(bootloader) kernel.version[1]: soncm@ilclbld73) (gcc version 4.9 201501
(bootloader) kernel.version[2]: 23 (prerelease) (GCC) ) #1 SMP PREEMPT T
(bootloader) kernel.version[3]: ue Feb 14 06:47:06 CST 2017
(bootloader) sbl1.git: git=MBM-NG-VC0.8A-0-gc33529e
(bootloader) rpm.git: git=MBM-NG-VC0.C0-1-g202d600
(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.8A-0-gc90d6a9-dirty
(bootloader) qe: qe 1/1
(bootloader) frp-state: no protection (0)
(bootloader) ro.carrier:
all: listed above
finished. total time: 0.026s
[Moto G5 Plus Questions & Answers] acejavelin:
No, you don't understand... Your "firmware" in this case means bootloader/partition table/radios, it has nothing to do with any custom ROM you would flash, but the last stock firmware you had installed, which in your case was NPN25.137-35 (Blur_Version.25.11.37.potter.retail.en.US) and a radio of M8953_02.03.07.08R POTTER_NA_CUST, so you need that version or higher.

Which seems odd, because that is newer than my version which is completely stock and untouched.... NPNS25.137-33-5/M8953_02.03.07.06R... So I am assuming you were on a special Verizon test build? You will need one of those except the same version or newer than when you were last stock.
[Moto G5 Plus Questions & Answers] NODE06:
I use Consumer Cellular, and the only thing I did that started screwing everything up was install Lineage 15 which is based on Android Oreo. Could that have change it to the newer version?
[Moto G5 Plus Questions & Answers] acejavelin:
I don't know about Consumer Cellular but I think they are an AT&T MVNO so it probably isn't relevant.

Any custom ROM you flashed is not relevant either... to go back to stock you must flash a same or newer firmware than what you have, and you are confusing what that means. Lineage, or any custom ROM, does not modify your firmware, only your system and boot partitions, your firmware is in the bootloader/radios and is related to your gpt.bin (the partition table). You need a factory image that is the same or newer than what you have, which I don't think is available since Moto isn't very forthcoming with factory images (and your version is very new, newer than mine), but this has nothing to do with flashing a custom ROM.

I haven't tried this on this device, but on older Moto devices you would downgrade by flashing the firmware but skipping gpt.bin and bootloader.img (you also cannot relock the booloader) and continuing with the other parts of the firmware image. Yes, the booloader and partition table no longer match the radios and rest of the ROM, but that usually fixes itself during the next major OTA update.
[Moto G5 Plus Questions & Answers] NODE06:
I understand what you are saying, but I am telling you I flashed the same stock firmware a month ago with no issues.

The only thing that changed everything was installing the Lineage ROM. Could the Linage ROM have messed up my partition tables? I was having issues when I tried to install it relating to data encryption. But I have no idea how I could have flashed a newer version of anything. This is why I am so confused.
[Moto G5 Plus Questions & Answers] acejavelin:
Eh, not mess up, but it could change the filesystem type for a partition or two, sometimes system or data. You could use TWRP and try a repair on them.

Can't you just restore a TWRP backup first, then flash stock?

Sorry, but I may be a considered a wizard by some with some Moto devices, but I am really new to this one and it seems to have a few different quirks. Hopefully someone else can jump in here.

Are you using an official image? They usually contain a file called flashfile.xml, that will tell you what commands you need to enter to flash and what version it is, the above instructions are to relock a stock device, not return to stock.
[Moto G5 Plus Questions & Answers] aaronrw:
He's flashing a stock.zip I believe.
[Moto G5 Plus Questions & Answers] acejavelin:
Not with fastboot...

[MENTION=8562603]NODE06[/MENTION] What exactly are you flashing and how?
[Moto G5 Plus Questions & Answers] NODE06:
I am flashing

POTTER_NPNS25.137-35-5_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml

on Linux using ADB, yes, fastboot. I have done it often enough on this phone and used to do it on my G4.

I am wondering, looking at the flashfile.xml, if I should flash them in the same order they are listed in that file. But again, it does not make sense since the only think I did was install Lineage 15 when I was running Resurrection. I will try again to repair with TWRP, maybe I am missing something.

I am back on Resurrection and things are running fine, but I am concerned now that Lineage 15 might be doing some really weird stuff.
[Moto G5 Plus Questions & Answers] NODE06:
I notice the flashfile.xml has

<sparsing enabled="true" max-sparse-size="536870912"/>
<step operation="getvar" var="max-sparse-size"/>

in it.

Do they matter at all?

When I run the fastboot command I get a different number

sudo fastboot getvar max-sparse-size
max-sparse-size: 268435456
finished. total time: 0.008s
[Moto G5 Plus Questions & Answers] NODE06:
So, I fixed it. And yeah, you need to fastboot stock in the same order as the flashfile.xml and include the getvar max-sparse-size. Here is what worked for me. I got no errors besides the "bad key" for boot and recovery images.

sudo fastboot getvar max-sparse-size
sudo fastboot oem fb_mode_set
sudo fastboot flash partition gpt.bin
sudo fastboot flash bootloader bootloader.img
sudo fastboot flash modem NON-HLOS.bin
sudo fastboot flash fsg fsg.mbn
sudo fastboot erase modemst1
sudo fastboot erase modemst2
sudo fastboot flash dsp adspso.bin
sudo fastboot flash logo logo.bin
sudo fastboot flash boot boot.img
sudo fastboot flash recovery recovery.img
sudo fastboot flash system system.img_sparsechunk.0
sudo fastboot flash system system.img_sparsechunk.1
sudo fastboot flash system system.img_sparsechunk.2
sudo fastboot flash system system.img_sparsechunk.3
sudo fastboot flash system system.img_sparsechunk.4
sudo fastboot flash oem oem.img
sudo fastboot erase cache
sudo fastboot erase userdata
sudo fastboot erase DDR
sudo fastboot oem fb_mode_clear
sudo fastboot reboot
[General Questions and Answers] MetalordicA:
Is there a real Kodi alternative out there that streams all kinds of torrent media like videos, audio, games & photo galleries, but is highly customizable, interactive & easier 2 use than Kodi, Spmc etc & is lighter on space 2 4 Android & Windows apps @ least?
[General Questions and Answers] MetalordicA:
Does any1 know the answer, going, going, not sold yet?
[General Questions and Answers] happyfeet_xoxo:
terrariumtv & mobdro come to my mind
[General Questions and Answers] MetalordicA:
So basically KODI & SPMC R the best way 2 get torrent media right now?
[General Questions and Answers] GuestK0087:
6. Do not post or request warez.

If a piece of software requires you to pay to use it, then pay for it. We do not accept warez nor do we permit members to request, post, promote or describe ways in which warez, cracks, serial codes or other means of avoiding payment, can be obtained or used. This is a site of developers, i.e. the sort of people who create such software. When you cheat a software developer, you cheat us as a community.

9. Don't get us into trouble.

Don't post copyrighted materials or do other things which will obviously lead to legal trouble. If you wouldn't do it on your own homepage, you probably shouldn't do it here either. This does not mean that we agree with everything that the software piracy lobby try to impose on us. It simply means that you cannot break any laws here, since we'll end up dealing with the legal hassle caused by you. Please use common sense: respect the forum, its users and those that write great code.

Thread closed.
[Galaxy Note 3 Q&A, Help & Troubleshooting] fanion:
hi guys what mean number 5

Envoyé de mon SM-G935F en utilisant Tapatalk
[Galaxy Note5 Q&A, Help & Troubleshooting] jleed88:
I followed the steps in this guide attempting to flash a rom. https://xdaforums.com/tmobile-galaxy-note5/development/rom-stock-debloated-deodexed-t3423387

I was able to flash the BL and modem no problem. I proceeded to flash twrp and have been stuck at boot since. I can only go back into DL mode. Read a few places that said to reinstall rom. How do i go about installing a rom via odin? Any help is greatly appreciated.
[Galaxy Note5 Q&A, Help & Troubleshooting] fast69mopar:
Okay. Here's what you do...

First, boot to DOWNLOAD MODE. Once in Download Mode, press the keys again like you are booting to Download Mode (VOLUME DOWN + HOME + POWER)

Watch the screen while holding the keys. When the screen goes blank, switch to the key combination for booting RECOVERY (VOLUME UP + HOME + POWER) and hold them until the TWRP screen appears. If the TWRP screen does not appear then we know TWRP didn't stick when you flashed it via Odin.

If the TWRP screen appears, release the keys and let it continue to boot to TWRP.

If TWRP does not boot, then I'd suggest flashing the stock firmware for your device. You can download the stock firmware for your device from www.sammobile.com or from www.updato.com

Sammobile.com is a very slow download unless you pay for a premium account. Updato is much faster. Make sure to select the correct region for your device before downloading the firmware.

Which version of Odin are you using? I've been using 3.12.3 and haven't had any problems at all with this version.

Once you habe downloaded the stock firmware, open Odin. Boot your device to Download Mode and then connect your USB cable. Make sure Odin shows you are connected.

Next, click the OPTIONS TAB in Odin and un-check

AUTO REBOOT. Then, select the AP TAB in Odin and navigate to the firmware file you have downloaded. Let Odin do its thing to verify the file and click START to begin the flash. Once the flash is complete, disconnect the USB Cable and press the key combination for booting to Download Mode again. Once the screen goes black, switch to the key combination for booting RECOVERY. Once in recovery you can select the reboot option to boot your device normally and start fresh from there and attempt to flash TWRP again.

Also, which Note 5 do you have?
[Galaxy Note5 Q&A, Help & Troubleshooting] jleed88:
Hey, thanks for your response. So I was able to get my System back to working. I had to downoad the stock firmware through sammobile. I ended up paying for the fast download (30days of service) Well ill keep updato in mind if this every happens again. Im on	N920TUVU4EQE1 For the n920T since i had already flashed the modem and bootloader before i flashed twrp. I'm on Odin 3.12.3 as well.

"This device uses dm-verity!

This means that swiping to allow system modifications will prevent you from being able to boot if you are using the stock kernel. In order to bypass dm-verity's boot prevention, you will have to install a kernel that has dm-verity disabled in the fstab."

Apparently the kernel i was using wasnt allowing twrp to install. So now i have to figure out how to root my new stock firmware and install recover so i can flash a rom.
[Galaxy Note5 Q&A, Help & Troubleshooting] fast69mopar:
What you have to do is this...

Flash TWRP, swipe to allow system modifications and then flash the no_verity_opt_encrypt_5.1.zip available from

https://build.nethunter.com/android-tools/no-verity-opt-encrypt/

This zip will disable dm-verity and forced encryption in the fstab and allow you to boot normally.

Once this had been done you can flash the root zip of your choice and go to town with debloating, custom ROM's and custom kernels.
[Galaxy Note5 Q&A, Help & Troubleshooting] jleed88:
When i flashed TWRP i unchecked the Auto-Reboot option. did a key combo to get to twrp but it didnt ask me to swipe to allow system modification. So i went ahead and flashed no_verity_opt_encrypt_5.1.zip with success. Proceeded to flash SuperSU-v2.66 and it got stuck at -Creating paths. I rebooted to recovery and found this guide https://xdaforums.com/galaxy-s6/general/root-s6-nougat-supersu-t3570740

Coming from sickmade 6.0.1 and through all the struggles i am now at stock ROOTED firmware EQG3 andriod 7.0! I just had to take my time and search around a bit. You guys are all amazing. Hopefully if someone has this problem they will find this thread.