Web ADB: Simple Web-based Access to Devices

I’ve had a number of occasions where I needed direct access to an Android device that wasn’t connected to the computer in front of me. I can usually SSH into the remote host machine and use ADB to try to debug the situation. If the simple stuff doesn’t work, I eventually start using ADB screencap to get a look at what’s on the device. If I’m lucky, I can remote desktop to the host. If not, I end up copying the images back to my machine to view them.

Remote Situation
Connecting to a remote host with some Android devices attached to it

Surely there is must be an easier way.

There is! I found the OpenSTF project which basically allows you to get web-based control of the Android and iOS devices. Just install the system on the host machine and install an agent on the Android devices. It looks pretty cool, but always seemed like overkill when I was in a remote debug situation.

So I decided I’d start hacking together a really simple system in Python. I started with the simplest Python API server I could find. Then I added a fairly basic webapp front-end. The result is Web ADB.

It’s a very minimal Python API server, which also serves up a basic single-page webapp. The approach is pretty simple: run ADB commands via Python, parse the output, send the results back through the API response.

The API supports getting attached devices, getting a screenshot of a device, sending key presses and screen taps, and even rebooting a device. The webapp just uses the API to make something useful. Maybe the only cool feature is clicking on a screenshot will send a tap to the device, then update the screenshot. I have some ideas for other features, as time permits.

Leaving Mozilla

I joined Mozilla in 2006 wanting to learn how to build & ship software at a large scale, to push myself to the next level, and to have an impact millions of people. Mozilla also gave me an opportunity to build teams, lead people, and focus on products. It’s been a great experience and I have definitely accomplished my original goals, but after nearly 10 years, I have decided to move on.

One of the most unexpected joys from my time at Mozilla has been working with contributors and the Mozilla Community. The mentorship and communication with contributors creates a positive environment that benefits everyone on the team. Watching someone get excited and engaged from the process of landing code in a Firefox is an awesome feeling.

People of Mozilla, past and present: Thank you for your patience, your trust and your guidance. Ten years creates a lot of memories.

Special shout-out to the Mozilla Mobile team. I’m very proud of the work we (mostly you) accomplished and continue to deliver. You’re a great group of people. Thanks for helping me become a better leader.

It's a Small World - Orlando All Hands Dec 2015
It’s a Small World – Orlando All Hands Dec 2015

7 Things

Steven Lau tagged me with the 7 things meme. He feels I don’t blog about myself enough and that is probably true. But then, who in their right mind wants to know about me? Benjamin thinks it’s important for people to know I’m not so one dimensional 🙂

The Rules

  • Link to your original tagger(s) and list these rules in your post.
  • Share seven facts about yourself in the post.
  • Tag seven people at the end of your post by leaving their names and the links to their blogs.
  • Let them know they’ve been tagged.

The Things

  1. I wanted to build spaceships when I grew up. I have Aerospace and Mechanical Engineering degrees to prove it. But alas, the Wall came down and defense contracts dried up. So I started looking for work using my hobby skills.
  2. I worked at Enron. Yes, that Enron. It was an amazing journey through Corporate America and I wouldn’t trade those experiences for anything. Of course, I knew they were selling lies and my 401k was safe. The stories I could tell…
  3. I worked on a project that used MSHTML (embedded IE) very heavily. We did some amazing things using MSHTML. Much of this blog (pre-2007) was about the subject.
  4. I married my wife in Las Vegas at the Little Church of the West.
  5. I always wanted to learn to play guitar. Now I have RockBand
  6. I am jealous of people who are multi-lingual.
  7. I never ate many fruits or vegetables, but I now find myself forced to set a good example for my two daughters.

Tags

Here I will break the rules. I was only doing this for the extra dimensions. I finally get to use the “Personal” tag!

Reboot

I recently accepted a job offer from Mozilla Corporation. Today, I start working as an extension evangelist / consultant – helping extension developers be more successful, productive and happy.

Mozilla has some really smart people and cool technologies. I can’t wait to get started.

Update: He really is a special guy. Thanks Mike.