Hacker's Diary

A rough account of what I did with Emacs recently.

August 17
Missed the first half hour but watched the rest of The Fugitive which was fun and, since it predates a lot of the more popular CGI and camera techniques now in use, was a lot easier to follow despite several glasses of wine and an ongoing conversation with my visiting brother. Probably helps that I'd seen it before as well. I did not recall that Joey Pants starred in this movie, however.

August 11
So, sharing what I know and all. Getting onto your GoPro HERO+'s linux partition is straightforward enough in the end - create a file on your SD card called autoexec.ash whose contents are t app usb linux with a plain '\n' line-ending - no MSDOS text files here! - then unplug your camera from the computer, power cycle it, wait a few seconds and plug it into the USB port on the computer again. You should now get a new USB device - for me on a MacBook it shows up as /dev/tty.usbmodem14101 - which is a serial terminal for your GoPro's linux partition. Run some sort of terminal emulator (I'm using Minicom) to access this and hit enter and you should get a login prompt (buildroot login:). Enter root as the login, with no password, and ta-da, you're now root on your GoPro.

Next thing I did was brought up the WiFi in client mode: (these commands assume your wifi database is empty, which it is by default, otherwise when you run the first one it'll output a number which you can substitute in the subsequent commands instead of zero)
wpa_cli -i wlan0 add_network
wpa_cli -i wlan0 set_network 0 ssid '"YOURSSID"'
wpa_cli -i wlan0 set_network 0 psk '"YOURWIFIKEY"'
wpa_cli -i wlan0 enable_network 0
Note the weird quoting on the SSID and wifi key - single quotes surrounding double quotes surrounding the string you want to use. After a few seconds this should successfully join your wireless network and obtain an IP address, after which you should be able to ping the camera across your network. There's an Avahi setup on the camera which announces _gopro-web._tcp.local. In theory you can put the above script into a file on the SD card, then create an autoexec.ash file containing lu_util exec "/tmp/fuse_d/scriptname.sh" to launch it, but I've not tried this yet.

Note also that enabling the USB port as a USB-over-serial port means you can't download your pictures, so to get things back to normal you can replace your autoexec.ash with one that says t app usb mtp and do the disconnect, powercycle, reconnect dance again. Possibly simply deleting the autoexec.ash file and dancing will work, but I've not tried that yet either.

So now I'm gonna have to figure out why I wanted to do this; most of the writeups on what you can do with the autoexec.ash mechanism revolve around better photography which frankly I don't much care about. I am interested in identifying the source of the 2GB bug I mentioned previously and figuring out if there's a way to hack around it. Oh, and running a telnet or ssh daemon would be nifty.

August 10
So no, I can't use an AWS ARM instance out of the box for GoPro hackery because for one thing the AWS instances are 64bit and the GoPro is 32bit. Anyway, turns out GoPro themselves link to a compiler toolchain that will cross-compile on x86 Linux to produce what look to be functioning binaries for the camera. Having poked around the camera's linux partition a bit, I want to see if there's somewhere I can make persistent changes that don't require firmware reflashing - maybe there's a startup script that copies stuff around, for example (the current hackery is enabled by a startup script on the SD card; I'm looking for something that might actually persist on the camera itself, or failing that will get copied off the SD card by the linux subsystem on boot).

Also, since I've used Linux from about 1993 when it was installed from 4 floppy disks, it's a bit weird for me to be interacting with the very same operating system on a camera that's probably got more horsepower than my early 90s machine.

August 9
Evening project this week (because why not add another unfinished project to my list) is hacking about with my GoPro. It turns out that with a few simple commands you can get a serial-over-USB terminal to the "outer layer"; currently working on transmuting this somehow into access to the Linux system sitting inside it. There are tantalising hints all over the interwebs, but a lot of them aren't obvious to casual searching. It's also occured to me that since it appears to be using ARM binaries, I can probably build stuff on an AWS ARM micro instance that might just run on the embedded Linux build...

Sparkling Cyanide wasn't completely terrible but it was mauled viciously by the fashions of the eighties and there was more ham in the acting than in your average pig factory... this story works far better when it's the Poirot episode, "The Yellow Iris".

August 5
Interesting. Have I Been Pwned? tells me that my email address was included in the CaféPress data breach, but I don't have a login recorded for the site in my password safe, and the "I forgot my password" option on the site doesn't recognise the email address. Sooooo. It's possible I bought something long ago from Warren Ellis' CaféPress affiliate but it looks like the site held onto my details long after they should've removed them. Well done, team.

August 2
Billion Dollar Brain isn't a patch on the previous Harry Palmer we watched; even though I read the book I found the plot difficult to follow and Winterpants or whatever his name was came across as someone who paid a lot to get a big scene rather than a frothing loon (well, he also came across as a frothing loon, but that's beside the point). Probably not a disaster if you never see this movie.

previous month | current month

Aw, gust!