Friday 13 May 2016

Recovering my Jolla from a boot loop

Recently while I was updating my Jolla phone to the latest release. I was asked to optimize the space left of the disk before updating. I did this but my phone got powered off during this process and once it was charged again it went into a bootloop. That is to say that it booted with the Jolla logo and then went to a blank screen and never went further.

Upon investigating the issue, I found that the Jolla file system is btrfs and that it was during a btrfs operation the device got turned off causing some file system issues. I read over Jolla's instructions on how to reset the device to factory settings available here but I didn't want to reset my device as it had quite a bit of valuable data on it. Luckily they had instructions on how to recover that data available here. These instructions worked for getting data off the device although it took several trips due to the size of my SD card. As an aside always have a backup .vault file on your Jolla it will make this process easier , I didn't and I wonuld have had to write code to retrieve my contacts and message from SQLite DBs had I not been able to fix the device.

Once I had my data safely off the device, I wanted to remove some of it to attempt a btrfs recovery. In order to see if I could get the device back in  working order without a factory reset. However the file system which I had mounted using the instructions in the article wasn't writable so I couldn't delete any data. Eventually I found that I could mount the file system like so



Which mounted the file system as writable, I then removed my Videos folder as it was safely backed up and would remove 2GB of space form the device. Then I ran sync and umount commands to make sure it was gone and to unmount the file system. Once I had done this I used option 5 in the recovery console to attempt a btrfs recovery and then I rebooted the device, it took a little while longer than usual to reboot but it's now back to normal and working as expected.

I hope this helps anyone else experiencing similar issues.

Wednesday 4 May 2016

Using GPG as a Last Pass Alternative

I use Last Pass on my laptop but have recently been thinking of moving away from it. There have been several reasons for this e.g.
  • Breaking accessibility in my browser
  • Lack of secure clients for some of my devices (Sailfish OS & Ubuntu Touch)
  • I wish they were open about their algorithms
but I don't want this to be an anti Last Pass article, for some people it works very well and it's certainly better than reusing the same password on different sites.

My solution is a simple one, since all of my devices have a command line with gpg installed just use gpg to encrypt my passwords. I can then sync this encrypted file between all of my devices. Below you can see how to do this, in case it's something your thinking of doing yourself:


Sunday 1 May 2016

uRoku for Ubuntu Touch

I've just released the first version of uRoku, a Roku remote app for Ubuntu Touch. It gives the user a remote interface along with a keyboard and the ability to launch Roku apps from their Ubuntu device. It's written using the Ubuntu Cordova SDK because the QML SDK won't work on Ubuntu 14.04. I may re-write it in QML later. It's MIT licensed and available on github and the Ubuntu app store now.

Github: https://github.com/ShaneQful/uRoku
uApp Exploerer: https://uappexplorer.com/app/uroku.shaneqful

Screenshots:

 

Thursday 24 March 2016

Bash to audit your npm dependencies

With the issues surrounding npm today, I thought it would be interesting to write a bash one liner to see how many stars on github each dependency in my project's dependency tree has. The bash is below, it's only real dependencies are curl and npm. A word of warning, it does take quite sometime to run especially if you have lots of dependencies.


npm ls | grep -oP "\w[^@]+@" | sed s/@// | sort |uniq |  awk '{print "npm view " $1 " repository.url"}' | sh | grep -oP "github(\w|\W)+\.git" | sed 's/.git//g' | sed 's/.com/.com\/repos/g' | awk '{print "curl -s \"https://api."$1"\" | grep -P \"(stargazers_count|full_name)\" "}' | sh
 

Gist: https://gist.github.com/ShaneQful/aa265f9ef87449b945b1


In regards to my opinion on the situation, the behavior of some of the individuals was clearly childish at best and everyone who was stung by the situation should be a little more careful about their dependencies.