OnePlus 3, plus Nougat

Tl;dr: I hacked at my OnePlus 3 for a few days to update from Marshmallow to Nougat, going the TWRP/SuperSU route. I then swapped stock GApps for OpenGApps pico, to minimize Google’s footprint. I ran into several problems, key being the “dm-verity” error message, but it all sorted itself out in the end. This is the whole outline of the battle, but steps 1-7 at the very end as well as their preceding paragraph is basically all I’d need to do in the future.

A serious camera focusing bug had me shipping my OnePlus 3 out to Toronto for repair (under warranty, completed in record time: it left Monday and was back Wednesday that same week). Still, I was told the repairs could take up to a week so I had to go a whole month before I was able to ship my phone out, and this resulted in many, many missed photo opportunities. The silver lining however, was that I was able to also get them to reset the device to factory settings. Since minimizing Google’s footprint on it earlier this year, the device was working perfectly except I was unable to update from Marshmallow to Nougat on the OS side. At least, not without setting aside a few days to properly read through all the forum talk… and I just didn’t have this kind of time, needing my phone running for work much of the week.

The device just came back and I love the new feel of Nougat, but I’m already excited to customize it again and degoogle it as far as possible! Privacy issues are driving me a little bit, of course, but I’m not qualified enough to understand what I’m doing on any real crypto level, and I’m not naïve enough to think I’m doing anything really NSA-proof. Still, doing all this blankets me in something of a feeling of more security, and more importantly, teaches me a lot about how my device works, giving me fuller control over what exactly is going on under the hood. But my main reason for going through with this is I’m just so annoyed at all the auto-updating bloatware Google serves as part of its default Android experience!

Turns out the whole process took a lot more time and digging (through both forum and phone) to get it done right. Here’s the play-by-play.

Day one: First try

First you need to unlock your phone. I did it using the video below:

… but it was very long and had lots of unnecessary talking. But I was patient, it got me through to the end. Here are the main points:

  1. Update the system (to Android 7.1.1 currently).
  2. Set up ADB/Fastboot on the PC: get ADB Installer v1.4.3 from the Google Drive link on androidsage, run the .exe file and then type “Y” three times, including for getting the additional drivers.
  3. Unlock the phone: enable Developer Options and then OEM unlocking, advanced reboot, and USB debugging, and then unlock the bootloader. The part where he’s fiddling with what appears to be a few buttons @ 5:37 he actually just pushed the power button. At the end, to get to the bootloader screen to confirm the device is unlocked, I had to also re-enable advanced reboot.

Next, the device needs to be rooted and then it’s good to install a custom recovery program (TWRP has become the standard). I downloaded SR 3 SuperSU v2.79-SR3 from androidsage and upload it to the phone, but this was a bad idea. You’ll see why as you read on. I next downloaded TWRP 3.1.0 from TWRP into my adb folder (C:\adb; androidsage didn’t seem to do this). Shift+right-click in this folder and open command window, then flash the recovery img file into it as per the video. At 6:15 he manually boots into recovery mode, once the recovery img file has been successfully installed. Here’s the whole walk-through:

Now this is important. MAKE A FRESH BACK UP OF EVERYTHING. Check all those boxes you see at 7:30 above. I cannot stress enough how important this is. Lastly install SuperSU. Wipe cache and dalvik; reboot into system. I chose to both prompt to install TWRP and to install it as a system app before rebooting after reading this article (tl;dr: this allows me to monitor and update TWRP from the app side and not continuously having to do so from the back end). Back up again now that the phone’s all set and presto!

All the above is great for now having fuller access over my phone and for being able to make solid backups that I can then export to external drives for safekeeping, but again, the real reason I do it all is to remove bloatware and minimize the amount of apps running on it that may be collecting information on my activity: enter the Open GApps project. From a blog post I know OnePlus 3s require the ARM64 platform, and I always get pico because that’s just enough Google to run the device (any less and it just doesn’t work) plus the Play Store to get all my apps  like Google Translate and Maps (sadly, still irreplaceable). The steps are simple:

  1. Download the appropriate GApps package, then upload that to your phone.
  2. Reboot your phone into recovery, then from the TWRP interface select Install and navigate to your GApps file, and flash it.

