Categories
Tech Thinking hard, or hardly thinking?

Two-Hand Philosophy

Monday morning! Time to get to work!

This morning, I put on my morning playlist to find my inspirational message from The Rock himself, Mr. Dwayne Johnson, was missing.

I notice that the five tracks from “Dwayne Johnson Workout” were missing from my playlist on my computer. These are 30-second clips of Dwayne Johnson telling you how hard work is worth the effort. It’s 2020, folks. I listen to these multiple times every single day.

I pulled these from a bigger playlist, “Dwayne Johnson’s Progress Workout Playlist“, with his motivational spoken tracks and some POWERFUL ROCK MUSIC TO KEEP YOU GOING. I click through, and they are all greyed out and unplayable in the original playlist too. Harrumph.

I knew these worked yesterday! My stomach drops. I had a feeling I had to act quickly.

I grab my phone, put it in in Airplane Mode instantly, trying to catch it before it realizes the tracks have been removed. As silly as it seems, to be faster than a computer, I have a chance here. Android pauses nearly all apps when it thinks your phone is sitting on a desk, not plugged in. (They call it Doze.) I had also marked the whole playlist for offline playing. Spotify says they give you ~30 days in offline mode before you have to go back online to reauthorize things. Maybe I can finagle a way to keep these tracks, so The Rock can help me get my work done and tell me I’m doing a great job.

After confirming I was in Airplane Mode, I open up Spotify. 4 of the 5 tracks are playable. The first, however, was greyed out and unavailable. :/ 4 outta 5 ain’t bad, folks. We can do this!

I tweet about the tracks going missing, and do a little research. They came out about a month ago, as part of a promotion Dwayne Johnson is doing. They’re on Spotify under “Seven Bucks Productions“, which was founded by (and still CEO’ed by) Dwayne Johnson. It doesn’t look like they’re available anywhere else, and I can’t buy them.

Before I dig in, I should confirm that there isn’t a weird glitch with my account or something. I jump into Spotify support chat. They quickly confirm that these tracks were no longer available in any region, so I rule out VPNing to a different country as a helpful component of my recovery strategy. The support person won’t tell me any reason why the tracks were no longer available, if they were always going to be pulled today, or if they were coming back.

OK, so let’s say there’s some sort of glitch and Spotify thinks the tracks violate some policy, or some intern somewhere marked them as a violation and another company automatically pulled them, or some other wishy-washy excuse. How can I get these tracks back?!

The first thing most folks will think of is copying the files. I knew that the Spotify cache was encrypted. This means they had gone out of their way to protect it. I am not a full-time security engineer, but I have done more than my fair share of security work. While there are likely issues that someone who could really devote some time could dig into, I’m not particularly interested in trying the front door, if I can see a bunch of bars and locks and guards from across the street.

This is voice, not a huge orchestral recording. I should be able to get the audio in a roundabout way and still have a decent recording. I look at the Android API docs to see if apps can record other app’s audio. They can, as of Android 10! Apps can block this in their manifest, but let’s give it a shot. Screen Recorder is free, has no ads, and uses these APIs. I install it, turn up the audio quality settings, and set it to record internal audio. I start the recording, open Spotify, and play one of the aforementioned tracks. I stop the recording, play it back, and… bupkis. No audio. Looks like Spotify blocks the recording in its manifest.

Android 11 comes with a screen recorder, now! Maybe because it’s part of the system, it has different permissions and can record this audio! I add the Quick Setting tile, set it to record audio from internal sources, and… nothing. Harrumph.

OK, what about analog? Some fellow nerds call this “the a(nalog) hole“. The Pixel 2 doesn’t have a headphone jack, but I have a USB-C headphone jack adapter. I could run a 3.5mm patch cable to my laptop, grab the audio, and have *something!*

After connecting it up, I jump into Audio settings on my Macbook to switch the headphone jack to an input. Hmm, where’d the “use this jack for audio input” box go? Oh, now you can only get audio input using TRRS cables? I don’t have any way to make the audio from my phone output that way. :/ I have some TRRS adapters at my workshop (and USB audio dongles that have mic inputs) but it’s rapidly approaching Monday afternoon and I haven’t yet gotten started with my “work”.

