Possible method for retrieving backups from a Nexus 5X with the boot-loop bug

Hello fellow owners of fucked Nexus 5X devices,

I started getting boot-loops this morning and a cursory search on the interwebs tells me I’m far from the only one. From the unending of stories of abysmal support from LG I’m not optimistic that I’ll have a Nexus 5X for much longer and I was beginning to reckon I’d lost all data since my last backup (which was way too long ago). Fortunately I seem to be able to (reproducibly) get fifteen minutes out of it by (i) plugging it into a laptop; (ii) letting it loop for a while; and (iii) wedging it somewhere where it will get very warm very fast – specifically I put it between two cushions. Eventually it boots happily.

Maybe I’m just lucky and this won’t work for most people, but I figure that for those who are currently stuck with a bricked phone, this is worth trying as a last-ditch effort for recovering any information at all.

What this did not do is permanently fix my phone. If you’re thinking of giving this a go, bear in mind that it does only last fifteen minutes and there’s no guarantee this will continue to work more than three or four times (or even once). Also, performance is notably terrible (presumably due to thermal sensors throttling the CPU) so you have to plan ahead here and be patient so you don’t overload the CPU if you do get it booted.

However, with planning I was able to get just enough time to download some important backups onto my laptop. I’ll describe the steps required below.

Prerequisites

Install Android platform tools on your PC (I used a Mac on either Windows or Linux). You’ll be using adb to pull down the files you need.

If you’re not familiar with ADB, read some guides on the installation and basic concepts. Follow a tutorial to get it installed, there are loads.

Once you have it installed, run adb wait-for-device in the Terminal.

You’ll need a USB to USB-C cable if your PC doesn’t have a USB-C port.

Determine in advance what to back up

I had a few apps in mind which I knew would not be backed up on the internal storage but whose settings or status I wanted a copy of for post-factory-reset or replacement.

There is an adb backup command which lets you accomplish this. Before you run it it you need to know the ID of the app you want to backup. Visit Google Play Store and click “My Apps”; find the apps you want to backup and click on them. The id is shown in the URL bar.

Example: for Terminal Emulator, the url is https://play.google.com/store/apps/details?id=jackpal.androidterm  – meaning the id is jackpal.androidterm.

The command you want to run follows the format adb backup -f <appid>.ab <appid>; make a note of the commands you’ll need:

adb backup -f jackpal.androidterm.ab jackpal.androidterm
adb backup -f com.tpcstld.twozerogame.ab com.tpcstld.twozerogame

There’s another command, adb pull, which lets you download files from the internal storage. In my case I wanted to backup my photos (just incase there was anything not captured in Google Photos) and WhatsApp. The relevant folders are /sdcard/DCIM; /sdcard/Pictures and /sdcard/WhatsApp. Make a note of the commands you’ll need:

adb pull /sdcard/DCIM
adb pull /sdcard/Pictures
adb pull /sdcard/WhatsApp

Try these if you need them and maybe some helpful commenters will leave additional ideas. You also may be able to use Google to determine where an app you use stores its files.

Enable developer mode / USB debugging and run the commands

As soon as your phone boots, if you didn’t already do so before you started experiencing issues, you will need to enable USB debugging on your device. Memorise it:

  1. tap ‘Settings’ > ‘About’ > ‘Software Information’ then tap on ‘Build Number’ 7 times.
  2. Go back to ‘Settings’ then select ‘Developer Options’
  3. Tap and enable USB Debugging.

If you have done as you were told above and started adb wait-for-device you should pretty much immediately get a prompt on your screen asking you to allow debugging. Tick the box and click Accept.

As soon as the terminal in which you entered the adb command returns to the prompt, start entering in the commands you saved above. This will start pulling down files and backups to your computer ready to be restored some other time.

It’s also worth taking a look in the app list to see if there’s anything you missed. I had a Bitcoin wallet app installed – although I already had a backup I thought I might as well take the opportunity to grab another one just incase.

Report back

Let me know in the comments if this worked or did not work for you, or if you have any advice for anyone who tries this. Listing common app IDs or /sdcard data folders would be really useful.

3 Comments

Add yours

  1. The “cushion” trick worked wonderfully for getting it temporarily working without having to pull the board and apply heat directly. Appreciate it.

  2. Thanks, you saved my data. After 22 months the dreaded bootloop of death finally hit. But sticking the device between two cushions really made it boot after maybe 20-30 mins of looping. And it was stable enough for a full backup.
    Just an addition for Linux (and maybe Mac) systems: You can chain commands with && and the second will immediately follow the first, gaining valuable seconds. Example: adb wait-for-device && adb pull /sdcard/Pictures will immediately pull data once USB debugging is active.

  3. Pushed my phone zipped into the fridge for an hour and was able to boot and rescue the most important files using your instructions. Thank you!

Leave a Reply

Your email address will not be published. Required fields are marked *