Day two: Second shot

That pesky error.

Everything was working fine until I uploaded the incorrect version of GApps, mistakenly thinking I needed ARM (I needed ARM64). The upload failed so I quickly restored the latest backup above (thank goodness I’d made them this time), and it would install, but then the Reboot System button wouldn’t show up even 10m after the reboot had clocked 100%. I powered the device down and then up again with the power button and that thankfully rebooted, but I didn’t feel secure with this set-up. I tried the previous recovery file and the same thing happened… and then I noticed that upon each restart, I kept getting a confusing dm-verity error. This may have been because I neglected to properly wipe the cache and data before starting up this process. This step seems important in the forums; otherwise residual footprints from the previous settings seem to mix things up in the new restore. The forums agreed on only one course of action: a full factory reset. It was time for me to learn how to do this. Luckily, it was a cinch:

  1. Download the appropriate OxygenOS version (I always go with the latest stable build) into your adb folder and then follow the remaining easy steps:
  2. Ensure your phone has OEM unlocking, advanced reboot, and USB debugging all enabled. Reboot into recovery mode. From there click through English > Install from ADB > Upgrade Android from USB? Ok.
  3. Using the ADB sideload method mentioned in the first part, open a command line in the adb folder (Shift+right click or type “cmd” in the folder address bar and hit “Enter”). Verify your device is connected via adb devices. You should see a short serial number confirming the device is connected and read by your PC.
  4. Type in adb sideload <filename>, where “filename” is whatever the name is of the recovery zip file. I renamed my zip to just “oxygen.zip” to make this process easier. Hit Enter and off you go! Here is a video quickly showing how it all looks like in action (I like it because the song is full of hope, and that’s what you need at this point in the process):

This took care of that dm-verity screen. Next up: redo the first day’s work in re-installing TWRP, SuperSU, and then finally the appropriate GApps if you so desire and you should be good to go! Here’s that process:

  1. Leave the phone on, connect it to your PC, then run the adb devices command to ensure it’s connected.
  2. Enter fastboot mode: adb reboot bootloader.
  3. Flash TWRP recovery img file (I renamed this to twrp.img to make it easier): fastboot flash recovery twrp.img.
  4. Enter recovery mode, selecting with volume rocker and hitting power to enter.
  5. When prompted if you want to keep system “unmodified and read-only“, do that this first time. This is good idea to create a completely fresh backup that you can fall back on to get OTAs (over-the-air updates: updates that were pushed out after whatever OS version you have). Remember? This was my original problem that had me stuck on Marshmallow months after Nougat came out. Wipe the cache and dalvik (full factory reset is perfect) and then reboot.
  6. Enable Developer Options, then OEM unlocking, advanced reboot, and USB debugging. If your phone isn’t being recognized by the PC, dis- and then re-enable USB debugging. That usually does the trick. Move the TWRP recovery you just made to your PC for safekeeping; move your SuperSU and GApps zip files to your phone. This caused Windows to muck up and restart twice for me so I just unplugged and re-plugged the phone in and it worked fine. Took about 5m though.
  7. Reboot back into recovery. For some reason, TWRP did not boot here, I suspect it’s because I chose to keep the recovery unmodified and read only in step 5 (this issue is easy to fix; read on). So repeat steps 1-5 to reinstall it. This time it did not offer an option of being read-only so just create a second backup here. When that’s done, swipe to a factory reset again under Wipe and then swipe right to Install TWRP App for the reasons listed earlier. Reboot the device (this will take a minute) and move that backup to desktop as well (keep copies of all your backups locally on the device as well). You’ll have to go through the welcome screens again. Re-enable Developer Options, then OEM unlocking, advanced reboot, and USB debugging.
  8. Reboot into recovery once more. This again led me to stock recovery options so I ADB-sideloaded a fresh OxygenOS zip (exactly as before the video in this section). I installed TWRP again, as above. Still, no swipe-right-to-get-out-of-read-only option. At this point I’m too tired to go through figuring out why, and confident enough that I can still de-bloat the phone, at least sufficiently to meet my needs.
  9. In the TWRP recovery screen I Wipe and do a factory reset. I Install my SuperSU, then wipe cache/dalvik. Then GApps is installed. This is where I get nervous because I really don’t want to go through any more of this… but it’s looking good. Done! Wipe cache/dalvik again, reboot system with the TWRP installation prompt enabled and there we have it! A de-bloated, largely de-googled OnePlus 3 running the latest Android OS: Nougat!!!

