[X 2014 Android Development] mikeoswego:
Updated 2016.12.07 - Post updated with current files, see end of post for links to helpful posts.

Updated 2016.04.14 - Post updated with current files.

Updated 2016.01.23 - This post has been rewritten for people who have unlocked their Verizon XT1096 through the Motorola unlock page. It is presumed that you have fastboot installed and working and that you have at least a 5.x version of Android on your phone. (Android version in Settings -> About phone) If not and you're still on 4.4.4, the information hidden at the bottom of this post will help you upgrade.

This ROM is based on the Stock ROM and has SuperSU v2.65, Xposed v80, Xposed Installer, BusyBox v1.24.1-Stericson, sqlite3, zip, aapt, and DNS support for Busybox apps pre-installed. System is mounted R/W via su.d script, addon.d scripts are supported, the Verizon part of the boot animation is removed, tethering is enabled. The following obsolete files are deleted from the stock image:

Avatar

AvatarPermissionsApp

Bug2GoStub

com.customermobile.preload.vzw

CQATest

DemoMode

fswriter

GuideMe

LMIRescue

LMIRescueSecurity

LocalWipePolicyManager

MediaShortcuts

MotoCare

MotoCareInt

VerizonSSOEngine

VMobileSecurity

VzwAVS

vznavigator

In addition to TWRP mentioned next, you'll need a few files on hand to complete the process:

XT1096-23.32-25-5-5-Firmware.zip - TWRP zip to update firmware.

xt1096-5.1-23.32-25-5-5-Mod.zip- The factory based modified ROM

A GApps package, this is possibly the most confusing part for new ROM flashers and will be discussed below.

xt1096-5.1-debloat.zip - Optional, removes some Verizon bloat, see list below

xt1096-5.1-debloat-keepconnect.zip - Same as above but retains Moto Connect and some files need for the Moto Gallery app.

