Tinkering with Android can be a lot of fun but if you ever get tired of it then let me show you how to revert the Nexus 5X back to stock.
Here on Android Explained I talk a lot about various tweaks and modifications like installing custom ROMs, custom kernels, Xposed Framework, etc. These can be a lot of fun to play with with sometimes the consequences can be bad. For example, if you install Xposed Framework on the Nexus 5X like I showed you in the tutorial then you’ll be fine.
However, there are hundreds, if not thousands of various Xposed Modules that simply will not work on the latest version because they haven’t been updated for Android 6.0 Marshmallow.
Sometimes this just means that the Xposed Module will not function but sometimes this means that your Nexus 5X could go into a bootloop. You can try uninstalling Xposed Framework if you downloaded the uninstaller(like I suggested), but some people don’t do this and sometimes the module makes changes that can’t be reverted simply by uninstalling Xposed. Then there are times when you install a custom kernel or custom ROM and you simply get tired of it even though it isn’t causing any trouble at all. If you created a Nandroid backup of the Nexus 5X, like I recommend so many times, then you can restore from said backup.
There are also times when we simply want to accept an OTA up date and no matter how many time we try to unroot the Nexus 5X, we still cannot accept that OTA update. This is usually because there was some change made to the /system partition that is being caught when Google tries to apply that brand new update. When this happens, the best thing to do is to simply revert back to complete stock. This is similar(since both will result in you losing your data and apps installed), but more complicated, than performing a factory reset on the Nexus 5X. So before you go through this tutorial you might want to try the factory reset and then see if you can accept that OTA update.
Nexus 5X Revert to Stock
- Download and Install Google’s USB Drivers
- Enable Developer Mode on the Nexus 5X
- Enable USB Debugging Mode on the Nexus 5X
- Install the Minimal ADB & Fastboot Tools
- Launch the ADB & Fastboot Shortcut it Created
- Type in the Following Command. . .
- adb devcies
- . . .And Press Enter on the Keyboard
- Connect the Nexus 5X to the PC with USB Cable
- Allow Access to USB Debugging on the Nexus 5X From the PC
- Disconnect the USB Cable From the Nexus 5X
- Download the Nexus 5X Stock Firmware to Your PC
- Extract the Contents of the Nexus 5X Stock Firmware
- Copy or Move Those Contents into the ADB & Fastboot Install Directory
- For Me, This Directory is “C:\Program Files (x86)\Minimal ADB and Fastboot”
- Boot the Nexus 5X into Fastboot Mode
- Connect the Nexus 5X to the PC with USB Cable Again
- Go Back to the Command Prompt Window
- Type in the Following Command. . .
- . . .Then Press Enter on the Keyboard
- Wait Until the Process is Completed and the Nexus 5X Reboots
Before we can begin to actually revert the Nexus 5X to stock Android, we need to set a few things up first. For instance, we need to install Google’s USB drivers, we need to enable Developer Mode, USB Debugging on the phone and install some sort of ADB and Fastboot tools on the PC. I recommend following the link I have included in the tutorial to just install the Minimal ADB & Fastboot tools program, but you can get this from the official Android SDK. You’ll just need to download and install a huge program to get it that way and this is why I recommend the minimal version.
Once that is done, go ahead and launch the ADB & Fastboot shortcut that was created when you installed the program and this will launch a command prompt exactly where you need to be(e.g. where ADB and Fastboot are installed). Once there, execute the command ‘adb devices’ so that we can start the service on the PC. Then you can connect the Nexus 5X to the PC with a USB cable so you can be prompted, and allow access, for USB Debugging from the computer(I even choose to always allow from my computer). Once this is allowed, go ahead and disconnect the USB cable and then download the stock Nexus 5X Android firmware from Google’s website.
As of writing this, there are 4 different firmwares that you can download. These different ones have different build numbers like MDA89E, MDB08I, MDB08L and MDB08M. Unless you want to go back to an older firmware, you’ll want to grab the one listed at the bottom because that will be the newest one available for the Nexus 5X. Once downloaded, you’ll want to extract the contents of this TGZ file(which is basically like a zip file), and then copy or move all of those individual files into the same directory that your ADB & Fastboot tools are in.
Then you can boot the Nexus 5X into Fastboot Mode and then reconnect the USB cable back to the Nexus 5X from the PC that you’re using. Turn your attention back to the command prompt that we opened earlier and execute the ‘flash-all.bat’ file to start the process. This can take some time because each of those partitions will be overwritten with the new firmware images that we just downloaded from Google. When the process is finished, you’ll get a notice in the command prompt and you’ll see the Nexus 5X reboot itself.
Once the Nexus 5X reboots, you’ll be taken to the standard Android activation screen that you see when you first pulled the device out of the box(and after you do a factory reset). Everything will be stock on the Nexus 5X now and you should be able to accept any OTA update, use Android Pay, or anything else(like banking apps or whatever) that require you to not have modified your /system partition.