… and all was good until I realized the SIM card wasn’t being picked up and I had no signal. That just won’t do. TWRP was very confusing because of that initial mount setting (it wasn’t letting me upload backups because of being in read-only mode), but that’s taken care of through unchecking a box under Mount. So off to the official site for the official recovery img file, sideload that in place of TWRP, and then re-load a fresh OxygenOS ROM back onto the phone using it. At this point I just don’t have more time to dabble in all this, and it’s a pity too — the minimized Google footprint felt great. I’m leaving this phone with how it was when I received it, and hoping the forums figure out how to not kill the SIM signal with GApps pico in future releases. Fingers crossed!

The main lesson today was how to backup and factory-reset my device on a deeper level. This feels like finding those one-up extra life mushrooms in Super Mario way back when, and is very good for selling it later without any sensitive information on it, from documents to passwords to bitcoin (yikes).

Insert 30m and some chewy Chinese candy…

Done! With a signal! Turns out my SuperSU file was faulty (either BETA-SuperSU-v2.74-2-20160519174328-forced-systemless.zip or SR3-SuperSU-v2.79-SR3-20170114223742.zip, both from the independent site androidsage). But XDA-developers pulled through again: they have a whole forum conversation dedicated to getting SuperSU right on there. I went with SuperSU-v2.79-201612051815 and it works like a charm! Still getting the dm-verity error but at this point this is a very minor problem (turns out it’s not a big deal, just a system error message, kind of like a “check engine” light usually is on old cars). Okay, time for a wrap-up. Let’s see if I can’t get the device up to factory settings, then make a TWRP backup, then bring it up to Google Minimized status in under 15m. Here is the setup:

First a TWRP backup of the current state to the PC. SuperSU and GApps pico zips are already on the device, ADB is running on the PC, Developer Options plus OEM unlocking, advanced reboot, and USB debugging are all enabled, and the device is connected and charged at 100%. Files: ADB from AndroidSage, OnePlus OxygenOS 4.1.3 (stock & recovery), SuperSU-v2.79-201612051815 from XDA-developers, and OpenGApps ARM64 7.1 pico. Now the process:

  1. PC (ADB flash stock recovery): adb devices > adb reboot bootloader > fastboot flash recovery <filename>.img. Reboot into recovery with volume rockers.
  2. OnePlus: English > Install from ADB > Upgrade Android from USB? Ok.
  3. PC (ADB sideload stock OS): verify via adb devices > adb sideload <filename>.img. Reboot into system.
  4. OnePlus: Reboot. Settings > Developer Options > Dis- then reen-able USB Debugging.
  5. PC (ADB flash TWRP recovery): verify via adb devices > adb reboot bootloader > fastboot flash recovery <filename>.img. Reboot into recovery with volume rockers.
  6. OnePlus (flash SuperSU): Install > SuperSU<filename>.zip > Wipe cache/dalvik >
    Backup > Check Boot, System, DataSwipe to Backup.
  7. OnePlus (flash OpenGApps): Install > OpenGApps<filename>.zip > Wipe cache/dalvik > Backup > Check Boot, System, DataSwipe to Backup. Reboot system > Swipe to Install TWRP App.

Time-wise, each step above took under a minute apart from sideloading the stock OS (15m). Altogether, the entire process lasted 25m. And the best part? No dm-verity error messages!

Day Three: After the Smoke Cleared