If you want root, flash SuperSU from this thread: SuperSU Release (As of the time of this posting the direct link to the download is here: SuperSU-v2.78-201609011115.zip

If you want Xposed, flash xposed from this thread: Xposed thread you want the version for SDK22 for ARM. (As of the time of this posting, the direct link to the download is here: xposed-v87-sdk22-arm.zip

Here is the list of apps deleted by the debloat zip, the keepconnect version does not remove Motorola Connect:

ECID_VZW_Victara (Verizon Caller ID $)

GoogleHindiIME

GooglePinyinIME

iWnnIME

KoreanIME

com.gotv.nflgamecenter.us.lite

VZMessages

BodyGuardApp (Alerts)

Verizon Cloud

Verizon CloudSetup

Entitlement

MotorolaConnect

MyVerizon

VVM3 (Visual Voice Mail $)

GApps are Google Applications, the stock ROM originally had many of the GApps but they are outdated. Note: Due to changes in the Open GApps package, the minimum level that will work correctly with this ROM is the Micro package, the nano and pico packages probably won't work. Like other custom ROM's, if you want to use any Google services and/or the Play Store, you must install a GApps package. One source is here: Open GApps with an XDA discussion group here: XDA Open GApps When selecting your GApps package, choose ARM for the platform and 5.1 for the version of Android. Then any of the variants will work to give you access to the Google services. The XT1096 has plenty of room and resources for the larger packages. The "Full" variant is probably most like what the phone came with as stock. Be advised that the "Stock" and "Super" variants, by default, will replace the excellent Motorola camera app with the Google camera app. You can avoid this by creating a gapps-config.txt file kept in the same place as the installer zip. In addition, all but the "Nano" and "Pico" variants will put Google Photos in place of the stock Gallery app with it's Highlight Reel tool. Creating a gapps-config.txt file is described on the pages linked above. To avoid losing the Moto Camera and Gallery apps, you might have a gapps-config.txt file like this:

+Gallery
CameraGoogle

Collect all the needed zip files and place them all in your download folder on the phone or on a USB-OTG drive.

Install TWRP. The TWRP app from the Play Store doesn't always work reliably, install TWRP using fastboot. The latest official version is 2.8.7.1 and you can download it from here: https://dl.twrp.me/victara/. (Note: Some people have reported problems with official versions of TWRP getting stuck at the splash screen. See post 1013 for alternate versions of TWRP that may work for you.) Put the .img file in the same place that you run fastboot from, put the phone in bootloader/fastboot mode and run the following command (replacing the file name at the end with the file you want to flash):

fastboot flash recovery twrp-2.8.7.1-victara.img

The process only takes a couple seconds, ignore any errors about size mismatch. Use the volume down key to highlight recovery, then press the volume up key to select. The phone should reboot into TWRP. Make a backup, preferably to a USB-OTG drive before you do anything else. If something goes wrong with the next steps, you'll be able to restore the backup and be back to where you started.

In TWRP select WIPE, then Advanced Wipe. Select, Data, System, Cache and then slide the slider to begin the process. This will wipe the phone except for your pictures and other things on the "SDCARD" or internal storage. (The phone will enter setup when booting the first time after flashing the ROM. You might be able to get away with not doing the wipe, most people will have problems if the wipe isn't done due to the Google apps being updated from the stock installed versions.)

Return to the Home menu in TWRP, select install, then add zip. Select xt1096-23.32-25-5-2_gpt.zip. Tap add zip again and select xt1096-23.32-25-5-2_Firmware.zip. Tap add zip again and select xt1096-5.1-23.32-25-5-2_1.zip. These 3 must be first. Tap add zip again and select the GApps zip file that you selected. If you are debloating, tap add zip again and select that zip file. If you want the CM AudioFX, tap add zip again and select that zip (you can actually do this step in the future by itself if you want.) At this point you have at least 4 zips and possibly 6 selected; slide the slider to begin the flashing process. This will take a while, don't interrupt it. If the screen turns off, use the power button to turn it back on. When done, use the Reboot System button to restart the phone. The phone will reboot, it will show the logo and then the boot animation. It will take 4-5 minutes during which time the boot animation will appear to be stuck, don't panic, this is normal and will only happen the first time after a clean install. The phone should start an optimizing apps process and when that completes, you will see the first set up screen.

Enjoy your rooted stock ROM!

See post 2 for zips to add Viper4Android, restore Exchange2, or remove Xposed and links to other useful things.

See post 886 for flashable zips to change the boot logo and boot animation to a Marshmallow style.

See post 1009 for more info about the current files listed here.

See post 1057 for more info about the April 2016 security update.

See post 1108 for more info about the August/November security update and instructions to flash your phone to stock.

The info below is about mofo and previous versions of this rom. Most people won't need to look at it!

Updated 2015.09.16 - Jump to post 781 for the TWRP Stagefright patch update!

Updated 2015.09.12 - Jump to post 783 for the MOFO Stagefright patch update!

Below is the original information for using Mofo to flash 5.0 images, upgrade to 5.1 and other Mofo info. If you have used Sunshine to unlock your bootloader, you can still flash any of the old images using fastboot. Now, this thread will have images for flashing with both mofo and TWRP..

I've created a base XT1096 v5.1 stock based image that is setup like a custom ROM. This image has tether enabled in build.prop, Busybox and SQLite3 are installed. The ROM has been rooted with SuperSU. Support for DNS in Busybox is included. Certain apps that are potentially spyware or are outdated have been removed. Even more stock apps can be removed via TWRP with the xt1096-5.1-debloat.zip file available in post 2. As time permits I'll create some more TWRP zip files to add Viper4Android, the stagefright patches when released, etc.

Important: This ROM, like other custom ROMs, does not included GApps (like PlayStore, etc.) Most everyone will want to download a GApps package and include it in the list of zips to install in TWRP. There are several GApps packages out there, TK GApps are very flexible and can be configured to install just the bare minimum or the full set of Google Apps: TK GApps 5.1 If using Xposed, you will need to reinstall the Xposed Installer app from here:	XposedInstaller_3.0_alpha4.apk; you will then need to open the Xposed Installer and enable your installed modules before they will function.

The TWRP flashable image is available here: xt1096-5.1-stock-20150820.zip

If you do a clean flash (wipe data), it takes 4-5 minutes for the phone to start the first time.

See some useful links and additional TWRP zips in the next post!

Here is a nice guide for upgrading from the Mofo to the unlocked bootloader with Sunshine, installing TWRP and using the TWRP compatible zips by [MENTION=5100261]betarepeating[/MENTION]:

Starting with 5.1 Mofo Rooted image provided in this thread:

First install/run sunshine. This process was painless and easy and I'm not going to waste my time typing instructions here.

Nuke the "Warning Message" boot logo

Instructions | Download

Just opened that folder and typed:

fastboot flash logo logo.bin

Installing TWRP

Instructions | Download

then do

adb reboot bootloader

fastboot flash recovery twrp.img

fastboot reboot

Now when you boot to recovery you will see TWRP!

Installing Apps

===============

Boot into recovery (TWRP)

Made backups of /system and /boot (didnt backup /data because I don't have an OTG cable or room on my internal storage - but you should!)

Copied backups to my PC

Copied the following to the TWRP folder on my phone (could put them anywhere doesnt matter):

xt1096-5.1-stock-20150820.zip

xt1096-5.1-debloat.zip

xt1096-5.1-CM-Stuff.zip

tk_gapps-modular-mini-5.1.1-20150816-signed.zip

xposed-v71-sdk22-arm-by-romracer-20150816.zip

Links to download are in the second post of this thread

Went into Wipe > Advanced Wipe and checked system and dvalik-cache and wiped them.

Installed all the zips from above in the listed order (all that matters is the xt1096-5.1-stock-20150820.zip goes first)

Rebooted

Phone sat and optimized for a long time

While waiting I downloaded:

XposedInstaller

AdAway

CF.Lumen

Dropped the APKs onto my phone once it was booted and ran them from file explorer.

Done.

=================================================

Here is the original info and links for Mofo 5.0 images:

The mofo image file with Xposed v65 baked in is listed below. It is based on the image posted by btdownloads7. It includes root, tether, BusyBox and SQLite3 while adding Xposed v65.

You need to flash an image with root from here: http://xdaforums.com/showpost.php?p=60537982&postcount=1 to be able to follow the instructions below.

You also need to install the alpha Xposed apk from here: http://xdaforums.com/attachment.php?attachmentid=3383776&d=1435601440 Download the apk to your phone, find it with your phone file manager and click on it to install. Do not try to install the framework from within the Xposed installer.

While in your root file manager, navigate to /data/dalvik-cache and delete both the "arm" and "profiles" folders. (This is needed one time due to a glitch in the alpha Xposed for Lollipop.) You must do this!

Connect your phone to your pc and issue the "adb reboot-bootloader" command to get into fastboot mode (or use the proper key combination on the phone to enter fastboot mode.)

Flash the image file with mofo as normal.

After mofo completes its work, enter "fastboot erase cache" from your pc to flush the system cache.

Once done, reboot the phone. The boot animation will end and seem to freeze for a minute or two, then it will start the upgrading/optimizing apps process. Once your phone is booted up, open the Xposed installer from the app drawer, install a module (like Gravity Box for LP) and enjoy!

Note: If you get system memory full errors after the reboot, you didn't delete the folders in /data/dalvik-cache as noted above; with luck you will be able to delete them in between error messages and reboot. Otherwise, you'll need to flash an image without Xposed and start over.

XT1096_5.0-tether-root-bb-sqlite3-XposedV65.img.7z - XT1096 image for use with mofo. Includes HDR fix, tether, root, busybox, sqlite3 and Xposed v65

http://xdaforums.com/attachment.php?attachmentid=3383776&d=1435601440 - Link to Xposed Installer Alpha 4 needed for Xposed v65

XT1096_5.0-tether-root-bb-sqlite3-XposedV65-DeBloat.img.7z - Image with bloat removed, see this post for details: Post 169

XT1096_5.0-tether-root-bb-sqlite3-XposedV65-DeBloat-AdAway.img.7z - Image for AdAway users with symlink for hosts file, see this posrt for details: Post 188

Here is the info for 5.1 Mofo Images, updating, patching, etc.:

Thanks to [MENTION=5983610]JulesJam[/MENTION] and [MENTION=1576439]Slack3r[/MENTION] we have Android 5.1 for the XT1096 with mofo! Below are links to the 5.1 mofo image and patch files.

These images have tether enabled, root, Sqlite3, BusyBox, Xposed, CF.lumen and support for AirAudio, AdAway, iOS Emoji fonts and Viper4Android with the latest TK Gapps installed. Here are the main files:

5.1bins.7z - Kernel, modem and other 5.1 update files

xt1096-5.1-v3.1g-pkg.7z - Base image

You should save the base 5.1 image file. When there are updates in the future, patch files will be used to work with this base image.

[MENTION=5983610]JulesJam[/MENTION] has written an excellent guide for new users (and those who might need a refresher) here: Mofo Noob Guide

These images are for Android 5.1. If you are still running 5.0, here are instructions for upgrading to 5.1:

The following presumes that you already are running a rooted mofo version of Android 5.0. You shouldn't loose your data by making this upgrade, however, it is always wise to backup anything on your device that isn't also stored somewhere else. As usual, I can't be responsible if your phone malfunctions in some way. I have installed these files following the instructions below without any difficulty.

First, download the 5.1 base file and the 5.1 base image with patches.

Do not remove your SIM card, leave it installed.

Using your root file explorer (like ES Explorer with root enabled), delete everything in /data/dalvik-cache - YOU MUST DO THIS! Then reboot into bootloader mode.

Extract the files from the 5.1bins.7z archive and then run these commands:

fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot flash recovery recovery.img

Then, immediately use mofo to flash the 5.1 image. Reboot your phone and enjoy Android 5.1!

The base image can be patched to enable/disable features. The patch files are listed below and instructions on how to apply them are here:

First, you need to have the Xdelta3 program:

xdelta3 for Windows x86

xdelta3 for Windows 64-bit

xdelta3 for Linux

For Linux, extract the files from the archive, enter the folder with the extracted files and run the following command to install xdelta3 to your system:

./configure && make && make install

For windows extract the xdelta3-3.0.9-x86.exe file from the zip and rename it to xdelta3.exe.

Put the patch file(s), the xdelta3 program and the base image mofo file into the folder where your mofo program file is.

Open a command window in this folder.

Enter the "dir" command (Without quotes. You should see your files listed including xdelta3, mofo, etc.)

For both Windows and Linux users enter the following cmd while in your mofo directory:

xdelta3 -d -s base_image_file patch_file

In other words, to patch the base image to add Xposed, your command would look like this:

xdelta3 -d -s xt1096-5.1-mofo-base-v2.img base-to-base_xp.patch

The patched image will be created and you can then flash that like normal.

Make sure the newly created image is the exact same size as the original image. If a patch for another image is applied to the wrong image, there will be an error message displayed. Even if there is an error, a patch file may be created but it will usually not be the same size as the original.

The patch files for the base image are included in the image archive

In the archive are patches to do the following:

3.1{x}--3.1{x}-de - Removes some apps from v3.1f image

3.1{x}--3.1{x}-cf-de - Removes some apps from v3.1f image, keeps CF.lumen

3.1{x]--3.1{x}-v4a - Adds Viper4Android to the image

3.1{x]--3.1{x}-v4a -cf-cmt-de - Adds Viper4Android to the image with some apps removed

The apps removed in the Debloat patch(es) are listed here:

3c_main	(Moto Apps Manager)
3c_checkin	(Moto Apps Connector)
3c_notification	(Moto Apps Notifications)
3c_ota	(Moto Apps Data Manager)
BodyGuardApp	(Moto Alerts)
Books	(Google Books)
CF.lumen
Chrome	(Google Chrome)
Cloud	(Verizon cloud storage)
Drive	(Google Drive)
Ears	(Google Sound Search)
ECID_VZW_Victara	(Verizon CallerID pay service)
EditorsDocs	(Google Docs)
EditorsSheets	(Google Sheets)
EditorsSlides	(Google Slides)
FaceLock	(Face Unlock)
Google Earth	(Google Earth)
Google HindiIME	(Hindi keyboard)
Google PinyinIME	(Pinyin keyboard)
Google PlayGames	(Playgames (not playstore))
Hangouts	(Google Hangouts)
Inbox	(Google Inbox)
iWnnIME	(iWnn keyboard)
Keep	(Google Keep)
KoreanIME	(Korean keyboard)
Maps	(Google Maps)
Messenger	(Not Messaging)
MotorolaConnect	(Connect to watches or your PC)
Music2	(Google Play Music)
MyVerizon	(My Verizon Mobile)
News & Weather	(News & Weather widget)
Newsstand	(Google Magazines)
Nflgamecenter	(NFL App)
PlusOne	(Google+)
Quickoffice	(Google Quickoffice)
Talkback	(Google Talkback)
Translate	(Google Translate)
Trebuchet (CM Launcher)
Videos	(Google Play Movies & TV)
VVM3	(Verizon Visual Voicemail)
VZMessages	(Verizon Messages)
VzwEntitlementService	(Not needed with tether in build.prop)
Wallet	(Google Wallet)
YouTube	(Google YouTube)

Tips:

The image includes AdAway support. If you want to use AdAway, go into the AdAway settings and set the location of the hosts file to /data/data/hosts

To change the bootup animation, place your desired bootanimation.zip file (not the installer zip) into /data/local/moodle and set the permissions to rwx rwx rwx (chmod 777) and owner:group u0_a40:u0_a40

To use iOS Emojis, follow these instructions:

If iOS Emojis are desired,
Copy /system/fonts/NotoColorEmoji.ttf.iOS to
/data/data/NotoColorEmoji.ttf

To restore the stock font,
Copy /system/fonts/NotoColorEmoji.ttf.stock to
/data/data/NotoColorEmoji.ttf

Or, just delete the file and the system will copy the
stock one into place at the next boot.

Changelog:

xt1096-5.1-v3.1f - 2015.08.06

- Major improvement to updated /system app cleanup
of apps in /data. Now takes 2 seconds instead of 90
Cleanup happens seamlessly, no reboot required

- Add CF.lumen v3.00, will add to debloat list if any requests

- Add CM's AudioFX, remove moto Audio Effects

- Add CM's Trebuchet Launcher, not in debloated image
On first boot of image with Trebuchet, you will be prompted to retain
the Google Now Launcher, select Always to keep the current launcher.
Launcher can be changed in Settings->Home

- Add patch to include Viper4Android v2.3.4.0 in image
Patch disables Selinux enforcing to allow V4A to work
Patch removes AudioFX

- Update Xposed Framework to v69
Minor changes don't require clearing dalvik-cache

- Updated Chrome to v44.0.2403.133
- Updated Docs to v1.4.292.15.35
- Updated Drive to v2.3.283.23.35
- Updated Moto App to v3.0.45
- Updated VZ Message+ to v5.6.5

- Patches now included with image & version update patch archive:
3.1e--3.1f.patch - Version update patch
3.1f--3.1f-v4a.patch - Patch to add Viper4Android
3.1f--3.1f-de.patch - Patch to debloat image
Requests for additional patch variations will be considered

xt1096-5.1-v3.1e - 2015.08.01

- Fixed incorrect permissions on Inbox causing fc

- Update Xposed Framework to v68
- Update Google Play Services to v7.8.95
- Update Chrome to v44.0.2403.128
- Update Connect to v2.06.16-pc-249
- Update My Verizon Mobile to v10.0.751
- Update Google Play Music to v6.0.195S.2109908
- Update Google+ to v6.0.0.99065591
- Update Maps to v9.12.1
- Update NFL Mobile to v12.0.28
- Update Photos to v1.2.1.99143001
- Update Translate to v4.0.0.RC08.99220384

- Updated debloat list

xt1096-5.1-v3.1d - 2015.07.29

- Fix problem with Connect force closing.

- Add Google Camera in addition to stock Moto Camera

xt1096-5.1-v3.1c - 2015.07.28

- Made change in updated play store app cleanup to account for
unexpected data in /data/system/packages.xml possibly causing
system failure to set correct processor parameters. Possible
infinite loop corrected.

- Added Google Inbox, rolled in updated versions of Google Photos,
Verizon Cloud, Message+, MyVerizon.

- Add Google Inbox to debloat list.

xt1096-5.1-v3.1b - 2015.07.25

- Fixed problem where apps updated by play store could be incorrectly
reverted to /system version which was actually older.

- Rolled into /system latest versions of: Google Keep, Maps, YouTube, Wallet.

- Restore stock Email app that was accidentally removed.

xt1096-5.1-v3.1a - 2015.07.21

- Fixed some directory permissions.

- Restored stock mms app to image.

- Rolled updated versions of apps into system:
NFL Game Center
Google Docs
Google Slides
Verizon Message+

- Added functionality for system to automatically remove
obsolete copies of apps in /data/app when new image has
newer or equal version of those apps (same as custom Roms.)

Release 5 - 2015.07.20

- Base file name: xt1096-5.1-v3.1.img

- Exchange is enabled in Gmail, old stock email was removed.

- Add PA-Gapps Stock package 20150717 - updates all Google
apps to versions available as of the date noted. Thanks
to TKruzze & osm0sis @ xda for their work.

- Updated Motorola and Verizon apps are integrated into image.

- Removed deprecated Spotlight player

- Installed AdAway and Xposed Installer into /system

- Corrected permissions on auto created /data/data/hosts file

- Install Air Audio in base image. (Future MMU will give option
to disable/enable this as well as other apps.)

- Updated Xposed to v67 (nothing major changed from v65)

- Made iOS Emoji support permanent by creating a symlink.

The Emojis will not be available until the second time
booting with this image.

If iOS Emojis are desired,
Copy /system/fonts/NotoColorEmoji.ttf.iOS to
/data/data/NotoColorEmoji.ttf

To restore the stock font,
Copy /system/fonts/NotoColorEmoji.ttf.stock to
/data/data/NotoColorEmoji.ttf

Or, just delete the file and the system will copy the
stock one into place at the next boot.

Release 4 - 2015.07.15

- Base file name: xt1096-5.1-v3.0.img

- Fix security context and ownership on BusyBox symlinks

- Add symlink for /system/etc/resolv.conf to /data/data/resolv.conf
Does not require user action, allows BusyBox DNS resolution by
creation of /data/data/resolv.conf file. Make one like the
following if you want to use Google's nameservers for DNS resolution
in adb shell programs like nslookup, traceroute, etc. Remember.
the adb shell nslookup, etc. only work after you su to root.

nameserver 8.8.8.8
nameserver 8.8.4.4
nameserver 4.4.4.4

- Add Better Battery Stats XDA version as a system app

- Add /system/etc/mofobuild.prop with name of image installed

- Alpha version of Mofo Utility

Release 3 - 2015.07.10

- Base file name: xt1096_5.1_mofo-base-v2.img

- Fix broken BusyBox installation

Release 2 - 2015.07.09

- Base file name: xt1096_5.1_mofo-base.img
- Correct security context on /system/etc/install-recovery.sh to value
in original ROM instead of value as (not) set by SuperSU installer
causing script to not run at boot.

- Make AdAway support the default. Added functionality to create
/data/data/hosts file on boot, if it doesn't exist, for users who
don't wish to use AdAway ensuring there will be no problems in
resolving localhost for apps/processes that might use that.

- Shorten and simplify names of base and patch files.

- Upgrade SuperSU from v2.46 to v2.49

Initial Release - 2015.07.05

- Base file name: XT1096_5.1-tether-root-bb-sqlite3.img

XDA:DevDB Information

Mofo XT1096 5.x Images, ROM for the Moto X 2014

Contributors

mikeoswego

ROM OS Version: 5.1.x Lollipop

Based On: Stock

Version Information

Status: No Longer Updated

Created 2015-05-04

Last Updated 2017-06-28