Weekly Review, November 29

By Saturday, November 29, 2014 0 Permalink 1

There, I’m done with my Nexus 5 Lollipop upgrade mini-project. You’ll stop hearing about it all the time now! 😉

On a similar fun note, the entire family was sick a significant part of this week… You should have been here to see the fun! The twins started pretty much at the same time with some generic stomach bug. Oogi joined shorty after, taking it even harder. The grandparents also got it after being with the twins for some time. I joined the party, fortunately lightly and briefly. Definitely much fun! Allow me to skip the graphics…

We got some winter in Israel at last, with cooler air and some rain, hurray! The rain prevents me from bicycling to work, and also reminds everybody how bad the Israeli infrastructure is if it gets a little wet. That aside, being able to walk outside without sweating, and breathing a lungful of cool air is priceless for me! Definitely worths the price of needing to put on shoes and long jeans (T-shirts are still enough for me though).

The Weekly Review is a recurring (so-far-)weekly summary, reviewing highlights from the last week.

Continue Reading…

Restoring My Apps, Settings & Configuration On Lollipop

I love a clean start. There’s nothing like the feel of a smartphone (or PC) after a factory reset.

I’m using my Nexus 5 for almost a year now. For a while, I’ve been wanting to do a factory reset and start clean. The upcoming Lollipop upgrade is exactly the push I needed to do it.

My game plan:

  1. Before upgrading:
    1. Perform general app cleanup, so I upgrade only with the apps I want.
    2. Document my settings and configuration (system and apps), so I can re-apply it if needed.
    3. Backup data.
  2. Upgrade.
  3. After upgrading:
    1. Restore apps, data, settings and configuration, as needed.
    2. Explore what new built-in features can replace 3rd party apps I’m using. I always prefer built-in over 3rd party.

After I upgraded my Nexus 5 to Lollipop, it’s time to set up the device the way I want it. Since my upgrade process involved full data wipe, I’m starting clean.

In this post, I describe how I use the preparation steps I’ve taken before the upgrade. Not unlike the previous posts, this process is highly personalized and detailed, so the post is just a description of the method with some highlights.

Continue Reading…

Shell Foo: Listing All C/C++ Files In a Project, Excluding Build Dir

You’re working on a non-trivial project, with multiple source files, in multiple languages. You want to list all C/C++ source files in the project, recursively, but without getting duplicates from the build dir.

Assuming your C/C++ files are all .h or .cc files, and the build directory is build/ – how would you do it?

Here’s my preferred solution:

$ find . -name \*.h -or -name \*.cc | grep -vE "^\.\/build\/"

Shell-Foo credit for this one: Eyal Fink.

Shell-Foo is a series of fun ways to take advantage of the powers of the shell. In the series, I highlight shell one-liners that I found useful or interesting. Most of the entries should work on bash on Linux, OS X and other UNIX-variants. Some probably work with other shells as well. Your mileage may vary.

Feel free to suggest your own Shell-Foo one-liners!

Continue Reading…

Upgrading My Nexus 5 to Lollipop

I love a clean start. There’s nothing like the feel of a smartphone (or PC) after a factory reset.

I’m using my Nexus 5 for almost a year now. For a while, I’ve been wanting to do a factory reset and start clean. The upcoming Lollipop upgrade is exactly the push I needed to do it.

My game plan:

  1. Before upgrading:
    1. Perform general app cleanup, so I upgrade only with the apps I want.
    2. Document my settings and configuration (system and apps), so I can re-apply it if needed.
    3. Backup data.
  2. Upgrade.
  3. After upgrading:
    1. Restore apps, data, settings and configuration, as needed.
    2. Explore what new built-in features can replace 3rd party apps I’m using. I always prefer built-in over 3rd party.

Initially, I planned to wait for the OTA update. I figured it would simplify the process, and should reach my device soon enough. Google started rolling out the OTA on November 12th 2014. Like most Android updates, this rollout was in “waves”. 3 days later, the waves still didn’t reach my Nexus 5.

With the factory images already available, I started wondering why I’m waiting for the OTA over going manual. I figured that the only downside of going manual with the factory image is having to perform full wipe to unlock the bootloader. That doesn’t bother me, since I want to factory reset any way!

