Thicket data repository for the EEG
1{
2 "id": "https://mort.io/blog/nexus-4-rescue/",
3 "title": "Rescuing a Shattered Nexus 4",
4 "link": "https://mort.io/blog/nexus-4-rescue/",
5 "updated": "2015-05-21T00:00:00",
6 "published": "2015-05-21T00:00:00",
7 "summary": "<p>A little while ago, before I’d done the smart thing and got myself a case for my\nNexus 4, I dropped it a couple of inches onto a hard surface at the wrong angle.\nThe screen promptly shattered – and this was bad because without the touch\nscreen, I couldn’t interact with it, I had some photos on it from son#1 birthday\nparty that hadn’t been copied off, and I hadn’t got round to enabling USB access\nto the filesystem or any of the debug/developer options.</p>\n<p>So what to do? I <em>really</em> didn’t want to lose those photos. A couple of hours\nsearching the Interwebs and a little bit of experimentation later, and I managed\nit. Basically, download and apply the clockwork mod bootloader, and this turns\non the developer options that allow access to the filesystem via the Android SDK\ntools. To find out the details, read on…</p>\n<p>First, download the recovery image:</p>\n<pre><code><span><span><span>$</span></span><span> wget http://download2.clockworkmod.com/recoveries/recovery-clockwork-touch-6.0.3.1-mako.img</span>\n</span></code></pre>\n<p>Next, install the Android SDK – I’m on OSX using [Homebrew][] so I do:</p>\n<pre><code><span><span><span>$</span></span><span> brew install android-sdk</span>\n</span></code></pre>\n<p>Now, power off and disconnect the phone! Then boot it into fastboot mode by\nholding down <code>power</code> and <code>volume-down</code>. Once it boots you should be in the\nfastboot list – the volume keys will cycle you through the list. You should now\nalso be able to see the device once connected to USB, and you can then OEM\nunlock it:</p>\n<pre><code><span><span><span>$</span></span><span> sudo fastboot devices<span><span> -</span>l</span></span>\n</span><span><span><span>04f02d4bdcd3b6e2</span></span><span> fastboot usb:FD123000</span>\n</span><span><span><span>$</span></span><span> sudo fastboot oem unlock</span>\n</span><span><span><span>...</span></span>\n</span><span><span><span>OKAY</span></span><span> <span>[</span> 17.937s<span>]</span></span>\n</span><span><span><span>finished.</span></span><span> total time: 17.937s</span>\n</span></code></pre>\n<p>Having unlocked it, you can now install the clockwork recovery bootloader you\ndownloaded (assuming it’s in the local directory):</p>\n<pre><code><span><span><span>$</span></span><span> sudo fastboot flash recovery recovery-clockwork-touch-6.0.3.1-mako.img</span>\n</span><span><span><span>sending</span></span><span> <span><span>'</span>recovery<span>'</span></span> (7560 KB</span><span></span>)<span><span>...</span></span>\n</span><span><span><span>OKAY</span></span><span> <span>[</span> 0.526s<span>]</span></span>\n</span><span><span><span>writing</span></span><span> <span><span>'</span>recovery<span>'</span></span>...</span>\n</span><span><span><span>OKAY</span></span><span> <span>[</span> 0.448s<span>]</span></span>\n</span><span><span><span>finished.</span></span><span> total time: 0.975s</span>\n</span></code></pre>\n<p>When you now use the volume keys to cycle through the list, you should now see\n<strong>recovery mode</strong> as an option – select it, and you should be able to see the\ndevice listed in the usual way via <code>adb</code>:</p>\n<pre><code><span><span><span>:</span></span><span> mort@greyjay:phone$</span><span>;</span> <span><span>sudo</span></span><span> adb devices<span><span> -</span>l</span></span>\n</span><span><span><span>List</span></span><span> of devices attached</span>\n</span><span><span><span>04f02d4bdcd3b6e2</span></span><span> recovery usb:FD123000 product:occam model:Nexus_4 device:mako</span>\n</span></code></pre>\n<p>Finally, pull all the contents off the sdcard:</p>\n<pre><code><span><span><span>$</span></span><span> adb pull /sdcard/0 ./sdcard/</span>\n</span><span><span><span>$</span></span><span> adb pull /data/ ./data/</span>\n</span><span><span><span>$</span></span><span> adb pull /system/ ./system/</span>\n</span></code></pre>\n<p>…and that’s it – you should now have a local copy of everything off the\nphone, and you can send it away for repair (or whatever you feel like\notherwise), possibly while sobbing quietly.</p>",
8 "content": "<p>A little while ago, before I’d done the smart thing and got myself a case for my\nNexus 4, I dropped it a couple of inches onto a hard surface at the wrong angle.\nThe screen promptly shattered – and this was bad because without the touch\nscreen, I couldn’t interact with it, I had some photos on it from son#1 birthday\nparty that hadn’t been copied off, and I hadn’t got round to enabling USB access\nto the filesystem or any of the debug/developer options.</p>\n<p>So what to do? I <em>really</em> didn’t want to lose those photos. A couple of hours\nsearching the Interwebs and a little bit of experimentation later, and I managed\nit. Basically, download and apply the clockwork mod bootloader, and this turns\non the developer options that allow access to the filesystem via the Android SDK\ntools. To find out the details, read on…</p>\n<p>First, download the recovery image:</p>\n<pre><code><span><span><span>$</span></span><span> wget http://download2.clockworkmod.com/recoveries/recovery-clockwork-touch-6.0.3.1-mako.img</span>\n</span></code></pre>\n<p>Next, install the Android SDK – I’m on OSX using [Homebrew][] so I do:</p>\n<pre><code><span><span><span>$</span></span><span> brew install android-sdk</span>\n</span></code></pre>\n<p>Now, power off and disconnect the phone! Then boot it into fastboot mode by\nholding down <code>power</code> and <code>volume-down</code>. Once it boots you should be in the\nfastboot list – the volume keys will cycle you through the list. You should now\nalso be able to see the device once connected to USB, and you can then OEM\nunlock it:</p>\n<pre><code><span><span><span>$</span></span><span> sudo fastboot devices<span><span> -</span>l</span></span>\n</span><span><span><span>04f02d4bdcd3b6e2</span></span><span> fastboot usb:FD123000</span>\n</span><span><span><span>$</span></span><span> sudo fastboot oem unlock</span>\n</span><span><span><span>...</span></span>\n</span><span><span><span>OKAY</span></span><span> <span>[</span> 17.937s<span>]</span></span>\n</span><span><span><span>finished.</span></span><span> total time: 17.937s</span>\n</span></code></pre>\n<p>Having unlocked it, you can now install the clockwork recovery bootloader you\ndownloaded (assuming it’s in the local directory):</p>\n<pre><code><span><span><span>$</span></span><span> sudo fastboot flash recovery recovery-clockwork-touch-6.0.3.1-mako.img</span>\n</span><span><span><span>sending</span></span><span> <span><span>'</span>recovery<span>'</span></span> (7560 KB</span><span></span>)<span><span>...</span></span>\n</span><span><span><span>OKAY</span></span><span> <span>[</span> 0.526s<span>]</span></span>\n</span><span><span><span>writing</span></span><span> <span><span>'</span>recovery<span>'</span></span>...</span>\n</span><span><span><span>OKAY</span></span><span> <span>[</span> 0.448s<span>]</span></span>\n</span><span><span><span>finished.</span></span><span> total time: 0.975s</span>\n</span></code></pre>\n<p>When you now use the volume keys to cycle through the list, you should now see\n<strong>recovery mode</strong> as an option – select it, and you should be able to see the\ndevice listed in the usual way via <code>adb</code>:</p>\n<pre><code><span><span><span>:</span></span><span> mort@greyjay:phone$</span><span>;</span> <span><span>sudo</span></span><span> adb devices<span><span> -</span>l</span></span>\n</span><span><span><span>List</span></span><span> of devices attached</span>\n</span><span><span><span>04f02d4bdcd3b6e2</span></span><span> recovery usb:FD123000 product:occam model:Nexus_4 device:mako</span>\n</span></code></pre>\n<p>Finally, pull all the contents off the sdcard:</p>\n<pre><code><span><span><span>$</span></span><span> adb pull /sdcard/0 ./sdcard/</span>\n</span><span><span><span>$</span></span><span> adb pull /data/ ./data/</span>\n</span><span><span><span>$</span></span><span> adb pull /system/ ./system/</span>\n</span></code></pre>\n<p>…and that’s it – you should now have a local copy of everything off the\nphone, and you can send it away for repair (or whatever you feel like\notherwise), possibly while sobbing quietly.</p>",
9 "content_type": "html",
10 "author": {
11 "name": "Unknown",
12 "email": null,
13 "uri": null
14 },
15 "categories": [],
16 "source": "https://mort.io/atom.xml"
17}