Saturday, December 25, 2010

Have Yourself a Merry Little Android ADB Rootkit

Quite a few people have emailed me about the post "The End of The Open Source Hardware Cambrian Age", and Chris had a few interesting observations and dialog about it on the Amp Hour - thanks (also a great set of casts in general)! Thank you... consider this the first installment of hackery to come :-)

It's one thing to have an Android. It's fun to download apps and whatnot, but at some point, you want to actually change the functionality of something, or make your own. That's the situation I found myself in recently, and so I've been hacking quite a bit on the Android DIY Starter Kit that I carry around.
 

The first thing anyone does when they get the Starter Kit or the Android Hardware Development Kit (more aimed at embedded programmers and engineers looking to learn Android) is... rootkit it, of course! I can honestly say that every device I have ever owned, I test on the basis of how quickly I can root it.
Now I just plug in the USB B mini cable into the side of the BeagleBoard. There's a USB B mini port on the BeagleTouch too, but don't plug into that one, since that's the serial debug port for the BeagleTouch.
 Here's proof that it works, and it's powered on:
 Now, it's as simple as popping up the "adb" debugger. Although I've mostly been a Windows/Linux guy up until now, I've been convinced recently to try out a lot of my development on Mac. One of the reasons, is illustrated here - all I have to do after I install the "adb toolkit". ABD is the Google set of command line utilities that allow you to communicate with an Android device at the low level - effectively "rooting it". Here's a link that describes what adb can do.

 And that's it. This is a little windows showing the results of running:
./adb shell
ls
You can see the command line interface shows the root set of directories, including my personal favorite, "sdcard" which is a symlink to the sd card storage space on Liquidware Android port. Another fun thing to do is to plug in the Android DIY Starter Kit, plug in the usb cable to the Mac, reboot, and type:
./adb shell
logcat
"Logcat" is the debugging interface, which shows all of the details of the boot-up process, for those that are hacker inclined. It's 100% pure fun - and especially helpful given you can also do things like:
./adb logcat | grep usb
From the Mac command line shell, running this command let's you see any startup debug messages associated with usb. Powerful, if I do say so myself.

Try that on an iPod or iPad :-)

3 comments:

Unknown said...

Good Morning

Thanks for all you are doing guys. I got my BeagleTouch and am looking forward to you guys releasing your Android Kernel Device Drivers. Open Source is such a great world. This is going to be fun. When are you all going to release the drivers?

Thanks
Gary

gge1 at yahoo dot com

Riddler said...

Is the Android sd card image available for download?

Unknown said...

Is the Android source repository available? At least the Android/Linux kernel git? I would greatly appreciate access asap.