I decided to pursue the manual upgrade route, which I describe in this post.

Warning: This process requires using the fastboot tool over USB from a terminal. While not too complicated, it does require being comfortable with doing such things. Also, enabling USB debugging and unlocking the bootloader exposes your device to extra security risks (even if for a short time). Proceed with caution, or prefer going the OTA route.

Continue Reading…

Preparing My Nexus 5 For Lollipop: Data Backup

I love a clean start. There’s nothing like the feel of a smartphone (or PC) after a factory reset.

I’m using my Nexus 5 for almost a year now. For a while, I’ve been wanting to do a factory reset and start clean. The upcoming Lollipop upgrade is exactly the push I needed to do it.

My game plan:

  1. Before upgrading:
    1. Perform general app cleanup, so I upgrade only with the apps I want.
    2. Document my settings and configuration (system and apps), so I can re-apply it if needed.
    3. Backup data.
  2. Upgrade.
  3. After upgrading:
    1. Restore apps, data, settings and configuration, as needed.
    2. Explore what new built-in features can replace 3rd party apps I’m using. I always prefer built-in over 3rd party.

I have lots of data on the sdcard. My Nexus 5 is the 32GB model, and before going through with factory reset & upgrade, I have about 24GB used. In this post, I describe what I backup, and how I get it off the sdcard over to my MacBook.

I performed this backup procedure right before going through with the upgrade, so the backup is as up-to-date as possible.

Continue Reading…

Weekly Review, November 22

By Saturday, November 22, 2014 0 Permalink 1

Last week I got tired of waiting for the Android Lollipop OTA update to reach my Nexus 5. I went through manually flashing the Nexus 5 Lollipop factory image. You can read all about my upgrade process in the upgrade mini-project posts (which is practically finished, but some of the planned posts are still pending).

Some initial thoughts on Android Lollipop:

  1. It’s pretty.
  2. It’s smooth.
  3. I experienced some really bad cellular reception on the first day. It seems the issue went away though.
  4. Battery drain is somewhat higher on average. This is not based on benchmarking, just on hunch. The difference is not significant enough to be a real issue, at least for me.
  5. The new lock screen behavior with notifications is interesting. I haven’t restored my DashClock lock screen configuration, so I can see how I like this one.
  6. The most notable change is probably the task switcher. It’s completely different. As long as I keep it clean, I like it. The problem is that it’s hard to keep it clean…
  7. Still haven’t figured out the new share menu. Is it sorted? By what? Can I control it?
  8. A nasty bug that I ran into 3-4 times so far: some activity gets “stuck” in the foreground. pressing “back”, “home”, or trying to switch away doesn’t work. after several seconds, I can lock, unlock, and then “home” will bring back the home screen. I couldn’t recognize any specific pattern that led to this bug yet.
  9. The Tasker task I have for disabling the PIN code lock stopped working. When I run it, the screen lock setting is changed to “Swipe” as expected, but the PIN is still active…
  10. SmartLock is nice! I heard an upcoming update adds “trusted locations” to it, which will be very useful for me!
  11. Long pressing the power button is a bit confusing now. It offers only “Power off”. No more silent / vibrate mode.
  12. The volume control now contains also “Interruptions control”. This can be set to “All”, “Priority” or “None”. “None” is like silent mode, but also for alarms! Seems that “Priority” is equivalent to the “standard silent mode”. Not sure where I can choose between “silent” and “vibrate” though…
  13. “Priority” mode can be enabled “indefinitely”, or for “N hours”. It also allows configuring “Downtime”, that automatically sets priority mode on schedule. This is similar to the Silence Premium app that I use for “downtime” and auto-priority-mode during calendar events, but without the calendar-awareness feature.

Some thoughts on the Android upgrade process:

  • When preparing for an upgrade, it’s hard to predict what gets automatically restored and what doesn’t.
  • The way different apps handle customization, settings, and app-related data is pretty inconsistent. From an end-user point of view, I’d expect Android to offer some kind of “synchronized app configuration and data storage service” API, that I can connect with my Google account. This way, my personalization can follow me across different devices and device-upgrades without all the hassle. Am I missing something here?
  • Overall, despite taking the factory image flashing route, the upgrade process was straight forward and smooth.

