J

Tools and guides for doing software development, data analytics, online privacy, and other things.

View My GitHub Profile

How to install Moto X Pure factory image

Introduction

This guide is for the Moto X Pure/Style (XT1575), codenamed clark.

A factory Android 6.0 (Marshmallow) image as well as official installation instructions are on Motorola’s website. A factory Android 7.0 (Nougat) image is hosted here.

Credits

Thanks to @acejavelin for posting on XDA. Thanks to @Motorola-Firmware-Team for acquiring and hosting an Android 7.0 image.

Set up environment

Download platform-tools for your operating system here. Extract the package somewhere.

unzip platform-tools_r29.0.4-linux.zip
cd platform-tools_r29.0.4-linux

Download the image

Download one of the image files and unzip it.

unzip CLARK_RETUS_7.0_NPH25.200-22_cid9_subsidy-DEFAULT_CFC.xml.zip
cd CLARK_RETUS_7.0_NPH25.200-22_cid9_subsidy-DEFAULT_CFC.xml

Install the image

Connect the device, reboot it into recovery mode, and use fastboot to install the image components:

fastboot oem lock begin # or `fastboot oem fb_mode_set` if you don't want to re-lock bootloader
fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.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 system system.img_sparsechunk.9
fastboot flash modem NON-HLOS.bin
fastboot erase modemst1 
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot flash bluetooth BTFM.bin
fastboot erase cache
fastboot erase userdata
fastboot erase customize
fastboot erase clogo
fastboot oem lock # or `fastboot oem fb_mode_clear` if you don't want to re-lock bootloader
fastboot reboot

The device should boot up with a fresh factory image.