What about decompiling the APK, modifying the manifest to enable recording, signing it, and putting it back on my phone? I’ve done deeper APK modifications in the past with some of my AOSP work. I’m not a pro-level Android APK reverse engineer, but this shouldn’t be a long job. As I think about it, however, I realize that I can’t figure out any way to do this while preserving the offline file. As far as I know, I’d have to remove the current APK before loading my modified APK onto it.

What about something even more esoteric? The avenues are limited. My phone isn’t rooted and I don’t have this song on any Spotify installations on any emulators. I take a quick look, anyway, and folks report that Spotify has a fair amount of anti-piracy/anti-reverse engineering/anti-root stuff built-in. Fine, fine.

What about through a system-level debug utility? I do know my way around AOSP documentation and I’ve set that stuff up before… I quickly find:

“For privacy the tee sink is disabled by default, at both compile-time and run-time. To use the tee sink, you will need to enable it by re-compiling, and also by setting a property. Be sure to disable this feature after you are done debugging; the tee sink should not be left enabled in production builds.”

AOSP Documentation, Audio Debugging

Alright. I take stock of my options. I think my best bet is to figure out how to get the audio out of my phone on a 3.5mm cable and record it. Many of my computers, my Macbook, even the ones running Linux, (WHO NEEDS FREEDOM IF IT CAN’T HELP THE ROCK TELL YOU THAT HE APPRECIATES YOUR HARD WORK?!?!) have combined headphone/mic jacks. After some reading, it seems that many of those have the ADC/DAC TRRS muxing done automatically by some intermediate circuitry, rather than under the direction of the operating system. I do have a computer that has a split headphone/mic jack, but my 6YO uses it all day for “distance learning”.

Rather than interrupt my son’s education (for this increasingly lengthy endeavor) for twenty minutes as I get levels set and these tracks backed up, I decide to put this on pause. It’s REDACTED o’clock on Monday morning, and I haven’t billed a single minute yet. I’ll get to work, two-hand philosophy, without Dwayne Johnson in my ears, and after my oldest is done with school, after I get some work done, I’ll make a copy of these tracks. My phone’s in Airplane Mode; I’ve got nothing to worry about. If this all fails, I have other ways of recording 3.5mm audio at my workshop, like USB audio dongles, Teensy Audio Shields, a variety of dev boards…

Before I really get to to work, I post some of this to a few places, to see if any smart folks had any other ideas. Some recommended keeping this phone in Airplane Mode forever, turning it into a Dwayne Johnson shrine. (Spotify gives you a 30-day timer when you go into offline mode, so once they learned about that, it morphed into requiring a software-defined cellular base station without internet access, with a modified clock.) Other folks recommended setting up an offline wifi network, joining my phone to it along with another computer that I’m also logged into in Spotify, seeing if I could play the track through the computer from my phone, and then using some fancy audio routing software to record it on the computer. I think that’s an amazing idea! I would want to try that *after* all else had failed, because I guess it’s possible Spotify could share “media no longer available” lists even offline, and I didn’t have any computers logged into my Spotify account that didn’t already know that those tracks shouldn’t be available.

Alright, end of the day! Let’s do this! I take my phone, still in Airplane Mode, over to my son’s computer, connect up the USB-C to 3.5mm adapter and the 3.5mm patch cable. I don’t think I’m exactly supposed to blast headphone-driving outputs into this mic input, electrically speaking, so I play a random track (the Phineas and Ferb theme, actually) while looking at the levels to get the volumes right. l use arecord to grab some audio, then play it back. My brain knows that it’s a photocopy of a photocopy of a photocopy, but it sounds fine to my Old Man Ears (and I’m trying hard to be optimistic). IT’S GO TIME, BABY!