The Weekly Review is a recurring (so-far-)weekly summary, reviewing highlights from the last week.

Continue Reading…

Preparing My Nexus 5 For Lollipop: Settings and Configuration

I love a clean start. There’s nothing like the feel of a smartphone (or PC) after a factory reset.

I’m using my Nexus 5 for almost a year now. For a while, I’ve been wanting to do a factory reset and start clean. The upcoming Lollipop upgrade is exactly the push I needed to do it.

My game plan:

  1. Before upgrading:
    1. Perform general app cleanup, so I upgrade only with the apps I want.
    2. Document my settings and configuration (system and apps), so I can re-apply it if needed.
    3. Backup data.
  2. Upgrade.
  3. After upgrading:
    1. Restore apps, data, settings and configuration, as needed.
    2. Explore what new built-in features can replace 3rd party apps I’m using. I always prefer built-in over 3rd party.

In order to be able to restore all of my set up, layout, customization, etc., I want to document in detail my starting state. This documentation should include anything that I might need to re-apply after factory reset & upgrade. It’s OK to skip things that are restored automatically (cloud-based, etc.). If I’m not sure about something, better be safe than sorry…

The method: Go over everything, and write down and/or take screenshots of anything I want to document.

This process generated a lot of data. Some of it includes sensitive stuff that I don’t want to document publicly (like account names on various services). All of it is highly personalized, and is probably of little interest to most readers. So instead of writing a post with 425 screenshots (really!) (and pixelating out many of them), I decided to just keep a few highlights, and describe the method. Feel free to ask for more details if you’re interested in something specific.

Continue Reading…

Shell Foo: Printing the Nth Line of a File

You’re running a Python script from the command line, and it throws some exception in your face. You want to take a quick look at the line that raised the exception (say, 42). How would you print that line?

My favorite way (minimal typing):

$ sed -n 42p myscript.py

Shell-Foo credit for this one: Eyal Fink.

Shell-Foo is a series of fun ways to take advantage of the powers of the shell. In the series, I highlight shell one-liners that I found useful or interesting. Most of the entries should work on bash on Linux, OS X and other UNIX-variants. Some probably work with other shells as well. Your mileage may vary.

Feel free to suggest your own Shell-Foo one-liners!

Continue Reading…

Sort Your Include Files!

The Google C++ Style Guide defines a guideline for names and order of includes. It occurred to me that grouping and sorting include files is tedious and error prone, and a computer can do it much better. So I wrote a script that does exactly that 🙂 .

The nitpick script is available on my GitHub cpplint fork.

If you’re comfortable with Python, you can figure out the script straight from nitpick.py source code and the accompanying unit tests. You can also read the rest of the post for some plain English review 🙂 .

Continue Reading…

Weekly Review, November 15

By Saturday, November 15, 2014 2 Permalink 1

Yesterday was Oogis birthday! She’s 30 years old! That’s old!

A couple of weeks ago I wrote about using Bitnami to set up a local WordPress sandbox. I was surprised (and delighted) to hear from Daniel from Bitnami shortly after, thanking me for the post, and asking to send me a T-shirt! I definitely did not expect such a nice experience when writing the post. Kudos to the Bitnami team for engaging with their users like that. I can only assume that they are as responsive to complaints as well.

The OTA update for Lollipop started on Wednesday, Nov.12. It includes Nexus 5, 7 & 10. As with most Android updates, this update is rolled out in waves. Unfortunately for me, it seems I’m on a “late wave”, and haven’t gotten my update yet, 3 days later… 🙁

The wait is too long for me! With the factory image available for download, I see no reason to keep waiting! I’m not afraid of a little adb-ing and fastboot-ing. As I see it, the only advantage of waiting for the OTA is avoiding a full data wipe. But I want to start clean, so I don’t mind doing a full wipe. As I write these words, I’m backing up the Nexus sdcard to my MacBook, before performing the manual Lollipop flashing. You can expect a detailed post on this process soon, if I don’t fuck it up on the way… 🙂 (update: as I publish this post, a couple of hours after, I finished the manual upgrade, and working on restoring all my settings)

The Weekly Review is a recurring (so-far-)weekly summary, reviewing highlights from the last week.

Continue Reading…