Waking up bright and early, I already couldn’t wait to get my hands on my machine again and start doing the fun stuff: uploading all my apps and setting up the settings to be as clean and clear and soft and solid as possible. OnePlus’ shelf feature is amazing here (I no longer need extra note-taking or weather apps)! Here’s how she looks now:

What a beauty! Look at that: fresh TWRP, SuperSU, and OpenGApps pico in the back end, and then personalized for productivity up front. And all this right through stock options!




OnePlus 3, Google minimized

After a surprisingly long relationship with my trusty rusty Nexus 4, I bit the $586.47 CAD bullet and got me a shiny new OnePlus 3. The honeymoon truly was up when I wasn’t able to properly update my custom ROM on the Nexus, but the screen suddenly losing huge chunks of responsiveness was really the beginning of the end. Even when I found workarounds for typing e, o, 3, 9 (and everything nearby), other things started to go… the browser’s address bar, ghost touches, menu soft key/volume rocker/power button unresponsiveness and, well, I knew it was time for an upgrade.

Paranoiders scooped up for Oxygen

Paranoiders scooped up for Oxygen

Why the Chinese flagship killer? Simple, and not really a solid reason: they had hired the core team behind Paranoid Android, my ROM of choice because of its great “immersion” feature and allusion to the depressed robot of Hitchiker’s‘ lore. They were also working closely with CyanogenMod to develop a custom OS for their phone, moving away from total Google control. Curtly, they seemed to be democratizing the mobile world, and at a fraction of the cost. Yes, I was worried about potential corporate abuses employed to get ahead in the market (eg: worker/environment exploitation), but, after researching this a little, I was happy to have my fears assuaged:

After getting my phone, I immediately set about removing as much Google from it as I could. First, it’s a whole lot of bloatware. Secondly, goodness only knows how much of it is spying on you. However, the only way I knew how to go about doing so was through installing a custom ROM. Naturally, I chose Paranoid Android again. Compared to my previous forays, this was an exceptionally painless operation. I have since discovered there is a script that can do much of this even more easily, but all this is water under the bridge now.

In researching this topic for about a week though, one of the biggest revelations was the video below, fully explaining what rooting is and why doing so is just good practice. A highlight was the explanation of why all Android phones offer slightly different, company-specific experiences. Tl;dw: Samsung, Sony, etc. wrap the original Android OS in a custom UI of theirs, complete with such nuisances as bloatware, a psychological incentive to stay with their brand when choosing a new phone, and much later official Android updates:

Taking control of your phone

Two quick steps:

    • Create a back-up, then install a custom ROM. I chose Paranoid Android:

And presto! Though I would no longer recommend Paranoid Android, it’s a bit slow and seems a lot less feature-rich than before. I might be flashing Hydrogen OS on my device shortly to see if that doesn’t speed things up. One thing to keep in mind while you’re flashing between ROMs: disable any screen lock. Recovery mode goes buggy and doesn’t let you do stuff if unless you do this.

Final things I learned: you should always perform MD5 checks when installing program files to ensure file integrity (ie: that the download is complete, that the file isn’t corrupt, etc). I remember the Liux Mint hack from the other year that was a direct result of people skipping this very important step when downloading what they thought were clean files. Here’s how:

And lastly, if it’s a minimal Google footprint you want, then the ROM you’re flashing isn’t of any significance —  it’s the GApps package you install that matters. Options are plenty, and I always go with pico because this has just enough Google functionality to enable the Play Store. Sadly, F-Droid doesn’t have all the apps I need, and in the end I download Google Translate and Maps anyway, because gosh darn it, they’re just that good. But I am looking for a way to unwind even these tendrils.




Lollipop!

How I felt when originally diving into this issue.

Despite previous speed bumps, I successfully updated my Nexus 4 to Lollipop Paranoid Android! There were many hiccups along the way, most notably an “Unfortunately, <random Google programs> have stopped working” error, and my accidentally deleting everything from my phone in a fit of frustrated curiosity (a dangerous blend) — including all backups, cache, Dalvik cache, and system files — including even the OS! Yowch.

