[Moto X4 ROMs, Kernels, Recoveries, & Other Develop] MotoX4:
First, let's give credit where credit is due. [MENTION=4608158]ZeNiXxX[/MENTION] and [MENTION=7578917]SKULSHADY[/MENTION] are the developers of this ROM. Additional credit goes to [MENTION=1915408]phhusson[/MENTION] and [MENTION=9034316]Dil3mm4[/MENTION] as well as:

LineageOS Team (https://www.lineageos.org)

AICP (https://www.aicp-rom.com)

MSM-Xtended Team (https://xdaforums.com/one...0-pre-t3693585)

Crdroid (https://crdroid.net)

Omnirom (https://omnirom.org)

And all the other Developers, Testers, Donators and Users.

The source code which can be reviewed and continued too can be located here https://github.com/Havoc-OS and https://github.com/Havoc-Devices You can request features https://goo.gl/forms/b8rY79XtUZnd5ji42 Announcement are made here https://t.me/Havoc_OS and additional support can be requested here https://t.me/havocofficial. Finally, the official Havoc-OS page can be located here https://sourceforge.net/projects/havoc-os/files The original official thread is actually located here and was originally posted by [MENTION=7730768]EnesSastim[/MENTION] and an updated thread can be found here originally posted by [MENTION=7210959]mountaser halak[/MENTION] I, myself, [MENTION=9167870]MotoX4[/MENTION] did full testing in verifying the support of MotoX4 having tested on several XT1900-1 (both Andriod One, Amazon Moto Retail, and * Project FI).

However, the purpose of this thread is only to bring awareness that MotoX4 users (such as yourself) do have another ROM to choose from and to include full instructions on how to install this on your MotoX4 device. ;)

/*
* Your warranty is now void.
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
*/

Not working:

Tethering

- You tell me

FEATURES:

[SIZE="4"][B][U][SIZE="5"]General:[/SIZE][/U][/B]
System-wide Rounded UI
Full OMS support
System-wide burn-in protection
Spectrum support
Compiled using SDCLANG
Razer Phone lock/unlock sounds
OTA support
Signature spoofing
Micro-G support

[SIZE="5"][B][U]Included Apps:[/U][/B][/SIZE]
AdAway
Google Calculator
Google Markup
Lean Launcher

[SIZE="5"][B][U]Settings:[/U][/B][/SIZE]

[B][U]Battery:[/U][/B]
Battery performance profiles
Sensor block per-package
Wakelock blocker
Alarm blocker
Optimal charge level alert

[B][U]Display:[/U][/B]
Live display (Day/Night/Outside)
Colour profiles (sRGB, DCI-P3)
Font manager
Ambient display
Always on display
Expanded desktop

[B][U][SIZE="5"]Havoc Settings:[/SIZE][/U][/B]

[B][U]Status Bar:[/U][/B]
Quick pulldown
Smart pulldown
Tap to sleep
Brightness control
Battery icon styles
Bluetooth battery status
Battery bar
Battery saver color
Clock & date options
Statusbar logo
No sim network hide
Disable no sim icon
Volte icon
Network icon customization
Net activity
Custom carrier label
System icons

[B][U]Panels:[/U][/B]
Power menu tweaks
Volume dialog tweaks

[B][U]Quick Settings:[/U][/B]
Brightness slider customization
QS panel footer customization
QS layout editor
Custom header images

[B][U]Notifications:[/U][/B]
Disable fc notifications
Force expanded notifications
Disable immersive mode messages
Kill app button in notification
Screen-on notifications
Toast icon
Toast animation
Toast icon color
Toast text color
Heads up toggle
Heads up timeout
Heads up blacklist
Heads up stoplist
Snooze timer
Statusbar ticker
Ticker animation
In-Call vibration options
Less annoying in-call notifications

[B][U]Recents:[/U][/B]
Stock recents customization
Clear all button customization
Memory bar
Recent styles
Hide apps from recents
Icon pack
Immersive recents
Recents layout (Stock/Grid/Android Go)
OmniSwitch
Slim recents

[B][U]Interface:[/U][/B]
Berry styles (Light/Dark/Black/Auto)
Blur personalization
Dashboard suggestions
Dashboard conditions
Screen stabilization

[B][U]Lockscreen:[/U][/B]
Charging info
Hide statusbar
Lockscreen elements visibility
Notification count
Lockscreen colors
Clock and date options
Lockscreen alpha
Double tap to sleep
Wake and unlock
Ambient display music ticker
Ambient display bottom view (Weather/Battery/None)
Music cover art
Music visualizer
Disable power menu
Disable qs panel
Fingerprint vibration
FP unlock on boot
Face auto unlock
Custom bottom shortcuts

[B][U]Navigation:[/U][/B]
Navigation mode(Stock/Smartbar/Fling)
Dynamic navbar color
Pulse

[B][U]Buttons:[/U][/B]
Swap back and recents
Awesome alert slider (Notification/Flashlight/Brightness/Rotation/Ringer)
Accidental touch
Power menu customization
Long press power button torch
Disable buttons
Button backlight customization
Hardware keys customization
Swap volume buttons with rotation
Volume keys for media volume
Playback control

[B][U]Gestures:[/U][/B]
Three finger screenshot
Pie control
App circle bar
Gesture anywhere
Screen-on gestures
Touchscreen gestures

[B][U]Animations:[/U][/B]
System Animations
Android P animations
Disable animations
QS tile animations
Listview animations
Custom Bootanimation
Screen off animation

[B][U]System:[/U][/B]
SELinux mode Toggle
Smart Pixels
Suspend actions
System app remover
Allow untrusted overlays toggle (for Substratum Support)
CPU info overlay

[B][U]IME Settings:[/U][/B]
Selector notification
Auto keyboard rotation
Disable fullscreen keyboard

[B][U]Weather:[/U][/B]
Weather service settings
Statusbar weather
Lockscreen weather

[B][U]Miscellaneous:[/U][/B]
Screenshot editor
Wake on plug
Pocket detection
Camera shutter sound
Disable safe headset volume
Launch music App on headset Connection
Scrolling cache
Events[/SIZE]

How to install Havoc-OS on Moto X4

!! Please read before proceeding !!

Download the latest Official TWRP https://dl.twrp.me/payton/. - You want the .img file.

Restart your phone to your bootloader. - You do this by pressing and holding both your phone's power button and the lower volume key at the same time.

Once at your phone's bootloader, from your Windows Command Prompt (as administrator) or from your Linux Terminal (as root) run the following command to load TWRP:

fastboot boot '/your_path_here/twrp-X.X.X-X-payton.img'

Note: Be sure to use your path on where you have the file on your computer. Be sure to replace and use the correct file name for your file (Do not just copy and paste the example posted here).

!! You will be wiping everything because regardless if you are coming from stock or a different ROM as this ROM works best with a full wipe !!

Note: If upgrading this ROM a full wipe is not necessary. See upgrade instructions below.​

Regardless of what ROM you are coming from (stock or not), format your DATA.

Reboot your device to bootloader and reuse the previous fastboot command to load TWRP listed above.

Regardless of what ROM you are coming from (stock or not), select "advanced wipe" to wipe your device (select all partitions).

Reboot your device to bootloader and reuse the previous fastboot command to load TWRP listed above.

If coming from stock:

Download "Copy Partitions Zip" - courtesy of [MENTION=3069475]filipepferraz[/MENTION] https://drive.google.com/file/d/1oiry9UfP2tf-5A6nQBF7pn2t2eSGKt0F/view

Upload "Copy Partitions Zip" to your phone using the "ADB Push" command to /sdcard/ (run as admin if on windows or as root if on Linux).

adb push copy-partitions-payton.zip /sdcard/

Now INSTALL "Copy Partitions Zip"

Reboot to your bootloader. - Stay at the bootloader screen (do not load TWRP)

Download the firmware for your phone

XT1900-1 Android 8.0

firmware_27.251.12_payton_retail_xt1900-1.zip

Only tested on

XT1900-1

XT1900-2

XT1900-5 (https://xdaforums.com/showpost.php?p=76934354&postcount=173)

XT1900-7 (https://xdaforums.com/showpost.php?p=76779696&postcount=14)

feel free to test on other Moto X4 models running 8.0.

XT1900-6 Android 8.0 - courtesy [MENTION=3069475]filipepferraz[/MENTION]

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

XT1900-1 Android 8.1 - courtesy [MENTION=4487886]ptn107[/MENTION]

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

tested on XT1900-7 as well (https://xdaforums.com/showpost.php?p=76816113&postcount=92)

Latest firmware for payton_fi android 9 from PPW29.69-26 - courtesy [MENTION=4487886]ptn107[/MENTION]

firmware-29.69-26_payton-fi_xt1900-1.zip

Unzip on your computer.

User flash_all.bat if on windows as administrator OR ./flash_all.sh if on Linux as root.

Reboot your phone to bootloader

Continue:

Reboot your device to bootloader and reuse the previous fastboot command to load TWRP listed above.

Download and locate the latest Amr64 A/B ROM located here: https://sourceforge.net/projects/havoc-os/files/arm64-ab/ - NOTE: You want the ROM that comes without Gapps. You can install Gapps after (see instructions below).

Extract the zip (XZ file) onto your computer. -- I suggest the free and open source program 7zip https://www.7-zip.org/

You will upload these files to your phone using the "ADB PUSH" command to your /sdcard/ directory (as admin in windows or root in Linux). For example:

adb push Havoc-OS-v2.0-20181016-GSI-ARM64-AB-Official.img /sdcard/

In TWRP select Install *

Select Install image

Locate your .IMG file and flash it to "SYSTEM"

* TWRP troubleshooting:

A small group of individuals has reported that TWRP will not correctly install IMG files directly. If you're one of those few people a manual install may work for you.

First wipe your phone again

Reboot back to bootloader. - Stay at bootloader

As an administrator on windows or as root on Linux run this command

fastboot -u flash system Havoc-OS-v2.0-20181016-GSI-ARM64-AB-Official.img

Note: Be sure to use your path on where you have the file on your computer. Be sure to replace and use the correct file name for your file (Do not just copy and paste the example posted here).

Credit to [MENTION=3352385]*.jpg[/MENTION] for this solution. :)

NOTE: Do NOT yet install Gapps. See instructions below.​

After a successful install, REBOOT your phone.

Congratulations, you're done! :cool:​

If adding Gapps: -- Read me

Your phone will work perfectly fine without Gapps. But if you do want to install Apps and use Google products and services; I recommend the minimal Gapps install known as Pico. You can learn about the many different Gapps flavors by visiting the Open Gapps Wiki found here https://github.com/opengapps/opengapps/wiki/Package-Comparison

Let your phone boot the ROM for the 1st time. - !! IMPORTANT !! You want to fully boot your phone and let the ROM load for the 1st time before installing Gapps.

After your phone as successfully booted up and loaded the ROM, reboot back into recovery

Download the latest Gapps - https://opengapps.org

Upload the zip to your phone

Install Gapps

Wipe cache/dalvik

Additionally, if you're one of those paranoid people who want to keep your distance away from Google (to each their own, but I love me some Google ) you do have the following alternatives.

https://apkpure.com/

https://en.uptodown.com/android

https://f-droid.org

Just remember that these are unofficial sources and you take the risk that can potentially come with them.

UPGRADING - How to upgrade this ROM.

Also known as a dirty upgrade, you do not need to wipe everything and start over. However, if this dirty upgrade fails a fresh install is recommended.

Download the latest ROM

Reboot into recovery

Install your new .img file

Wipe cache/dalvik

Reboot

If all has gone well you're done! If not, a full wipe and install are recommended.

* Project Fi

If you do not have Google Project Fi as your cellular provider, you can ignore this.

The Google Project Fi app will inform you that you cannot activate using this GSI/Rom. Assuming, you have already previously activated your phone before trying out new GSI/ROM's, you can technically, safely ignore this warning as you will still be able to send and receive calls, text, data, etc... and continue to use the Project Fi app to manage your account. However, if this is your first time activating or you simply wish to be sure you get the latest carrier and tower updates (recommended), this fix is for you.

First let's give credit where credit is due. [MENTION=7119915]Sass86oh[/MENTION] for originally coming up with this fix here and a personal thanks to [MENTION=2689772]johnjingle[/MENTION] for pointing this out to me here.

Google Project Fi Fix

You will need to make a minor and yet important edit to your system before installing the Project Fi app. If you have already installed the Project Fi app before making this edit, you should close the app, clear both the app's cache and clear the app's storage, then proceed to uninstall the Project Fi app.

Using your preferred root text editor navigate to /system/

Locate the file build.prop

Carefully make the following changing, listed below, to the file build.prop

!! Important !! Double check you have correctly made the correct changes.

Save your changes

REBOOT your phone

Go to: Setting > System > About

Verify that your device model is a Moto x4

Install Project Fi

Open Project FI and proceed with the activation

Congratulations, you're done! :cool:

!! IMPORTANT !! These values are CASE SENSITIVE which means if you type "Payton" rather than "payton" it will NOT work !! Be sure you double-check what you type before saving !!

Locate and edit to match. -- Do NOT rush (Do NOT be in a hurry). This is something you want to carefully take your time with.

ro.product.model=Moto x4
ro.product.brand=Motorola
ro.product.name=payton
ro.product.device=payton
ro.product.manufacturer=Motorola
ro.build.product=payton
ro.opa.eligible_device=true

Headphone jack fix found here. credit: [MENTION=8834019]abrfilho[/MENTION]

:)