Uncategorized

Android Phone Finder Update

A few years ago, I used a combination of Google Voice, Tasker, Secure Settings, Dropbox and Dropsync to enable finding my phone by sending a text message to it.  I documented the first part of the project, which included detecting the text message and turning on GPS, and using Google Latitude to find the phone.  Latitude isn’t around anymore, though you can track location in Google+ now.

At some point after that, CyanogenMod added a feature to their CyanogenMod Account that would let you find your phone and remotely wipe it as well, so I switched to that.  Earlier this year, however, they discontinued that feature and moved it to their C-Apps.  There are privacy issues with C-Apps, so I didn’t want to use it.  As a result, I tried to resurrect the old hack.  Although I had switched from the Google Voice app to the Hangouts app as my text messaging client, the process still worked, with a few tweaks.  Here it is:

Set up Tasker and Secure Settings to detect a text message.  Make sure you select the right text messaging client.  For me that’s now Hangouts.  Create an associated task that does the following:

  1. Variable Set–Name %GPS_WAS To %GPS
  2. Secure Settings–Configuration GPS Enabled
  3. Get Location–Source GPS Timeout (Seconds) 90
  4. Write File–{a dropsync-enabled file} Append Off
  5. Secure Settings–Configuration GPS Disabled if %GPS_WAS ~ off

Steps 1, 2 and 5 will turn GPS on to get the location, then turn it off after, but only if it was not already on.

In step four, you have to write a file to a location that is synchronized by Dropsync to a DropBox folder.  Here’s the contents of that file:

<html><body>
%DATE %TIME<br>
%LOC accurate to %LOCACC meters<br>
Altitude %LOCALT meters<br>
Speed %LOCSPD meters/second<br>
<a href=”http://maps.google.com/maps?q=%LOC“>Map</a>
</body></html>

The process takes a minute or two to update the file.  The delay is almost entirely due to waiting for the GPS to get a coordinate fix.

Uncategorized

Comments (0)

Permalink

ROM Manager and TWRP Problems on new CyanogenMod 13 Installation

After installing CyanogenMod 13 on my Nexus 5, ROM Manager failed to back up the current ROM or reboot into recovery. Both of these actions just rebooted the phone. It was possible to manually reboot into recovery and perform a backup, but ROM Manager could not see it. The problem was that although root access was enabled in Privacy Guard for ROM Manager, it was not enabled for the OS in Settings -> Developer Options.

Uncategorized

Comments (0)

Permalink

Upgrading Nexus 5 from CyanogenMod 12.1 (Lollipop) to 13.0 (Marshmallow)

CyanogenMod 13.0 release post

  1. On the phone, perform a Nandroid backup from ROM Manager
  2. Under Settings > Developer options, enable Android debugging
  3. Connect the phone via USB to your computer
  4. On your computer, run [sudo] adb pull /mnt/shell/emulated/clockworkmod/backup
  5. Remove all backups on phone other than the most recent with adb shell
  6. Update to the latest TWRP image
  7. Under settings > About Phone > CyanogenMod Updates, download the update–it will go in /sdcard/cmupdater
  8. Download Google Apps for CyanogenMod 13 (ARM, 6.0, Nano)
  9. Send the package to the phone with adb push file /sdcard/.
  10. Unplug the phone
  11. Boot into recovery
  12. Wipe the System, Cache, & Dalvik partitions
  13. Install the CM snapshot and Open Gapps package

If you trigger an assert violation (radio, bootloader, etc), fulfill the requirement it complains about. These asserts are in place to make sure your firmware matches what CM13/Android 6.0.1 needs and you can actually use your device/phone as a device/phone.

I got repeated errors that com.android.phone has stopped.  This is the fix:

adb shell
rm -fr /data/data/com.android.providers.telephony/
rm -fr /data/data/com.android.phone/
exit

Uncategorized

Comments (0)

Permalink

Install Team Win Recovery Project (TWRP)

Install TWRP Manager on the phone (requires root):
http://play.google.com/store/apps/details?id=com.jmz.soft.twrpmanager

Uncategorized

Comments (1)

Permalink

Netflix Broken on Chrome

In the past, Netflix would not work in Linux without jumping through hoops. About a year ago or so, Netflix added support for Chrome under Linux. This worked fine with no extra steps required.

Today, however, I loaded up Netflix for the first time in a while and the web page was broken. Missing links, text that should have been links, missing graphics–totally unusable. A little Googling turned up that some extensions can break Netflix. AdBlock is one of them. The solution is to whitelist netflix.com in the extension. Unfortunately, I had already done that. The next step is to disable extensions one at a time to find the guilty party. This time it was Privacy Badger. Luckily, it has a domain whitelist setting also. Adding www.netflix.com fixed the problem.

Uncategorized

Comments (0)

Permalink

SSH X Forwarding when using Sudo

When you ssh -X to a host, SSH handles X forwarding for you. However, if you run a sudo command in that session, the process breaks down. Here’s how you can make it work:

you@local$ ssh -XC server
you@server$ xauth list
 [output]
you@server$ sudo su - otheruser
otheruser@server$ xauth add [paste output from "xauth list"]
otheruser@server$ xterm (or other X application)

Source: http://backdrift.org/x-forwarding-sudo-ssh-session

Uncategorized

Comments (0)

Permalink

Video in Piwigo

To play video in a Piwigo photo gallery, you need the VideoJS plugin.  Set-up information is here.

Videos need to be in MP4 format.  To convert from MOV, use winff (available in the Ubuntu repository).

Uncategorized

Comments (0)

Permalink

Upgrading Nexus 5 from CyanogenMod 11 to 12.1

  1. On the phone, perform a Nandroid backup from ROM Manager
  2. Under Settings > Developer options, enable Android debugging
  3. Connect the phone via USB to your computer
  4. On your computer, run adb pull /mnt/shell/emulated/clockworkmod/backup
  5. On the phone, turn off Android debugging
  6. Under settings > About Phone > CyanogenMod Updates, download the update and install it

Uncategorized

Comments (0)

Permalink

Installing OTF Fonts in Ubuntu 14

Copy the .otf files to /usr/share/fonts/opentype. (No need to run fc-cache.)

Uncategorized

Comments (0)

Permalink

Back Up Trello to Synology NAS

I’ve been using a paper-based planner for years. From time to time, I’ve tried to convert to an electronic system found them all lacking. My most recent attempt is with Trello and it might just work.

Before fully commiting to anything in the cloud, I wanted to have a backup strategy in place. Trello will let you export your data in JSON format. All I needed to do is automate that. I found a script called trello-backup that will do the job. I set it up in my home directory according to its instructions and verified it saved my data.

Now to automate it… The Synology DS 411+II seems like a logical choice since it runs 24/7 and is itself backed up every night. This wasn’t as easy as I would have expected. Synology has their own cron and from what I Googled, it’s rather picky. They also have an interface to it in the Control Panel. This was also picky, but here’s how I got it to work:

  1. Log in to the NAS Web interface as root
  2. From the Control Panel, select Task Scheduler
  3. Create a task of type “user-defined script”
  4. Name the task “Trello Backup” and have it run as root.  You can try to run as your user name, but it won’t work.
  5. For the run command, enter “php /volume1/homes/<you>/trello-backup/trello-backup.php 2>&1 > /var/log/trello-backup.log”
  6. Select the Schedule tab and set it to run daily
  7. Upload the contents of the working trello-backup directory to a directory of the same name in your home on the NAS
  8. Make sure everything’s working by highlighting the Trello Backup task and selecting run

Uncategorized

Comments (0)

Permalink