Tony

Jun 262017
 

warning symbol

In general it’s a good idea to see warnings your code generates while you are testing, but if you are anything like me, you usually don’t need to see warnings generated by third party code. I was plagued by this today as I was testing a function that utilized NLTK, one of, if not the most, popular natural language processing software libraries for Python.

I’m not too proud to admit that only very rarely do my unit tests run without any failures. It’s usually difficult enough to track down the failures and errors without also being swamped by a ton of extraneous warnings generated by third party software.  Such was the case with a simple function I had written to remove accidental duplicate characters from a piece of text.

Continue reading »

Jun 092017
 

Boston Dynamics

Boston Dynamics, the MIT spin-off and self-proclaimed maker of “nightmare-inducing robots“, has been sold by its parent company Alphabet (aka Google) to the Japanese tech behemoth SoftBank. No specifics regarding the price or the terms of the sale have been announced which is not surprising given we still don’t know how much Google paid for the company when it purchased it four years ago.

Continue reading »

May 222017
 

teamwin logo

If you want to do anything at all interesting with your phone once you have unlocked the bootloader, you will need to install custom recovery software on it. And if you are going to install a custom recovery image on your phone, you are going to want to install Team Win Recovery Project, more commonly known by its abbreviation TWRP, the most popular, open source custom recovery software for Android phones.

If you are reading this post, then you likely already know the advantages of installing a custom recovery like TWRP. For those that don’t, TWRP offers a plethora of functionality that stock recoveries do not. With TWRP, you can install custom ROMs and kernels on your phone. You can backup and restore your entire phone including partitions that normal backup apps can’t touch including boot and system. You can wipe, repair and reformat partitions. And most importantly for most Android hackers, with TWRP you can root your phone by installing a super user (root) app like the very popular SuperSu by chainfire.

Continue reading »

May 192017
 

 

Moto G5 Plus unlocked

These are the steps I took in order to unlock the bootloader of my Moto G5 Plus. Ultimately I would like to install custom recovery software on it à la TWRP and root it with chainfire’s SuperSu. I’ve also included some extra notes in places that that gave me problems or I thought were tricky.  The normal caveat applies: these steps worked for me, but your mileage may vary.

Continue reading »

May 142017
 

Android Robot

The Android Debug Bridge, aka adb, has been an indispensable tool while unlocking and rooting my new Moto G5 Plus. I’ve used it dozens of times this week to push and pull files, run shells, and reboot my phone. Today, as is my habit, I ran the command adb devices after plugging my phone into my laptop, but the response I received made it obvious that I had some troubleshooting ahead of me.

tpodlaski@Alabama:~$ adb devices
List of devices attached
* daemon not running. starting it now at tcp:5037 *
* daemon started successfully *
ZY2243PNMF      unauthorized

The output of adb devices lists the devices currently connected to your computer and recognized by the adb server. In addition to a unique identifier, the state of the device is also reported. Since I’d been using adb without issue for days, I fully expected to see the G5’s state listed as device, meaning it is connected and ready to go. Instead it was unauthorized, a condition I would have to rectify before I could get any work done.

Continue reading »

May 082017
 

Android 7 Nougat

There are many reasons to use the settings found in Android phone or tablet’s Developer Options, but one of the most common is that you want to use the Android Device Bridge (ABD) or Fastboot programs on your PC to connect to your device via the command line. To use ABD or Fastboot, your phone has to have USB Debugging enabled in the Developer Options settings tab. Easy enough. I’ll just to Settings, find the Developer Options tab, and … wait, what? There is no Developer Options tab. As it turns out, most commercial ROMs do not have Developer Options enabled by default. The good news is that it is not difficult to activate them. Follow along, and I will tell you how.

Continue reading »

May 032017
 

Moto G5 Plus

Powered by a 2GHz octa-core Qualcomm Snapdragon 625, running a near-stock version of Android 7.0 Nougat and priced at less than $300 USD, the Moto G5 Plus has been crowned the best budget phone of 2017 by nearly ever reviewer to handle it. The phone is carrier unlocked, and Motorola remains one of the few phone manufactures not only open to, but actually friendly about, bootloader unlocking.  By all metrics, the Moto G5 Plus should be an Android hacker’s playground, and in my limited experience with the device so far, it really is.

Continue reading »

Mar 212017
 

Apple to Ubuntu

For almost the last 20 years, an Apple laptop of one variety or another has been my main computing device. Imagine my surprise when I finally learned today that Apple keyboards don’t have an Insert key. In almost two decades I have never needed it, but that changed this morning.

While working in my favorite Python editor, Wing IDE by Wingware, some sloppy touch typing resulted in the cursor changing from the blinking vertical line I am used to a blinking underline. That change was subtle enough that I missed it, but as soon as I began typing and the text I was entering started overwriting the existing code, I knew something was up. WTF!

Continue reading »

Mar 042017
 

Django logo

If you’ve created any forms at all using the Django web framework then you should already be familiar with Django’s CSRF middleware and the protection it provides web site’s against cross site forgery request attacks. When the middleware is active, and unless the view has this protection overridden, any form POSTed will be expected to contain a hidden field named csrfmiddlewaretoken the value of which is expected to match a similarly named field in a CSRF cookie attached to the user. Because this value is specific to a user and constantly changing as well, testing the output of webpages with forms against what is expected is difficult. What follows is the solution I am using in Django 1.10.

Continue reading »

Feb 152017
 

SWI-Prolog Logo

I know that this post will probably be of interest to about a dozen people worldwide, and even those few may be disappointed by it. Since the official SWI-Prolog packages aren’t often kept up to date and because compiling and installing SWI-Prolog from source should be both quick and straightforward, that is the recommended way to do it on Linux and other *nix systems.

If you are looking for tips, tricks or assistance with an installation problem, you likely won’t find it here. The instructions provided on the SWI-Prolog site for building and installing SWI-Prolog from source code “just worked” for me. Nevertheless, I want to document what I did, and if you are looking for the Cliff Notes version, then by all means, read on.

Continue reading »