I switch over to the list of the five Dwayne Johnson motivational tracks, and… What? My face falls. They’re all marked unavailable. How? They worked REDACTED hours ago, and it’s been in Airplane Mode since the morning!

Did my phone take itself out of Airplane Mode? Did Spotify see I was trying to get at its music and go into lockdown? Did the tracks have some sort of deadline metadata built into them? I know that, in general, you can put Spotify in offline mode and play music for days and days. It says up to a month–I’ve never tested that, but I’ve used it over long weekends without internet access. This Dwayne Johnson catastrophe happened in the span of a day, so I truly have no idea what happened.

One favorite–my mom.
Categories
Tech

Acer R11 Chromebook

I picked up a Chromebook a week ago. It was a bit under $250, has touch, a lit keyboard, a reasonable trackpad, HDMI out, USB3, an SSD, run ChromeOS and also Android apps, and the screen can flip all the way around so it’s in tablet mode.

I’ve only played with it a little, but it’s reasonably snappy and seems to do a huge portion of what I use computers for.

I’ve been playing with Termux so I can have a reasonable Python environment, and I think I’m going to try some Django development on the device itself…

Categories
Tech

Maidenhead Locator System

Amateur Radio operators compete and often keep track of how far away the people are that they make contact with. In the late 50s, folks created a grid system for Europe so people could quickly transmit approximate location. In 1980, amateurs began to adopt a new system, the Maidenhead Locator System, which describes a world-wide grid system.

I found a fun Google Maps dealie that shows you the Maidenhead Locator System overlaid a more traditional map.

Categories
Tech

“Library Extension”

I read quite a bit. One of the tools I use is “Library Extension“, a Chrome plugin that adds a little box to Amazon and Goodreads, showing the availability of the book, ebook, or audiobook at your local library.

Many libraries offer ebooks now, which can usually transfer right to a Kindle. It’s really slick!

Categories
Tech

How to get Arduino 0017 working on 64 bit Linux (including Ubuntu 9.04)

Currently, Arduino 0017 doesn’t work in 64 bit Linux, including Ubuntu 9.04. Arduino includes a copy of libRXTX, which is for 32 bit systems. Ubuntu only offers up to librxtx 2.1 something as of August 2009, and that doesn’t help either.

There’s a pretty quick way to get everything working–even the Serial Monitor!

The solution is to download Arduino 0017 for 32 bit Linux. Extract the files, and remove lib/librxtxSerial.so and RXTXcomm.jar.

Download rxtx-2.2pre2-bins from the RXTX folks. Extract the files, and copy RXTXcomm.jar and x86_64-unknown-linux-gnu/librxtxSerial.so to the Arduino lib/ directory, basically replacing the two files that came shipped with Arduino 0017.

Doing this doesn’t enable any other java application on your system to use the newer RXTX libraries, but that isn’t a problem for me. I’d much rather keep the rest of my system using packages from the repositories. The Arduino devs seem to be completely on top of the problem and the Ubuntu devs are aware as well.

Categories
Tech

Using Duplicity to make encrypted, incremental backups to Dreamhost

Recently, Dreamhost began cracking down on people using their space to store personal backups. The policy states that only website-related content is supposed to be stored in your webspace area. They provide a 50GB area for you to store any files–called the Backups user. Previously, you could only SFTP into it or something–you couldn’t rsync to it easily, so it was approximately worthless to me. However, Dreamhost has a place where you can vote for features and changes, and one of them I was voting on was allowing rsync over SSH to your backups user. I got the email this morning saying it was completed, and decided to play around with encrypted, incremental backups using Duplicity.

I use duplicity to maintain my offsite backups with a “backups buddy,” someone I trade backups with. I don’t want to allow them access to my files, even if I trust them. What if they get pwned and my files end up on the internet? No thanks!

Duplicity is Free, open source, and relies on some nice standards. It uses gpg, and has a variety of endpoints supported, like Amazon S3, Gmail, and of course things like rsync servers and file servers.

Instead of me walking you through setting up GPG and SSH keys, why don’t I point you on over to rsync.net’s tutorial on duplicity, and add a little discussion.