Neat for the first hour...

Neat for the first hour…

This all started because I wiped all back-ups, intending (but neglecting) to make a fresh one in the process. This meant I had to do a complete reformat, manually resetting  everything to factory settings via flashing a factory image on my device… all this before I could even think of installing PA. As I tried this a few times, my phone would continuously get stuck in a bootloop cycle — entering the animation screen with all the floating colourful dots and staying there for hours. So I killed the process (held the power button until the device powered off — about 5s), entered recovery mode (holding power+volume down buttons until the recovery screen showed up), and then started from scratch… and here’s how I did it.

Manually flashing stock Nexus factory image

Note: first, I tried the instructions laid out here, but they didn’t work very well. Still, a very comprehensive resource maybe useful for someone else.

  1. Install Minimal ADB and Fastboot to your computer.
  2. Download the appropriate factory image (Nexus 4 v5.1.1). Extract files as needed to your Minimal ADB and Fastboot folder.
  3. Follow steps 4-onward here. Note: Enter commands correctly, even if this means typing the same word twice.
  4. Let the phone reboot (may happen automatically, despite the guide saying you need to do so manually). This took about 10m of the flying circles… I just waited.
  5. Trying to enter recovery mode from here just leads to a screen with the Android robot on its back with a yield sign above… this is okay, this just means the phone is in true factory stock format. Success!

Unlocking, rooting, and flashing a custom recovery on the phone

  1. Power the phone on. Enable Developer options menu and USB debugging mode. Connect it to your comp via USB. If something gets stuck along the way, a common fix is dis- and reconnecting the phone.
  2. Download the latest TWRP custom recovery file appropriate for your phone (twrp-2.8.7.0-mako.img for me). Put this file inside your Minimal ADB and Fastboot folder. You can also use CWM but, having used both, I prefer the UI of TWRP.
  3. Enter recovery on the phone. This wasn’t working for me until I disconnected the USB and held volume up+volume down+power buttons at once. Luckily, the phone showed it was already unlocked.
  4. Reconnect USB. Return to the Minimal ADB folder, select MAF.exe (or just return to the command window you were using before if it’s still open), and type in fastboot flash recovery twrp-2.8.7.0-mako.img, replacing the img file’s name to reflect the one you’re using.
  5. Enter Recovery Mode on your phone (don’t simply reboot). Here I was met with a TWRP official screen asking if I wanted to allow it to make modifications to my phone. I did.
  6. Make a backup!!!
  7. Reboot your device. At this point, TWRP said my device wasn’t rooted but that downloading SuperSU would take care of this. I allowed this.

 Flashing a custom ROM

I’m going with Paranoid Android though CyanogenMod is the more popular option. I just had PA for years now and it kind of grew on me. I probably will experiment with CM soon though.

  1. I downloaded PA v5.1 and pico GApps to have as minimal a Google footprint as possible, transferring both files via USB to my phone’s main directory.
  2. Enter into Recovery mode. Perform a factory reset under “Wipe”.
  3. Hit “Install”, flashing first the ROM and then the GApps files. Reboot system. At this point I was asked to install SuperSU again; I did. Once your phone reboots, you’ll have to finish the SuperSU installation process. And there you have it, you’re basically done!
  4. I missed the gestures-to-type function since the Google Keyboard wasn’t installed (pico really is minimal), so I installed and activated that separately, directly on my device once it was booted. There are several other add-on modules available as well.
  5. Lastly, I copied the whole TWRP recovery folder to my computer, just in case.

Ugh, finally.

Ugh, finally.

The main thing I learned during this process: always confirm you have backups before making any changes!

But, overall, I’m happy things turned out this way because I learned a lot, and I had wanted to give my phone a proper app cleaning for some time now anyway. In the end, I was able to tame the rage bear from the previous post. All’s well that ends well : ).




Lollipopping my KitKat

This is something of an update to a post I wrote a few months back about unbricking my Nexus 4. I did end up getting it working in the end, if you’d like to just directly skip to that post instead.

