These are some notes on how I did this, mainly so that I remember if I need to do it again, and also just in case it helps anyone else.
The first thing I did was to clone the Pebble Python PebbleKit JS implementation, used in the emulator. The original is at https://github.com/pebble/pypkjs and mine is at https://github.com/DamianMehers/pypkjs
Once I'd done that I cloned my one locally onto my Mac, and followed the instructions to build it.
It needs a copy of the Pebble qemu open source emulator to which to talk, and I started off trying to clone the Pebble qemu and build it locally. Half-way through it occurred to me that I already had a perfectly good qemu locally, since I already had the Pebble Dev Kit installed.
By running a pbw in the emulator, with the debug switch enabled, I was able to determine the magic command to start the emulator locally:
I copied the command, added some quotes around parameters that needed them, and was able to launch the emulator in one window:
The phone simulator in another window:
And then my app in another:
Once I was up and running I started making changes to the Python code. Since I've never written a line of Python before I made liberal use of existing code to make the changes I needed.
It all ended well when my pull request containing my changes to support sending binary data was accepted into the official Pebble codebase, meaning that Evernote now runs in the emulator.
I know I'm not alone in wishing there was a TimeSnapper equivalent for the Mac. Among many things it lets you look back in time at what you were doing on your computer minutes, hours or days ago.
Perfect for remembering what you were doing yesterday, and even to recover stuff that was displayed on your screen.
Inspired by TimeSnapper, I've created a small bash script that I've called MacBlackBox which takes regular screen-shots every few seconds. Every hour it combines the screenshots into an mp4 video, and every day it combines the hourly videos into daily videos, one per screen.
It is available in GitHub here. Happy to accept improvement suggestions.
If you are developing using the Moto 360 and debugging over bluetooth, you'll notice the battery plummeting quickly.
If you put the watch on a QI charging pad, the Moto 360's charging screen kicks in, and you can no longer do anything on the watch, although if you launch your app via Android Studio, it will run.
adb -s 'localhost:4444' shell
# pm disable com.motorola.targetnotif
This works for me, although I am sure it stops plenty of other things from working, so only do this on a development device, and at your own risk.