[Moto E4 (Qualcomm) ROMs, Kernels, Recoveries, & Ot] LenovoTech:
Motorola Moto E (4th Gen) xt1766 SPerry

Sprint, Boost Mobile, Virgin Mobile, TextNow

Stock Android 7.1.1 Nougat

Build No. NCQS26.69-64-11

TWRP Flashable Installer

WARNING • • • • • • •

Altering, modifying or otherwise tampering with your device's stock filesystem configuration will render your warranty null & void, and carries with it an inherent risk of causing damage to your device. By proceeding further, you acknowledge and understand any such risks, and take sole accountability for the integrity of your device. You are encouraged to fully read this guide prior to performing any steps. I assume no liability in the event you damage your device or render it unable to function normally. However, with that having been said, should you encounter any adverse issues installing any of the files herein, stay calm and describe your issue in comments, using clear and concise dictum. I will assist to the best of my ability to help you troubleshoot your problem. Follow the below instructions carefully, paying close attention to detail, and things should go smoothly.

• • • • • • • • • • •

IMPORTANT NOTE: I am new to XDA and I'm here to learn and grow as an Android enthusiast. When posting, please be respectful to me and other members. Under no circumstances should members ask for ETAs, updates, etc. Also, I respectfully ask that this thread stay on topic with stock ROM related subject matter only.

--SPECS:

• Model: Qualcomm xt1766 SPerry Only

• Providers: Sprint, Boost Mobile, Virgin Mobile

• Android Version: 7.1.1 Nougat

• Build No. NCQS26.69-64-11

• Kernel: Linux 3.18.31-perf

• Radio: M8920_15000.280.06.58.06R

• Security Patch Level: November 1, 2018

• Build Date: November 18, 2018

--CHANGELOG:

This is an incremental update from the NCQS26.69-64-10 build number, bringing the build up to NCQS26.69-64-11. With this update comes typical bug fixes, stability improvements, and Google security patches up to November 1, 2018. More noteworthy is the update to the radio firmware (baseband), from version M8920_15000.280.06.58.05R up to version M8920_15000.280.06.58.06R. This update patches some integrity issues with LTE data connectivity in some North American regions, improves seamless cellular data handover in domestic roaming scenarios, and fixes instabilities with 4G/LTE Band 41 (TDD-LTE), improving upon carrier aggregation. It should be noted that my stock ROM installer does not update your radio firmware, but only the Android OS, the /OEM partition, and the stock boot image. If you have not updated your device to NCQS26.69-64-11 by OTA or firmware package, you are strongly encouraged to update your radio firmware now, by downloading my baseband updater from the link below, and installing it via TWRP.

•Kernel Source Code: https://github.com/MotorolaMobilityLLC/kernel-msm/releases/tag/MMI-NCQ26.69-48

--FEATURES:

• Systemless Root: Magisk v18.0-stable

• Init.d & su.d support

• BusyBox: v1.29.3 static binaries

• SafetyNet Pass: ctsProfile & basicIntegrity

• AVB/dm-verity disabled

• Force encryption disabled (opt encrypt)

• Zipaligned /system/app & /framework

• Debloated (see links below for debloated build)

--REQUIREMENTS:

An unlocked bootloader and TWRP custom recovery are required for installation of this ROM. I strongly recommend [MENTION=6485916]squid2[/MENTION]'s TWRP v3.2.1-r1, to ensure the best results on installation. After installation of this ROM, you may then update your TWRP version/build. Also, for best results, you'll need an external microSD with at least 1.5 GB free storage space.

--INSTALLATION GUIDE:

1. Recommended -- download the baseband updater from the link below and install it via TWRP;

2. Download the ROM zip and save it to your device's external storage;

3. Boot into TWRP recovery mode. Perform a wipe on /system, /cache, & Dalik. Now select Wipe again and format /userdata (this is crucial to disabling force encryption);

4. Select Install, navigate to the saved location of the ROM zip on external storage, and commence with installation;

5. Done. Reboot System

** Following initial installation, prior to completing setup, it is completely normal to experience a couple of bootloops. Just be patient.

--F2FS LOOPBACK KERNEL BUG:

Like a great many Motorola smartphones, the Moto E4 (xt1766) ships with an inherent kernel issue known as the f2fs loopback bug. In a nutshell, the xt1766's /userdata partition is formatted using the f2fs filesystem standard. The bug prevents loopback devices (.img files) from being mounted read/write (R/W). Because Magisk implements a magisk.img loopback configuration for systemless root and systemless modifications, the inability to mount read/write is extremely problematic. Luckily, a workaround exists as a Magisk module, known as the F2FS Loopback Bug Workaround. The module works by moving magisk.img to the /cache partition, which uses the ext4 filesystem type, then symlinking it to its actual location in the /userdata partition (/data/adb/magisk.img). Moreover, shortly following each and every reboot, magisk_merge.img is automatically regenerated and is handled in the same manner as magisk.img. With this workaround, a patched or modified kernel is not needed.

After the initial setup following first boot, open the Magisk Manager app and follow all prompts and grant any necessary permissions. Then go to the Downloads section within the Magisk Manager app and find the F2FS Loopback Bug Workaround module. Download it, boot into TWRP recovery mode and install the module. On reboot, the Modules section in the Magisk Manager app should indicate that the F2FS module is installed. To avoid any future issues, it is strongly advised to install any and all Magisk modules from TWRP recovery mode, versus installing them via Magisk Manager.

DEBLOATED BUILD:

I have added a debloated build to the links below. This ROM has all attributes of the standard build except that I have removed all annoying Amazon and carrier-specific bloatware from /oem/app and /oem/priv-app. In addition, I have removed many non-essential Google apps from /system/app and /system/priv-app, leaving a moderately slimmed down and bloat-free stock ROM. This ROM should be installed using the above instructions as well.

THANKS/MENTIONS:

Thanks to [MENTION=5228676]VR25[/MENTION] for his Magisk module for the f2fs loopback bug.

Thanks to [MENTION=6485916]squid2[/MENTION] for his TWRP builds for this and many other Moto devices. Thanks to [MENTION=4470081]topjohnwu[/MENTION] for his Magisk Universal Systemless Interface and, last but not least, thanks to [MENTION=5752019]madbat99[/MENTION] for his warm welcome to me, and his encouragement, and to [MENTION=5488402]Davey126[/MENTION].

--BUGS:

No known bugs

Download Links:

_______________________________________________

Baseband (radio firmware) Updater

Version: M8920_15000.280.06.58.06R: https://drive.google.com/file/d/1YckU38KUWL9YiHP4eafVteK0zArcXonu/view?usp=drivesdk

Stock ROM (Rooted, BusyBox)

Build No. NCQS26.69-64-11: https://drive.google.com/file/d/19bEz9nHZn9NP42RAl4VQGfR8WSO_Bc9y/view?usp=drivesdk

Stock ROM (Debloated, Rooted, BusyBox)

Build No. NCQS26.69-64-11: https://drive.google.com/file/d/1EMkriY3thTejiyRndiSjM-hoQdGuh-3X/view?usp=drivesdk

Stock Recovery: https://drive.google.com/file/d/1GLj-2lMkuwJFlLMYs-S754oDv0YfgdUQ/view?usp=drivesdk

Unmodified Stock Boot Image

(secure boot, avb/dm-verity, force encrypt): https://drive.google.com/file/d/1Rau38EC2FTiuu-4MFhbzatagDlWe7hvI/view?usp=drivesdk