yashsingh1/xdaforums huggingface dataset:
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] ShaDisNX255:
Stock OneUI Release for J6

So, a couple of days ago OneUI was released for the SM-J600F. I simply took the ROM and made it flashable via ZIP

This is JUST STOCK ONEUI """OFFICIAL""" for the J6, DO NOT EXPECT EXTRA FEATURES!

Also, I debloated it lol

BUT

I want to make something clear. If you have not read this and this allow me to summarize

Pie brings new locks to the table, something far worse than rmm lock. If you flash Pie officially, either via OTA or via Odin, these new locks will prevent you from rooting, as I understand it.

The workaround is to flash Pie but with Oreo BL.

BUT

We don't know how long that will keep working

Samsung can easily make Pie only boot with Pie BL.

So... for now... DO NOT UPLOAD YOUR BOOTLOADER TO PIE YET OR YOU WILL NOT BE ABLE TO ROOT OR FLASH CUSTOM BINARY ANYMORE!

And this is where this zip comes in handy!

This ZIP will not change your BL (it will keep your Oreo BL) and included is a kernel (Helios Pie kernel) that fixes small issues. Also, if anything were to go wrong, you still have TWRP to backup and restore, how awesome is that? ;)

So, you have been warned!

Downloads:

Android File Host:

https://www.androidfilehost.com/?fid=1395089523397933484

Mega: https://mega.nz/#!5BEXVSgJ!I6ta7PQQFHFqF9b1i3QeE5pANf1lVmF_c87uS6p8vEI

OneDrive: https://1drv.ms/u/s!AjUnizekeauKhAHeYnt-lwr5YZDW

(I'll try to upload to GDrive and AFH soon, I promise)

Instructions:

-Create a backup (just in case)

-Wipe system and data

-Flash zip

-Reboot and wait 10 minutes

If after 10 minutes, it is still in logo, force a reboot (Hold VOL +, VOL - and POWER) and then the ROM will work

"Features":

-Official Pie!

-In theory, should not have major bugs

-Pre-rooted with Magisk

-Debloated

If you appreciate having Pie early (and rooted!) please consider a donation to ananjaser1211, who was kind enough to compile Helios Pie kernel without even having the device!!!

http://paypal.me/ananjaser1211

[MENTION=4637718]ananjaser1211[/MENTION] for compiling Pie kernel for the J6... without even having the device! Amazing job!

[MENTION=5787964]SuperR.[/MENTION] For his Super R's Kitchen which you can find here: https://xdaforums.com/apps/superr-kitchen/windows-linux-superr-s-kitchen-v3-0-0-0-t3601702

[MENTION=4470081]topjohnwu[/MENTION] for Magisk

@ Samsung for the firmware

@ Team TWRP for their amazing recovery

@ To users like you!

XDA:DevDB Information

[STOCK][OneUI][9.0]Stock OneUI for J600 G/F, ROM for the Samsung Galaxy J

Contributors

ShaDisNX255, ananjaser1211

Source Code: [url]https://github.com/ananjaser1211/Helios_7870[/URL]

ROM OS Version: 9.x Pie

ROM Kernel: Linux 4.x

Version Information

Status: Stable

Created 2019-04-03

Last Updated 2019-04-03
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] ShaDisNX255:
FAQ

[Q] My phone is stuck in bootloop/infinite boot, what should I do?

[A] It is normal for first instalation to take aprox 10-20 minutes on first boot, let it sit for a little bit

[Q] Even after 20 minutes, my phone is still in a bootloop/infinite boot, what can I do?

[A] It is possible that your previoius Android setup is conflicting with this new setup. Please, do the following:

1. FORMAT DATA (not WIPE, FORMAT!)

2. Try the instalation of the ROM again

[Q] I've found a bug, what should I do

[A] Please read the "Bugs" section of the thread to see if your bug has been reported, if it hasn't, please let me know exactly what the problem is so I can take a look

[Q] My phone isn't rooted

[A] This ROM has Magisk pre-packaged. If you do not see Magisk Manager, just download the latest version of it in xda

[Q] Something bothers me and I want it fixed/changed