First off, security. They export your gpg passphrase. That doesn’t really hide the passphrase from anyone who is logged on to your local machine. Is that ok? That’s your call. Assuming your gpg keys for backups aren’t the same as your normal keys, and assuming you don’t let other people log into your machine, and assuming you run a tight shop normally, that might be ok. This doesn’t lower the security of the remote site. If the Feds or Dreamhost or whoever try to open your files from the remote (Dreamhost’s) end, without access to your computer, this doesn’t lower the security.

There is discussion around the ‘nets about turning off signing might allow you to not have to export your passphrase. I haven’t tried this, but it sounds like it might be a worthwhile tradeoff. Increasing the security of your gpg keys but eliminating the chance you can cryptographically prove your backups weren’t tampered with in their encrypted form is a call you’d have to make.

Next, Dreamhost has a 50 GB limit on the Backups user, and instead of stopping you at 50 GB, Dreamhost will charge you 10 cents a gigabyte per month. You’ll have to monitor that yourself.

To actually use their tutorial, replace the destination of the commands to backup.dreamhost.com, and replace the user with the user that Dreamhost gives you when you activate the user through the pane.

Pretty nifty, Dreamhost, pretty nifty…

Categories
Tech

Restoring to a single partition after installing Linux with Boot Camp

I recently installed Linux on my Macbook with Boot Camp. I recently decided to use a virtualization solution instead, and wanted to get that space back. When I ran Boot Camp, it wouldn’t combine my partitions together, possibly because I put Linux on there, instead of Windows, and it changed the partition type.

Using this article, I fixed it and successfully combined everything.

IF YOU FOLLOW THESE INSTRUCTIONS, AND YOU LOSE ALL YOUR DATA AND YOUR MOM MAKES YOU MOVE OUT, IT IS NOT MY FAULT.

If you decide to do what I did, please understand what you’re doing. Please read all applicable man pages, and have recent backups.

I booted into the Mac Install CD, and opened the Terminal. Using gpt show disk0 and diskutil list /dev/disk0 and diskutil info /dev/disk0, I confirmed a little bit about how my disk was being managed. My Linux partitions were /dev/disk0s3 and /dev/disk0s4, which corresponded to gtp indexes 3 and 4.

I used gpt remove -i 3 disk0 and gpt remove -i 4 disk0 to remove the gpt entries.

I ran diskutil resizeVolume disk0s2 limits to find out how large I could make the original partition. I then tried to run diskutil resizeVolume disk0s2 *maximum size* but diskutil told me it couldn’t resize it. I rebooted, back into the cd again, and ran the diskutil resizeVolume disk0s2 *maximum size*. It succeeded, I rebooted, and I had my space back.

Categories
Tech

Linux Driver to Print Index Cards on the Samsung ML-1740–Lazyweb Request

Dear internets,

I would like to be able to print index cards on my Samsung ML-1740 in Linux. It can be done in Windows. Have any of you ever gotten this to work? I’m not averse to writing code. I’ve written a CUPS backend in python. It wasn’t that bad.

I’ve looked far and wide for this, and have only found one lonely mailing list post of a solution that doesn’t really work right.

You’re my only hope!

Categories
Tech

Reading Ebooks on the Nokia 770 with FBreader

The Nokia 770 is the best ebook reader I have ever used. I use FBreader, a very versatile reader for Linux. My favorite feature is screen rotate. This lets me use the 770 sideways in my hand, and I can use my finger change pages with the up-down rocker.
In these pictures, the scratches on the screen are on a cheap screen protector. The real screen doesn’t scratch that easily, but I’m paranoid anyway. The screen is a bajillion times brighter, but the flash washed it out.
Nokia 770 with FBreader in rotated orientation

Nokia 770 with FBreader in rotated orientation, showing the rocker page control

