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.

Homemade Chinese takeaway-style curry

At the behest of my colleague Ross, I’m going to put a couple of recipes up. Here’s a homemade Chinese takeaway curry sauce that tastes pretty much like the real thing. If you are going to take a photo for your Instagram try to do a better job than this:

hello

Ingredients

1 tablespoon coconut oil (but vegetable oil will do).
1 onion.
4 cloves of garlic.
1 inch of ginger.
1 tablespoon of Chinese five-spice powder.
Half tablespoon of hot chilli powder.
1 tablespoon of light soy sauce.
400ml of chicken stock.
Half teaspoon of MSG.
2 tablespoons of flour.

Optionally:
Double all of the above and add 2 chicken breasts.

Method

Cut the onion into large chunks. Finely chop or grate the garlic and ginger. Fry the onion, garlic and ginger on a medium heat for three minutes or so, and then add the five-spice and chilli powder. If using the chicken, add now. Coat the contents of the pan with the powder and let it cook for up to a minute before adding the chicken stock and soy sauce. Don’t worry too much about the chicken being browned before adding the liquid – it’ll poach.

Let the stock come up to a boil before reducing to a simmer. Add in as much flour as you need to thicken it up – one tablespoon is usually enough. A whisk will help you get rid of any lumps. A tiny amount of MSG goes a long way – a half teaspoon is enough for this, even with chicken. Simmer for twenty minutes. If you leave it on for too long it and it gets slightly too thick just stir through a little bit of water.

Serve with egg fried rice and beer.