[A] Please, kindly make a request and if it's within my grasp, I'll try to fix it. Just, don't be rude and demand something. Either that or return to stock, your choice :P
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] ShaDisNX255:
Enjoy Pie :)
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] danicadanicadanica:
Yes its working
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] danicadanicadanica:
You should tell that vendor will be also replaced.
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] MKashifSajjad:
Downloading

Downloading...
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] Aleko91:
nice work
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] MKashifSajjad:
Nice work Sha! Working great. Battery is draining faster as compared to Ncx A8. Keep it up.
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] Aleko91:
battery drains faster then stock oreo rom ? do you find any other bug ? camera works good ? can you check please if camera is flickering while taking photo to computer monitor or tv ?
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] ShaDisNX255:
Battery takes about 2 cycles to stabilize. My first testers and me did notice higher than normal drain but then reduced the drain a lot.
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] ShaDisNX255:
It's normal for any camera to flicker when taking photos of older tvs as far as I know
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] war7777:
j6 plus :(:crying:

???
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] ShaDisNX255:
This is not the J6+ forum lol
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] naviidgull:
Will it work for On6

J600G please reply
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] ShaDisNX255:
Yeah, maybe lol. Backup before you try anything
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] mmcluke:
Digital TV is working?
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] naviidgull:
Links are not working anymore bro please bro new link
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] Aleko91:
on stock oreo rom it's not flickering , but it flickers even on odex stock rom
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] danicadanicadanica:
Hey its normal to see a flickering screens like on CRT TV
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] Aleko91:
understand , but i'm saying that it is not flickering on stock rom ( flickers very little , almost unseenable ) but tried 2 roms last week and it was flickering like waves

..................................

It's not about this rom but i have one question ... is there way to adopt storage(to install apps traight to sd card) with oreo or pie roms ? i tried root essentials but didnt work on oreo
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] danicadanicadanica:
Early builds always have unexpected issues it might be set below 50 - 60hz flicker. Try use any cam app to confirm.
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] ShaDisNX255:
Added AFH link to download

I'm out of GDrive storage tho ?
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] xIdol:
Hi. May i flash this via stock recovery? My phone is not rooted and doesn't have twrp recovery. Need your response Thanks in advance.
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] ShaDisNX255:
No, stock recovery will not let you
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] naviidgull:
Big thanks bro ShaDisNx255

It's really awesome and I feel no fast battery drain it's normal for me as 0reo

Well thank u and all other so much for the contribution

Working Awesomely on my Galaxy 0n6 J600GF
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] Aleko91:
"We don't know how long that will keep working

Samsung can easily make Pie only boot with Pie BL."

what you mean with this ? is it possible to stop working , after some time , if i flash and setup rom ?
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] ShaDisNX255:
No, what I mean is that when Pie officially comes out, you may be locked if you update the official way. So for now, I think it is best not to update via the official way (OTA or Odin) because you may never be able to install TWRP again. For this zip, however it is totally safe.
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] Aleko91:
ok , thank you ...
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] Dexter126:
this rom works for J600-FN?? thanks!
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] ShaDisNX255:
It probably should, you can backup just in case
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] GerardooTorres:
Hi!, have a question, I'm on 8.0 no root J600G, do you recommend to install a custom recovery and then this rom?, or wait until the OTA update to arrive? Thanks in advance :laugh:
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] ShaDisNX255:
Me personally, I make use of root. If you are OK with not having root, I would just wait for the official OTA
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] GerardooTorres:
Thanks, I was waiting to the official OTA and after that making root. But after seeing that Pie blocks rooting, now I'm going to think what to do. :p
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] Aleko91:
works well on J600F , root works also after installing magisk manager apk . no bug yet
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] Aleko91:
i can't download big games while using vpn , never had problem like this , it's stuck on downloading and nothing happens ... without vpn everything is alright . tried different vpn apps ...

tried also official version of pie and same problem , so i back to rooted one
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] MKashifSajjad:
Battery drains the same, increase refresh rate to avoid flicker. Camera is good. Kid mode is not working.
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] Aleko91:
camera works good without increasing refresh rate . i asked because i had problem with other rom .