I’ve read ebooks on a Palm IIIxe, a Palm IIIc, a Treo 600, a Treo 650, and a Nokia 770, and the 770 is the best ebook reader I have ever used. I would have bought it simply as an ebook reader. I’ve used the Nokia 770 to surf to Baen Free Library, grab an ebook off there, and read it, all without an extra computer.

The 770 is better in almost all ways than a paperback. I never lose my spot. I don’t need to turn off the light to go to bed, as the screen is backlit. I can fit more paperbacks than I could fit in a house on a single memory card. The 770 fits in a single hand, and I can change pages with the same hand. The screen is beautiful.
The only real downsides are the fact that the Nokia 770 uses electricity and costs more than a single paperback.

Categories
Tech

With a Treo 650 and a Nokia 770, I shall take over the world!

Summary in photos:

Treo 600 and Treo 650

Nokia 770 and Treo 650

My Treo 650 arrived today! It’s a free replacement of my Treo 600 that no longer makes or takes phone calls. I haven’t had a lot of time to play with the new Treo, but because it has Bluetooth, I should be able to interface the Nokia 770 and the Treo 650 easily. This means that if I’m somewhere without free Wifi, but I get cellular signal, I can easily bridge the cellular signal to my Nokia 770 through the wireless magic of Bluetooth.

I’ve been meaning to post this except of a comment I ran across on Metafilter, but I wasn’t really sure how to introduce it. The setup is that there was a post on a video from the 70’s about ARPAnet, the precursor of the internet. A Metafilter user, loquacious, posted the following. The complete comment can be found at the original post.

Even in today’s realm of nearly pervasive computing, I’m still constantly astounded. I’m barely old enough to remember Pong. I sort-of remember the dawn of personal computing. I’m old enough to remember what 75 bps/baud felt like. Yes, I know that BPS != baud, but for the purposes of that particular modem and this argument, it’s fine – especially when confronted by the 9mbit cable modem currently providing my connection. I even remember the first single file in excess of 1mb I ever downloaded. At 300 bps/baud. With interruptions and download resuming, it took something like 2-3 days. My parents were furious when they got the phone bill that month. It was a local ZUM 3 zoned toll call. That 1mb file cost our household over $500 USD! And I don’t even remember what it was!!

And yet… for years now, people throw away working computers so powerful I would have chewed off at least one of my own limbs just to possess them, way back when. Though I jest easily, I jest not about such important things. Twenty years later it’s still difficult to even comprehend the fever that gripped me back then. Even now I go all clammy thinking about how potent those feelings once were. I am using such a throwaway computer now, and I have a few more such machines I use besides. Interestingly, it’s still faster than the modern WindowsXP laptop issued to me by my work!

I now carry around a now nearly ancient – and also thrown-away – Palm IIIC that has an order of magnitude more storage then my family’s first home computer. In fact, it’s nearly equatable in feel and power to a Mac Classic 512K. But in color. In my pocket. With, again, an order of magnitude more default storage space. This now obsolete device contains a dozen novels, assorted maps and transportation schedules, and dozens upon dozens of applications ranging from music creation tools to document editors, various utilities, a very complete interactive star chart, painting/art programs, numerous games, and even an infrared meter/detection tool – and more besides.

I also carry a rather bottom-of-the-line portable phone that has better graphics, a better display – in color rather than green monochrome, more CPU and more memory then my family’s first computer. That talks wirelessly. To most of the world. Much or all of it through varieties of packet switching networks. (And yet they still won’t let me connect to the internet, browse via WAP, send a proper email, or simply do an old-school data modem connection from it. Hrmpf. I use Cricket. No frills.)

People now routinely buy – at toy stores! – what were once astronomically expensive, experimental supercomputers, now packaged in slim, small, brightly colored enclosures, simply to play silly, inconsequential little games on. Rather than, say, simulating nuclear explosions on. By all means, play on! Chess? 😉

I have nearly immediate access to more information then I could ever hope to consume or even glance at – even in a hundred lifetimes. Or even a thousand. In fact, even excluding all the boring stuff, more interesting text and data is created or transcribed and uploaded every day then I could consume in n number of lifetimes.