Updating my Nexus 4

Seemed easy enough...

Seemed easy enough…

I noticed since Google rolled out with the new Lollipop 5.0 update, my Nexus 4 (still running the old Paranoid Android ROM, KitKat 4.4) would chew up my data plans. Like just today I went through a whole gigabyte. Ouch. After letting this go on for a few months and just learning to live only by WiFi, I finally came along a forum post that explained it all. Quickly, my phone was constantly trying to upgrade to Android 5.0 but, running a custom ROM, would just download the ~150MB update, fail to install it, delete it, and then try again. And again. And again. So I decided to not wait for the official Paranoid Android 5.0 release and just flash the Alpha version right away, to save big on data at the very least.

This initially seemed a super easy task: first, make sure you do a backup of your current system. I used Team Win Recovery Project. Then download the ROM and GApps and transfer them to your phone’s SD card via USB, in the main directory. Next, turn off your phone and boot it into Recovery Mode. In the TWRP menu that opens select “Wipe” and then swipe to Factory Reset. This done, return to the main menu and select “Install”. Navigate to the bottom of the list and install your ROM first, then GApps next. Now reboot and you shouuuld be done…

Bugs

This is how I felt. This stuff shouldn't happen!

This is how I felt. This stuff shouldn’t happen!

During my initial process, I was told my device wasn’t rooted, and then asked if I wanted to install SuperSU. I did. Everything seemed to work upon booting, so I tried to manually delete previous backups I had made via USB docking to my laptop. After this whole process, I noticed a few bugs (eg: photos and screenshots weren’t recorded, I wasn’t able to manually drag and drop files to or from my device via USB, I couldn’t properly download Threema from their store). So I redid this entire process, this time ignoring the prompt to install SuperSU. The same bugs were present.

… so I performed the whole process yet again, this time also performing an advanced wipe on both the cache and Dalvik Cache (as suggester here), and installing SuperSU when prompted. This somewhat cleared the photo problem… I was able to drag photos from my device to my computer and to manually delete them from my Nexus 4 via USB, but they still wouldn’t show up in my phone’s Gallery.

I then installed, re-installed, and re-reinstalled everything in all sorts of orders and configurations, with many tweaks here and there. Ultimately, GApps just stopped installing, so I took a break from it all. Thank goodness for my backups!

Final decision

I felt it should have went something like this.

I felt it should have went something like this.

I opted for waiting for the non-Alpha Paranoid Lollipop release. After dedicating two days to reviewing forums I just didn’t have any more time to dedicate to this issue. Until then, I’ll continue running Paranoid Android 4.4.4, which I think is the latest (and last) version of KitKat, and will simply restrict Google Play services from running on data. This isn’t ideal as I’ll have to open the majority of my chatting apps to check for messages (their notifications get blocked under these settings), but this in itself isn’t a tragedy.

... but in the end, it was a lot more like this.

… but in the end, it was a lot more like this.

Going forward, I will also ensure I have the latest TWRP and SuperSUs installed.The TWRP was quite easy to update: I downloaded the ROM Installer app from the Play store, then clicked on “Flash Recovery” in the main menu and selected the latest version (though I will likely uninstall ROM Installer because it keeps requesting superuser access…).

SuperSU was also easy: I downloaded it from the Play store, and then updated it by granting it superuser access when prompted. I then rebooted my device directly from SuperSU and made a backup. This way I at least don’t have to worry about entering some godforsaken bootloop limbo as in the post that started this whole adventure. Oh what a pain that was.

Update: After much effort, I finally got it working!




Unbricking a Nexus 4

Update: I figured out and fixed what was causing massive data drainage in this same device once Google rolled out with Android 5.0 Lollipop, settling for a simple workaround for a bit before finally fixing the issue.

Backdrop

The device in question.

The device in question.