what you mean "kid mode is not working "?
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] MKashifSajjad:
If you see in status tile there is a tile with kid mode. When I want to use it it tried to download some resources and for me, it isn't working nor Downloading anything.
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] shinFinex:
whish frimware did you based on to port this rom

i have the j600g i tried the oficial methode cuz i dont care about root i tried to flash this https://www.sammobile.com/firmwares/galaxy-j6/SM-J600G/XXV/download/J600GDXU3BSD1/266228/ with odin its one ui update vietnam when i flashed all good i start to see a problem with battery give me wrong status i tried to use the phone until the battery drain ( i mean until its goes to 0 ) because the persentage of it dont change its still 70% all time and when i reboot it turns 50% another reboot it turns 80% .. so i use it until its turn off

i tried to charge it when its turned off until its hit 100% i boot the phone and its show me 20% .. so i have nothing to do just to go back to oreo .. and thats it

beside that i try to comunicate with them on samsung members i still wait for reply
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] ShaDisNX255:
It is based on official J600F.

A lot of users were reporting the battery problem you mention even when they updated via OTA, so it's a common problem I suppose.
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] shinFinex:
Wierd ..

Also i try another frimware the ones from April 9 everything works well , expect the same bug but in defferent way it's stable but when try to charge it go well until it hit 100% and it go straight down to 20% tried to full charge 2 time still the same hit the 100% and go straight down to 20% ... Hope they release new fixed one soon

Ty anyway :good::o
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] Whiz91:
This rom is fantastic, very stable with no bugs. Battery is good for my usage, no notible difference from stock. Everything works and the debloat is a very welcome addition.

I highly recommend this for anyone on the fence about getting it. It will just make your phone better.

Excellent work, good sir.
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] fpg06ii8:
Thank you very much for the ROM. Pie is great but still no official support from Xposed.

By the way I debloated this one from more than 150 packages.
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] Aleko91:
it works very well on J600F , using almost 2-3 weeks and can't find any bug ...

if you make lite version of this rom , will be great ...
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] ShaDisNX255:
I appreciate your support, but I doubt I will work on anything else for Pie. I'm not even using it anymore lol I'm back on Oreo. But I do think some people are currently working on stuff for Pie, we usually hear about it first on the Telegram group before we share here.
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] Hqckdone:
The response in invalid.

Hello ShaDisNX255, (or whoever is going to see this ^^)

i got a problem from Magisk.

Everythink works fine and smoothly now BUT... there is a big problem from Magisk (you patched into the rom)

If i try the "Tap to start SafetyNet check" it gives me this message "The response in invalid."

[IMG="Magisk"]https://i.imgur.com/lFQcRbz.jpg[/IMG]

I cant PokemonGO because of this problem.

Thank you in advantage :3
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] tsky7:
Deleted
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] Aleko91:
good rom , but only problem i found is wifi signal . it can't catch wifi signals on long distance where other phones can ( j320f , j330f .... tried many phones ) i don't know this bug is because of rom , or maybe j600f has weak wifi ?
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] blueangel4ever:
What about those people who got the official update.. Isn't there any way to obtain root??
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] ShaDisNX255:
Well, I don't know much about the new KG State block on Pie, so I don't know if you have to wait 7 days before you can root like in Oreo.

I would suggest just flashing back to Oreo and rooting that way, but I can't say for sure as I have never updated to Pie officially.
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] Haider111:
After I installed Pie 9.0 on my galaxy J6, everything works fine except my keyboard dictionary. It does NOT add words in my custom dictionary.

While writing, I tap the words which aren't already in the dictionary (custom words) it momentarily adds the same word, but as soon as I rewrite it, the word isn't added. This problem wasn't there in the old version. Help required.
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] mssee:
Related to this part:

"So... for now... DO NOT UPLOAD YOUR BOOTLOADER TO PIE YET OR YOU WILL NOT BE ABLE TO ROOT OR FLASH CUSTOM BINARY ANYMORE!"

I updated to pie using phone software update.. can I flash this ROM now? Is there any new method to bypass the protection you mentioned?

Or can I just flash the stock 8 oreo rom and then flash your rom? Is that get the oreo BL back again?