Barring catastrophe, I will never, ever again experience what it feels like to read every Sci Fi novel, every technical manual, every art book at the rather large central library that I spent much of my formative years growing up in.

Barring catastrophe, I will never, ever (truly) again experience what it means to be unable to communicate with someone, regardless of physical distance or time of day. Excluding the internet itself as a channel, but including the internet simply as the container for many channels, I have at my fingertips half a dozen ways of communication with a vast number of people. Hundreds, thousands, hundreds of thousands if I want to expand this to include the myriad number of ways of sending information to and receiving information from a recipient. Without even touching my stand-alone, battery powered phone.

Even without a computer and connection of my own, the cost of entry would be absolutely nothing at all if I just schlepped myself down to the local library.

—–

Amongst all this I’m still intensely aware of all of these things. They do not fade readily into the background as a much as a “given” (in the so-called civilized world) as running water fades into the background. As electricity does. As breathing itself does.

And sometimes I wonder if all this pervasive computing and connectivity will ever fade into the background for me as a given, taken for granted metabolic state, as it probably does for those just a bit younger than I.

And yet, this connectivity is already as essential as breathing is to me. Without it I would not have my current job, this apartment, even the computer itself which I now use. (Thanks you craigslist!) I wouldn’t have immediate access to transportation schedules, which maintain my job. Access to vital weather information, which helps me maintain my health and my job, and enables good planning. I haven’t touched a paper phone book in years.

I wouldn’t have entertainment. I wouldn’t have the art and music I enjoy. I wouldn’t be able to pick and choose the minds I find fascinating to interact with. I would be but a fraction of who I am today.

The internet has literally saved my hide from certain doom – if not at least prolonged discomfort – at least a dozen times. It has enabled the seeking of shelter when it was needed most, the provision of economic viability, transportation, communication, and so much more.

I would even personally argue that I owe the internet my very life – via the convoluted, twisting paths of life itself, with it’s occasionally fatal levels of frustration leading to ideations of self harm and hopelessness – upon which once a frightened call in the dark was answered so long ago, not merely by one concerned soul, but dozens upon dozens bearing not only firm, kind wishes – but bucketfuls of wisdom, strength, and love.

There is no price for such a thing. It cannot be valued, bartered, bought or sold, or even given away. The very concept and abstraction of price becomes meaningless in the face of it.

I have a hard time comparing, say, the mechanical printing press and this nebulous, cloud-like concept we call the internet. They do not sit rationally or comfortably together on the same scale in my mind. While one begat the other, one now dwarfs the other with such complexity and massiveness it is as crude a comparison as relating a simple wheel or lever to something as fantastic as a (yet) fictional faster-than-light starship.

And yet I still revel in it, awash, even drowning in such fantastic knowledge and access that – even if it were to vanish entirely, right now – my mind would gibber and reel at the incredibleness of it all for the rest of its days, forever changed. Leary was right! PC+internet > LSD!

Thanks, nerds and hackers everywhere. Have you ever been properly thanked? Or was the fact that the whole world pretty much just ran off with your countless inventions and started using them with gusto thanks enough for you?

Thanks DARPA/ARPA, and even the DoD. Thanks for letting the genie out, and making sure it couldn’t be put back in. Thanks Bell labs, thanks Xerox-PARC. Ma Bell? AT&T? G’way, you malingerers! Stern, strict great-grandfathers though you may be, a pox on you! Thanks MIT, Stanford, Berkeley, Santa Cruz and everyone else. Thanks Apple, Intel, and even Microsoft. Thanks, Linus Torvalds. Thanks, Wozniak. Thanks, Lee Felsenstein. Thanks, Google, and it’s long-lost batty great aunt who once lived in a dorm closet, Yahoo. Thank you, thank you, thank you CERN. And thanks to all the countless others I’ve missed, both large and small.

You probably won’t be able hear me among the riotous, delicious cacophony you’ve enabled, but… Thanks for everything.

posted by loquacious at 4:59 AM PST on March 19

*nods*