This past while I’ve been getting to know smartphones a bit better, first owning an iPhone 4s in 2012 then swapping it for an LG Nexus 4 in 2013. One thing I hated with both was how the app stores — Apple and Android — required accounts in order to download apps. In trying to move away from such unfree practices, I flashed the Paranoid Android ROM onto my Nexus 4 this past summer and the results were just wonderful. Still very much tied up in Google, the custom ROM came with one or two stylistic upgrades that I absolutely loved, specifically a really neat pie menu feature that I now simply cannot do without.

That awesome pie menu feature.

That awesome pie menu feature.

Fast forward to this past Christmas when a Paranoid update became available. I tried installing it and, well, my phone became a brick. I suspect this was because the update I installed was only partially downloaded, likely due to a sketchy wireless connection that had a horrible habit of going offline just when you needed it most. During the process I also accidentally deleted my system back-up and any automatic restore points that might have been inherently present in the device.

The red light of death.

The red light of death.

This effectively locked my phone in a nasty bootloop cycle. When I plugged the phone in, it would charge and the “Google” logo in white on black was prominently displayed, but it would never move past this screen. When it would turn off, I was confronted with the anxiety-inducing “red light of death”. Pressing the power button and volume-down rocker moved me into the fastboot screen, from which I could do nothing since no backups existed on the device.

The fastboot screen.

The fastboot screen.

Luckily, I was able to fix my phone in about 20 minutes, largely thanks to this video (and its related forum discussion). All I needed was the phone, my laptop (Windows 8.0), and a USB cable to connect the two.

Here’s what I did. You should watch the video above first; the majority of these steps are outlined there. First, you need to download the following to your desktop: usb_driver.rar (File → Download), Google_Nexus_4_ToolKit_v2.0.0.exe, and the latest Nexus 4 Factory Image (for me, this was 4.4.4 (KTU84P)). That done, it’s probably a good idea to read all the steps below before you actually start the process.

Installing the driver:

  1. Extract the USB Driver file to your desktop. I used WinRAR.
  2. Put your phone into fastboot mode by holding the power and volume-down buttons down. It might take a few seconds.
  3. Connect the phone to your computer and open Device Manager (Windows button+F → type in “Device Manager” → hit “Settings”).
  4. In the box that appears, right-click the option that says “Android Device” or “Android ADB device” and select “Browse my computer for driver software”.
  5. Hit “Browse” and select the “usb_driver” folder on your Desktop. Your selection should look like this in the end: “C:\Users\your-username\Desktop\usb_driver”. Hit “Next” to install the driver.

Installing the factory image:

  1. Install and run your Google Nexus ToolKit (something like “Google_Nexus_4_ToolKit_v2.0.0.exe” on your desktop).
  2. When it asks you to “Make your choice”, type in “9”. This is the option to “Download, Extract  Flash Google Factory Stock Rom”, if you read the legend.
  3. In the next screen, you want to “Flash Google Factory Image”, so type in “2” when they ask for your choice.
  4. This is important. Before moving on in the Google ToolKit (Matrix-like black screen with green characters), go to your computer’s C drive and find the Nexus ToolKit folder (“C:\Google_Nexus_4_ToolKit”). Open it and in the “put_google_factory_image_here” folder, paste the full, unextracted factory image file. The file should end in “.tar” or “.tgz” (mine was “occam-kot49h-factory-02e344de.tgz”).
  5. Now type “yes” in the ToolKit and let it run, and then “yes” again when it asks you if you want to “proceed anyway”.

The pulsating "X".

The pulsating “X”.

Make sure you have enough battery power on your laptop at this point. I would plug it in, just in case. It’ll take about five minutes to move the factory image from your computer to your phone — just let it run. During this time your phone will reboot a few times and will finish with a pulsating “X” made of four coloured circles. After a few more minutes it should restart again — there are detailed instructions in the ToolKit on what to do if the phone gets stuck in this “pulsating X mode”, but I found patience to be just as effective. And presto, you’ve done it! Your phone is now working again, restored to pretty much factory settings.

Re-enabling as a Media Device