Thank you for your effort.
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] mssee:
Hi..have you rooted after all?
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] ShaDisNX255:
You can read about it on the article that's being referenced in the OP. You can update your bootloader to Pie only if you TWRP, the ROM and the v3 bypass while on Oreo BL then update to Pie BL. But, as the thread states, we don't know how long until Samsung makes the deleted files mandatory and blocks any phone not having those files that the v3 bypass removes.
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] mrsamkhar:
Hello ppl, i installed this rom everything works perfect only screen never goes off if i dont press power key.
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] mrsamkhar:
can i use this method https://xdaforums.com/galaxy-note-8/development/secure-folder-patch-custom-rom-t3949878 to make secure folder working again?
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] ShaDisNX255:
Well it should but you would need to add back the knox stuff I removed.
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] mrsamkhar:
thanks for ur reply.

how can i add it back or where tk finde?
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] ShaDisNX255:
It's been so long I don't remember everything I removed.

Why not just try H-ROM which already has secure folder fixed?
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] mrsamkhar:
i wanna use stock rom, coz H-ROM have a more bugs.thanks anyway
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] Sarwar Hossain Himel:
sir i am pie user. samsunh j600g ,mu rom binary u4. i can not found twrp or proper root method. can you give me link sir?
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] mattpg:
NFC doesn't work

i can't find nfc in settings

PLZ help me
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] ShaDisNX255:
This ROM was built with a base without NFC. Please change to stock ROM

Regards
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] Aleko91:
android 10 is officially available on j600f , when will you make it for rooted devices ?
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] ShaDisNX255:
Well considering that I've long stopped doing anything dev related, I would say never :D
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] FDUARTs:
Twrp J600GT Android 9 binary 7 ??? plz, help...
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] ShaDisNX255:
You are asking in the wrong thread. This post is not about TWRP.
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] Kleio:
Safety net and volte rip
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] riyanpacitan5:
like rom stable. not stable signal quality bug on karnel.
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] Sahil 9:
link ded?
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] Ace_02:
Hello!. I'm not sure if this is wrong or if its wrong to ask here but is there a flashable zip for the oreo version for j600g? Thanks
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] pico3:
Can you do the same to the Android 8.0 for the J6.
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] ShaDisNX255:
No, I don't have the device anymore
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] pico3:
ah ok
[Samsung Galaxy J6 ROMs, Kernels, Recoveries, & Oth] pico3:
i have a j6 so i might do it.
[8525, TyTN, MDA Vario II, JasJam ROM Development] Vermillion:
Hi!

I tried to cook Hermes WM6 ROM - when cooking was completed i got RUU_signed.nbh file - then I flashed it, upgrade went well till 100% and it was completed - but after restart it freezes on HTC boot screen! I'm unable to flash another ROM. RUUWrapper.exe shows error ''error [270] Update error image file is corrupted''. I flashed only OS ROM.

Maybe some one can help me out, because I can't find nothing on this forum about errror 270!

Thanks
[8525, TyTN, MDA Vario II, JasJam ROM Development] ai6908:
Your ROM might be oversized. If I remember right, the cooked os.nb file cannot be more than 64MB.

Try putting your phone in boot loader and see if you can get back to your original OS. If that doesnt work, use the SD card method.

If you dont understand what I am talking about, then use search, follow the link in my signature.

Good luck!
[8525, TyTN, MDA Vario II, JasJam ROM Development] Vermillion:
In bootloader if a try to ugrade os - I get Corruped file 270 error - I have tried many ROMs error is the same. Phone tries to do upgrade but on 1% restarts.

I tried sd upgrade also but it checks sd card, shows loading and then 00068002 and returns to bootloader.
[8525, TyTN, MDA Vario II, JasJam ROM Development] Vermillion:
Got another sd card and everything is working now!

Tread closed!!!

Thanks
[Verizon Samsung Galaxy S 4] jackson223:
Specs

SKU: SCH-I545VKZ

ODIN MODE

Product: SCH-I545

Binary: Samsung Official

System Status: Custom

Reactivation Lock: On

CSB-Config-LSB": 0x30

Secure Download: Enable

Write Proection: Enable

eMMC Burst Rate: Enabled

My phone is stuck at the "Software Update Failed" screen. I can reboot into the "Downloading... Do not turn off target!!" screen (power + vol down + home), and my PC recognizes that a USB device has been plugged in, but ODIN and KIES do not seem to recognize the phone. I cannot get into recovery mode using power + vol up + home.

I would be grateful for suggested next steps.

Many thanks.
[Verizon Samsung Galaxy S 4] jackson223:
SOLVED

Got is solved. The trick was to use the brand-new, never-used Samsung USB cord that came with the phone between the PC and the phone. Not sure if it's something special about the cord or whether it was just providing a tight fit on the contacts, but it made the difference.
[Verizon Samsung Galaxy S 4] StoneyJSG:
Hmm it is interesting that cable was the culprit.
[Verizon Samsung Galaxy S 4] jackson223:
I've always sort of laughed at all those admonitions that it was important to use the USB cable that came with a device, but in this case, they made the difference.
[OnePlus 6T  Questions & Answers] da4kgr3y:
Hello ive on oficial lastest OOS stable build.

Today realised that some apps do not starts automatically after phone reboots.

the same translationally loaded programs are unloaded from memory
[OnePlus 6T  Questions & Answers] indian84:
Welcome to Oxygen OS.

You can disable Deep Optimization under battery settings. That may help a bit..
[OnePlus 6T  Questions & Answers] da4kgr3y:
No changes....
[OnePlus 6T  Questions & Answers] indian84:
Like I said, welcome to Oxygen OS. :)
[Moto G5 Questions & Answers] diogofd8:
Hello. The phone is with my mom now and I haven't been here to know how rom development is going. She complains that camera doesn't work so I want to either return to stock or flash a pie build that has 100% camera functionality or a fix. Can you guys enlighten me?
[Moto G5 Questions & Answers] TheFixItMan:
Flash stock firmware via fastboot

https://mirrors.lolinet.com/firmware/moto/cedric/official/

fastboot oem fb_mode_set
fastboot flash partition gpt.bin (don't flash this as may hard brick if incorrect)
fastboot flash bootloader bootloader.img (don't flash this as may hard brick if incorrect)
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash dsp adspso.bin
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 system system.img_sparsechunk.5
fastboot flash system system.img_sparsechunk.6
fastboot flash system system.img_sparsechunk.7
fastboot flash system system.img_sparsechunk.8
fastboot flash modem NON-HLOS.bin
fastboot erase modemst1 (don't erase this unless you have network issues)
fastboot erase modemst2 (don't erase this unless you have network issues)
fastboot flash fsg fsg.mbn
fastboot erase cache
fastboot erase userdata
fastboot oem fb_mode_clear
fastboot reboot

Flash the above with your phone in fastboot mode - I've edited which bits you shouldn't need to do
[Moto G5 Questions & Answers] diogofd8:
So it doesn't matter if phone is on 64 bits or 32 bits?
[Moto G5 Questions & Answers] TheFixItMan:
Why would it?

You are flashing stock firmware which will replace what ever is on your phone

Stock firmware for this device is only 32bit - it doesn't matter what rom you are currently using
[Moto G5 Questions & Answers] diogofd8:
Thanks a lot man, mom is happy!
[Moto G5 Questions & Answers] Oremusnix:
I applied your method to my moto g5 and I confirm it works as advertised !

I only had to reflash TWRP and the boot logo and that was it. Thanks !
[Moto G5 Questions & Answers] achintyakv:
Why you need to reflash twrp and boot logo?

Sorry if it is a lame question. I am also thinking on reverting back to stock.
[Moto G5 Questions & Answers] Oremusnix:
There is no lame question !

The guide provided by OP erases the TWRP recovery and replaces it with what was on stock (my guess because I did not check, actually). So I had to reflash TWRP to install Magisk, but this is not mandatory.

The logo was back to the "this device is not secure" warning wich is ugly. The unlocked state was not lost (which was fine by me). So I flashed one boot logo to replace that warning.
[Moto G5 Questions & Answers] achintyakv:
Okay now I understand. Thank you! ?