After resetting the device, my computer didn’t recognize it (ie: when I plugged it into the USB port I wasn’t able to directly access the files on it, eg. my photos). Another forum provided the fix: I just needed to reinstall the drivers which, luckily, the device can do on its own provided any previous drivers are deleted:

  1. Plug your phone into your computer and open Device Manager, as before.
  2. Select “Android Device” → “Android ADB Device”, right-click and select “Uninstall” → check “Delete the driver software for this device”.
  3. Unplug your phone from the USB port and then plug it back in. Your drivers will install automatically (give it a minute) and you’re done! If you’re looking for your device in the Device Manager now, it’ll be under “Portable Devices”.

I’m putting this guide up just in case I find myself back in the same boat. If it helps someone else along the way, so much the better!




Setting up your blog: a beginner’s guide

October 2015 update: Just watch this (more here : ):

A quick tutorial on how I set up this blog quickly and easily, and how you can too. Two things you need: a domain name people can type into their browser to find your site and somewhere to host all the files that comprise it. All told, I had this site up and running from scratch within an hour; playing with WordPress to tweak it took another two days. This involved finding a nice theme, installing some necessary plugins, and arranging the basic settings — in that order.

For the former, I created an account with Toronto-based 10Dollar.ca where, for less than $10/year, I bought the domain name you now see up in the address bar. For the latter I had two options: either set up my own server or pay for the hosting of my files somewhere reputable. Setting up your own server is neat but with how quickly technology is changing these days — especially with all the malicious software out there just waiting to unleash itself on anything unprotected — I decided to go with the latter. I just don’t have the time to spend weekends worrying about security or Googling answers to technical problems a professional can fix for just cents a day. I went with Texas-based HostGator.com: three years of hosting cost me $150. I chose these two companies on the advice of a trustworthy web designer friend. He recommended both for their great prices and even greater customer service. Yes, you will have to call these people from time to time so caring, knowledgeable customer service reps available promptly 24/7 are even more important than a good deal. Because you never know when you’ll be on holiday, 12 time zones away from home, when your site gets hacked and you need backups like right now.

However, with the recent government spying that’s been in the news since the Edward Snowden affair, it would be prudent not to host your site on American servers nor to use an American domain name if you are dealing with sensitive material (eg: “.com”). Financial details, client information, personal stuff you wouldn’t want copied or deleted without notice… if none of this applies to you, then go with HostGator. If you are afraid of something like the Lavabit affair coming between you and your data, make sure you host offshore. Another good friend of mine, this one with an undergraduate thesis in cryptography and currently wrapping up a PhD in computer science, recommends Iceland’s 1984.is as an alternative hosting service if you need the added security.

All the above said, here are the four simple steps to get your blog running today:

  1. Get a domain name, it should not cost more than $12/year. You might have to wait a few hours for your request to go through.
  2. Get hosting, it should not cost more than $75/year. This is immediate. You’ll need to provide them with your domain name from above and they will give you your nameservers. These are the locations of where your site will be housed on their computers. There are usually two (one for use and one for back-up, though some give more) and they tend to follow the pattern “ns####.hostingservice.com” (eg: “ns1234.hostgator.com”). They are what connects your domain name to the physical location of your site’s files on your host’s computers.
  3. Copy those nameservers into the appropriate field in your domain name provider account. With 10Dollar you log into your account and then go to “My Domains” → select your domain → “DNS Information”. Here make sure all radio buttons are deselected and enter your nameservers into the fields provided, one per field. It’s perfectly alright if some fields are left empty. It may take a few hours for these changes to come into effect.
  4. Start making your site! Either upload your files on there via FTP (Filezilla Client is awesome and free) or — and this is the better option if you know nothing about web design — install WordPress. HostGator makes this super easy.

You’re done! All the above should take maybe one hour to set up, and then up to a day for your site to actually be up at the address you pointed to it. From there you will have to learn to play with WordPress to make your site do your bidding, but with all the plugins and themes available for this platform, this is definitely the best initial foray into setting up your first website. Everything else is a matter of spending a few weekends Googling, trying things out, making mistakes and, above all, having fun!